/* =========================================================
   NEURAL WORKBENCH — Manosakthi Thiyagarajan Portfolio
   Skeuomorphism · Claymorphism · 3D Parallax Storytelling
   =========================================================
   1. Design tokens (light + dark)
   2. Base & reset
   3. Ambient background
   4. Custom cursor
   5. Loader
   6. Nav + theme toggle
   7. Buttons & clay pills
   8. Section scaffolding (parallax)
   9. Hero (CRT monitor)
   10. About (clipboard + stat cards)
   11. Skills (instrument rack)
   12. Education (plaque)
   13. Projects (cartridges)
   14. Experience (conveyor)
   15. Awards & certs (trophy case)
   16. Contact (patch panel + signal form)
   17. Footer
   18. Responsive
   19. Reduced motion
   ========================================================= */

/* =========================================================
   1. DESIGN TOKENS
   ========================================================= */
:root {
    /* --- WARM LIGHT CLAY (default) --- */
    --bg: #ece4d9;
    --bg-2: #f3ede4;
    --bg-3: #e2d8c8;
    --surface: #f6f1e9;
    --surface-raised: #fbf7f0;
    --surface-sunk: #e7dccc;

    --ink: #2b2722;
    --ink-2: #4a433a;
    --ink-3: #7c7264;
    --ink-4: #a89c8a;

    /* Accents */
    --brand: #d2553a;          /* terracotta */
    --brand-2: #b8432b;
    --amber: #e89b3c;
    --teal: #3a8d8c;
    --violet: #7b5cb8;
    --blue: #2f6db5;
    --green: #4f9d5a;

    /* Category chips */
    --cat-cv: #2f6db5;
    --cat-nlp: #7b5cb8;
    --cat-security: #d2553a;
    --cat-time: #e89b3c;
    --cat-3d: #3a8d8c;

    /* Claymorphism shadows */
    --clay-shadow:
        8px 8px 18px rgba(120, 96, 70, 0.28),
        -8px -8px 18px rgba(255, 250, 244, 0.95),
        inset 2px 2px 3px rgba(255, 255, 255, 0.7),
        inset -2px -2px 4px rgba(120, 96, 70, 0.12);
    --clay-shadow-sm:
        4px 4px 10px rgba(120, 96, 70, 0.22),
        -4px -4px 10px rgba(255, 250, 244, 0.9),
        inset 1px 1px 2px rgba(255, 255, 255, 0.7);
    --clay-inset:
        inset 4px 4px 10px rgba(120, 96, 70, 0.22),
        inset -4px -4px 10px rgba(255, 250, 244, 0.9);
    --drop: 0 18px 40px -12px rgba(80, 60, 40, 0.32);

    /* Skeuomorphism helpers */
    --metal-grad: linear-gradient(180deg, #fbf7f0 0%, #e7dccc 45%, #d8cab5 100%);
    --metal-grad-dark: linear-gradient(180deg, #5a5048 0%, #3a332c 50%, #2b2620 100%);
    --bezel: linear-gradient(145deg, #4a433a, #2b2722);

    --glow-a: rgba(210, 85, 58, 0.30);
    --glow-b: rgba(123, 92, 184, 0.28);
    --glow-c: rgba(58, 141, 140, 0.26);

    --grid-line: rgba(120, 96, 70, 0.07);
    --hairline: rgba(80, 60, 40, 0.14);
    --hairline-2: rgba(80, 60, 40, 0.08);

    --radius: 18px;
    --radius-lg: 26px;
    --radius-xl: 36px;

    --font-display: 'Bricolage Grotesque', 'Space Grotesk', sans-serif;
    --font-head: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --nav-h: 76px;
    --maxw: 1240px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="dark"] {
    /* --- DARK PREMIUM --- */
    --bg: #0d1220;
    --bg-2: #11182b;
    --bg-3: #161f36;
    --surface: #161f33;
    --surface-raised: #1c2742;
    --surface-sunk: #0e1626;

    --ink: #eef2ff;
    --ink-2: #c2c9e0;
    --ink-3: #8a93b3;
    --ink-4: #5c6488;

    --brand: #ff7a59;
    --brand-2: #ff5a37;
    --amber: #ffc452;
    --teal: #2dd4bf;
    --violet: #a78bfa;
    --blue: #60a5fa;
    --green: #34d399;

    --cat-cv: #60a5fa;
    --cat-nlp: #a78bfa;
    --cat-security: #ff7a59;
    --cat-time: #ffc452;
    --cat-3d: #2dd4bf;

    --clay-shadow:
        10px 10px 24px rgba(0, 0, 0, 0.55),
        -6px -6px 20px rgba(96, 165, 250, 0.06),
        inset 2px 2px 4px rgba(167, 139, 250, 0.12),
        inset -2px -2px 6px rgba(0, 0, 0, 0.5);
    --clay-shadow-sm:
        5px 5px 14px rgba(0, 0, 0, 0.55),
        -3px -3px 12px rgba(96, 165, 250, 0.05),
        inset 1px 1px 2px rgba(167, 139, 250, 0.14);
    --clay-inset:
        inset 5px 5px 14px rgba(0, 0, 0, 0.6),
        inset -3px -3px 12px rgba(96, 165, 250, 0.05);
    --drop: 0 22px 50px -14px rgba(0, 0, 0, 0.7);

    --metal-grad: linear-gradient(180deg, #2a3450 0%, #161f33 50%, #0e1626 100%);
    --metal-grad-dark: linear-gradient(180deg, #1c2742 0%, #0e1626 100%);
    --bezel: linear-gradient(145deg, #1c2742, #0a0f1d);

    --glow-a: rgba(255, 122, 89, 0.34);
    --glow-b: rgba(167, 139, 250, 0.34);
    --glow-c: rgba(45, 212, 191, 0.30);

    --grid-line: rgba(96, 165, 250, 0.06);
    --hairline: rgba(167, 139, 250, 0.16);
    --hairline-2: rgba(167, 139, 250, 0.08);
}

/* =========================================================
   2. BASE & RESET
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 16px);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.65;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background 0.6s var(--ease), color 0.6s var(--ease);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }
strong { color: var(--ink); font-weight: 600; }

::selection { background: var(--brand); color: #fff; }

::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--bg-3); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--brand), var(--brand-2));
    border-radius: 6px;
    border: 2px solid var(--bg-3);
}

.container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 clamp(16px, 5vw, 60px);
    position: relative;
}

/* =========================================================
   3. AMBIENT BACKGROUND
   ========================================================= */
.ambient {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: radial-gradient(ellipse 120% 80% at 50% -10%, var(--bg-2), var(--bg) 60%);
    transition: background 0.6s var(--ease);
}

.ambient-grid {
    position: absolute;
    inset: -2px;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 100% 70% at 50% 30%, #000 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 100% 70% at 50% 30%, #000 30%, transparent 80%);
}

.ambient-glow {
    position: absolute;
    width: 55vw;
    height: 55vw;
    max-width: 720px;
    max-height: 720px;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.55;
    will-change: transform;
}
.glow-a { background: var(--glow-a); top: -8%; left: -10%; }
.glow-b { background: var(--glow-b); top: 40%; right: -12%; }
.glow-c { background: var(--glow-c); bottom: -10%; left: 30%; }

.ambient-noise {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* =========================================================
   4. CUSTOM CURSOR — crosshair reticle (lab instrument target)
   ========================================================= */
.cursor-dot, .cursor-reticle {
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 9999;
    will-change: transform;
}
.cursor-dot {
    width: 5px; height: 5px;
    margin: -2.5px 0 0 -2.5px;       /* center the dot */
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 6px var(--brand);
}
.cursor-reticle {
    width: 30px; height: 30px;
    margin: -15px 0 0 -15px;          /* center the reticle */
    transition: width 0.15s var(--ease), height 0.15s var(--ease), margin 0.15s var(--ease), opacity 0.15s;
}
/* Four corner brackets built from 2 pseudo-elements via conic masks */
.cursor-reticle::before,
.cursor-reticle::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1.5px solid var(--brand);
    /* carve out the middles of each side so only the 4 corners remain */
    -webkit-mask:
        linear-gradient(#000 0 0) top    left  / 9px 9px no-repeat,
        linear-gradient(#000 0 0) top    right / 9px 9px no-repeat,
        linear-gradient(#000 0 0) bottom left  / 9px 9px no-repeat,
        linear-gradient(#000 0 0) bottom right / 9px 9px no-repeat;
            mask:
        linear-gradient(#000 0 0) top    left  / 9px 9px no-repeat,
        linear-gradient(#000 0 0) top    right / 9px 9px no-repeat,
        linear-gradient(#000 0 0) bottom left  / 9px 9px no-repeat,
        linear-gradient(#000 0 0) bottom right / 9px 9px no-repeat;
    opacity: 0.9;
}
/* small center cross tick */
.cursor-reticle::after {
    border: none;
    inset: auto;
    top: 50%; left: 50%;
    width: 1px; height: 1px;
    background: transparent;
    -webkit-mask: none;
    mask: none;
    box-shadow:
        0 -7px 0 var(--brand),
        0  7px 0 var(--brand),
        -7px 0 0 var(--brand),
        7px  0 0 var(--brand);
    opacity: 0.5;
}
/* hover state — expands the reticle over interactive elements */
body.cursor-hover .cursor-reticle {
    width: 52px; height: 52px;
    margin: -26px 0 0 -26px;
}
body.cursor-hover .cursor-reticle::before { opacity: 1; }
body.cursor-hover .cursor-dot { opacity: 0; }

/* hide system cursor only when our custom one is active */
@media (hover: hover) and (pointer: fine) {
    body.cursor-active { cursor: none; }
    body.cursor-active a, body.cursor-active button, body.cursor-active input,
    body.cursor-active textarea, body.cursor-active label { cursor: none; }
}
@media (hover: none), (pointer: coarse) {
    .cursor-dot, .cursor-reticle { display: none; }
}

/* =========================================================
   5. LOADER
   ========================================================= */
#loader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    background: var(--bg);
    transition: opacity 0.6s var(--ease), visibility 0.6s var(--ease);
}
#loader.done { opacity: 0; visibility: hidden; }

.loader-bench {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 26px;
}

/* analog gauge */
.gauge { width: 200px; height: 124px; position: relative; }
.gauge-face {
    width: 100%;
    height: 100%;
    border-radius: 100px 100px 12px 12px;
    background: var(--metal-grad);
    box-shadow: var(--clay-shadow), var(--drop);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--hairline);
}
.gauge-face::before {
    content: '';
    position: absolute;
    inset: 8px 8px 0 8px;
    border-radius: 92px 92px 6px 6px;
    background:
        radial-gradient(circle at 50% 100%, transparent 58%, var(--hairline) 58%, var(--hairline) 59%, transparent 60%);
    opacity: 0.5;
}
.gauge-needle {
    position: absolute;
    bottom: 8px;
    left: 50%;
    width: 4px;
    height: 70px;
    background: linear-gradient(180deg, var(--brand) 0%, var(--brand-2) 100%);
    transform-origin: bottom center;
    transform: translateX(-50%) rotate(-90deg);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--brand);
    z-index: 3;
    transition: transform 0.4s var(--ease);
}
.gauge-pivot {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff, var(--ink-3) 70%);
    box-shadow: 0 1px 2px rgba(0,0,0,0.4);
    z-index: 4;
}
.gauge-label {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    font: 600 9px/1 var(--font-mono);
    letter-spacing: 0.2em;
    color: var(--ink-3);
}
.gauge-min, .gauge-max {
    position: absolute;
    bottom: 28px;
    font: 700 10px/1 var(--font-mono);
    color: var(--ink-4);
}
.gauge-min { left: 26px; }
.gauge-max { right: 26px; }

.loader-readout {
    text-align: center;
    font-family: var(--font-mono);
}
.loader-pct {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--brand);
    letter-spacing: 0.05em;
}
.loader-status {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--ink-3);
}

/* =========================================================
   6. NAV + THEME TOGGLE
   ========================================================= */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    z-index: 900;
    display: flex;
    align-items: center;
    background: color-mix(in srgb, var(--bg) 70%, transparent);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid var(--hairline-2);
    transition: background 0.4s var(--ease), transform 0.4s var(--ease);
}
.nav.hidden { transform: translateY(-100%); }

.nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-head);
    font-weight: 600;
}
.brand-seal {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(145deg, var(--brand), var(--brand-2));
    color: #fff;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.04em;
    box-shadow:
        inset 1px 1px 2px rgba(255,255,255,0.5),
        inset -2px -2px 4px rgba(0,0,0,0.25),
        0 4px 12px rgba(210,85,58,0.4);
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
}
.brand-name { font-size: 16px; color: var(--ink); }
.brand-name small { color: var(--brand); font-weight: 700; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    margin-right: 12px;
}
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-2);
    transition: color 0.25s, background 0.25s, box-shadow 0.25s;
}
.nav-link:hover, .nav-link.active {
    color: var(--brand);
    background: color-mix(in srgb, var(--brand) 10%, transparent);
}
.nav-link svg { width: 15px; height: 15px; }
.nav-link-cta {
    background: var(--ink);
    color: var(--bg) !important;
    margin-left: 6px;
    box-shadow: var(--clay-shadow-sm);
}
.nav-link-cta:hover { background: var(--brand); color: #fff !important; }

/* Theme toggle (skeuomorphic switch) */
.theme-toggle {
    display: grid;
    place-items: center;
    padding: 0;
    width: 64px;
    height: 34px;
    border-radius: 20px;
    flex-shrink: 0;
}
.toggle-track {
    position: relative;
    width: 64px;
    height: 34px;
    border-radius: 20px;
    background: var(--metal-grad);
    box-shadow: var(--clay-inset);
    border: 1px solid var(--hairline);
}
.toggle-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff, var(--ink-4) 130%);
    box-shadow:
        0 2px 5px rgba(0,0,0,0.3),
        inset 1px 1px 2px rgba(255,255,255,0.8),
        inset -2px -2px 4px rgba(0,0,0,0.2);
    display: grid;
    place-items: center;
    transition: transform 0.45s var(--ease);
}
html[data-theme="dark"] .toggle-knob { transform: translateX(30px); }
.theme-icon {
    position: absolute;
    width: 15px; height: 15px;
    transition: opacity 0.3s, transform 0.3s;
}
.theme-icon-light { opacity: 1; color: var(--amber); }
.theme-icon-dark { opacity: 0; transform: rotate(-90deg) scale(0.5); color: var(--blue); }
html[data-theme="dark"] .theme-icon-light { opacity: 0; transform: rotate(90deg) scale(0.5); }
html[data-theme="dark"] .theme-icon-dark { opacity: 1; transform: rotate(0) scale(1); }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    border-radius: 10px;
}
.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: 0.3s var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   7. BUTTONS & CLAY PILLS
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 24px;
    border-radius: 14px;
    font-family: var(--font-head);
    font-size: 15px;
    font-weight: 600;
    transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
    white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary {
    background: linear-gradient(145deg, var(--brand), var(--brand-2));
    color: #fff;
    box-shadow:
        inset 1px 1px 2px rgba(255,255,255,0.4),
        inset -2px -2px 4px rgba(0,0,0,0.25),
        0 8px 20px -4px color-mix(in srgb, var(--brand) 55%, transparent);
    text-shadow: 0 1px 1px rgba(0,0,0,0.18);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow:
        inset 1px 1px 2px rgba(255,255,255,0.4),
        inset -2px -2px 4px rgba(0,0,0,0.25),
        0 14px 28px -4px color-mix(in srgb, var(--brand) 60%, transparent);
}
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--clay-shadow-sm);
}
.btn-ghost:hover { transform: translateY(-2px); box-shadow: var(--clay-shadow); }

/* Clay pill (claymorphism) */
.clay-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--surface-raised);
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--clay-shadow);
    transition: transform 0.25s var(--ease), color 0.25s, box-shadow 0.25s;
    cursor: default;
}
.clay-pill:hover {
    transform: translateY(-3px);
    color: var(--brand);
}
.eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.06em;
    color: var(--ink-2);
}
.pulse-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 70%, transparent);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 60%, transparent); }
    70% { box-shadow: 0 0 0 10px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

/* Clay card */
.clay-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--clay-shadow);
    padding: 26px;
    border: 1px solid var(--hairline-2);
}

/* =========================================================
   8. SECTION SCAFFOLDING (PARALLAX)
   ========================================================= */
main { position: relative; z-index: 1; }
.scene {
    position: relative;
    padding: clamp(80px, 12vh, 150px) 0;
    perspective: 1600px;
    z-index: 1;
}
.scene > * { transform-style: preserve-3d; }

/* GPU-composited parallax layers. No CSS transition: rAF drives them every
   frame, so a transition would add lag and double-motion jitter. */
[data-parallax-speed] {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}
@media (prefers-reduced-motion: reduce) {
    [data-parallax-speed] { transform: none !important; will-change: auto; }
}

.section-head {
    margin-bottom: 56px;
    max-width: 640px;
}
.section-index {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    color: var(--brand);
    letter-spacing: 0.2em;
    margin-bottom: 10px;
    padding: 4px 12px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--brand) 12%, transparent);
}
.section-title {
    font-family: var(--font-display);
    font-size: clamp(30px, 5vw, 52px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.section-sub {
    margin-top: 12px;
    font-size: 17px;
    color: var(--ink-3);
}

.gsap-reveal { opacity: 0; }

/* =========================================================
   9. HERO (CRT MONITOR)
   ========================================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: calc(var(--nav-h) + 40px);
    padding-bottom: 60px;
    position: relative;
}
.hero-bg-layer { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.rail {
    position: absolute;
    left: -5%;
    right: -5%;
    height: 6px;
    background: var(--metal-grad-dark);
    box-shadow:
        inset 0 1px 2px rgba(255,255,255,0.12),
        inset 0 -2px 4px rgba(0,0,0,0.4),
        0 8px 24px rgba(0,0,0,0.18);
    border-radius: 3px;
}
.rail-top { top: 22%; }
.rail-bottom { bottom: 14%; }
.rail::before, .rail::after {
    content: '';
    position: absolute;
    top: -8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--metal-grad-dark);
    box-shadow: inset 0 2px 3px rgba(255,255,255,0.1), inset 0 -2px 4px rgba(0,0,0,0.5);
}
.rail::before { left: 8%; }
.rail::after { right: 8%; }

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 50px;
    align-items: center;
    width: 100%;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: -0.03em;
    margin: 18px 0 14px;
}
.hero-title-line {
    display: block;
    font-size: clamp(38px, 7vw, 76px);
    color: var(--ink);
}
.hero-title-line.accent {
    background: linear-gradient(120deg, var(--brand) 0%, var(--amber) 60%, var(--brand-2) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-role {
    font-family: var(--font-head);
    font-size: clamp(17px, 2.4vw, 22px);
    font-weight: 600;
    color: var(--ink-2);
}
.hero-tagline {
    margin-top: 8px;
    font-family: var(--font-mono);
    font-size: 15px;
    color: var(--ink-3);
    min-height: 24px;
}
.type-caret {
    display: inline-block;
    width: 8px;
    background: var(--brand);
    margin-left: 2px;
    animation: caret 1s step-end infinite;
}
@keyframes caret { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }

.hero-cta {
    margin-top: 30px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* CRT Monitor */
.hero-monitor-wrap { display: grid; place-items: center; position: relative; }
.crt-monitor { position: relative; width: 100%; max-width: 460px; transform-style: preserve-3d; }

.crt-bezel {
    position: relative;
    padding: 22px;
    border-radius: 28px;
    background: linear-gradient(150deg, #efe7da 0%, #d9cdb8 40%, #b8a98f 100%);
    box-shadow:
        inset 2px 2px 3px rgba(255,255,255,0.7),
        inset -3px -3px 6px rgba(120,96,70,0.4),
        0 30px 60px -20px rgba(60,40,20,0.5),
        0 12px 24px -10px rgba(60,40,20,0.3);
}
html[data-theme="dark"] .crt-bezel {
    background: linear-gradient(150deg, #2a3450 0%, #1a2238 50%, #0e1626 100%);
    box-shadow:
        inset 2px 2px 3px rgba(167,139,250,0.15),
        inset -3px -3px 6px rgba(0,0,0,0.6),
        0 30px 60px -20px rgba(0,0,0,0.7);
}
.crt-screen {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: radial-gradient(ellipse at center, #0c1f1a 0%, #061410 100%);
    aspect-ratio: 4 / 3;
    box-shadow:
        inset 0 0 0 3px #1a1208,
        inset 0 0 40px rgba(0,0,0,0.8),
        inset 0 0 80px rgba(0,255,140,0.04);
}
.crt-scanline {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, transparent 0, transparent 2px, rgba(0,0,0,0.18) 2px, rgba(0,0,0,0.18) 3px);
    pointer-events: none;
    z-index: 3;
    animation: scan 6s linear infinite;
}
@keyframes scan { from { background-position-y: 0; } to { background-position-y: 100px; } }
.crt-content {
    position: relative;
    z-index: 2;
    padding: 22px 20px;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.9;
    color: #5dff9c;
    text-shadow: 0 0 6px rgba(93,255,156,0.5);
}
.crt-line { opacity: 0; animation: crtIn 0.4s var(--ease) forwards; }
.crt-line:nth-child(1) { animation-delay: 0.4s; }
.crt-line:nth-child(2) { animation-delay: 0.7s; }
.crt-line:nth-child(3) { animation-delay: 1.0s; }
.crt-line:nth-child(4) { animation-delay: 1.3s; }
.crt-line:nth-child(5) { animation-delay: 1.6s; }
.crt-line:nth-child(6) { animation-delay: 1.9s; }
.crt-line:nth-child(7) { animation-delay: 2.2s; }
@keyframes crtIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.crt-ok { color: #b6ffb0; }
.crt-blink { animation: crtIn 0.4s 2.5s var(--ease) forwards, caret 1s 2.5s step-end infinite; }
.tok-key { color: #ff7a59; }
.tok-var { color: #ffc452; }
.tok-fn { color: #5dff9c; }
.tok-comment { color: #2e7d5b; font-style: italic; }
.crt-glare {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    background: linear-gradient(125deg, rgba(255,255,255,0.18) 0%, transparent 35%, transparent 70%, rgba(255,255,255,0.05) 100%);
}
.crt-brand {
    text-align: center;
    margin-top: 14px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.3em;
    color: var(--ink-4);
}
.crt-stand { display: flex; flex-direction: column; align-items: center; }
.crt-neck {
    width: 70px; height: 22px;
    background: var(--metal-grad);
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.4), inset 0 -2px 4px rgba(120,96,70,0.4);
    border-radius: 0 0 6px 6px;
}
.crt-base {
    width: 60%; height: 16px;
    background: var(--metal-grad);
    box-shadow: inset 0 2px 3px rgba(255,255,255,0.4), inset 0 -2px 4px rgba(120,96,70,0.4), 0 10px 20px rgba(60,40,20,0.3);
    border-radius: 8px;
}

/* floating clay stats */
.float-stat {
    position: absolute;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: max-content;
    height: auto;
    padding: 10px 18px;
    line-height: 1;
    z-index: 5;
    white-space: nowrap;
}
.float-num {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 800;
    color: var(--brand);
}
.float-lbl {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.15em;
    color: var(--ink-3);
}
.float-stat-1 { top: -8%; right: -6%; }
.float-stat-2 { bottom: 18%; left: -12%; }
.float-stat-3 { top: 40%; right: -14%; }

/* hero oscilloscope (decorative) */
.hero-scope {
    position: absolute;
    right: 4%;
    bottom: 8%;
    width: 110px;
    height: 60px;
    border-radius: 12px;
    background: var(--metal-grad);
    box-shadow: var(--clay-shadow), var(--drop);
    border: 1px solid var(--hairline);
    overflow: hidden;
    display: none;
}
.scope-needle {
    position: absolute;
    left: 10%; right: 10%; bottom: 30%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--green), transparent);
    filter: blur(0.5px);
    transform-origin: left;
    animation: scopeWave 3s ease-in-out infinite;
}
@keyframes scopeWave {
    0%,100% { transform: rotate(-8deg); }
    50% { transform: rotate(10deg); }
}

/* scroll hint */
.scroll-hint {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.3em;
    color: var(--ink-4);
}
.scroll-hint-arrow svg { width: 16px; height: 16px; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* =========================================================
   10. ABOUT
   ========================================================= */
.about-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 30px;
    align-items: start;
}

/* Clipboard (skeuomorphic) */
.clipboard {
    position: relative;
    background: var(--surface-raised);
    border-radius: var(--radius);
    padding: 34px 30px 28px;
    box-shadow: var(--clay-shadow), var(--drop);
    border: 1px solid var(--hairline-2);
}
.clip-clip {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 26px;
    background: var(--metal-grad-dark);
    border-radius: 6px 6px 12px 12px;
    box-shadow:
        inset 0 2px 3px rgba(255,255,255,0.15),
        inset 0 -2px 4px rgba(0,0,0,0.5),
        0 6px 12px rgba(0,0,0,0.3);
}
.clip-clip::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 8px;
    border-radius: 4px;
    background: #0a0a0a;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.8);
}
.clip-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    margin-bottom: 18px;
    border-bottom: 2px dashed var(--hairline);
}
.clip-stamp {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--brand);
    border: 2px solid var(--brand);
    padding: 4px 10px;
    border-radius: 4px;
    transform: rotate(-2deg);
    opacity: 0.85;
}
.clip-id {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-4);
}
.clip-body p { margin-bottom: 14px; color: var(--ink-2); font-size: 16px; }
.clip-body p:last-child { margin-bottom: 0; }
.clip-lead { font-size: 18px !important; color: var(--ink) !important; font-weight: 500; }

.about-rail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.stat-card { padding: 20px; }
.stat-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.1em;
    color: var(--ink-3);
    margin-bottom: 10px;
}
.stat-card-head svg { width: 16px; height: 16px; color: var(--brand); }
.stat-card-val {
    font-family: var(--font-display);
    font-size: 38px;
    font-weight: 800;
    color: var(--ink);
    line-height: 1;
}
.stat-card-val small { font-size: 16px; color: var(--ink-3); font-weight: 600; }
.stat-card-sub {
    margin-top: 6px;
    font-size: 13px;
    color: var(--ink-3);
}

/* mini gauge */
.gauge-mini {
    margin-top: 14px;
    height: 8px;
    border-radius: 4px;
    background: var(--surface-sunk);
    box-shadow: var(--clay-inset);
    overflow: hidden;
    position: relative;
}
.gauge-mini-fill {
    height: 100%;
    width: var(--w);
    border-radius: 4px;
    background: linear-gradient(90deg, var(--teal), var(--brand));
    box-shadow: 0 0 8px color-mix(in srgb, var(--brand) 50%, transparent);
    transform-origin: left;
}

/* =========================================================
   11. SKILLS (instrument rack)
   ========================================================= */
.skills-rack {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.rack-rail {
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 2px;
    background: var(--metal-grad-dark);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.1);
}

.instrument {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--clay-shadow);
    border: 1px solid var(--hairline-2);
    position: relative;
}
.inst-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--hairline-2);
}
.inst-knob {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff, var(--ink-4) 80%);
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.6), 0 2px 4px rgba(0,0,0,0.3);
    position: relative;
    flex-shrink: 0;
}
.inst-knob::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 6px;
    background: var(--ink);
    border-radius: 1px;
}
.inst-led {
    width: 9px; height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 6px currentColor, inset 0 0 2px rgba(255,255,255,0.6);
}
.led-green { background: var(--green); color: var(--green); }
.led-blue { background: var(--blue); color: var(--blue); }
.led-amber { background: var(--amber); color: var(--amber); }
.led-violet { background: var(--violet); color: var(--violet); }
.led-red { background: var(--brand); color: var(--brand); }
.inst-title {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 17px;
    color: var(--ink);
}
.inst-code {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-4);
    letter-spacing: 0.1em;
}
.inst-meter {
    margin: 14px 0 16px;
    position: relative;
}
.inst-meter-fill {
    height: 7px;
    border-radius: 4px;
    width: var(--w);
    background: linear-gradient(90deg, var(--teal), var(--amber));
    box-shadow: 0 0 8px color-mix(in srgb, var(--amber) 40%, transparent);
}
.inst-meter::after {
    content: '';
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 7px;
    border-radius: 4px;
    background: var(--surface-sunk);
    box-shadow: var(--clay-inset);
    z-index: -1;
}
.inst-meter-label {
    display: block;
    margin-top: 6px;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.2em;
    color: var(--ink-4);
}
.inst-body { display: flex; flex-wrap: wrap; gap: 9px; }
.skill-pill {
    font-size: 13px;
    padding: 7px 14px;
}
.skill-pill:hover { color: var(--ink); }

/* =========================================================
   12. EDUCATION (plaque)
   ========================================================= */
.edu-layout {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 30px;
    align-items: start;
}
.plaque {
    position: relative;
    background: linear-gradient(150deg, var(--surface-raised), var(--surface-sunk));
    border-radius: var(--radius-lg);
    padding: 38px 32px 30px;
    box-shadow: var(--clay-shadow), var(--drop);
    border: 1px solid var(--hairline-2);
    overflow: hidden;
}
.plaque::before {
    content: '';
    position: absolute;
    inset: 8px;
    border: 2px solid var(--brand);
    border-radius: calc(var(--radius-lg) - 8px);
    opacity: 0.25;
    pointer-events: none;
}
.plaque-seal {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 56px; height: 56px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--amber), var(--brand));
    display: grid;
    place-items: center;
    color: #fff;
    box-shadow:
        inset 1px 1px 2px rgba(255,255,255,0.5),
        inset -2px -2px 4px rgba(0,0,0,0.3),
        0 6px 14px rgba(210,85,58,0.4);
    transform: rotate(8deg);
}
.plaque-seal svg { width: 26px; height: 26px; }
.plaque-ribbon {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.15em;
    color: var(--brand);
    margin-bottom: 14px;
}
.plaque-degree {
    font-family: var(--font-display);
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 700;
    line-height: 1.15;
    color: var(--ink);
    max-width: 80%;
}
.plaque-school {
    margin-top: 10px;
    color: var(--ink-2);
    font-size: 16px;
}
.plaque-meta {
    margin-top: 22px;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}
.plaque-meta-item { display: flex; flex-direction: column; gap: 2px; }
.plaque-meta-lbl {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--ink-4);
}
.plaque-meta-val {
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--ink);
    font-size: 16px;
}
.plaque .gauge-mini { max-width: 220px; }

.edu-side {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--clay-shadow);
    border: 1px solid var(--hairline-2);
}
.edu-side-lead {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.1em;
    color: var(--ink-3);
    margin-bottom: 16px;
}
.edu-side-list li {
    position: relative;
    padding: 10px 0 10px 28px;
    border-bottom: 1px solid var(--hairline-2);
    color: var(--ink-2);
    font-size: 15px;
}
.edu-side-list li:last-child { border-bottom: none; }
.edu-side-list li::before {
    content: '';
    position: absolute;
    left: 0; top: 16px;
    width: 14px; height: 14px;
    border-radius: 4px;
    background: var(--metal-grad);
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.5), 0 2px 4px rgba(0,0,0,0.2);
}

/* =========================================================
   13. PROJECTS (cartridges)
   ========================================================= */
.cat-filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}
.cat-chip {
    padding: 8px 16px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.05em;
    color: var(--ink-3);
    background: var(--surface);
    box-shadow: var(--clay-shadow-sm);
    cursor: pointer;
    transition: all 0.25s var(--ease);
    user-select: none;
}
.cat-chip:hover { color: var(--ink); transform: translateY(-2px); }
.cat-chip.active {
    background: var(--ink);
    color: var(--bg);
}

.cartridges {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 22px;
    perspective: 1400px;
}

.cartridge {
    position: relative;
    background: linear-gradient(160deg, var(--surface-raised), var(--surface-sunk));
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--clay-shadow);
    border: 1px solid var(--hairline-2);
    transform-style: preserve-3d;
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.cartridge:hover {
    transform: translateY(-4px);
    box-shadow: var(--clay-shadow-sm), var(--drop);
}
.cartridge.hidden { display: none; }

.cart-strip { height: 8px; width: 100%; }
.cartridge[data-cat="cv"] .cart-strip { background: linear-gradient(90deg, var(--cat-cv), color-mix(in srgb, var(--cat-cv) 50%, #fff)); }
.cartridge[data-cat="nlp"] .cart-strip { background: linear-gradient(90deg, var(--cat-nlp), color-mix(in srgb, var(--cat-nlp) 50%, #fff)); }
.cartridge[data-cat="security"] .cart-strip { background: linear-gradient(90deg, var(--cat-security), color-mix(in srgb, var(--cat-security) 50%, #fff)); }
.cartridge[data-cat="time"] .cart-strip { background: linear-gradient(90deg, var(--cat-time), color-mix(in srgb, var(--cat-time) 50%, #fff)); }
.cartridge[data-cat="3d"] .cart-strip { background: linear-gradient(90deg, var(--cat-3d), color-mix(in srgb, var(--cat-3d) 50%, #fff)); }

.cart-pin-row {
    display: flex;
    gap: 10px;
    padding: 10px 16px 0;
}
.cart-pin {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--metal-grad-dark);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.15), inset 0 -1px 2px rgba(0,0,0,0.6);
}
.cart-body { padding: 14px 20px 22px; }
.cart-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.cart-tag {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: #fff;
    padding: 3px 9px;
    border-radius: 5px;
    box-shadow: inset 1px 1px 1px rgba(255,255,255,0.3), inset -1px -1px 2px rgba(0,0,0,0.3);
}
.chip-cv { background: var(--cat-cv); }
.chip-nlp { background: var(--cat-nlp); }
.chip-security { background: var(--cat-security); }
.chip-time { background: var(--cat-time); }
.chip-3d { background: var(--cat-3d); }
.cart-id {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink-4);
    letter-spacing: 0.1em;
}
.cart-title {
    font-family: var(--font-head);
    font-size: 20px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.2;
    margin-bottom: 10px;
}
.cart-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}
.cart-tags span {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-3);
    background: var(--surface-sunk);
    padding: 3px 9px;
    border-radius: 6px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
}
.cart-desc {
    font-size: 14px;
    color: var(--ink-2);
    line-height: 1.6;
    margin-bottom: 16px;
}
.cart-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--brand);
    transition: gap 0.25s var(--ease);
}
.cart-link svg { width: 14px; height: 14px; }
.cart-link:hover { gap: 10px; }

/* =========================================================
   14. EXPERIENCE (conveyor)
   ========================================================= */
.conveyor {
    position: relative;
    padding-left: 50px;
}
.conv-rail {
    position: absolute;
    left: 18px;
    top: 20px;
    bottom: 20px;
    width: 4px;
    border-radius: 2px;
    background: repeating-linear-gradient(180deg, var(--metal-grad-dark) 0 12px, transparent 12px 24px);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.1);
}
.conv-item {
    position: relative;
    margin-bottom: 28px;
}
.conv-item:last-child { margin-bottom: 0; }
.conv-node {
    position: absolute;
    left: -50px;
    top: 6px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff, var(--brand) 80%);
    color: #fff;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 16px;
    box-shadow:
        inset 1px 1px 2px rgba(255,255,255,0.6),
        inset -2px -2px 4px rgba(0,0,0,0.25),
        0 6px 14px rgba(210,85,58,0.4);
    text-shadow: 0 1px 1px rgba(0,0,0,0.25);
    z-index: 2;
}
.conv-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 22px 26px;
    box-shadow: var(--clay-shadow);
    border: 1px solid var(--hairline-2);
    border-left: 4px solid var(--brand);
}
.conv-card-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}
.conv-role {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 19px;
    color: var(--ink);
}
.conv-date {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--brand);
    letter-spacing: 0.05em;
}
.conv-org {
    margin-top: 4px;
    color: var(--ink-2);
    font-size: 15px;
    font-weight: 500;
}
.conv-points {
    margin-top: 14px;
    display: grid;
    gap: 8px;
}
.conv-points li {
    position: relative;
    padding-left: 22px;
    font-size: 14px;
    color: var(--ink-2);
    line-height: 1.55;
}
.conv-points li::before {
    content: '';
    position: absolute;
    left: 0; top: 9px;
    width: 8px; height: 8px;
    border-radius: 2px;
    background: var(--brand);
    transform: rotate(45deg);
    opacity: 0.7;
}

/* =========================================================
   15. AWARDS & CERTS (trophy case)
   ========================================================= */
.case-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}
.case-col-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-head);
    font-size: 19px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--hairline);
}
.case-col-title svg { width: 22px; height: 22px; color: var(--brand); }

.medals, .certs {
    display: grid;
    gap: 14px;
}

.medal {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 14px 18px;
    box-shadow: var(--clay-shadow-sm);
    border: 1px solid var(--hairline-2);
    transition: transform 0.25s var(--ease);
}
.medal:hover { transform: translateX(4px); }
.medal-disc {
    position: relative;
    width: 52px; height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    flex-shrink: 0;
    box-shadow:
        inset 2px 2px 3px rgba(255,255,255,0.5),
        inset -2px -2px 5px rgba(0,0,0,0.35),
        0 5px 12px rgba(0,0,0,0.25);
}
.medal-disc::before {
    content: '';
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    border: 2px dashed rgba(255,255,255,0.35);
}
.medal-disc svg { width: 16px; height: 16px; position: absolute; top: 7px; opacity: 0.85; }
.medal-disc span {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 16px;
    margin-top: 6px;
    text-shadow: 0 1px 1px rgba(0,0,0,0.3);
}
.medal-disc span sup { font-size: 9px; }
.medal-gold { background: radial-gradient(circle at 35% 30%, #ffe08a, #e0a92e 70%, #b8821e); }
.medal-silver { background: radial-gradient(circle at 35% 30%, #f0f0f5, #b8bcc8 70%, #8a8e9c); }
.medal-bronze { background: radial-gradient(circle at 35% 30%, #e8a87c, #c47a4a 70%, #8a5128); }
.medal-info { display: flex; flex-direction: column; }
.medal-info strong { font-family: var(--font-head); font-size: 16px; color: var(--ink); }
.medal-info small { font-size: 13px; color: var(--ink-3); }

.cert {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 13px 16px;
    box-shadow: var(--clay-shadow-sm);
    border: 1px solid var(--hairline-2);
    position: relative;
    transition: transform 0.25s var(--ease);
}
.cert:hover { transform: translateX(4px); }
.cert::before {
    content: '';
    position: absolute;
    left: 0; top: 14px; bottom: 14px;
    width: 4px;
    border-radius: 0 2px 2px 0;
    background: linear-gradient(180deg, var(--teal), var(--blue));
}
.cert-seal {
    width: 38px; height: 38px;
    border-radius: 8px;
    background: var(--metal-grad);
    display: grid;
    place-items: center;
    color: var(--teal);
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.5), 0 3px 6px rgba(0,0,0,0.2);
    flex-shrink: 0;
}
.cert-seal svg { width: 20px; height: 20px; }
.cert-info { display: flex; flex-direction: column; }
.cert-info strong { font-family: var(--font-head); font-size: 15px; color: var(--ink); }
.cert-info small { font-size: 12px; color: var(--ink-3); }

/* =========================================================
   16. CONTACT (patch panel + signal form)
   ========================================================= */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.switchboard {
    padding: 22px;
}
.sb-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 14px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--hairline-2);
}
.sb-led { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 6px currentColor; }
.sb-title {
    margin-left: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.15em;
    color: var(--ink-3);
}
/* Lenis Integration Helper */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* Navigation Mobile Backdrop */
.nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 899;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s var(--ease);
}
.nav-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

/* --- ENHANCED HOVER EFFECTS --- */
.port {
    display: grid;
    grid-template-columns: 40px 100px 1fr;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
    transition: background 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.port::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 12%, transparent), transparent 75%);
    opacity: 0;
    transition: opacity 0.3s var(--ease);
    pointer-events: none;
}
.port:hover {
    background: var(--surface-raised);
    transform: translateX(4px);
    box-shadow: var(--clay-shadow-sm);
    border-color: color-mix(in srgb, var(--brand) 30%, transparent);
}
.port:hover::before { opacity: 1; }
.port-jack {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: var(--surface-sunk);
    display: grid;
    place-items: center;
    color: var(--brand);
    box-shadow:
        inset 2px 2px 4px rgba(0,0,0,0.18),
        inset -2px -2px 3px rgba(255,255,255,0.5);
    transition: transform 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.port-jack svg { width: 18px; height: 18px; }
.port:hover .port-jack {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 4px 10px color-mix(in srgb, var(--brand) 35%, transparent);
}
.port-lbl {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--ink-4);
    transition: color 0.25s var(--ease);
}
.port:hover .port-lbl {
    color: var(--brand);
    font-weight: 600;
}
.port-val {
    font-size: 14px;
    color: var(--ink-2);
    font-weight: 500;
    word-break: break-all;
    transition: transform 0.25s var(--ease), color 0.25s var(--ease);
}
.port:hover .port-val {
    color: var(--ink);
    transform: translateX(3px);
}
.port-static { cursor: default; }
.port-static:hover { transform: none; box-shadow: none; border-color: transparent; }
.port-static:hover::before { opacity: 0; }
.port-static:hover .port-jack { transform: none; background: var(--surface-sunk); color: var(--brand); box-shadow: inset 2px 2px 4px rgba(0,0,0,0.18), inset -2px -2px 3px rgba(255,255,255,0.5); }
.port-static:hover .port-lbl { color: var(--ink-4); font-weight: normal; }
.port-static:hover .port-val { transform: none; color: var(--ink-2); }

.signal-form {
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.sf-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 6px;
}
.sf-scope {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--green) 30%, transparent 70%);
    box-shadow: 0 0 10px var(--green);
    animation: scopeWave2 2s ease-in-out infinite;
}
@keyframes scopeWave2 { 0%,100% { opacity: 0.5; } 50% { opacity: 1; } }
.sf-title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 18px;
    color: var(--ink);
}
.sf-field { display: flex; flex-direction: column; gap: 6px; }
.sf-lbl {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--ink-3);
}
.signal-form input, .signal-form textarea {
    background: var(--surface-sunk);
    border: 1px solid var(--hairline-2);
    border-radius: 12px;
    padding: 13px 16px;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 15px;
    box-shadow: var(--clay-inset);
    outline: none;
    transition: box-shadow 0.25s var(--ease), border-color 0.25s;
    width: 100%;
}
.signal-form input::placeholder, .signal-form textarea::placeholder { color: var(--ink-4); }
.signal-form input:focus, .signal-form textarea:focus {
    border-color: var(--brand);
    box-shadow: var(--clay-inset), 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent);
}
.signal-form textarea { resize: vertical; min-height: 96px; font-family: var(--font-body); }
.sf-submit { align-self: flex-start; margin-top: 4px; }
.sf-status {
    font-family: var(--font-mono);
    font-size: 13px;
    min-height: 18px;
}
.sf-status.ok { color: var(--green); }
.sf-status.err { color: var(--brand); }

/* =========================================================
   17. FOOTER
   ========================================================= */
.footer {
    position: relative;
    z-index: 1;
    padding: 50px 0 26px;
    border-top: 1px solid var(--hairline-2);
    background: color-mix(in srgb, var(--bg-2) 60%, transparent);
}
.footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-name { font-family: var(--font-head); font-weight: 700; color: var(--ink); font-size: 17px; }
.footer-tag { font-size: 13px; color: var(--ink-3); }
.footer-socials { display: flex; gap: 10px; }
.footer-social {
    width: 42px; height: 42px;
    border-radius: 12px;
    background: var(--surface);
    display: grid;
    place-items: center;
    color: var(--ink-2);
    box-shadow: var(--clay-shadow-sm);
    transition: transform 0.25s var(--ease), color 0.25s, background 0.25s, box-shadow 0.25s;
}
.footer-social svg { width: 18px; height: 18px; transition: transform 0.25s var(--ease); }
.footer-social:hover {
    transform: translateY(-4px) scale(1.08) rotate(-5deg);
    color: #fff;
    background: var(--brand);
    box-shadow: 0 8px 18px color-mix(in srgb, var(--brand) 50%, transparent);
}
.footer-social:hover svg { transform: scale(1.1); }
.footer-shutdown {
    max-width: var(--maxw);
    margin: 30px auto 0;
    padding: 0 clamp(16px, 5vw, 60px);
    text-align: center;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink-4);
}
.footer-shutdown .blink { color: var(--green); animation: caret 1.4s step-end infinite; }
.footer-shutdown span { color: var(--ink-3); }

/* =========================================================
   18. RESPONSIVE CORRECTIONS (MOBILE VIEW FIT & ALIGNMENT)
   ========================================================= */
@media (max-width: 1024px) {
    .hero { padding-top: calc(var(--nav-h) + 50px); }
    .hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .hero-monitor-wrap { order: -1; max-width: 440px; margin: 0 auto; width: 100%; }
    .about-layout, .edu-layout, .contact-layout { grid-template-columns: 1fr; gap: 24px; }
    .skills-rack { grid-template-columns: 1fr; }
    .case-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .container { padding: 0 20px; }
    .scene { padding: 60px 0; }
    .nav { height: 68px; }
    .hero { padding-top: calc(68px + 44px); }

    .nav-links {
        position: fixed;
        top: 68px;
        left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 20px;
        background: color-mix(in srgb, var(--bg) 94%, transparent);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--hairline);
        box-shadow: var(--drop);
        transform: translateY(-120%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.4s var(--ease), opacity 0.3s, visibility 0.3s;
        margin: 0;
        max-height: calc(100vh - 68px);
        overflow-y: auto;
    }
    .nav-links.open { transform: translateY(0); opacity: 1; visibility: visible; }
    .nav-link { width: 100%; padding: 13px 18px; font-size: 15px; border-radius: 12px; }
    .nav-link-cta { margin: 8px 0 0; justify-content: center; width: 100%; }
    .nav-toggle { display: flex; }

    .hero-title { font-size: clamp(32px, 8vw, 48px); }
    .section-head { margin-bottom: 30px; }
    .about-rail { grid-template-columns: 1fr 1fr; gap: 16px; }
    .cartridges { grid-template-columns: 1fr; gap: 20px; }

    /* Floating stat badges positioning on tablet/mobile screens */
    .float-stat {
        position: absolute;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        width: auto;
        max-width: max-content;
        height: auto;
        padding: 5px 12px;
        border-radius: 999px;
        box-shadow: var(--clay-shadow-sm);
        z-index: 10;
        background: var(--surface-raised);
    }
    .float-num { font-size: 14px; }
    .float-lbl { font-size: 8px; }
    .float-stat-1 { top: 6px; bottom: auto; right: 10px; left: auto; height: auto; }
    .float-stat-2 { top: 6px; bottom: auto; left: 10px; right: auto; height: auto; }
    .float-stat-3 { display: none; }

    .crt-monitor { max-width: 100%; }
    .crt-bezel { padding: 16px 14px 14px; }
    .crt-content { font-size: 12px; line-height: 1.5; }

    /* Soften hero background rails on mobile so they don't visually collide with buttons */
    .hero-bg-layer { opacity: 0.15; pointer-events: none; }
    .rail { opacity: 0.15; }
    .hero-tagline { min-height: 2.2em; word-break: break-word; }

    /* Hide custom cursor on mobile touch screens to prevent interference */
    .cursor-dot, .cursor-reticle { display: none !important; }
    body.cursor-active { cursor: auto !important; }
    body.cursor-active a, body.cursor-active button, body.cursor-active input,
    body.cursor-active textarea, body.cursor-active label { cursor: pointer !important; }
}

@media (max-width: 520px) {
    .about-rail { grid-template-columns: 1fr; }
    .brand-name { font-size: 14px; }
    .brand-name small { font-size: 13px; }
    .theme-toggle { width: 56px; }
    .toggle-track { width: 56px; }
    html[data-theme="dark"] .toggle-knob { transform: translateX(22px); }

    .hero-cta { flex-direction: column; align-items: stretch; gap: 10px; }
    .hero-cta .btn { justify-content: center; width: 100%; }
    .plaque-meta { gap: 12px; flex-wrap: wrap; }

    /* PATCH PANEL MOBILE CORRECTION (Screenshot 1 fix) */
    .port {
        grid-template-columns: 38px 1fr;
        grid-template-rows: auto auto;
        gap: 2px 12px;
        padding: 10px 10px;
    }
    .port-jack {
        grid-row: 1 / span 2;
        width: 36px;
        height: 36px;
        border-radius: 9px;
    }
    .port-jack svg { width: 16px; height: 16px; }
    .port-lbl {
        display: block;
        grid-column: 2;
        font-size: 10px;
        letter-spacing: 0.12em;
        line-height: 1.2;
        color: var(--ink-3);
    }
    .port-val {
        grid-column: 2;
        font-size: 13.5px;
        font-weight: 600;
        line-height: 1.3;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .conv-node { width: 30px; height: 30px; left: -40px; font-size: 13px; }
    .conveyor { padding-left: 36px; }
    .signal-form { padding: 20px 16px; }
    .switchboard { padding: 18px 14px; }
    .footer-row { flex-direction: column; align-items: flex-start; gap: 18px; }
    .footer-socials { width: 100%; justify-content: flex-start; }
}

@media (max-width: 380px) {
    .container { padding: 0 14px; }
    .brand-name { display: none; }
    .crt-content { font-size: 11px; }
}

/* =========================================================
   19. REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .crt-scanline, .ambient-glow, .pulse-dot { animation: none !important; }
    .gsap-reveal { opacity: 1 !important; }
    [data-parallax-speed] { transform: none !important; }
}
