* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #c6cef7;
    --secondary-color: #d4b78c;
    --outline-color: #797979;
    --text-color: #e7e3da;
    --bg-color: #2e2e2e;
    --spacing-unit: 1rem;
    --max-width: 1200px;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
        scroll-padding-top: 80px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-padding-top: 80px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 1.5px solid var(--secondary-color);
    outline-offset: 2px;
    border-radius: 4px;
    background: #a88256;
}

header {
    background: #292929;
    padding: var(--spacing-unit);
    box-shadow: 0 4px 16px rgba(61, 61, 61, 0.63);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 calc(var(--spacing-unit) * 2);
}

@media (max-width: 1024px) {
    nav {
        padding: 0px;
    }

}

@media (min-width: 1024px) {
    nav {
        padding: 0 calc(var(--spacing-unit) * 2);
    }

}


nav ul {
    list-style: none;
    display: flex;
    gap: calc(var(--spacing-unit) * 3);
    justify-content: flex-start;
    margin-left: calc(var(--spacing-unit) * 1.7); 
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    padding: 4px;
}

nav a:hover {
    color: var(--secondary-color);
    outline: 1.5px solid var(--secondary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: calc(var(--spacing-unit) * 2);
}

section {
    margin-bottom: calc(var(--spacing-unit) * 4);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-unit);
}

h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing-unit);
}

h3 {
    font-size: 1.5rem;
    margin-bottom: calc(var(--spacing-unit) / 2);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.about-container {
    display: flex;
    gap: calc(var(--spacing-unit) * 3);
    align-items: flex-start;
    margin-top: calc(var(--spacing-unit) * 2);
}

.subtitle-heading {
    border-bottom: 2px solid var(--secondary-color);
}

.headshot {
    width: 235px;
    height: 235px;
    border-radius: 50%; 
    object-fit: cover;
    border: 2px solid var(--secondary-color);
    flex-shrink: 0; 
}

.about-content {
    flex: 1;
    border: 1px solid var(--outline-color);
    border-radius: 8px;
    padding: 10px;
    background: rgb(65, 63, 63);
}

.about-content p {
    margin-bottom: var(--spacing-unit);
    line-height: 1.2; 
}

@media (max-width: 768px) {
    .about-container {
        flex-direction: column;
        align-items: left;
        text-align: left;
    }
    
    .headshot {
        margin-bottom: var(--spacing-unit);
    }
}

.projects-grid {
    display: flex;
    flex-wrap: wrap;
    gap: calc(var(--spacing-unit) * 2);
    margin-top: calc(var(--spacing-unit) * 2);
}

.project-card {
    flex: 1 1 400px;
    border: 1px solid #797979;
    border-radius: 8px;
    background: rgb(65, 63, 63);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden; 
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(179, 179, 179, 0.849);
}

.project-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.project-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin-bottom: 0; 
}

.project-content {
    padding: calc(var(--spacing-unit) * 1.5);
}

.project-card h3 {
    margin-bottom: calc(var(--spacing-unit) / 2);
    color: var(--text-color);
}

.project-card p {
    color: #acacac;
    margin-bottom: 0; 
}


form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-unit);
    max-width: 600px;
}

label {
    font-weight: 500;
}

input,
textarea {
    padding: calc(var(--spacing-unit) / 2);
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

button {
    padding: calc(var(--spacing-unit) / 2) var(--spacing-unit);
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
}

button:hover {
    opacity: 0.9;
}

.resume-container {
    background: #474646;
    border-radius: 8px;
    padding: calc(var(--spacing-unit) * 2);
    margin-top: calc(var(--spacing-unit) * 2);
    border: 1px solid #797979;
    border-radius: 8px;
}

.resume-section {
    margin-bottom: calc(var(--spacing-unit) * 3);
}

.resume-section:last-of-type {
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.resume-section h3 {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: calc(var(--spacing-unit) / 2);
    margin-bottom: var(--spacing-unit);
}

.resume-item {
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.resume-item h4 {
    font-size: 1.25rem;
    margin-bottom: calc(var(--spacing-unit) / 4);
}

.resume-item .company {
    color: #cecece;
    font-style: italic;
    margin-bottom: calc(var(--spacing-unit) / 2);
}

.resume-item ul {
    margin-left: calc(var(--spacing-unit) * 1.5);
    margin-top: calc(var(--spacing-unit) / 2);
}

.resume-item li {
    margin-bottom: calc(var(--spacing-unit) / 4);
    color: var(--text-color);
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: calc(var(--spacing-unit) / 2);
}

.skill-tag {
    background: rgb(78, 71, 71);
    color: var(--text-color);
    padding: calc(var(--spacing-unit) / 2) var(--spacing-unit);
    border-radius: 4px;
    border: 1px solid #8a7e74;
    font-size: 0.9rem;
}

.resume-download {
    display: inline-block;
    margin-top: var(--spacing-unit);
    padding: calc(var(--spacing-unit) / 2) calc(var(--spacing-unit) * 1.5);
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: opacity 0.2s;
}

.resume-download:hover {
    opacity: 0.7;
    box-shadow: 0 2px 8px rgba(179, 179, 179, 0.849);
}

footer {
    background: #2c2c2c;
    padding: calc(var(--spacing-unit) * 2);
    text-align: center;
    margin-top: calc(var(--spacing-unit) * 4);
}

.project-detail {
    max-width: var(--max-width); 
    margin: 0 auto;
}

.back-button {
    display: inline-block;
    margin-bottom: calc(var(--spacing-unit) * 2);
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.2s;
}

.back-button:hover {
    transform: translateX(-4px);
}

.project-detail h1 {
    margin-bottom: calc(var(--spacing-unit) / 2);
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: calc(var(--spacing-unit) * 2);
    padding-bottom: calc(var(--spacing-unit));
    border-bottom: 2px solid var(--secondary-color);
}

.project-date {
    color: #a0a0a0;
    font-style: italic;
}

.project-external-links {
    display: flex;
    gap: var(--spacing-unit);
}

.project-external-links a {
    padding: calc(var(--spacing-unit) / 2) var(--spacing-unit);
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.project-external-links a:hover {
    opacity: 0.9;
}

.project-gallery {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 2);
    margin-bottom: calc(var(--spacing-unit) * 3);
}

.project-gallery-main {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 2);
    margin-bottom: calc(var(--spacing-unit) * 3);
}

.project-gallery img {
    width: 100%;
    border-radius: 8px;
    border: 2px solid var(--secondary-color);
}

.project-gallery-main img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--secondary-color);
    max-width: 800px;
}

.project-description,
.project-technologies,
.project-learnings {
    margin-bottom: calc(var(--spacing-unit) * 3);
}

.text-box-design {
    border: 1px solid var(--outline-color);
    border-radius: 8px;
    padding: 10px;
    background: rgb(65, 63, 63);
}

.project-detail h2 {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-unit);
    color: var(--secondary-color);
}

.project-detail p {
    line-height: 1.8;
    margin-bottom: var(--spacing-unit);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: calc(var(--spacing-unit) / 2);
}

@media (max-width: 768px) {
    .project-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-unit);
    }
}




@media (min-width: 768px) {
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2.5rem;
    }
}

@media (min-width: 1024px) {
    main {
        padding: calc(var(--spacing-unit) * 4);
    }
}

@media (min-width: 1250px) {
    main {
        border-bottom: 1px solid #797979;
        border-left: 1px solid #797979;
        border-right: 1px solid #797979;
        border-bottom-left-radius: 8px;
        border-bottom-right-radius: 8px;
        box-shadow: 0 1px 36px rgba(141, 141, 141, 0.849);
    }
}