/* ============================================================
   Precision Silver — Design System & Home Page Styles
   "Industrial Humanist Modernism"
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Inter+Tight:wght@400;700&display=swap');

/* ── 1. Design Tokens ─────────────────────────────────────── */
:root {
    --bg: #0F0F0F;
    --bg-raised: #141414;
    --surface: #1C1C1C;
    --surface-hi: #242424;
    --border: rgba(192, 192, 192, 0.15);
    --border-hi: rgba(192, 192, 192, 0.35);
    --accent: #C0C0C0;
    --accent-hi: #E5E5E5;
    --text: #E5E5E5;
    --text-muted: #777;
    --text-faint: #3A3A3A;
    --tag-bg: rgba(192, 192, 192, 0.08);

    --nav-bg: rgba(15, 15, 15, 0.72);
    --nav-bg-scrolled: rgba(10, 10, 10, 0.82);
    --nav-shadow: 0 8px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    --nav-shadow-scrolled: 0 10px 30px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    --nav-link-color: rgba(192, 192, 192, 0.5);
    --nav-link-active: rgba(255, 255, 255, 1);
    --nav-link-glint: #E5E5E5;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --radius-pill: 999px;

    --nav-h: 56px;
    --nav-h-small: 44px;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --dur: 0.3s;
    
    --trail-rgb: 192, 192, 192;
}

body.light-theme {
    --bg: #E2E5E9;
    --bg-raised: #EBEDF0;
    --surface: #D8DBDF;
    --surface-hi: #CFD3D8;
    --border: rgba(0, 0, 0, 0.15);
    --border-hi: rgba(0, 0, 0, 0.35);
    --accent: #555555;
    --accent-hi: #222222;
    --text: #222222;
    --text-muted: #666666;
    --text-faint: #888888;
    --tag-bg: rgba(0, 0, 0, 0.08);

    --nav-bg: rgba(226, 229, 233, 0.85);
    --nav-bg-scrolled: rgba(216, 219, 223, 0.95);
    --nav-shadow: 0 8px 40px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    --nav-shadow-scrolled: 0 10px 30px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    --nav-link-color: rgba(0, 0, 0, 0.55);
    --nav-link-active: rgba(0, 0, 0, 1);
    --nav-link-glint: #333333;

    --trail-rgb: 60, 60, 60;
}

/* ── 2. Reset & Base ──────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    cursor: none;
    /* Hide default cursor */
}

/* ── Custom Cursor Styles ── */
.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 6px;
    height: 6px;
    background-color: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: background-color 0.3s var(--ease-out), width 0.3s var(--ease-out), height 0.3s var(--ease-out);
}

.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-hi);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.4s var(--ease-out), height 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
}

/* Hover States */
body.cursor-active .cursor-dot {
    background-color: #FFFFFF;
    width: 8px;
    height: 8px;
}

body.cursor-active .cursor-ring {
    width: 56px;
    height: 56px;
    border-color: rgba(255, 255, 255, 0.4);
}

/* Particle Trail Styles */
.cursor-trail {
    position: fixed;
    width: 4px;
    height: 4px;
    background-color: rgba(var(--trail-rgb), 0.3);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9997;
    transform: translate(-50%, -50%);
}

/* Disable on touch */
@media (hover: none) and (pointer: coarse) {
    body {
        cursor: auto;
    }

    .cursor-dot,
    .cursor-ring,
    .cursor-trail {
        display: none;
    }
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button {
    cursor: pointer;
    font-family: inherit;
}

/* ── 3. Floating Island Nav ───────────────────────────────── */
.nav-wrapper {
    position: fixed;
    top: 20px;
    width: min(720px, calc(100vw - 40px));
    left: 50%;
    transform: translateX(-50%) translateY(-30px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, transform 0.8s var(--ease-out), visibility 0.8s;
    z-index: 9999;
}

.nav-wrapper.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

nav.site-nav {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-h);
    padding: 0 24px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-hi);
    background: var(--nav-bg);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    box-shadow: var(--nav-shadow);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        backdrop-filter 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        background 0.6s ease;
    will-change: transform, backdrop-filter;
}

/* Shrunk State: Silky Zoom Out */
.nav-wrapper.scrolled nav.site-nav {
    transform: scale(0.85);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    box-shadow: var(--nav-shadow-scrolled);
    background: var(--nav-bg-scrolled);
}

.nav-logo {
    font-family: 'Inter Tight', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.02em;
    color: var(--accent-hi);
    cursor: pointer;
    user-select: none;
    transition: color 0.3s ease;
}

.nav-logo:hover {
    color: var(--text);
}

.nav-links {
    display: flex;
    gap: 6px;
    list-style: none;
}

.nav-links a {
    display: block;
    padding: 6px 14px;
    position: relative;
    border-radius: var(--radius-pill);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--nav-link-color);
    letter-spacing: 0.02em;
    transition: color 0.4s ease, text-shadow 0.4s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: var(--nav-link-glint);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.nav-links a.active {
    color: var(--nav-link-active) !important;
    text-shadow: 0 0 8px rgba(var(--nav-link-active), 0.3);
}

.nav-links a.active::after {
    transform: scaleX(1);
}

/* Sync Glint scaling when navbar is shrunk */
.nav-wrapper.scrolled .nav-links a::after {
    height: 1.2px;
    /* Slightly thinner to match scale */
    bottom: -2px;
}

.nav-links a:hover {
    color: var(--nav-link-active);
}

/* Glint & Glow Focus (Cleanup old pill) */


/* Shrunk state on scroll */
.nav-wrapper.scrolled {
    top: 12px;
    width: min(620px, calc(100vw - 40px));
}

.nav-wrapper.scrolled nav.site-nav {
    height: var(--nav-h-small);
    padding: 0 20px;
    box-shadow: var(--nav-shadow-scrolled);
}

/* ── 4. Hero Section ──────────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    background: transparent;
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 7vw 10vh;
    position: relative;
    z-index: 10;
}

.hero-divider {
    display: none;
}

.hero-playground {
    position: relative;
    flex: 1;
    overflow: hidden;
    background: transparent;
    z-index: 1;
    pointer-events: none;
    /* Logic: Don't steal clicks from background items */
}

.hero-grid-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
    background-image:
        radial-gradient(circle at var(--mouse-x, -100%) var(--mouse-y, -100%), rgba(255, 255, 255, calc(var(--glow-opacity, 0) * 0.15)) 0%, transparent 250px),
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 80px 80px;
    transition: background-image 0.1s ease;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: radial-gradient(ellipse 60% 60% at 70% 40%, rgba(192, 192, 192, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: auto;
    /* Logic: Particles react to mouse */
}

/* Ensure CTA buttons are clickable despite being in hero layers */
.hero-cta-row a,
.hero-scroll-hint {
    pointer-events: auto;
}

.hero-grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 80px 80px;
    pointer-events: none;
    opacity: 0.5;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 60% at 70% 40%, rgba(192, 192, 192, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.hero-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.hero-heading {
    font-family: 'Inter Tight', sans-serif;
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--accent-hi);
    margin-bottom: 48px;
    /* Increased away from the name */
    max-width: 900px;
    position: relative;
    z-index: 1;
}

.hero-name {
    font-family: 'Inter Tight', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 12px;
    /* Reduced spacing to the bio below */
    letter-spacing: -0.02em;
    opacity: 0.8;
}

/* Techy Hero Animations */
.hero::after {
    content: '';
    position: absolute;
    top: 20%;
    right: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(192, 192, 192, 0.03) 0%, transparent 70%);
    border: 1px solid rgba(192, 192, 192, 0.05);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morph 15s linear infinite;
    pointer-events: none;
}

.hero::before {
    content: '';
    position: absolute;
    bottom: 15%;
    left: 5%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(192, 192, 192, 0.02) 0%, transparent 60%);
    border: 1px solid rgba(192, 192, 192, 0.03);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes morph {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
        transform: rotate(0deg);
    }

    25% {
        border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
    }

    50% {
        border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
    }

    75% {
        border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
    }

    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
        transform: rotate(360deg);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) translateX(0);
    }

    50% {
        transform: translateY(-40px) translateX(20px);
    }
}

.hero-heading em {
    font-style: normal;
    color: var(--text-muted);
}

.hero-sub {
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    color: var(--text-muted);
    max-width: 440px;
    line-height: 1.7;
    margin-bottom: 48px;
    position: relative;
    z-index: 1;
}

.hero-cta-row {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-hi);
    background: var(--surface);
    color: var(--accent-hi);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: background var(--dur), border-color var(--dur), transform var(--dur);
}

.btn-primary:hover {
    background: var(--surface-hi);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.hero-scroll-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-scroll-hint::before {
    content: '';
    display: inline-block;
    width: 32px;
    height: 1px;
    background: var(--text-muted);
}

/* ── 5. Projects Section (Hierarchical Split-Screen) ───────── */
.projects-section {
    padding: 0 7vw;
}

.work-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: flex-start;
}

.work-left {
    min-width: 0;
}

.work-right {
    position: sticky;
    top: 15vh;
    padding-bottom: 5vh;
}

#skills-graph-container {
    width: 100%;
    height: 600px;
    background: transparent;
    position: relative;
    overflow: visible;
    pointer-events: none;
}

#skills-graph-lines {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
}

#skills-graph-root {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 2px;
    pointer-events: auto;
}

/* 3-Tier Node Styles with Overshoot Physics */
.skill-node {
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 0.4s ease,
        box-shadow 0.4s ease;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
    text-align: center;
    border-radius: 50%;
    overflow: hidden;
}

.skill-node.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Tier 1: Core (SKILLS) */
.skill-node.lv-0 {
    width: 100px;
    height: 100px;
    border: 3px solid #C0C0C0;
    background: rgba(40, 40, 40, 0.95);
    backdrop-filter: blur(10px);
    z-index: 30;
    box-shadow: 0 0 15px rgba(192, 192, 192, 0.2);
    animation: pulse-glow 3s ease-in-out infinite;
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 15px rgba(192, 192, 192, 0.2), inset 0 0 0px rgba(255, 255, 255, 0);
        border-color: rgba(192, 192, 192, 0.5);
    }

    50% {
        box-shadow: 0 0 35px rgba(255, 255, 255, 0.4), inset 0 0 10px rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.9);
        transform: translate(-50%, -50%) scale(1.05);
    }
}

.skill-node.lv-0:hover {
    animation: none;
    /* Stop pulsing on hover for manual control */
    box-shadow: 0 0 45px rgba(255, 255, 255, 0.6);
    transform: translate(-50%, -50%) scale(1.1);
}

.skill-node.lv-0 .node-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #C0C0C0;
    letter-spacing: 0.1em;
}

/* Tier 2: Groups (Muted Backgrounds + Glow) */
.skill-node.lv-1 {
    width: 85px;
    height: 85px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: currentColor;
    z-index: 20;
}

.skill-node.lv-1[data-group="programming"] {
    box-shadow: 0 0 15px rgba(26, 58, 74, 0.8);
}

.skill-node.lv-1[data-group="webdev"] {
    box-shadow: 0 0 15px rgba(26, 74, 58, 0.8);
}

.skill-node.lv-1[data-group="security"] {
    box-shadow: 0 0 15px rgba(74, 26, 26, 0.8);
}

.skill-node.lv-1 .node-label {
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    padding: 10px;
    line-height: 1.1;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

/* Tier 3: Nodes */
.skill-node.lv-2 {
    width: 70px;
    height: 70px;
    background: rgba(30, 30, 30, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 15;
}

.skill-node.lv-2 .node-label {
    font-size: 0.7rem;
    color: #eee;
    padding: 8px;
    font-weight: 500;
}

.skill-node.lv-2[data-group="programming"] {
    box-shadow: 0 0 10px rgba(26, 58, 74, 0.4);
}

.skill-node.lv-2[data-group="webdev"] {
    box-shadow: 0 0 10px rgba(26, 74, 58, 0.4);
}

.skill-node.lv-2[data-group="security"] {
    box-shadow: 0 0 10px rgba(74, 26, 26, 0.4);
}

.skill-node:hover {
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.2);
}

.skill-node.lv-1:hover {
    transform: translate(-50%, -50%) scale(1.05);
}

/* Cord-like Connection Lines (Tethers) */
.skill-line-svg {
    stroke-width: 1px;
    /* Robust thin tether */
    stroke-linecap: round;
    transition: opacity 0.5s ease;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    /* Behind Nodes */
}

.skill-line-svg.visible {
    opacity: 0.5;
}

/* ── Mobile: Collapsible Skills View ────────────────────── */
.skills-section {
    display: none;
    padding: 120px 7vw;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: transparent;
    overflow: hidden;
}

.skills-section-content {
    max-width: 1200px;
    margin: 0 auto;
}

.skills-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.skills-heading {
    font-family: 'Inter Tight', sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--accent-hi);
    line-height: 1.1;
    margin-bottom: 48px;
}

.skills-collapsible-view {
    display: none;
    width: 100%;
}

.skills-categories {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.skill-category {
    border: 1px solid var(--border-hi);
    border-radius: var(--radius-md);
    background: rgba(20, 20, 20, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow: hidden;
    transition: all 0.3s var(--ease-out);
}

.skill-category.active {
    background: rgba(25, 25, 25, 0.8);
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(192, 192, 192, 0.1);
}

.skill-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s var(--ease-out);
}

.skill-category-header:hover {
    background: rgba(30, 30, 30, 0.6);
}

.skill-category.active .skill-category-header {
    background: rgba(35, 35, 35, 0.8);
}

.skill-category-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent-hi);
}

.skill-category-icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: transform 0.3s var(--ease-out);
}

.skill-category[data-group="programming"] .skill-category-icon {
    background: #1A3A4A;
}

.skill-category[data-group="tools"] .skill-category-icon {
    background: #063A26;
}

.skill-category[data-group="security"] .skill-category-icon {
    background: #4A1A1A;
}

.skill-category-toggle {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s var(--ease-out);
    color: var(--text-muted);
}

.skill-category.active .skill-category-toggle {
    transform: rotate(180deg);
    color: var(--accent-hi);
}

.skill-category-skills {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s var(--ease-out), padding 0.3s var(--ease-out);
}

.skill-category.active .skill-category-skills {
    max-height: 500px;
    padding: 0 20px 16px;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(192, 192, 192, 0.08);
    border: 1px solid rgba(192, 192, 192, 0.15);
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.skill-tag:hover {
    background: rgba(192, 192, 192, 0.15);
    border-color: rgba(192, 192, 192, 0.35);
    color: var(--accent-hi);
}

/* Mobile Fallback: Bento Grid (Hidden by default) */
.bento-grid {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    padding: 40px 0;
}

.bento-item {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-align: left;
}

.bento-item .bento-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
}

.bento-item .bento-list {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.projects-header {
    display: grid;
    grid-template-columns: 64px 1fr 200px 80px 32px;
    gap: 0 24px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.projects-header span {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-faint);
}

/* ── 6. Project Row ───────────────────────────────────────── */
.project-row {
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.row-header {
    display: grid;
    grid-template-columns: 64px 1fr 200px 80px 32px;
    gap: 0 24px;
    align-items: center;
    padding: 28px 0;
    cursor: pointer;
    transition: background var(--dur);
    position: relative;
}

.row-header::before {
    content: '';
    position: absolute;
    inset: 0;
    margin: 0 -7vw;
    background: rgba(192, 192, 192, 0.03);
    opacity: 0;
    transition: opacity var(--dur);
    pointer-events: none;
}

.row-header:hover::before {
    opacity: 1;
}

.row-index {
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-faint);
    letter-spacing: 0.05em;
}

.row-title {
    font-family: 'Inter Tight', sans-serif;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 600;
    color: var(--accent-hi);
    letter-spacing: -0.02em;
    transition: color var(--dur);
}

.project-row.is-open .row-title,
.row-header:hover .row-title {
    color: #fff;
}

.row-category {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 400;
}

.row-year {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 400;
}

.row-chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.75rem;
    transition: transform var(--dur) var(--ease-out),
        border-color var(--dur),
        color var(--dur),
        background var(--dur);
    flex-shrink: 0;
}

.project-row.is-open .row-chevron {
    transform: rotate(180deg);
    border-color: var(--accent);
    color: var(--accent-hi);
    background: rgba(192, 192, 192, 0.08);
}

/* ── 7. Expanded Accordion Card ───────────────────────────── */
.row-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease-out);
}

.project-row.is-open .row-detail {
    max-height: 640px;
}

.row-detail-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 0 0 48px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.detail-image-wrap {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
    aspect-ratio: 16/9;
}

.detail-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}

.project-row.is-open .detail-image-wrap img {
    transform: scale(1.02);
}

/* CSS placeholder for projects without images */
.detail-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--surface) 0%, var(--bg-raised) 100%);
}

.placeholder-glyph {
    width: 80px;
    height: 80px;
    border: 1px solid var(--border-hi);
    border-radius: var(--radius-md);
    display: grid;
    place-items: center;
}

.placeholder-glyph svg {
    opacity: 0.3;
}

.detail-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    padding: 8px 0;
}

.detail-summary {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.75;
    border-left: 2px solid var(--border-hi);
    padding-left: 16px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-tag {
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    background: var(--tag-bg);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.04em;
}

.btn-case-study {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-hi);
    background: transparent;
    color: var(--accent-hi);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: background var(--dur), border-color var(--dur), transform var(--dur), color var(--dur);
}

.btn-case-study:hover {
    background: var(--accent-hi);
    color: var(--bg);
    border-color: var(--accent-hi);
    transform: translateY(-1px);
}

.btn-case-study svg {
    transition: transform var(--dur) var(--ease-out);
}

.btn-case-study:hover svg {
    transform: translateX(3px);
}

/* ── Live At button (secondary) ───────────────────────────── */
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.btn-live-at {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--accent);
    background: rgba(192, 192, 192, 0.05);
    color: var(--accent-hi);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all var(--dur) var(--ease-out);
}

.btn-live-at:hover {
    border-color: var(--accent);
    color: var(--accent-hi);
    transform: translateY(-1px);
}

.btn-live-at svg {
    transition: transform var(--dur) var(--ease-out);
}

.btn-live-at:hover svg {
    transform: translate(2px, -2px);
}

/* Responsive Work Section */
@media (max-width: 1024px) {
    .work-container {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .work-right {
        position: static;
        width: 100%;
        padding-bottom: 0;
    }

    #skills-graph-container {
        height: 500px;
    }

    .bento-grid {
        display: grid;
    }
}

/* Mobile: Switch to Collapsible Skills View */
@media (max-width: 768px) {
    .skills-section {
        display: block;
    }

    .skills-collapsible-view {
        display: block;
    }

    #skills-graph-container {
        display: none;
    }
}

/* Small mobile: Optimize for very small screens */
@media (max-width: 480px) {
    .skills-section {
        padding: 80px 5vw;
    }

    .skills-heading {
        margin-bottom: 32px;
    }
}

/* ── 8. About Section ─────────────────────────────────────── */
.about-section {
    padding: 120px 7vw;
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
    overflow: hidden;
}

@media (max-width: 900px) {
    .about-section {
        grid-template-columns: 1fr;
    }
}

.about-copy {
    min-width: 0;
}

.about-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.about-heading {
    font-family: 'Inter Tight', sans-serif;
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--accent-hi);
    line-height: 1.1;
    margin-bottom: 24px;
    max-width: 600px;
}

.about-text {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 0.9375rem;
    max-width: 640px;
    margin-bottom: 40px;
}

/* ── 8b. About — Photo + Quote ───────────────────────────── */
.about-photo-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    min-width: 0;
}

.about-photo-frame {
    position: relative;
    width: 260px;
    flex-shrink: 0;
}

.about-photo {
    width: 260px;
    height: 320px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-hi);
    display: block;
}

/* Fallback initials block */
.about-photo-fallback {
    width: 260px;
    height: 320px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-hi);
    background: linear-gradient(145deg, var(--surface) 0%, #111 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-photo-fallback span {
    font-family: 'Inter Tight', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--text-faint);
}

/* Subtle animated silver rim */
/* .photo-rim { */
/* position: absolute; */
/* inset: -1px; */
/* border-radius: calc(var(--radius-lg) + 1px); */
/* background: conic-gradient(from 0deg, */
/* transparent 0%, */
/* rgba(192, 192, 192, 0.6) 30%, */
/* transparent 60%, */
/* rgba(192, 192, 192, 0.2) 80%, */
/* transparent 100%); */
/* mask: linear-gradient(#fff 0 0) content-box, */
/* linear-gradient(#fff 0 0); */
/* mask-composite: exclude; */
/* -webkit-mask-composite: destination-out; */
/* padding: 1px; */
/* animation: rim-spin 6s linear infinite; */
/* pointer-events: none; */
/* ── About Timeline (90-Degree Step Snake) ──────────────── */

.about-timeline-wrap {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
    position: relative;
    overflow: visible;
}

.timeline-heading {
    font-family: 'Inter Tight', sans-serif;
    font-size: 1rem;
    font-weight: 900;
    /* Bolder as requested */
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-hi);
    /* Highlight with silver-white */
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
    /* Highlight effect */
    margin-bottom: 60px;
    text-align: center;
}

.timeline-container {
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
}

.timeline-row {
    display: flex;
    justify-content: flex-start;
    /* Corrected from space-around to keep dots on grid */
    position: relative;
    margin-bottom: 95px;
    /* Reduced spacing */
}

/* Straight horizontal line for each row */
/* Straight horizontal line for each row */
.timeline-row::before {
    content: '';
    position: absolute;
    top: 60px;
    /* Center leveled spine */
    left: 0;
    right: 0;
    height: 1.5px;
    background: var(--border);
    opacity: 1;
    z-index: 0;
    transition: all 0.3s ease;
}

/* Entry/Exit Logic for a clean journey */

/* First row: line starts at the first dot (10% center) */
.timeline-row:first-child::before {
    left: 10% !important;
}

/* Last row trimming: Path ends exactly at the dot's center + 40px buffer */
.timeline-row.last-row.row-ltr::before {
    left: 0;
    right: auto;
    width: calc((var(--last-item-idx) * 20% + 10%) + 40px) !important;
}

.timeline-row.last-row.row-rtl::before {
    right: 0;
    left: auto;
    width: calc((var(--last-item-idx) * 20% + 10%) + 40px) !important;
}

.row-ltr {
    flex-direction: row;
}

.row-rtl {
    flex-direction: row-reverse;
}

.timeline-item {
    position: relative;
    width: 20%;
    /* 5 items per row */
    min-height: 120px;
    z-index: 5;
    text-align: center;
}

/* Alternate Dots Alignment */
.timeline-item:nth-child(odd) .timeline-dot {
    top: 45px;
    /* UP */
}

.timeline-item:nth-child(even) .timeline-dot {
    top: 75px;
    /* DOWN */
}

/* Vertical Tethers connecting staggered dots to the spine */
.timeline-dot::before {
    content: '';
    position: absolute;
    left: 50%;
    width: 1.5px;
    /* Match bold spine */
    background: var(--border);
    opacity: 1;
    z-index: -1;
}

.timeline-item:nth-child(odd) .timeline-dot::before {
    top: 50%;
    height: 15px;
    /* From 45px to 60px line */
}

.timeline-item:nth-child(even) .timeline-dot::before {
    bottom: 50%;
    height: 15px;
    /* From 75px to 60px line */
}

/* Alternating Content (Text) Position */
.timeline-content {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    pointer-events: none;
}

/* UP Items: Content ABOVE line. ORDER: Details (Title) then Timeline (Date) */
.timeline-item:nth-child(odd) .timeline-content {
    bottom: calc(100% - 40px);
    flex-direction: column;
}

/* DOWN Items: Content BELOW line. ORDER: Timeline (Date) then Details (Title) */
.timeline-item:nth-child(even) .timeline-content {
    top: 85px;
    flex-direction: column-reverse;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(192, 192, 192, 0.4);
    z-index: 10;
    transition: all 0.3s var(--ease-out);
}

.timeline-item:hover .timeline-dot {
    background: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    transform: translateX(-50%) scale(1.4);
}

.timeline-content {
    padding: 0;
}

.timeline-date {
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-hi);
}

.timeline-text {
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--text-muted);
}

/* ─────────────────────────────────────────────────────────── */
/* ── 90-DEGREE CONNECTORS (Clearance Logic) ────────────────── */
/* ─────────────────────────────────────────────────────────── */

/* Drop from far right */
.row-ltr .timeline-item.row-end::after {
    content: '';
    position: absolute;
    top: 0px;
    right: -1.25px;
    /* Centered overlap */
    width: 1.5px;
    /* Bolder drop */
    height: calc(100% + 95px);
    /* Bridge next row's line (matching current margin) */
    background: var(--border);
    opacity: 1;
    z-index: 0;
    transform: translateY(60px);
    /* Start from the spine level */
}

/* Drop from far left */
.row-rtl .timeline-item.row-end::after {
    content: '';
    position: absolute;
    top: 0px;
    left: -1.25px;
    /* Centered overlap */
    width: 1.5px;
    height: calc(100% + 95px);
    background: var(--border);
    opacity: 1;
    z-index: 0;
    transform: translateY(60px);
}

/* Hide the drop connector on the very last item of the entire timeline */
.timeline-row:last-child .timeline-item.row-end::after,
.timeline-item.absolute-last::after {
    display: none !important;
}

/* Mobile: Clean Vertical Stack for High Density */
@media (max-width: 768px) {
    .timeline-heading {
        margin-bottom: 34px;
    }

    .timeline-container {
        padding: 0 22px;
    }

    .timeline-track {
        position: relative;
        padding-left: 18px;
    }

    .timeline-track::before {
        content: '';
        position: absolute;
        top: 6px;
        bottom: 6px;
        left: 0;
        width: 1.5px;
        background: var(--border);
        z-index: 0;
    }

    .timeline-row {
        display: block;
        padding-left: 0;
        margin-bottom: 0;
    }

    .timeline-row::before {
        display: none;
    }

    .timeline-row::after {
        display: none !important;
    }

    .timeline-item {
        width: 100%;
        text-align: left;
        min-height: 0;
        padding: 0 0 28px 22px;
    }

    .timeline-row:last-child .timeline-item:last-child {
        padding-bottom: 0;
    }

    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot,
    .timeline-dot {
        top: 0.45rem;
        left: -18px;
        transform: translateX(-50%);
    }

    .timeline-dot::before,
    .timeline-item.row-end::after {
        display: none !important;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content,
    .timeline-content {
        position: static;
        width: auto;
        max-width: 100%;
        transform: none;
        flex-direction: column;
        gap: 2px;
    }

    .timeline-date {
        order: 1;
    }

    .timeline-text {
        order: 2;
        max-width: 30rem;
    }
}

/* ── 9. Footer ────────────────────────────────────────────── */
footer.site-footer {
    border-top: 1px solid var(--border);
    padding: 40px 7vw;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: color var(--dur);
}

.footer-links a:hover {
    color: var(--accent-hi);
}

/* ── 10. Utilities ────────────────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    clip: rect(0 0 0 0);
    overflow: hidden;
}

/* ── 10b. Modal ───────────────────────────────────────────── */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s var(--ease-out);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.modal-container {
    position: relative;
    width: min(500px, 90vw);
    background: rgba(20, 20, 20, 0.72);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(192, 192, 192, 0.3);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transform: translateY(20px);
    transition: transform 0.4s var(--ease-out);
}

.modal.active .modal-container {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--accent-hi);
}

.modal-heading {
    font-family: 'Inter Tight', sans-serif;
    font-size: 2rem;
    margin-bottom: 8px;
    color: var(--accent-hi);
}

.modal-sub {
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 0.9rem;
}

/* ── Action Hub Styling ── */
.action-hub {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 20px;
}

.email-display {
    background: rgba(255, 255, 255, 0.05);
    padding: 16px;
    border-radius: var(--radius-sm);
    border: 1px dashed rgba(192, 192, 192, 0.2);
    text-align: center;
}

.email-display code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    color: var(--accent-hi);
    letter-spacing: -0.01em;
}

.hub-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.hub-buttons button,
.hub-buttons a {
    justify-content: center;
    padding: 14px;
    font-size: 0.85rem;
}

/* ── Footer Email Copy Styling ── */
.footer-email-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.copy-tooltip {
    position: absolute;
    bottom: 150%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--accent-hi);
    color: var(--bg);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease-out);
}

.copy-tooltip.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.footer-email-link {
    transition: color 0.3s ease;
}

.footer-email-link.copied {
    color: #FFFFFF !important;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-faint);
    letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.form-group textarea {
    min-height: 120px;
    resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-submit {
    margin-top: 10px;
    justify-content: center;
    width: 100%;
}

/* ── 11. Preloader ────────────────────────────────────────── */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s var(--ease-out), visibility 0.6s var(--ease-out);
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(192, 192, 192, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(192, 192, 192, 0.06) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

/* Moving horizontal scanline */
.preloader-scanline {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(192, 192, 192, 0.25) 40%, rgba(255, 255, 255, 0.5) 50%, rgba(192, 192, 192, 0.25) 60%, transparent);
    animation: scan 2.5s linear infinite;
    pointer-events: none;
}

@keyframes scan {
    from {
        top: 0;
    }

    to {
        top: 100%;
    }
}

.preloader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    position: relative;
    z-index: 1;
}

.preloader-logo {
    font-family: 'Inter Tight', sans-serif;
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--accent-hi);
    animation: pl-fade 1.2s var(--ease-out) both;
}

@keyframes pl-fade {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.preloader-bar-wrap {
    width: clamp(180px, 28vw, 320px);
    height: 1px;
    background: var(--border);
    position: relative;
    overflow: hidden;
}

.preloader-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-hi));
    transition: width 0.1s linear;
    box-shadow: 0 0 12px rgba(192, 192, 192, 0.6);
}

.preloader-status {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    animation: pl-fade 1.4s var(--ease-out) both;
}

/* ── 12. Responsiveness ───────────────────────────────────── */
@media (max-width: 1024px) {
    .about-section {
        grid-template-columns: 1fr;
        gap: 60px;
        text-align: center;
    }

    .about-copy {
        order: 1;
    }

    .about-photo-col {
        order: 2;
    }

    .about-timeline-wrap {
        order: 3;
    }

    .hero-heading {
        font-size: clamp(3rem, 12vw, 6rem);
    }
}

@media (max-width: 768px) {
    .nav-wrapper {
        width: calc(100vw - 32px);
    }

    .nav-links {
        gap: 2px;
    }

    .nav-links a {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    .projects-header {
        display: none;
    }

    .row-header {
        grid-template-columns: 40px 1fr 40px;
        padding: 20px 0;
    }

    .row-category,
    .row-year {
        display: none;
    }

    .row-detail-inner {
        grid-template-columns: 1fr;
        padding: 0 0 40px;
        gap: 24px;
    }

    .site-footer {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 16px;
    }
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 0;
    }

    .hero-content {
        padding: 0 6vw 8vh;
        min-height: 60vh;
    }

    .hero-divider {
        display: none;
    }

    .hero-playground {
        height: 40vh;
        order: -1;
    }
}

@media (max-width: 480px) {
    .hero-heading {
        font-size: 3rem;
        line-height: 1.1;
    }

    .hero-cta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .modal-container {
        padding: 30px 20px;
    }

    .modal-heading {
        font-size: 1.5rem;
    }
}
