/* ===== Modern Minimal Portfolio ===== */

:root {
    /* Muted Earth Tones - Light mode */
    --bg: #FAF9F6;
    --bg-alt: #F5F3EF;
    --text: #1d1d1f;
    --text-secondary: #6b6b6b;
    --accent: #5c7c5c;
    --border: #e0ddd8;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --shadow-color-strong: rgba(0, 0, 0, 0.12);
    
    /* Gradient colors - Light mode */
    --gradient-1: rgba(200, 215, 190, 0.5);
    --gradient-2: rgba(230, 220, 205, 0.6);
    --gradient-3: rgba(205, 175, 140, 0.2);
    --grain-opacity: 0.045;
    
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif: 'Instrument Serif', Georgia, serif;
    
    --max-width: 680px;
    --spacing: clamp(60px, 10vh, 120px);
    
    /* Animation timing */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== Dark Mode (System Preference) ===== */
@media (prefers-color-scheme: dark) {
    :root {
        /* Muted Earth Tones - Dark mode */
        --bg: #121512;
        --bg-alt: #1A1918;
        --text: #f0efe9;
        --text-secondary: #9a9890;
        --accent: #8fac8f;
        --border: #2a2926;
        --shadow-color: rgba(0, 0, 0, 0.25);
        --shadow-color-strong: rgba(0, 0, 0, 0.35);
        
        /* Gradient colors - Dark mode */
        --gradient-1: rgba(35, 50, 35, 0.6);
        --gradient-2: rgba(50, 45, 35, 0.5);
        --gradient-3: rgba(100, 80, 60, 0.15);
        --grain-opacity: 0.03;
    }
}

/* ===== Dark Mode (Manual Toggle) ===== */
[data-theme="dark"] {
    /* Muted Earth Tones - Dark mode */
    --bg: #121512;
    --bg-alt: #1A1918;
    --text: #f0efe9;
    --text-secondary: #9a9890;
    --accent: #8fac8f;
    --border: #2a2926;
    --shadow-color: rgba(0, 0, 0, 0.25);
    --shadow-color-strong: rgba(0, 0, 0, 0.35);
    
    /* Gradient colors - Dark mode */
    --gradient-1: rgba(35, 50, 35, 0.6);
    --gradient-2: rgba(50, 45, 35, 0.5);
    --gradient-3: rgba(100, 80, 60, 0.15);
    --grain-opacity: 0.03;
}

[data-theme="light"] {
    /* Muted Earth Tones - Light mode */
    --bg: #FAF9F6;
    --bg-alt: #F5F3EF;
    --text: #1d1d1f;
    --text-secondary: #6b6b6b;
    --accent: #5c7c5c;
    --border: #e0ddd8;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --shadow-color-strong: rgba(0, 0, 0, 0.12);
    
    /* Gradient colors - Light mode */
    --gradient-1: rgba(200, 215, 190, 0.5);
    --gradient-2: rgba(230, 220, 205, 0.6);
    --gradient-3: rgba(205, 175, 140, 0.2);
    --grain-opacity: 0.045;
}

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

html {
    font-size: 17px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--accent);
    color: white;
}

/* ===== Animated Grain Background ===== */
.grain-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

/* Gradient layer underneath */
.gradient-layer {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 60% at 10% 20%, var(--gradient-1) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 90% 15%, var(--gradient-2) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 50% 90%, var(--gradient-3) 0%, transparent 45%);
    animation: gradient-shift 25s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% {
        opacity: 1;
        transform: scale(1) translate(0, 0);
    }
    33% {
        opacity: 0.85;
        transform: scale(1.03) translate(1%, -1%);
    }
    66% {
        opacity: 0.95;
        transform: scale(0.98) translate(-0.5%, 0.5%);
    }
}

/* Grain overlay */
.grain-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: var(--grain-opacity);
    animation: grain-shift 8s steps(10) infinite;
}

@keyframes grain-shift {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-2%, -2%); }
    20% { transform: translate(2%, 2%); }
    30% { transform: translate(-1%, 2%); }
    40% { transform: translate(2%, -1%); }
    50% { transform: translate(-2%, 1%); }
    60% { transform: translate(1%, -2%); }
    70% { transform: translate(-1%, 0%); }
    80% { transform: translate(0%, 2%); }
    90% { transform: translate(1%, 0%); }
}

/* ===== Links & Interaction Animations ===== */
a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s var(--ease-out-quart), opacity 0.3s var(--ease-out-quart);
}

a:hover {
    opacity: 0.8;
}

/* ===== Layout ===== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

section {
    padding: var(--spacing) 0;
}

/* ===== Corner Controls ===== */
.corner-controls {
    position: fixed;
    top: 24px;
    right: 32px;
    z-index: 100;
}

/* ===== Theme Toggle ===== */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s var(--ease-out-quart);
    padding: 0;
}

.theme-toggle:hover {
    color: var(--text);
}

.theme-toggle svg {
    width: 15px;
    height: 15px;
}

.theme-toggle .moon-icon {
    display: none;
}

[data-theme="dark"] .theme-toggle .sun-icon {
    display: none;
}

[data-theme="dark"] .theme-toggle .moon-icon {
    display: block;
}

/* ===== Page Links Section ===== */
.page-links-section {
    padding: 0 0 clamp(60px, 12vh, 140px);
}

.page-links {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.page-link-item {
    border-top: 1px solid var(--border);
    opacity: 0;
    animation: fadeIn 0.6s var(--ease-out-expo) both;
}

.page-link-item:nth-child(1) { animation-delay: 1.2s; }
.page-link-item:nth-child(2) { animation-delay: 1.35s; }
.page-link-item:nth-child(3) { animation-delay: 1.5s; }
.page-link-item:nth-child(4) { animation-delay: 1.65s; }
.page-link-item:nth-child(5) { animation-delay: 1.8s; }

.page-link-item:last-child {
    border-bottom: 1px solid var(--border);
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 18px 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-family: var(--font-serif);
    font-size: clamp(1.4rem, 4vw, 2.2rem);
    font-weight: 400;
    letter-spacing: -0.01em;
    text-align: left;
    transition: color 0.25s var(--ease-out-quart),
                padding-left 0.25s var(--ease-out-quart);
}

.page-link:hover,
.page-link[aria-expanded="true"] {
    color: var(--text);
}

.page-link:hover {
    padding-left: 6px;
}

.link-arrow {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform 0.35s var(--ease-out-quart), opacity 0.25s ease;
    opacity: 0.4;
}

.page-link:hover .link-arrow {
    opacity: 0.8;
}

.page-link[aria-expanded="true"] .link-arrow {
    transform: rotate(180deg);
    opacity: 1;
}

/* Accordion drawer */
.section-drawer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.45s var(--ease-out-expo);
}

.section-drawer.open {
    grid-template-rows: 1fr;
}

.section-drawer-inner {
    overflow: hidden;
}

.section-drawer-inner > *:first-child {
    margin-top: 0;
}

.section-drawer-inner > * {
    padding-bottom: 0;
}

/* Add spacing inside drawer */
.section-drawer.open .section-drawer-inner {
    padding-bottom: 32px;
}

.drawer-external-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
    text-decoration: none;
    text-transform: lowercase;
    transition: color 0.2s ease;
}

.drawer-external-link:hover {
    color: var(--text);
}

.drawer-external-link svg {
    width: 12px;
    height: 12px;
}

/* ===== Hero ===== */
/* Oversized Name Typography */
.hero-name-container {
    width: 100%;
    margin-bottom: 40px;
}

.hero-name {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 15vw, 11rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 0.95;
    color: var(--accent);
    margin: 0 0 16px 0;
    margin-left: -0.04em;
    user-select: none;
    animation: nameColorFade 2.5s ease-out 0.8s forwards;
}

@keyframes nameColorFade {
    from {
        color: var(--accent);
    }
    to {
        color: var(--text);
    }
}

.hero-name-line {
    display: block;
    opacity: 0;
    animation: heroNameEnter 1.2s var(--ease-spring) forwards;
}

.hero-name-line:first-child {
    animation-delay: 0.2s;
}

.hero-name-lobo {
    display: flex;
    align-items: center;
    gap: 0.15em;
    animation-delay: 0.35s;
}

@keyframes headshotBlossom {
    0%   { transform: scale(0); opacity: 0; }
    60%  { transform: scale(1.12); opacity: 1; }
    80%  { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* Headshot - inline with LOBO */
.hero-name-lobo .headshot {
    width: 0.75em !important;
    height: 0.75em !important;
    max-width: none;
    max-height: none;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    flex-shrink: 0;
    vertical-align: middle;
    animation: headshotBlossom 0.55s cubic-bezier(0.34, 1.4, 0.64, 1) both;
    animation-delay: 1.5s;
}

.hero-role {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.35em;
    flex-wrap: wrap;
    opacity: 0;
    animation: heroRoleEnter 0.8s var(--ease-out-expo) forwards;
    animation-delay: 0.6s;
}

/* Hero Content */
.hero-content {
    position: relative;
}

.hero-body {
    max-width: 480px;
}

.hero .subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 28px;
    line-height: 1.65;
}

/* Headshot - in about drawer */
.section-drawer-inner .headshot {
    width: 100px;
    height: 100px;
    max-width: 100px;
    max-height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
    transition: transform 0.5s var(--ease-out-expo), 
                box-shadow 0.5s var(--ease-out-expo),
                border-color 0.3s ease;
    flex-shrink: 0;
    margin-bottom: 20px;
    display: block;
}

/* ===== Experience ===== */
.experience-item {
    margin-bottom: 48px;
}

.experience-item:last-child {
    margin-bottom: 0;
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.experience-header h3 {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.experience-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: var(--font-body);
    letter-spacing: 0.01em;
}

.experience-role {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    letter-spacing: 0.01em;
}

.experience-item ul {
    list-style: none;
}

.experience-item li {
    font-size: 0.95rem;
    color: var(--text);
    padding-left: 20px;
    position: relative;
    margin-bottom: 10px;
    line-height: 1.65;
}

.experience-item li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--text-secondary);
}

/* ===== Projects ===== */
.project {
    margin-bottom: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--border);
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

/* --- Showcase Card: Golden Willow Aura Hover --- */
.project-showcase-card {
    border-radius: 12px;
    padding: 28px 24px 28px;
    margin-left: -24px;
    margin-right: -24px;
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.6s var(--ease-out-expo),
                border-color 0.5s ease;
}

.project-showcase-card:hover {
    box-shadow:
        0 0 0 1px rgba(212, 175, 55, 0.12),
        0 0 40px -8px rgba(212, 175, 55, 0.08),
        0 0 80px -16px rgba(0, 63, 60, 0.06);
}

[data-theme="dark"] .project-showcase-card:hover {
    box-shadow:
        0 0 0 1px rgba(212, 175, 55, 0.18),
        0 0 40px -8px rgba(212, 175, 55, 0.12),
        0 0 80px -16px rgba(0, 63, 60, 0.10);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .project-showcase-card:hover {
        box-shadow:
            0 0 0 1px rgba(212, 175, 55, 0.18),
            0 0 40px -8px rgba(212, 175, 55, 0.12),
            0 0 80px -16px rgba(0, 63, 60, 0.10);
    }
}

/* --- Screenshot Showcase Grid --- */
.project-showcase {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 24px 0;
}

/* --- Browser Frame --- */
.browser-frame {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-alt);
    cursor: pointer;
    transition: transform 0.35s var(--ease-out-expo),
                box-shadow 0.35s var(--ease-out-expo),
                border-color 0.35s ease;
}

.browser-frame:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 16px 40px -12px var(--shadow-color-strong);
    border-color: rgba(212, 175, 55, 0.35);
}

.browser-chrome {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
}

.browser-dots {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.dot-red { background: #ff5f57; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #28c940; }

.browser-address {
    flex: 1;
    font-family: var(--font-body);
    font-size: 0.55rem;
    color: var(--text-secondary);
    background: var(--bg);
    border-radius: 4px;
    padding: 2px 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.browser-viewport {
    width: 100%;
    height: 160px;
    overflow: hidden;
    position: relative;
    background: var(--bg);
}

.showcase-img {
    width: 100%;
    display: block;
    object-fit: cover;
    object-position: top center;
}

/* Static image (homepage) — just cover the viewport */
.showcase-img-static {
    height: 100%;
    object-fit: cover;
}

/* Scrollable images (menu, contact) — tall image, scrolls on hover */
.showcase-img-scroll {
    height: auto;
    transition: transform 3s var(--ease-out-quart);
    transform: translateY(0);
}

.browser-viewport-scroll:hover .showcase-img-scroll {
    transform: translateY(calc(-100% + 160px));
}

.browser-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    font-family: var(--font-body);
    font-size: 0.6rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 28px 0 10px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.browser-frame:hover .browser-label {
    opacity: 1;
    transform: translateY(0);
}

/* --- Feature Pills --- */
.project-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 4px;
}

.feature-pill {
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 4px 10px;
    border-radius: 100px;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    background: var(--bg-alt);
    transition: color 0.25s ease,
                border-color 0.25s ease,
                background 0.25s ease;
    white-space: nowrap;
}

.project-showcase-card:hover .feature-pill {
    border-color: rgba(212, 175, 55, 0.3);
    color: var(--text);
}

/* --- Showcase Live Link --- */
.showcase-live-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
    text-decoration: none;
    text-transform: lowercase;
    transition: color 0.2s ease;
}

.showcase-live-link:hover {
    color: var(--text);
    opacity: 1;
}

.showcase-live-link svg {
    width: 12px;
    height: 12px;
    transition: transform 0.3s var(--ease-out-expo);
}

.showcase-live-link:hover svg {
    transform: translate(3px, -3px);
}

.project:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.project h3 {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
}

.project-meta {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
    margin-bottom: 14px;
}

.project p {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

.project-stats {
    display: flex;
    gap: 32px;
    margin-top: 20px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--text);
    transition: color 0.3s ease;
}

.stat-value.counting {
    color: var(--accent);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ===== Skills ===== */
.skills-statement {
    font-size: 1rem;
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 32px;
    font-family: var(--font-sans);
    max-width: 520px;
}

.skills-codex {
    font-style: normal;
    font-weight: 500;
    color: var(--accent);
    font-family: var(--font-sans);
    letter-spacing: -0.02em;
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.skills-category h3 {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.skills-category ul {
    list-style: none;
}

.skills-category li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    transition: color 0.2s ease;
}

.skills-category li:hover {
    color: var(--accent);
}

.skills-category li:last-child {
    border-bottom: none;
}

/* ===== Contact ===== */
.contact-intro {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 24px;
    line-height: 1.7;
}

#section-contact .contact-links {
    display: flex;
    gap: 24px;
    font-size: 0.9rem;
}

#section-contact .contact-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    transition: color 0.3s var(--ease-out-quart);
}

#section-contact .contact-links a::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s var(--ease-out-expo);
}

#section-contact .contact-links a:hover::before {
    width: calc(100% - 22px);
}

#section-contact .contact-links a:hover {
    opacity: 1;
}

#section-contact .contact-links svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s var(--ease-out-expo);
}

#section-contact .contact-links a:hover svg {
    transform: translate(3px, -3px);
}

/* ===== Animations ===== */

/* Hero name entrance - scale and fade with spring */
@keyframes heroNameEnter {
    from {
        opacity: 0;
        transform: scale(1.05) translateY(10px);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

/* Hero role entrance */
@keyframes heroRoleEnter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.fade-in {
    opacity: 0;
    animation: fadeIn 0.8s var(--ease-out-expo) forwards;
}

/* Hero body cascade animation */
.hero-body-animate {
    opacity: 0;
    animation: fadeIn 0.8s var(--ease-out-expo) forwards;
    animation-delay: 1.1s;
}

/* Page load animation */
body:not(.page-loaded) .grain-background {
    opacity: 0;
}

body.page-loaded .grain-background {
    animation: fadeIn 1.5s var(--ease-out-expo) forwards;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    html {
        font-size: 16px;
    }
    
    /* Hide sidebar on mobile */
    .sidebar-nav {
        display: none;
    }
    
    /* Hero on mobile */
    .hero-name-container {
        margin-bottom: 24px;
    }
    
    .hero-name {
        font-size: clamp(2.8rem, 28vw, 7rem);
        line-height: 0.92;
        letter-spacing: -0.02em;
    }
    
    .hero-name-lobo .headshot {
        display: block;
    }
    
    .hero-role {
        font-size: 1rem;
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 0.25em;
    }
    
    /* Fix builder alignment on mobile */
    .highlight-builder {
        vertical-align: baseline;
        margin: 0;
        cursor: pointer;
        transition: transform 0.15s ease;
        -webkit-tap-highlight-color: rgba(154, 152, 144, 0.2);
    }
    
    .hero .subtitle {
        font-size: 0.95rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .project-stats {
        flex-direction: column;
        gap: 16px;
    }

    /* Showcase responsive */
    .project-showcase {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .browser-viewport {
        height: 200px;
    }

    .browser-viewport-scroll:hover .showcase-img-scroll {
        transform: translateY(calc(-100% + 200px));
    }

    .project-showcase-card {
        margin-left: -16px;
        margin-right: -16px;
        padding: 20px 16px 20px;
    }

    .project-features {
        gap: 5px;
    }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .grain-svg {
        animation: none;
    }
    
    .gradient-layer {
        animation: none;
    }

    /* Disable showcase hover-scroll for reduced motion */
    .showcase-img-scroll {
        transition: none;
    }

    .browser-viewport-scroll:hover .showcase-img-scroll {
        transform: none;
    }

    .browser-frame:hover {
        transform: none;
    }

    /* Always show labels when reduced motion is on */
    .browser-label {
        opacity: 1;
        transform: none;
    }
}

/* ===== Hero Layout ===== */
.hero {
    min-height: 82vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 80px 0 40px;
}

/* ===== Mobile Hero ===== */
@media (max-width: 640px) {
    .hero {
        min-height: 80vh;
        padding: 120px 0 40px;
    }
}


/* ===== Reduced Motion Support ===== */
@media (prefers-reduced-motion: reduce) {
    .hero-name-line,
    .hero-role,
    .hero-body-animate {
        opacity: 1;
        animation: none;
        transform: none;
        filter: none;
    }
}
