/* ============================================
   DESIGN SYSTEM & CSS VARIABLES
   ============================================ */

:root {
    /* Colors - Black & White Minimalism */
    --color-primary-bg: #FFFFFF;    /* Pure white background */
    --color-secondary-bg: #FFFFFF;  /* White for cards */
    --color-tertiary-bg: #F0F0F0;   /* Light gray for image placeholders */
    
    --color-primary-text: #000000;  /* Pure black */
    --color-secondary-text: #000000;
    --color-tertiary-text: #555555;
    
    --color-accent: #000000;        /* Black as accent */
    --color-accent-hover: #000000;
    --color-accent-light: #F0F0F0;  /* Light gray tint */
    
    --color-border: #000000;
    --color-border-light: #DDDDDD;
    
    /* Typography */
    --font-heading: 'Syne', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Fira Code', monospace;
    
    /* Spacing Scale (8px base) */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Transitions */
    --transition: all 0.3s ease;
    --transition-fast: all 0.2s ease;
    
    /* Shadows (subtle) */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* ============================================
   GLOBAL STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-primary-text);
    background-color: var(--color-primary-bg);
    line-height: 1.6;
    font-size: 16px;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--space-md);
}

h1 {
    font-size: 48px;
    margin-bottom: var(--space-lg);
}

h2 {
    font-size: 36px;
    margin-bottom: var(--space-lg);
}

h3 {
    font-size: 24px;
    margin-bottom: var(--space-md);
}

h4 {
    font-size: 18px;
    margin-bottom: var(--space-sm);
}

p {
    margin-bottom: var(--space-md);
    color: var(--color-secondary-text);
    font-size: 16px;
    line-height: 1.7;
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--color-accent-hover);
}

strong {
    font-weight: 600;
    color: var(--color-primary-text);
}

/* ============================================
   LAYOUT: Container & Grid
   ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    width: 100%;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.header {
    position: sticky;
    top: 0;
    background-color: #000000;
    border-bottom: 2px solid #000000;
    z-index: 100;
    box-shadow: none;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-md) var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand, .logo {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    transition: var(--transition-fast);
    letter-spacing: -0.5px;
}

.logo:hover {
    color: #ffffff;
    opacity: 0.7;
}

/* Brand image styling — logo is white-on-black, sits naturally on black header */
.brand-logo {
    display: inline-block;
    width: 140px;
    height: auto;
    transition: opacity 0.2s ease;
    filter: none;
}

.brand:hover .brand-logo,
.brand:focus .brand-logo {
    opacity: 0.7;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--space-xl);
    align-items: center;
}

.nav-link {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffffff;
    transition: var(--transition-fast);
    position: relative;
    text-decoration: none;
}

.nav-link:hover {
    color: #ffffff;
    opacity: 0.6;
}

/* Underline animation on hover */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #ffffff;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu toggle (hidden on desktop) */
.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
    gap: 4px;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background-color: #ffffff;
    transition: var(--transition-fast);
    border-radius: 0;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    padding: 0 var(--space-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 2px solid #000000;
    /* taller hero with optional background image; place a file at images/hero.jpg to use a custom image */
    min-height: 520px;
    background-color: #111111;
    background-image: url('../images/hero.jpg'), linear-gradient(135deg, #111111 0%, #222222 100%);
    background-size: cover;
    background-position: center;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero::before {
    display: block;
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    pointer-events: none;
}

/* Center inner content and ensure readable white text */
.hero .container {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-3xl) 0;
}

.hero .hero-title,
.hero .hero-subtitle,
.hero {
    color: #ffffff;
}

/* White CTA with black text when inside hero */
.hero .cta-button {
    background-color: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.hero .cta-button:hover {
    background-color: #000000;
    color: #ffffff;
    border-color: #000000;
}

.hero-title {
    font-size: 56px;
    color: var(--color-primary-text);
    margin-bottom: var(--space-lg);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
    font-weight: 700;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 24px;
    color: var(--color-secondary-text);
    margin-bottom: var(--space-md);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-description {
    font-size: 18px;
    color: rgb(187, 187, 187);
    margin-bottom: var(--space-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   CALL-TO-ACTION BUTTONS
   ============================================ */

.cta-button {
    display: inline-block;
    padding: 14px 32px;
    background-color: #000000;
    color: #ffffff;
    border: 2px solid #000000;
    border-radius: 0;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    text-decoration: none;
    box-shadow: none;
    position: relative;
}

.cta-button:hover {
    background-color: #ffffff;
    color: #000000;
    box-shadow: none;
    transform: none;
}

.cta-button:active {
    transform: none;
}

/* ============================================
   PROJECTS SECTION
   ============================================ */

.projects {
    padding: var(--space-3xl) var(--space-lg);
    background-color: var(--color-primary-bg);
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-2xl);
    font-size: 42px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-2xl);
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================
   PROJECT CARDS
   ============================================ */

.project-card {
    background-color: var(--color-secondary-bg);
    border: 2px solid var(--color-primary-text);
    border-radius: 0;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: none;
}

.project-card:hover {
    box-shadow: 8px 8px 0px #000000;
    transform: translate(-4px, -4px);
    border-color: #000000;
}

.project-link {
    display: block;
    color: inherit;
    text-decoration: none;
    height: 100%;
}

.project-image {
    width: 100%;
    height: 280px;
    background-color: var(--color-tertiary-bg);
    overflow: hidden;
    border-bottom: 1px solid var(--color-border);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-info {
    padding: var(--space-lg);
}

.project-title {
    font-size: 20px;
    margin-bottom: var(--space-sm);
    color: var(--color-primary-text);
}

/* Dark section card overrides (work.html Creative Work section) */
.category-section.dark .project-card {
    background-color: transparent;
    border-color: rgba(255,255,255,0.25);
}

.category-section.dark .project-card:hover {
    box-shadow: 8px 8px 0px #ffffff;
    border-color: #ffffff;
    transform: translate(-4px, -4px);
}

.category-section.dark .project-image {
    border-bottom-color: rgba(255,255,255,0.15);
    background-color: #111111;
}

.category-section.dark .project-title {
    color: #ffffff;
}

.category-section.dark .project-type {
    color: rgba(255,255,255,0.5);
}

/* PDF viewer mobile */
.pdf-viewer iframe {
    min-height: 500px;
}

.pdf-download-fallback {
    display: none;
    text-align: center;
    padding: var(--space-2xl);
    border: 2px solid #000000;
}

@media (max-width: 600px) {
    .pdf-viewer iframe {
        display: none;
    }
    .pdf-download-fallback {
        display: block;
    }
}

/* Case study meta mobile fix */
@media (max-width: 600px) {
    .case-study-meta {
        flex-direction: column;
        align-items: center;
        gap: var(--space-lg);
    }
}

.project-type {
    font-size: 14px;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* ============================================
   ABOUT SECTION
   ============================================ */

.about {
    padding: var(--space-3xl) var(--space-lg);
    background-color: var(--color-tertiary-bg);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
}

/* New about layout */
.about-top {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-3xl);
    max-width: 1200px;
    margin: 0 auto var(--space-3xl);
    align-items: start;
}

.about-photo {
    flex-shrink: 0;
}

.about-photo img {
    display: block;
    width: 380px;
    height: auto;
    object-fit: cover;
    border: 2px solid #000000;
}

.about-meta-block {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: var(--space-2xl);
    border-top: 1px solid var(--color-border-light);
}

.meta-row-top {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: var(--space-3xl);
    margin-bottom: var(--space-2xl);
}

.meta-row-top .meta-item {
    text-align: center;
    min-width: 200px;
}

.meta-row-bottom {
    display: flex;
    justify-content: center;
}

.meta-row-bottom .meta-item {
    text-align: center;
    max-width: 700px;
}

.about-text p {
    display: block;
    max-width: 900px;
    margin: var(--space-lg) auto 0;

}

.about-meta {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xl);
}

.about-image {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-image img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.centered-meta {
    display: flex;
    justify-content: center;
    gap: var(--space-3xl);
    margin-top: var(--space-lg);
}

.centered-meta .meta-item {
    text-align: center;
}

/* Overlayed about text on top of image */
/* Ensure normal paragraph spacing */
.about-text p {
    margin-bottom: var(--space-lg);
}

.meta-item h3 {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-secondary-text);
    margin-bottom: var(--space-sm);
}

.meta-item p {
    font-size: 18px;
    color: var(--color-primary-text);
    margin: 0;
}

/* Meta layout: upper row (two columns) and centered skills below */
.meta-upper {
    display: flex;
    gap: var(--space-3xl);
    justify-content: center;
    align-items: flex-start;
}

.meta-upper .meta-item {
    min-width: 220px;
    max-width: 380px;
    text-align: left;
}

.meta-divider {
    height: 1px;
    width: 100%;
    background-color: rgba(0,0,0,0.5);
    margin: var(--space-lg) 0;
}

.meta-lower {
    display: flex;
    justify-content: center;
    align-items: center;
}

.meta-lower .meta-item {
    max-width: 760px;
    text-align: center;
}

/* Add vertical whitespace around the meta block */
.about-meta {
    padding: 64px 0;
}

@media (max-width: 768px) {
    .meta-upper {
        flex-direction: column;
        gap: var(--space-md);
        align-items: center;
    }
    .meta-upper .meta-item {
        text-align: center;
        max-width: 100%;
    }
}

/* ============================================
   CONTACT SECTION
   ============================================ */

.contact {
    padding: var(--space-3xl) var(--space-lg);
    background-color: var(--color-primary-bg);
}

.contact-intro {
    text-align: center;
    max-width: 600px;
    margin: 0 auto var(--space-2xl);
    font-size: 18px;
}

.contact-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    max-width: 1000px;
    margin: 0 auto;
    align-items: start;
}

.contact-left {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xl);
    padding-top: var(--space-sm);
}

.contact-info-block h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-tertiary-text);
    margin-bottom: var(--space-sm);
}

.contact-info-block p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-primary-text);
    margin: 0;
}

.email-link {
    font-size: 18px;
    font-weight: 700;
    color: #000000;
    word-break: break-all;
    text-decoration: none;
    border-bottom: 2px solid #000000;
    transition: opacity 0.2s ease;
    padding-bottom: 2px;
}

.email-link:hover {
    opacity: 0.5;
    text-decoration: none;
}

.contact-socials {
    display: flex;
    gap: var(--space-lg);
}

.social-link {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #000000;
    padding-bottom: 2px;
    transition: opacity 0.2s ease;
}

.social-link:hover {
    opacity: 0.5;
}

.contact-email {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
}

.contact-email h3 {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-md);
}

.contact-email .email-intro {
    margin-bottom: var(--space-md);
    color: var(--color-tertiary-text);
}

/* ============================================
   FORM STYLING
   ============================================ */

.contact-form {
    display: flex;
    flex-direction: column;
}

.contact-form input,
.contact-form textarea {
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    border: 2px solid #000000;
    border-radius: 0;
    font-family: var(--font-body);
    font-size: 16px;
    background-color: #ffffff;
    color: #000000;
    transition: box-shadow 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 4px 4px 0px #000000;
}

.contact-form textarea {
    resize: vertical;
    min-height: 150px;
}

.contact-form button {
    align-self: flex-start;
    padding: 12px 28px;
    border-radius: 0;
}

/* Make the email block feel like a callout */
.contact-email .email-link {
    padding: 8px 12px;
    display: inline-block;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background-color: #000000;
    border-top: 2px solid #000000;
    padding: var(--space-3xl) var(--space-lg) 0;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: var(--space-3xl);
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: var(--space-3xl);
    border-bottom: 1px solid rgba(255,255,255,0.15);
    align-items: start;
}

/* Left: nav */
.footer-nav h4,
.footer-contact h4 {
    font-family: var(--font-heading);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.4);
    margin-bottom: var(--space-lg);
}

.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.footer-nav ul li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.footer-nav ul li a:hover {
    opacity: 1;
}

/* Center: logo + tagline */
.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-lg);
}

.footer-brand img {
    width: 120px;
    height: auto;
    opacity: 0.9;
}

.footer-brand p {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    margin: 0;
    max-width: 200px;
    line-height: 1.6;
}

.footer-brand .footer-cta {
    display: inline-block;
    padding: 10px 24px;
    border: 2px solid #ffffff;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
    margin-top: var(--space-sm);
}

.footer-brand .footer-cta:hover {
    background-color: #ffffff;
    color: #000000;
}

/* Right: contact */
.footer-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.footer-contact-email {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    opacity: 0.85;
    border-bottom: 1px solid rgba(255,255,255,0.4);
    padding-bottom: 2px;
    transition: opacity 0.2s ease;
    margin-bottom: var(--space-2xl);
    display: inline-block;
}

.footer-contact-email:hover {
    opacity: 1;
}

.footer-socials {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    align-items: flex-end;
}

.footer-socials a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.footer-socials a:hover {
    opacity: 1;
}

/* Bottom bar */
.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-lg) 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    font-size: 12px;
    color: rgba(255,255,255,0.35);
    margin: 0;
}

.footer-links {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: var(--space-2xl);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.footer-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    padding-bottom: 2px;
    transition: border-color 0.2s ease, opacity 0.2s ease;
}

.footer-link:hover {
    opacity: 0.6;
    border-bottom-color: #ffffff;
}

.footer-note {
    font-style: italic;
}

@media (max-width: 768px) {
    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-contact {
        align-items: center;
        text-align: center;
    }

    .footer-socials {
        align-items: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
    }
}

/* ============================================
   ANIMATIONS & TRANSITIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Apply animations to sections */
.hero {
    animation: fadeInUp 0.8s ease-out;
}

.projects {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.about {
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.contact {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.section-title {
    animation: fadeInUp 0.6s ease-out;
}

.project-card {
    animation: fadeInUp 0.6s ease-out;
}

.project-card:nth-child(2) {
    animation-delay: 0.1s;
}

.project-card:nth-child(3) {
    animation-delay: 0.2s;
}

.nav-link {
    animation: fadeIn 0.6s ease-out;
}

.about-text {
    animation: slideInFromLeft 0.8s ease-out;
}

.about-meta {
    animation: slideInFromRight 0.8s ease-out;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablets (768px and below) */
@media (max-width: 768px) {
    h1 {
        font-size: 36px;
    }

    h2 {
        font-size: 28px;
    }

    .hero-title {
        font-size: 40px;
    }

    .hero-subtitle {
        font-size: 20px;
    }

    .nav {
        position: relative;
    }

    .nav-menu {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #000000;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, padding 0.35s ease;
        gap: 0;
        z-index: 99;
    }

    .nav-menu.active {
        max-height: 400px;
        padding: var(--space-lg) 0;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
    }

    .nav-menu li a {
        display: block;
        padding: var(--space-md) var(--space-lg);
        font-size: 16px;
        border-bottom: none;
    }

    .nav-menu li a::after {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    /* Hamburger → X animation */
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: var(--space-xl);
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .about-top {
        grid-template-columns: 1fr;
    }

    .about-photo img {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }

    .meta-row-top {
        flex-direction: column;
        align-items: center;
        gap: var(--space-lg);
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .contact-email {
        border-right: none;
    }

    .contact-socials {
        flex-direction: column;
        gap: var(--space-md);
    }

    .hero {
        padding: var(--space-2xl) var(--space-lg);
    }

    .projects,
    .about,
    .contact {
        padding: var(--space-2xl) var(--space-lg);
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    :root {
        font-size: 15px;
    }

    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 24px;
    }

    h3 {
        font-size: 20px;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .hero-description {
        font-size: 16px;
    }

    .hero {
        padding: var(--space-xl) var(--space-md);
    }

    .projects,
    .about,
    .contact {
        padding: var(--space-xl) var(--space-md);
    }

    .container {
        padding: 0 var(--space-md);
    }

    .nav-container {
        padding: var(--space-sm) var(--space-md);
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .project-image {
        height: 200px;
    }

    .section-title {
        font-size: 28px;
        margin-bottom: var(--space-xl);
    }

    .cta-button {
        padding: 12px 24px;
        font-size: 15px;
    }

    .contact-content {
        gap: var(--space-xl);
    }

    .email-link {
        font-size: 18px;
    }

    .nav-menu {
        gap: 0;
    }
}

/* ============================================
   UTILITY & ACCESSIBILITY
   ============================================ */

/* Skip to main content link (accessibility) */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background-color: var(--color-accent);
    color: white;
    padding: var(--space-sm) var(--space-md);
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid #000000;
    outline-offset: 2px;
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Smooth animations */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}