/* ==========================================================================
   Self-Hosted Display Fallback: Source Serif 4 (SIL OFL, Variable opsz 8-60)
   ========================================================================== */
@font-face {
    font-family: "Source Serif 4";
    font-style: italic;
    font-weight: 400 700;
    font-display: swap;
    src: url("fonts/source-serif-4-italic-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Source Serif 4";
    font-style: italic;
    font-weight: 400 700;
    font-display: swap;
    src: url("fonts/source-serif-4-italic-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Source Serif 4";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("fonts/source-serif-4-normal-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Source Serif 4";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("fonts/source-serif-4-normal-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   Variant 1 + 3 Hybrid: Warm Editorial Precision
   Warm Alabaster (#fafaf8) / Deep Obsidian (#09090b) + Cobalt Blue (#2563eb / #3b82f6)
   Cardless hairline ledgers, monospace tabular metadata, single-layer glass, zero double-bezels
   ========================================================================== */
:root {
    --bg-color: #fafaf8;
    --surface-subtle: #f3f2ee;
    --surface-elevated: #ffffff;

    --text-primary: #141413;
    --text-secondary: #52514d;
    --text-tertiary: #66645e;

    --accent-color: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-soft: rgba(37, 99, 235, 0.07);
    --accent-ring: rgba(37, 99, 235, 0.16);

    --border-color: rgba(20, 20, 19, 0.09);
    --border-strong: rgba(20, 20, 19, 0.2);
    --code-bg: rgba(20, 20, 19, 0.048);

    --nav-bg: rgba(250, 250, 248, 0.82);
    --nav-shadow: 0 14px 34px -14px rgba(20, 20, 19, 0.12), 0 2px 6px -2px rgba(20, 20, 19, 0.04);
    --ambient-shadow: 0 18px 40px -22px rgba(20, 20, 19, 0.12);
    --grain-opacity: 0.195;

    /* Headshot Ambient Effects */
    --profile-shadow-1: rgba(37, 99, 235, 0.1);
    --profile-shadow-2: rgba(20, 20, 19, 0.05);
    --profile-glow-filter: blur(22px) sepia(1) saturate(4.5) hue-rotate(190deg);
    --profile-glow-opacity: 0.13;
    --profile-hover-glow-filter: blur(44px) sepia(1) saturate(5.5) hue-rotate(190deg);
    --profile-hover-glow-opacity: 0.22;

    --radius-btn: 9999px;
    --ease-fluid: cubic-bezier(0.32, 0.72, 0, 1);
    --ease-out-expo: cubic-bezier(0.22, 1, 0.36, 1);

    --font-sans: "Plus Jakarta Sans", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-display: "kepler-std", "Source Serif 4", Georgia, "Times New Roman", serif;
    --font-display-subhead: "kepler-std-subhead", "Source Serif 4", Georgia, "Times New Roman", serif;
    --font-mono: "SF Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

    /* Hairline Figure Palette (Light) */
    --hairline-plate: #fafaf8;
    --hairline-hi: #5c5a54;
    --hairline-edge: #e7e5df;
    --hairline-mid: #eeece7;
    --hairline-lo: #f2f0ec;
    --hairline-stroke: 0.9;
}

[data-theme="dark"] {
    --bg-color: #09090b;
    --surface-subtle: rgba(255, 255, 255, 0.03);
    --surface-elevated: #111114;

    --text-primary: #f5f5f3;
    --text-secondary: #adaca6;
    --text-tertiary: #94938c;

    --accent-color: #3b82f6;
    --accent-hover: #60a5fa;
    --accent-soft: rgba(59, 130, 246, 0.1);
    --accent-ring: rgba(59, 130, 246, 0.22);

    --border-color: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.2);
    --code-bg: rgba(255, 255, 255, 0.06);

    --nav-bg: rgba(14, 14, 17, 0.8);
    --nav-shadow: 0 20px 44px -14px rgba(0, 0, 0, 0.72);
    --ambient-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.65);
    --grain-opacity: 0.075;

    --profile-shadow-1: rgba(59, 130, 246, 0.18);
    --profile-shadow-2: rgba(0, 0, 0, 0.35);
    --profile-glow-filter: blur(26px) sepia(1) saturate(6.5) hue-rotate(195deg) brightness(1.1);
    --profile-glow-opacity: 0.2;
    --profile-hover-glow-filter: blur(48px) sepia(1) saturate(7.5) hue-rotate(195deg) brightness(1.2);
    --profile-hover-glow-opacity: 0.3;

    /* Hairline Figure Palette (Dark) */
    --hairline-plate: #09090b;
    --hairline-hi: #f5f5f3;
    --hairline-edge: #8a8a93;
    --hairline-mid: #4a4a52;
    --hairline-lo: #35353c;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-color: #09090b;
        --surface-subtle: rgba(255, 255, 255, 0.03);
        --surface-elevated: #111114;

        --text-primary: #f5f5f3;
        --text-secondary: #adaca6;
        --text-tertiary: #94938c;

        --accent-color: #3b82f6;
        --accent-hover: #60a5fa;
        --accent-soft: rgba(59, 130, 246, 0.1);
        --accent-ring: rgba(59, 130, 246, 0.22);

        --border-color: rgba(255, 255, 255, 0.09);
        --border-strong: rgba(255, 255, 255, 0.2);
        --code-bg: rgba(255, 255, 255, 0.06);

        --nav-bg: rgba(14, 14, 17, 0.8);
        --nav-shadow: 0 20px 44px -14px rgba(0, 0, 0, 0.72);
        --ambient-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.65);
        --grain-opacity: 0.075;

        --profile-shadow-1: rgba(59, 130, 246, 0.18);
        --profile-shadow-2: rgba(0, 0, 0, 0.35);
        --profile-glow-filter: blur(26px) sepia(1) saturate(6.5) hue-rotate(195deg) brightness(1.1);
        --profile-glow-opacity: 0.2;
        --profile-hover-glow-filter: blur(48px) sepia(1) saturate(7.5) hue-rotate(195deg) brightness(1.2);
        --profile-hover-glow-opacity: 0.3;
    }
}

/* ==========================================================================
   Reset, Base Typography & Fixed Tactile Grain
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 112px;
}

body {
    font-family: var(--font-sans);
    font-weight: 450;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.65;
    transition: background-color 0.5s var(--ease-fluid), color 0.5s var(--ease-fluid);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

/* Fixed, GPU-safe tactile film grain */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 40;
    pointer-events: none;
    opacity: var(--grain-opacity);
    background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 180px 180px;
}

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

:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

/* ==========================================================================
   Single-Layer Floating Pill Nav + Scroll-Revealed Contact Icons
   ========================================================================== */
.nav-bar {
    position: fixed;
    top: 1.25rem;
    left: 0;
    right: 0;
    z-index: 100;
    pointer-events: none;
    padding: 0 1.5rem;
}

.nav-container {
    pointer-events: auto;
    max-width: 1080px;
    margin: 0 auto;
    height: 52px;
    padding: 0 0.45rem 0 1.45rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-radius: 9999px;
    background-color: transparent;
    border: 1px solid transparent;
    box-shadow: none;
    transition:
        background-color 0.6s var(--ease-fluid),
        border-color 0.6s var(--ease-fluid),
        box-shadow 0.6s var(--ease-fluid),
        max-width 0.7s var(--ease-fluid);
}

.nav-bar.is-scrolled .nav-container {
    max-width: 560px;
    background-color: var(--nav-bg);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    border-color: var(--border-color);
    box-shadow: var(--nav-shadow);
}

.nav-logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-style: italic;
    font-size: 1.125rem;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
    display: inline-block;
    overflow: hidden;
    vertical-align: middle;
    perspective: 1000px;
    white-space: nowrap;
    transition: color 0.35s var(--ease-fluid);
}

.nav-logo-inner {
    display: inline-block;
    transition:
        transform 0.75s var(--ease-out-expo),
        opacity 0.65s var(--ease-out-expo);
}

.js .nav-logo-inner {
    transform: translateY(115%) rotateX(-16deg);
    opacity: 0;
}

.js .nav-logo.is-visible .nav-logo-inner {
    transform: translateY(0) rotateX(0deg);
    opacity: 1;
}

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

/* Right side of Floating Pill: Quick Contact Icons + Theme Toggle */
.nav-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-contacts {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    overflow: hidden;
    transition:
        max-width 0.65s var(--ease-fluid),
        opacity 0.5s var(--ease-fluid),
        transform 0.65s var(--ease-fluid);
}

.js .nav-contacts {
    max-width: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateX(8px);
}

.js .nav-contacts.is-visible {
    max-width: 170px;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.nav-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 50%;
    color: var(--text-secondary);
    text-decoration: none;
    flex-shrink: 0;
    transition:
        color 0.35s var(--ease-fluid),
        background-color 0.35s var(--ease-fluid),
        transform 0.4s var(--ease-fluid);
}

.nav-icon-btn:hover {
    color: var(--accent-color);
    background-color: var(--surface-subtle);
    transform: scale(1.06);
}

.nav-icon-btn:active {
    transform: scale(0.94);
}

.nav-icon-btn svg {
    width: 1rem;
    height: 1rem;
}

.nav-divider {
    width: 1px;
    height: 16px;
    background-color: var(--border-color);
    margin: 0 0.45rem 0 0.35rem;
    flex-shrink: 0;
}

.theme-btn {
    background-color: var(--surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.3rem;
    height: 2.3rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px -2px rgba(20, 20, 19, 0.06);
    transition:
        transform 0.45s var(--ease-fluid),
        border-color 0.35s var(--ease-fluid),
        color 0.35s var(--ease-fluid),
        background-color 0.35s var(--ease-fluid);
}

.nav-bar.is-scrolled .theme-btn {
    background-color: transparent;
    border-color: transparent;
    box-shadow: none;
}

.theme-btn:hover {
    transform: scale(1.06);
    border-color: var(--border-strong);
    color: var(--accent-color);
    background-color: var(--surface-subtle);
}

.theme-btn:active {
    transform: scale(0.94);
}

.theme-btn svg {
    width: 1.05rem;
    height: 1.05rem;
}

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

/* ==========================================================================
   Background 3D Unitree Go2 Hairline Figure (Left Margin Whitespace Only)
   ========================================================================== */
#go2-bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--go2-gutter-width, 0px);
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.8s var(--ease-fluid);
}

#go2-bg-canvas.is-ready {
    opacity: 0.48;
    filter: drop-shadow(0 0 0 rgba(37, 99, 235, 0));
    transition: opacity 0.8s var(--ease-fluid), filter 0.8s var(--ease-fluid);
}

#go2-bg-canvas.is-ready.is-hovered {
    opacity: 0.78;
    filter: drop-shadow(0 0 10px rgba(37, 99, 235, 0.22));
    transition: opacity 0.22s var(--ease-fluid), filter 0.22s var(--ease-fluid);
}

[data-theme="dark"] #go2-bg-canvas.is-ready {
    opacity: 0.44;
    filter: drop-shadow(0 0 0 rgba(59, 130, 246, 0));
}

[data-theme="dark"] #go2-bg-canvas.is-ready.is-hovered {
    opacity: 0.74;
    filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.3));
}

body.go2-robot-hovered {
    cursor: pointer;
}

.go2-caption {
    position: fixed;
    top: var(--go2-caption-top, 62vh);
    left: 0;
    width: var(--go2-gutter-width, 0px);
    container-type: inline-size;
    padding: 0 0.5rem;
    z-index: 0;
    pointer-events: none;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-align: center;
    font-family: var(--font-sans);
    font-size: 0.6875rem;
    font-weight: 450;
    line-height: 1.45;
    letter-spacing: 0.005em;
    color: var(--text-tertiary);
    text-wrap: balance;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.9s var(--ease-fluid), transform 0.9s var(--ease-fluid);
}

.go2-caption.is-ready {
    opacity: 0.72;
    transform: translateY(0);
    transition: opacity 0.8s var(--ease-fluid), transform 0.9s var(--ease-fluid);
}

.go2-caption.is-ready.is-hovered {
    opacity: 0.94;
    transition: opacity 0.22s var(--ease-fluid), transform 0.9s var(--ease-fluid);
}

.go2-caption-main {
    max-width: none;
    font-size: clamp(0.54rem, 3.35cqw, 0.6875rem);
}

.go2-caption-sub {
    display: grid;
    place-items: center;
}

.go2-caption-note,
.go2-caption-hint {
    grid-area: 1 / 1;
    max-width: 38ch;
    font-size: 0.64rem;
    transition: opacity 0.8s var(--ease-fluid);
}

.go2-caption.is-hovered .go2-caption-note,
.go2-caption.is-hovered .go2-caption-hint {
    transition: opacity 0.22s var(--ease-fluid);
}

.go2-caption-note {
    opacity: 0.6;
}

.go2-caption-hint {
    opacity: 0;
    color: var(--accent-color);
}

.go2-caption.is-hovered .go2-caption-note {
    opacity: 0;
}

.go2-caption.is-hovered .go2-caption-hint {
    opacity: 0.92;
}

[data-theme="dark"] .go2-caption.is-ready {
    opacity: 0.68;
}

[data-theme="dark"] .go2-caption.is-ready.is-hovered {
    opacity: 0.9;
}

/* ==========================================================================
   Page Layout Container & Hero
   ========================================================================== */
.container {
    position: relative;
    z-index: 1;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 2.5rem;
}

.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4.5rem;
    padding: 8.5rem 0 6.5rem 0;
}

.hero-content {
    flex: 1;
    min-width: 0;
}

h1, h2, h3, .nav-logo, .highlight-value {
    font-optical-sizing: auto;
}

h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-style: italic;
    font-size: clamp(2.9rem, 5.3vw, 4.25rem);
    line-height: 1.07;
    letter-spacing: -0.036em;
    color: var(--text-primary);
    margin-bottom: 0.9rem;
    padding-bottom: 0.06em;
    text-wrap: balance;
}

h2 {
    font-family: var(--font-display-subhead);
    font-weight: 700;
    font-style: italic;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    text-wrap: balance;
}

h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-style: normal;
    color: var(--text-primary);
    letter-spacing: -0.015em;
    text-wrap: balance;
}

.hero-tagline {
    font-size: 1.08rem;
    font-weight: 500;
    color: var(--accent-color);
    margin-bottom: 2.25rem;
    letter-spacing: -0.01em;
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.tagline-divider {
    width: 1px;
    height: 14px;
    background-color: var(--border-strong);
    flex-shrink: 0;
}

.tagline-location {
    font-family: var(--font-mono);
    color: var(--text-tertiary);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.summary-text {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.75;
    max-width: 58ch;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2.5rem;
    text-wrap: pretty;
}

.contact-info {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Profile Headshot */
.profile-container {
    position: relative;
    width: 276px;
    height: 276px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    --glow-scale: 1;
}

.profile-container::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('headshot.webp');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    filter: var(--profile-glow-filter);
    opacity: var(--profile-glow-opacity);
    z-index: 1;
    pointer-events: none;
    transition: filter 0.7s var(--ease-out-expo), opacity 0.7s var(--ease-out-expo);
    animation: float-glow 9s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate;
}

.profile-img-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 2;
    transition: transform 0.7s var(--ease-out-expo), filter 0.7s var(--ease-out-expo);
    filter: drop-shadow(0 6px 14px var(--profile-shadow-2)) drop-shadow(0 0 10px var(--profile-shadow-1));
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 2;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
    -webkit-clip-path: url(#cradle-clip);
    clip-path: url(#cradle-clip);
}

.profile-cradle {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15.38%;
    z-index: 3;
    pointer-events: none;
}

.profile-cradle svg path { transition: stroke-width 0.7s var(--ease-out-expo), filter 0.7s var(--ease-out-expo); }
.profile-container:hover { --glow-scale: 1.12; }
.profile-container:hover::before {
    filter: var(--profile-hover-glow-filter);
    opacity: var(--profile-hover-glow-opacity);
    transition: filter 1.4s var(--ease-fluid), opacity 1.4s var(--ease-fluid);
}
.profile-container:hover .profile-img-wrap {
    transform: scale(1.035) translateY(-4px);
    filter: drop-shadow(0 12px 24px var(--profile-shadow-2)) drop-shadow(0 0 16px var(--profile-shadow-1));
    transition: transform 1.4s var(--ease-fluid), filter 1.4s var(--ease-fluid);
}
.profile-container:hover .profile-cradle svg path {
    stroke-width: 2.1px;
    filter: drop-shadow(0 0 3px var(--accent-color));
}

@keyframes float-glow {
    0% { transform: scale(calc(var(--glow-scale, 1) * 0.96)) translate(-1%, -1%); }
    50% { transform: scale(calc(var(--glow-scale, 1) * 1.04)) translate(1%, 1%); }
    100% { transform: scale(calc(var(--glow-scale, 1) * 0.96)) translate(-1%, -1%); }
}

/* ==========================================================================
   Buttons (Monochrome Ink -> Cobalt Hover + Button-in-Button Icon)
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.375rem 0.375rem 0.375rem 1.35rem;
    height: 2.85rem;
    border-radius: var(--radius-btn);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: -0.005em;
    white-space: nowrap;
    background-color: var(--text-primary);
    color: var(--bg-color);
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    transition:
        transform 0.55s var(--ease-fluid),
        background-color 0.45s var(--ease-fluid),
        border-color 0.45s var(--ease-fluid),
        color 0.45s var(--ease-fluid),
        box-shadow 0.55s var(--ease-fluid);
}

.btn:hover {
    background-color: var(--accent-color);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 12px 26px -10px rgba(37, 99, 235, 0.45), 0 0 0 4px var(--accent-ring);
}

.btn:active { transform: scale(0.975) translateY(0); }

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--border-strong);
    background-color: var(--surface-subtle);
    color: var(--text-primary);
    box-shadow: none;
}

.btn-sm {
    height: 2.25rem;
    padding: 0.25rem 0.25rem 0.25rem 1rem;
    font-size: 0.8125rem;
    gap: 0.6rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: rgba(128, 128, 128, 0.2);
    color: inherit;
    flex-shrink: 0;
    transition: transform 0.55s var(--ease-fluid), background-color 0.45s var(--ease-fluid), color 0.45s var(--ease-fluid);
}

.btn-outline .btn-icon {
    background-color: var(--code-bg);
    color: var(--text-secondary);
}

.btn:hover .btn-icon {
    background-color: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    transform: scale(1.06);
}

.btn-outline:hover .btn-icon {
    background-color: var(--text-primary);
    color: var(--bg-color);
}

.icon-arrow, .icon-mail { width: 0.95rem; height: 0.95rem; transition: transform 0.55s var(--ease-fluid); }
.btn-sm .btn-icon { width: 1.6875rem; height: 1.6875rem; }
.btn-sm .icon-arrow { width: 0.825rem; height: 0.825rem; }
.btn:hover .icon-arrow { transform: translate(1.5px, -1.5px) scale(1.05); }
.btn:hover .icon-mail { transform: translateY(-1px) scale(1.05); }

/* Animated Editorial Text Links */
.text-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.84rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    position: relative;
    padding-bottom: 3px;
    transition: color 0.4s var(--ease-fluid);
}

.text-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.45s var(--ease-fluid);
}

.text-link:hover { color: var(--text-primary); }
.text-link:hover::after { transform: scaleX(1); transform-origin: left; }
.text-link .link-arrow { opacity: 0.5; transition: transform 0.45s var(--ease-fluid), opacity 0.4s var(--ease-fluid), color 0.4s var(--ease-fluid); }
.text-link:hover .link-arrow { transform: translateX(3.5px); opacity: 1; color: var(--accent-color); }

/* ==========================================================================
   Section Blocks (Sticky Left Rail + Generous Macro-Whitespace)
   ========================================================================== */
.section-block {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 4rem;
    padding: 6rem 0;
    border-top: 1px solid var(--border-color);
}

.section-header-area h2 {
    font-size: clamp(1.55rem, 2.2vw, 1.85rem);
    line-height: 1.2;
    position: sticky;
    top: 6.25rem;
    color: var(--text-primary);
}

.section-content-area {
    width: 100%;
    min-width: 0;
}

/* ==========================================================================
   Education — Unified Cardless Hairline Ledger (Matches Experience & Volunteering)
   ========================================================================== */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.timeline-item {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    column-gap: 2rem;
    row-gap: 0.25rem;
    padding: 2.4rem 0;
    border-top: 1px solid var(--border-color);
    position: relative;
}

.timeline-item:first-child {
    border-top: none;
    padding-top: 0.2rem;
}

.timeline-item:last-child {
    padding-bottom: 0.5rem;
}

.timeline-meta,
.timeline-details {
    display: contents;
}

.timeline-date {
    grid-column: 2;
    grid-row: 1;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-tertiary);
    letter-spacing: 0.03em;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.timeline-details h3 {
    grid-column: 1;
    grid-row: 1;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.325rem;
    line-height: 1.3;
    margin-bottom: 0;
}

.timeline-institution {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 0.9375rem;
    color: var(--accent-color);
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 0.9rem;
}

.timeline-details .description {
    grid-column: 1 / -1;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.68;
    max-width: 62ch;
    margin-bottom: 0.65rem;
    text-wrap: pretty;
}

.timeline-links {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 1.35rem;
    margin-top: 0.55rem;
}

/* ==========================================================================
   Experience — Anti-Chronological Vertical List (Cardless Hairline Ledger)
   ========================================================================== */
.experience-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.experience-card {
    background-color: transparent;
    border: none;
    border-top: 1px solid var(--border-color);
    border-radius: 0;
    box-shadow: none;
    padding: 2.4rem 0;
    display: flex;
    flex-direction: column;
    gap: 1.3rem;
    position: relative;
}

.experience-card:first-child {
    border-top: none;
    padding-top: 0.2rem;
}

.experience-card:last-child {
    padding-bottom: 0.5rem;
}

.card-header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    column-gap: 2rem;
    row-gap: 0.25rem;
}

.card-date {
    grid-column: 2;
    grid-row: 1;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-tertiary);
    letter-spacing: 0.03em;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.experience-card h3 {
    grid-column: 1;
    grid-row: 1;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.325rem;
    line-height: 1.3;
}

.experience-card .institution {
    grid-column: 1;
    grid-row: 2;
    font-size: 0.9375rem;
    color: var(--accent-color);
    font-weight: 500;
}

.card-bullets {
    list-style-type: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-width: 62ch;
}

.card-bullets li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.35rem;
    line-height: 1.65;
    text-wrap: pretty;
}

.card-bullets li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 7px;
    height: 1px;
    background-color: var(--accent-color);
    opacity: 0.65;
}

/* ==========================================================================
   Volunteering — Flat, Open Editorial Ledger (Matches Rest of Design)
   Zero cards, zero double-bezels
   ========================================================================== */
.spotlight-card {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.spotlight-card-inner {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0.15rem 0 0 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.spotlight-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 1rem;
}

.spotlight-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}

.spotlight-badge {
    display: inline-flex;
    align-self: flex-start;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.2rem;
}

.spotlight-card h3 {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.35rem;
    line-height: 1.3;
}

.spotlight-link {
    font-size: 0.9375rem;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.35s var(--ease-fluid);
}

.spotlight-link:hover {
    opacity: 0.75;
}

.spotlight-date {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-tertiary);
    letter-spacing: 0.03em;
    font-variant-numeric: tabular-nums;
}

.spotlight-card .description {
    font-size: 0.975rem;
    color: var(--text-secondary);
    max-width: 60ch;
    line-height: 1.68;
    text-wrap: pretty;
}

.spotlight-bullets {
    list-style-type: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-width: 62ch;
}

.spotlight-bullets li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.35rem;
    line-height: 1.64;
    text-wrap: pretty;
}

.spotlight-bullets li strong {
    color: var(--text-primary);
    font-weight: 600;
}

.spotlight-bullets li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 7px;
    height: 1px;
    background-color: var(--accent-color);
    opacity: 0.65;
}

.spotlight-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.25rem;
    align-items: center;
}

/* ==========================================================================
   Projects — Cardless Hairline Index with Monospace Categories
   ========================================================================== */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--border-color);
}

.project-item {
    background-color: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    box-shadow: none;
    position: relative;
    transition: background-color 0.45s var(--ease-fluid);
}

.project-item::before {
    content: "";
    position: absolute;
    left: -1.25rem;
    top: 0.75rem;
    bottom: 0.75rem;
    width: 2px;
    border-radius: 2px;
    background-color: var(--accent-color);
    transform: scaleY(0);
    transform-origin: center;
    opacity: 0;
    transition: transform 0.55s var(--ease-fluid), opacity 0.45s var(--ease-fluid);
}

.project-item[data-expanded="true"]::before {
    transform: scaleY(1);
    opacity: 1;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.65rem 1.25rem;
    margin: 0 -1.25rem;
    border-radius: 12px;
    cursor: pointer;
    user-select: none;
    gap: 1.5rem;
    outline: none;
    transition: background-color 0.45s var(--ease-fluid);
}

.project-header:hover {
    background-color: var(--surface-subtle);
}

.project-header:focus-visible {
    background-color: var(--surface-subtle);
    outline: 2px solid var(--accent-color);
    outline-offset: -2px;
}

.project-title-group {
    display: grid;
    grid-template-columns: 162px 1fr;
    gap: 1.75rem;
    align-items: baseline;
    flex: 1;
    min-width: 0;
}

.project-category {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    font-weight: 600;
    transition: color 0.4s var(--ease-fluid);
}

.project-item:hover .project-category,
.project-item[data-expanded="true"] .project-category {
    color: var(--accent-color);
}

.project-header h3 {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.2rem;
    line-height: 1.35;
    color: var(--text-primary);
    transition: transform 0.55s var(--ease-fluid);
}

.project-header:hover h3 {
    transform: translateX(4px);
}

.project-trigger {
    flex-shrink: 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: transparent;
    transition:
        background-color 0.45s var(--ease-fluid),
        border-color 0.45s var(--ease-fluid),
        color 0.45s var(--ease-fluid),
        transform 0.45s var(--ease-fluid);
}

.project-header:hover .project-trigger,
.project-item[data-expanded="true"] .project-trigger {
    border-color: var(--accent-color);
    background-color: var(--accent-color);
    color: #ffffff;
    transform: scale(1.05);
}

.trigger-icon { width: 15px; height: 15px; transition: transform 0.55s var(--ease-fluid); }
.trigger-icon .line-v { transition: transform 0.55s var(--ease-fluid), opacity 0.35s var(--ease-fluid); transform-origin: center; }
.project-item[data-expanded="true"] .trigger-icon .line-v { transform: rotate(90deg); opacity: 0; }

.project-body {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.55s var(--ease-fluid), opacity 0.45s var(--ease-fluid);
}

.project-item[data-expanded="true"] .project-body { opacity: 1; }

.project-body-inner {
    padding: 0.25rem 3.25rem 2.25rem calc(162px + 1.75rem);
    color: var(--text-secondary);
    font-size: 0.96rem;
    line-height: 1.7;
}

.project-body-inner > p { max-width: 60ch; text-wrap: pretty; }
.project-link { margin-top: 1.25rem; }
.project-body-inner .spotlight-bullets { margin: 1.1rem 0; }
.project-body-inner .spotlight-actions { flex-wrap: wrap; }

/* Media Project Inner Layout — Clean Single Surface (No Double-Bezel) */
.project-media-layout {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 2.5rem;
    align-items: start;
}

.project-media-text {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    align-items: flex-start;
}

.project-media-text p { font-size: 0.96rem; line-height: 1.7; color: var(--text-secondary); text-wrap: pretty; }
.project-media-text .project-link { margin-top: 0.25rem; }

.media-bezel {
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.project-screenshot {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--ambient-shadow);
}

.project-item .project-media-text,
.project-item .project-media-visual {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.45s var(--ease-fluid), transform 0.45s var(--ease-fluid);
}

.project-item[data-expanded="true"] .project-media-text {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.65s var(--ease-fluid) 0.08s, transform 0.65s var(--ease-fluid) 0.08s;
}

.project-item[data-expanded="true"] .project-media-visual {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.65s var(--ease-fluid) 0.16s, transform 0.65s var(--ease-fluid) 0.16s;
}

/* Thesis Project Inner Layout — Clean Hairline Metrics (No Boxes) */
.thesis-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2.75rem;
}

.thesis-abstract { font-size: 0.96rem; line-height: 1.72; color: var(--text-secondary); text-wrap: pretty; }

.thesis-highlights {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    border-left: 1px solid var(--border-color);
    padding-left: 2rem;
}

.highlight-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.highlight-value {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--accent-color);
    font-family: var(--font-display-subhead);
    font-style: italic;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.highlight-label {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-primary);
    font-weight: 600;
}

.highlight-desc {
    font-size: 0.9rem;
    line-height: 1.58;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.project-item .thesis-abstract,
.project-item .highlight-item {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s var(--ease-fluid), transform 0.4s var(--ease-fluid);
}

.project-item[data-expanded="true"] .thesis-abstract {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.65s var(--ease-fluid) 0.08s, transform 0.65s var(--ease-fluid) 0.08s;
}

.project-item[data-expanded="true"] .highlight-item:nth-child(1) {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.65s var(--ease-fluid) 0.16s, transform 0.65s var(--ease-fluid) 0.16s;
}

.project-item[data-expanded="true"] .highlight-item:nth-child(2) {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.65s var(--ease-fluid) 0.24s, transform 0.65s var(--ease-fluid) 0.24s;
}

@keyframes highlight-pulse-project {
    0% { background-color: var(--accent-soft); }
    45% { background-color: var(--accent-soft); }
    100% { background-color: transparent; }
}

.project-item.highlight-pulse {
    animation: highlight-pulse-project 2.4s var(--ease-out-expo) forwards;
}

/* ==========================================================================
   Scroll Choreography
   ========================================================================== */
.js .reveal-ready {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.85s var(--ease-out-expo), transform 0.85s var(--ease-out-expo);
    transition-delay: var(--reveal-delay, 0ms);
}

.js .reveal-ready.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Footer & Single-Layer Frosted Glass Cookie Banner (No Double-Bezel)
   ========================================================================== */
.footer {
    max-width: 1080px;
    margin: 2rem auto 0 auto;
    padding: 3rem 2.5rem 4rem 2.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.8125rem;
    font-weight: 500;
}

.footer-link { color: var(--text-secondary); text-decoration: none; transition: color 0.35s var(--ease-fluid); }
.footer-link:hover { color: var(--accent-color); }
.footer-dot { margin: 0 0.6rem; color: var(--border-strong); }

.cookie-banner {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    max-width: 440px;
    width: calc(100% - 4rem);
    opacity: 0;
    transform: translateY(1.5rem) scale(0.98);
    pointer-events: none;
    transition: opacity 0.8s var(--ease-fluid), transform 0.8s var(--ease-fluid);
}

.cookie-banner.is-visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.cookie-banner.hidden { display: none; }

.cookie-banner-outer {
    padding: 0;
    border-radius: 18px;
    background: var(--nav-bg);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    box-shadow: var(--nav-shadow);
}

.cookie-banner-inner {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 18px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.cookie-content { display: flex; gap: 1.15rem; align-items: flex-start; }

.cookie-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.55rem;
    height: 2.55rem;
    border-radius: 50%;
    background-color: var(--accent-soft);
    color: var(--accent-color);
    flex-shrink: 0;
}

.cookie-icon { width: 1.15rem; height: 1.15rem; }
.cookie-text { flex: 1; }
.cookie-text h4 { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.3rem; }
.cookie-text p { font-size: 0.8125rem; line-height: 1.55; color: var(--text-secondary); }
.cookie-actions { display: flex; justify-content: flex-end; gap: 0.65rem; }
.cookie-banner .btn-outline { padding-right: 1rem; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
    .container { padding: 0 1.75rem; }

    .section-block {
        grid-template-columns: 165px 1fr;
        gap: 2.5rem;
        padding: 4.5rem 0;
    }

    .project-title-group {
        grid-template-columns: 138px 1fr;
        gap: 1.25rem;
    }

    .project-body-inner {
        padding: 0.25rem 2.5rem 2rem calc(138px + 1.25rem);
    }
}

@media (max-width: 768px) {
    .nav-bar { top: 0.85rem; padding: 0 1rem; }
    .nav-container { height: 48px; padding: 0 0.4rem 0 1.15rem; }
    .nav-bar.is-scrolled .nav-container { max-width: 100%; }
    .nav-icon-btn { width: 2rem; height: 2rem; }
    .nav-divider { margin: 0 0.3rem 0 0.25rem; }

    .container { padding: 0 1.25rem; }

    .hero-section {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 2.5rem;
        padding: 5.5rem 0 3.75rem 0;
    }

    .hero-tagline {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }

    .tagline-divider { display: none; }
    .profile-container { width: 185px; height: 185px; margin: 0 auto; }

    .section-block {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 3.5rem 0;
    }

    .section-header-area h2 { position: static; }

    .timeline-item {
        grid-template-columns: 1fr;
        padding: 2rem 0;
    }
    .timeline-date { grid-column: 1; grid-row: 1; text-align: left; }
    .timeline-details h3 { grid-column: 1; grid-row: 2; }
    .timeline-institution { grid-column: 1; grid-row: 3; }

    .experience-card { padding: 2rem 0; }

    .card-header { grid-template-columns: 1fr; gap: 0.25rem; }
    .card-date { grid-column: 1; grid-row: 1; text-align: left; }
    .experience-card h3 { grid-column: 1; grid-row: 2; }
    .experience-card .institution { grid-column: 1; grid-row: 3; }

    .project-item::before { display: none; }
    .project-header { padding: 1.35rem 0; margin: 0; border-radius: 0; }
    .project-header:hover { background-color: transparent; }
    .project-header:hover h3 { transform: none; }
    .project-title-group { grid-template-columns: 1fr; gap: 0.3rem; }
    .project-body-inner { padding: 0.25rem 0 1.75rem 0; }
    .project-media-layout { grid-template-columns: 1fr; gap: 1.75rem; }

    .thesis-layout { grid-template-columns: 1fr; gap: 1.75rem; }
    .thesis-highlights { border-left: none; padding-left: 0; border-top: 1px solid var(--border-color); padding-top: 1.5rem; }

    .footer { padding: 2.5rem 1.25rem 3rem 1.25rem; }

    .cookie-banner {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        width: auto;
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
    .js .reveal-ready { opacity: 1 !important; transform: none !important; }
}

.no-js .project-body { max-height: none !important; opacity: 1 !important; overflow: visible !important; }
.no-js .project-header { cursor: default !important; pointer-events: none !important; }
.no-js .project-trigger, .no-js #theme-toggle { display: none !important; }
.no-js .project-item .project-media-text,
.no-js .project-item .project-media-visual,
.no-js .project-item .thesis-abstract,
.no-js .project-item .highlight-item { opacity: 1 !important; transform: none !important; }
