/* ============================================
   JUNKSCION — "SYSTEM SHOCK"
   hand-built · opinionated · unpolished on purpose
   ============================================ */

/* Fonts loaded via <link> tags in HTML <head> for non-render-blocking performance */

:root {
    /* 1. COLOR PALETTE — "TERMINAL WARMTH" */
    /* Dark Mode (Default) */
    color-scheme: dark;
    --bg-void: #050505;
    --bg-surface: #111111;

    /* Text - Boosted Contrast */
    --text-primary: #f2f2f2;
    --text-secondary: #a3a3a3;
    --text-tertiary: #666666;

    /* Accents — tuned for harmony */
    --accent-orange: #e8622b;
    --accent-blue: #4a90ff;
    --accent-red: #e04545;
    --accent-green: #00e639;
    --accent-purple: #a87cff;
    --accent-warm: #d4a053;

    /* The Signature Accent (hero, global UI) */
    --brand-pop: var(--accent-orange);

    /* Section accents — cascade via --section-accent */
    --physics-accent: var(--accent-blue);
    --culture-accent: var(--accent-orange);
    --creative-accent: var(--accent-purple);

    /* UI Elements */
    --border-color: #2a2a2a;
    --border-active: #ffffff;
    --line-grid: rgba(255, 255, 255, 0.03);

    /* Typography & Spacing scales (unchanged) */
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Source Serif 4', 'Georgia', serif;
    --font-mono: 'JetBrains Mono', 'Consolas', monospace;
    --font-sans: 'Space Grotesk', sans-serif;

    /* Scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.5rem;
    --text-2xl: 2rem;
    --text-3xl: 3rem;
    --text-4xl: 4rem;
    --text-hero: clamp(3rem, 11vw, 9rem);

    /* Spacing */
    --space-2: 0.125rem;
    --space-4: 0.25rem;
    --space-8: 0.5rem;
    --space-12: 0.75rem;
    --space-16: 1rem;
    --space-24: 1.5rem;
    --space-32: 2rem;
    --space-48: 3rem;
    --space-64: 4rem;
    --space-96: 6rem;
    --space-128: 8rem;
}

[data-theme="light"] {
    color-scheme: light;
    --bg-void: #f8f7f4;
    --bg-surface: #efeee9;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --text-tertiary: #888888;
    --border-color: #d8d5cd;
    --border-active: #000000;
    --line-grid: rgba(0, 0, 0, 0.025);
    --accent-orange: #d4551f;
    --accent-blue: #3370d9;
    --accent-purple: #7c55cc;
    --accent-red: #cc3838;
}

/* Light mode — refined card surfaces */
[data-theme="light"] .card {
    background: #ffffff;
    border-color: #e2dfda;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .card:hover {
    border-color: #c5c1b9;
    box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .hero {
    border-bottom-color: #e2dfda;
}

[data-theme="light"] .section {
    border-bottom-color: #e2dfda;
}

[data-theme="light"] .manifesto-text {
    color: #3d3d3d;
}

[data-theme="light"] .footer {
    background: #f0efe9;
}

[data-theme="light"] .toc,
[data-theme="light"] .note {
    background: #ffffff;
}

/* Light mode nav override */
[data-theme="light"] .nav {
    background: rgba(248, 247, 244, 0.8);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .nav,
[data-theme="light"] .nav-logo,
[data-theme="light"] .nav-link,
[data-theme="light"] .nav-burger span,
[data-theme="light"] .theme-toggle {
    color: #1a1a1a;
}

[data-theme="light"] .nav-burger span {
    background: #1a1a1a;
}

[data-theme="light"] .nav-link {
    color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.active {
    color: #1a1a1a;
}

/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 100%;
    /* scroll-behavior handled by JS easeOutExpo for premium feel */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-void);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.65;
    overflow-x: hidden;
    /* Static noise texture — no filter re-render on resize */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    background-size: 256px 256px;
}

/* Accessibility */
:focus-visible {
    outline: 2px solid var(--brand-pop);
    outline-offset: 4px;
    border-radius: 2px;
}

a:focus,
button:focus,
.card-link:focus .card {
    outline: 2px solid var(--brand-pop);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--brand-pop);
    color: var(--bg-void);
    padding: 0.75rem 1.5rem;
    z-index: 10000;
    text-decoration: none;
    font-weight: 600;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

a {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Quality of Life: Selection & Scrollbar */
::selection {
    background: var(--section-accent, var(--brand-pop));
    color: var(--bg-void);
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-void);
    border-left: 1px solid var(--border-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border: 2px solid var(--bg-void);
    border-radius: 6px;
    transition: background 0.2s;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--brand-pop);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) var(--bg-void);
}

/* ============================================
   BACKGROUND GRID — slightly off-kilter, not perfect
   ============================================ */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(var(--line-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--line-grid) 1px, transparent 1px);
    background-size: 72px 72px;
    z-index: -1;
    pointer-events: none;
    mask-image: radial-gradient(ellipse 70% 60% at 35% 50%, black 20%, transparent 100%);
    /* Asymmetric fade — intentionally off-center */
}

/* ============================================
   CUSTOM CURSOR
   ============================================ */
@media (hover: hover) and (pointer: fine) {

    body.custom-cursor-active,
    body.custom-cursor-active *,
    body.custom-cursor-active *::before,
    body.custom-cursor-active *::after {
        cursor: none !important;
    }
}

.cursor-dot {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background: var(--brand-pop);
    border-radius: 50%;
    z-index: 100001;
    will-change: transform;
    transition: width 0.15s, height 0.15s, background 0.2s;
    opacity: 0;
}

.cursor-dot.active {
    width: 6px;
    height: 6px;
    background: #fff;
}

.cursor-outline {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 36px;
    height: 36px;
    border: 1.5px solid color-mix(in srgb, var(--brand-pop) 60%, transparent);
    border-radius: 50%;
    z-index: 100000;
    will-change: transform;
    transition: width 0.25s, height 0.25s, background 0.25s, border-color 0.25s, opacity 0.25s;
    opacity: 0;
}

.cursor-outline.active {
    width: 56px;
    height: 56px;
    background: color-mix(in srgb, var(--brand-pop) 8%, transparent);
    border-color: color-mix(in srgb, var(--brand-pop) 30%, transparent);
}


/* ============================================
   NAVBAR
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: var(--space-16) var(--space-48);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    color: #fff;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(5, 5, 5, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    will-change: transform;
    /* isolate composite layer for blur perf */
}

.nav-logo {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: var(--text-lg);
    letter-spacing: -1px;
    text-transform: uppercase;
}

.nav-logo .dot {
    color: var(--brand-pop);
}

.nav-links {
    display: flex;
    gap: var(--space-32);
}

.nav-link {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.6);
    position: relative;
    padding: var(--space-4) 0;
    /* ... existing base styles ... */
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* 1. PHYSICS NAV: "Quantum Glitch" */
.nav-link[data-section="physics"]:hover,
.nav-link[data-section="physics"].active {
    color: var(--physics-accent);
    animation: navGlitch 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.nav-link[data-section="physics"]::after {
    background: var(--physics-accent);
}

/* 2. CULTURE NAV: "Perspective Shift" */
.nav-link[data-section="culture"]:hover,
.nav-link[data-section="culture"].active {
    color: var(--culture-accent);
    transform: skewX(-12deg) scale(1.05);
}

.nav-link[data-section="culture"]::after {
    background: var(--culture-accent);
}

/* 3. CREATIVE NAV: "Ethereal Bloom" */
.nav-link[data-section="creative"]:hover,
.nav-link[data-section="creative"].active {
    color: var(--creative-accent);
    text-shadow: 0 0 12px var(--creative-accent);
    letter-spacing: 0.15em;
    /* Breathing text */
}

.nav-link[data-section="creative"]::after {
    background: var(--creative-accent);
    box-shadow: 0 0 8px var(--creative-accent);
}

/* Base Nav Line Logic */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--brand-pop);
    transition: width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

@keyframes navGlitch {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(-2px, 2px);
    }

    40% {
        transform: translate(-2px, -2px);
    }

    60% {
        transform: translate(2px, 2px);
    }

    80% {
        transform: translate(2px, -2px);
    }

    100% {
        transform: translate(0);
    }
}

/* Nav link press state — tactile feedback */
.nav-link:active {
    transform: scale(0.95);
    transition: transform 0.05s;
}

.nav-burger {
    display: none;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

.nav-burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    margin: 5px 0;
}

.theme-toggle {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Show sun in dark mode, moon in light mode */
.theme-toggle .icon-moon {
    display: none;
}

[data-theme="light"] .theme-toggle .icon-sun {
    display: none;
}

[data-theme="light"] .theme-toggle .icon-moon {
    display: block;
}

.theme-toggle:hover svg {
    transform: rotate(30deg);
}

.theme-toggle:active svg {
    transform: rotate(180deg) scale(0.85);
    transition: transform 0.15s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.search-toggle {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

[data-theme="light"] .search-toggle {
    color: var(--text-primary);
}

.search-toggle:hover svg {
    transform: scale(1.15);
    transition: transform 0.2s;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-24);
}


/* ============================================
   HERO SECTION — ASYMMETRIC VISUAL INTEREST
   ============================================ */
.hero {
    min-height: 92vh;
    padding: var(--space-64) var(--space-48);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.hero-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 800px;
    gap: 0;
}

/* Background Abstract Shape — subtle since orbs + particles provide main atmosphere */
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(255, 95, 31, 0.04) 0%, transparent 60%);
    filter: blur(100px);
    z-index: -1;
    animation: drift 25s infinite alternate ease-in-out;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(-50px, 50px) scale(1.1);
    }
}

.hero-title {
    font-family: var(--font-sans);
    font-size: var(--text-hero);
    font-weight: 800;
    letter-spacing: -0.06em;
    line-height: 0.82;
    margin-bottom: var(--space-16);
    color: var(--text-primary);
    position: relative;
    z-index: 1;
    perspective: 500px;
    white-space: nowrap;
}

/* Glitch hover on hero title */
.hero-title:hover .hero-letter {
    animation: letterGlitch 0.3s ease forwards;
}

.hero-title:hover .hero-letter:nth-child(odd) {
    animation-delay: 0.02s;
}

.hero-title:hover .hero-letter:nth-child(even) {
    animation-delay: 0.06s;
}

@keyframes letterGlitch {
    0% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-2px) skewX(-5deg);
        color: var(--accent-blue);
    }

    40% {
        transform: translateX(2px) skewX(3deg);
    }

    60% {
        transform: translateX(-1px);
        color: var(--accent-purple);
    }

    80% {
        transform: translateX(1px) skewX(-1deg);
    }

    100% {
        transform: translateX(0) skewX(0);
        color: var(--text-primary);
    }
}

.hero-byline {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-tertiary);
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: lowercase;
    margin-bottom: var(--space-32);
    position: relative;
    z-index: 1;
}

.hero-title .dot {
    color: var(--brand-pop);
}

.hero-tagline {
    font-family: var(--font-body);
    font-size: clamp(1.15rem, 2vw, 1.45rem);
    font-style: italic;
    color: var(--text-secondary);
    max-width: 540px;
    line-height: 1.6;
    margin-bottom: var(--space-32);
}

.hero-cta {
    margin-bottom: var(--space-32);
    display: flex;
    gap: var(--space-24);
}

.btn-primary {
    padding: var(--space-12) var(--space-32);
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-mono);
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    border: 1px solid var(--text-tertiary);
    transition: all 0.3s;
    position: relative;
}

.btn-primary:hover {
    border-color: var(--brand-pop);
    color: var(--brand-pop);
    padding-left: var(--space-48);
    letter-spacing: 0.15em;
}

.btn-primary::before {
    content: '→';
    position: absolute;
    left: var(--space-16);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-primary:hover::before {
    opacity: 1;
}

/* Scroll Indicator */
.hero-scroll {
    position: absolute;
    bottom: var(--space-48);
    left: var(--space-48);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-tertiary);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-scroll span {
    animation: pulse 2s ease-in-out infinite;
}

.hero-scroll-chevron {
    writing-mode: horizontal-tb;
    display: inline-block;
    animation: scrollBounce 2s ease-in-out infinite;
}

.hero-scroll-chevron svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

@keyframes scrollBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(5px);
    }
}

/* Quote */
.hero-quote {
    text-align: center;
    max-width: 500px;
    z-index: 10;
}

.hero-quote blockquote {
    margin: 0;
    padding: 0;
}

.q-text {
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 1.5vw, 1.15rem);
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.5;
    display: block;
    margin-bottom: var(--space-8);
    opacity: 0.7;
}

.q-cite {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--brand-pop);
    display: block;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .hero-quote {
        text-align: center;
        max-width: 100%;
    }
}


/* ============================================
   MAIN LAYOUT & GRID
   ============================================ */
.main {
    max-width: 1200px;
    /* Wider container */
    margin: 0 auto;
    padding: 0 var(--space-48);
}

.section {
    padding: var(--space-128) 0;
    border-bottom: 1px solid var(--border-color);
    scroll-margin-top: 80px;
    content-visibility: auto;
    contain-intrinsic-size: auto 600px;
}

/* Scroll offset for heading anchors too */
.article h2[id] {
    scroll-margin-top: 100px;
}

/* Manifesto section — the opening statement */
.manifesto {
    padding: var(--space-96) 0;
}

.manifesto-text {
    font-family: var(--font-body);
    font-size: clamp(1.2rem, 2.5vw, 1.7rem);
    line-height: 1.5;
    max-width: 680px;
    color: var(--text-secondary);
    font-style: italic;
    position: relative;
    padding-left: var(--space-24);
    border-left: 2px solid var(--brand-pop);
    transition: border-color 0.4s, color 0.4s;
}

.manifesto-text:hover {
    color: var(--text-primary);
    border-left-color: var(--accent-purple);
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: var(--space-64);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--space-24);
}

.section-title {
    font-family: var(--font-body);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 600;
    font-style: italic;
    text-transform: none;
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.section-title .dot {
    display: inline-block;
    width: 0.35em;
    height: 0.35em;
    margin-right: var(--space-12);
    vertical-align: middle;
    border-radius: 50%;
    /* circles, not squares */
}

.section-sub {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-tertiary);
}

/* Section accent propagation */
.s-physics {
    --section-accent: var(--physics-accent);
}

.s-culture {
    --section-accent: var(--culture-accent);
}

.s-creative {
    --section-accent: var(--creative-accent);
}

/* Colors */
.s-physics .section-title .dot {
    background: var(--physics-accent);
}

.s-culture .section-title .dot {
    background: var(--culture-accent);
}

.s-creative .section-title .dot {
    background: var(--creative-accent);
}


/* GRID — intentionally uneven rhythm */
.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-24) var(--space-32);
}

/* let single-child grids breathe instead of stretching full width */
.grid> :only-child {
    max-width: 540px;
}

/* Card — the whole damn personality */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: var(--space-32) var(--space-32) var(--space-24);
    position: relative;
    overflow: hidden;
    transition: border-color 0.4s, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    height: 100%;
    min-height: 280px;
    will-change: transform;
}

/* Card shadow now handled by 3D tilt section (shine overlay + hover glow) */

/* the big background initial */
.card-symbol {
    position: absolute;
    bottom: -0.2em;
    right: 0.05em;
    font-family: var(--font-body);
    font-size: clamp(7rem, 14vw, 11rem);
    font-weight: 700;
    font-style: italic;
    line-height: 0.8;
    color: var(--text-primary);
    opacity: 0.04;
    pointer-events: none;
    user-select: none;
    transition: opacity 0.5s, transform 0.5s, color 0.5s, filter 0.5s;
    z-index: 0;
    filter: blur(2px);
}

.card:hover .card-symbol {
    opacity: 0.12;
    transform: translate(-4px, 4px) scale(1.05);
    color: var(--section-accent, var(--brand-pop));
    filter: blur(0);
}

/* ============================================
   THEMATIC CARD INTERACTIONS
   ============================================ */

/* 1. PHYSICS CARD: "Quantum Superposition" */
/* Sharp offsets, tech-blinking border, solid shadow */
.s-physics .card:hover {
    border-color: var(--physics-accent);
    box-shadow: 6px 6px 0px var(--physics-accent);
    transform: translate(-3px, -3px);
    z-index: 10;
}

/* 2. CULTURE CARD: "Entropic Tilt" */
/* Skewed perspective, bold highlighter shadow */
.s-culture .card:hover {
    border-color: var(--culture-accent);
    transform: rotate(1deg) scale(1.02);
    box-shadow: 0 10px 0px var(--culture-accent);
    z-index: 10;
}

/* 3. CREATIVE CARD: "Ghostly Float" */
/* Large bloom, slow rift, ethereal rise */
.s-creative .card:hover {
    border-color: var(--creative-accent);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 0 32px -4px var(--creative-accent);
    z-index: 10;
}

/* Base generic hover (fallback) */
.card:hover {
    z-index: 10;
}

/* Section Title Interaction */
.section-title {
    display: inline-block;
    cursor: default;
}

.section-title:hover .dot {
    transform: scale(1.4);
    box-shadow: 0 0 16px var(--section-accent);
}

.section-title .dot {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}

/* Mobile tap feedback — :hover doesn't fire on touch */
@media (hover: none) {
    .card-link:active .card {
        transform: scale(0.98) !important;
        box-shadow: none !important;
        border-color: var(--section-accent, var(--brand-pop));
    }

    .card-link:active .card-title {
        color: var(--section-accent, var(--brand-pop));
    }
}

/* section-specific top border sweep on hover */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--section-accent, var(--brand-pop));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover::before {
    transform: scaleX(1);
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

/* Placeholder Card */
.card-wip {
    border-style: dashed;
    opacity: 0.55;
    cursor: not-allowed;
}

.card-wip .card-symbol {
    opacity: 0.03;
}

.card-wip:hover {
    opacity: 0.75;
    border-style: dashed;
    transform: none;
    box-shadow: none;
}

.card-wip::before {
    display: none;
}

.card-wip .card-title {
    color: var(--text-secondary);
}

.card-wip:hover .card-title {
    color: var(--text-secondary);
}

/* Top Bar: Pill & Status */
.card-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-16);
}

.pill {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    padding: 3px 8px;
    border: 1px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    width: fit-content;
    margin-bottom: var(--space-12);
}

.s-physics .pill {
    color: var(--physics-accent);
    border-color: color-mix(in srgb, var(--physics-accent) 25%, transparent);
}

.s-culture .pill {
    color: var(--culture-accent);
    border-color: color-mix(in srgb, var(--culture-accent) 25%, transparent);
}

.s-creative .pill {
    color: var(--creative-accent);
    border-color: color-mix(in srgb, var(--creative-accent) 25%, transparent);
}

/* Main Content */
.card-content {
    flex-grow: 1;
    position: relative;
    z-index: 1;
}

.card-title {
    font-family: var(--font-sans);
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    font-weight: 700;
    margin-bottom: var(--space-12);
    line-height: 1.05;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    transition: color 0.3s;
}

.card:hover .card-title {
    color: var(--section-accent, var(--brand-pop));
}

.card-desc {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: var(--space-16);
}

/* pull-quote inside card */
.card-pull {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-tertiary);
    margin-bottom: var(--space-12);
    padding-left: var(--space-12);
    border-left: 2px solid var(--section-accent, var(--brand-pop));
    line-height: 1.45;
}

/* Footer / Meta */
.card-foot {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
    padding-top: var(--space-16);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-tertiary);
    letter-spacing: 0.05em;
    position: relative;
    z-index: 1;
}


/* ============================================
   ARTICLE PAGE — the reading experience
   ============================================ */
.article-wrap {
    max-width: 720px;
    margin: var(--space-128) auto var(--space-64);
    padding: 0 var(--space-24);
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    margin-bottom: var(--space-48);
}

.breadcrumb a {
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--brand-pop);
}

.breadcrumb-sep {
    color: var(--text-tertiary);
    opacity: 0.4;
    font-size: 0.65rem;
}

.breadcrumb-current {
    color: var(--section-accent, var(--brand-pop));
}

/* Back link (kept for compat) */
.back {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    display: inline-block;
    margin-bottom: var(--space-48);
    transition: color 0.2s;
}

.back:hover {
    color: var(--brand-pop);
}

.back::before {
    content: '\2190 ';
}

/* Meta line */
.article-meta {
    display: flex;
    gap: var(--space-24);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    margin-bottom: var(--space-16);
}

.article-meta span:not(:last-child)::after {
    content: '\00b7';
    margin-left: var(--space-24);
    color: var(--border-color);
}

/* Title */
.article h1 {
    font-family: var(--font-body);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-12);
    color: var(--text-primary);
}

/* Subtitle */
.article-sub {
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: var(--space-48);
    display: block;
}

/* Body text — the most important thing on the page */
.article p {
    font-family: var(--font-body);
    font-size: 1.15rem;
    line-height: 1.75;
    margin-bottom: var(--space-24);
    color: var(--text-primary);
    font-weight: 400;
    letter-spacing: 0.005em;
    -webkit-font-smoothing: auto;
    /* let the serifs breathe */
}

.article h2 {
    font-family: var(--font-body);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    margin-top: var(--space-64);
    margin-bottom: var(--space-24);
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: var(--text-primary);
}

.article h3 {
    font-family: var(--font-body);
    font-size: 1.3rem;
    font-weight: 600;
    font-style: italic;
    margin-top: var(--space-48);
    margin-bottom: var(--space-16);
    color: var(--text-primary);
}

/* Sidenotes */
.sidenote {
    float: right;
    clear: right;
    width: 200px;
    margin-right: -240px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-secondary);
    border-left: 1px solid var(--brand-pop);
    padding-left: var(--space-8);
    margin-bottom: var(--space-16);
    line-height: 1.5;
}

.sn-num {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--brand-pop);
    vertical-align: super;
}

/* Blockquotes */
.article blockquote {
    margin: var(--space-48) 0;
    padding: var(--space-24) var(--space-32);
    border-left: 3px solid var(--brand-pop);
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-style: italic;
    line-height: 1.5;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
}

.article blockquote cite {
    display: block;
    margin-top: var(--space-12);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
}

/* Links inside articles */
.article a {
    color: var(--text-primary);
    text-decoration: underline;
    text-decoration-color: var(--brand-pop);
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
    transition: text-decoration-color 0.2s;
}

.article a:hover {
    text-decoration-color: var(--text-primary);
}

[data-theme="light"] .article a {
    text-decoration-thickness: 2px;
    text-decoration-color: color-mix(in srgb, var(--section-accent, var(--brand-pop)) 70%, transparent);
}

[data-theme="light"] .article a:hover {
    text-decoration-color: var(--text-primary);
}

/* Strong / emphasis */
.article strong {
    font-weight: 600;
    color: var(--text-primary);
}

.article em {
    font-style: italic;
}

/* Lists */
.article ul,
.article ol {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: var(--space-24);
    padding-left: 1.5em;
    color: var(--text-primary);
}

.article li {
    margin-bottom: var(--space-8);
}

/* Math Block */
.math-block {
    overflow-x: auto;
    padding: var(--space-24);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    margin: var(--space-32) 0;
    text-align: center;
}

/* Code Blocks — premium terminal aesthetic */
pre {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: var(--space-24);
    margin: var(--space-32) 0;
    overflow-x: auto;
    position: relative;
    border-radius: 4px;
}

pre::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--section-accent, var(--brand-pop)), var(--accent-purple), var(--accent-blue));
    opacity: 0.6;
}

pre code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text-primary);
    display: block;
    -webkit-font-smoothing: antialiased;
}

.article code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 2px 6px;
    border-radius: 3px;
    color: var(--brand-pop);
}

pre code {
    background: none;
    border: none;
    padding: 0;
    color: var(--text-primary);
}

[data-theme="light"] pre {
    background: #ffffff;
    border-color: #e2dfda;
}

[data-theme="light"] .article code {
    background: #f5f4f0;
    border-color: #e2dfda;
}

/* Article images — future-proof */
.article img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
    margin: var(--space-32) 0;
    display: block;
}

.article figure {
    margin: var(--space-48) 0;
    padding: 0;
}

.article figure img {
    margin-bottom: var(--space-12);
}

.article figcaption {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-align: center;
    font-style: normal;
    letter-spacing: 0.04em;
}

/* Notes / Callouts */
.note {
    background: rgba(255, 95, 31, 0.06);
    border-left: 3px solid var(--brand-pop);
    padding: 1.25rem 1.5rem;
    margin: var(--space-32) 0;
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.note-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--brand-pop);
    font-weight: 600;
    margin-right: 0.5rem;
    display: inline-block;
    margin-bottom: var(--space-8);
}

/* ============================================
   POST DECORATIONS — margin art & scroll elements
   ============================================ */
.article-wrap {
    position: relative;
    overflow: visible;
}

.post-deco {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    /* No overflow:hidden — let elements bleed into page margins.
       body overflow-x:hidden prevents horizontal scroll. */
}

.article {
    position: relative;
    z-index: 1;
}

.deco {
    position: absolute;
    pointer-events: none;
    user-select: none;
    will-change: transform;
    transition: opacity 0.6s ease;
    contain: layout style;
}

/* Text decorations — faded typographic fragments */
.deco-text {
    font-family: var(--font-body);
    font-weight: 300;
    font-style: italic;
    color: #ffffff;
    opacity: 0.14;
    line-height: 1;
    white-space: nowrap;
}

[data-theme="light"] .deco-text {
    color: #000000;
    opacity: 0.08;
}

/* Large background glyph */
.deco-glyph {
    font-family: 'Cormorant Garamond', var(--font-serif);
    font-weight: 300;
    font-style: italic;
    color: #ffffff;
    opacity: 0.10;
    line-height: 1;
}

[data-theme="light"] .deco-glyph {
    color: #000000;
    opacity: 0.06;
}

/* Hand-drawn SVG decorations */
.deco-svg {
    opacity: 0.16;
    fill: none;
    stroke: #ffffff;
    stroke-width: 1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

[data-theme="light"] .deco-svg {
    stroke: #000000;
    opacity: 0.09;
}

/* Accent-colored decorations (dimmer) */
.deco-accent {
    opacity: 0.12;
}

[data-theme="light"] .deco-accent {
    opacity: 0.08;
}

/* Dot clusters */
.deco-dots {
    opacity: 0.14;
}

.deco-dots circle {
    fill: #ffffff;
}

[data-theme="light"] .deco-dots {
    opacity: 0.08;
}

[data-theme="light"] .deco-dots circle {
    fill: #000000;
}

/* Stamp-style rotated text */
.deco-stamp {
    font-family: var(--font-mono);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #ffffff;
    opacity: 0.12;
    border: 2px solid currentColor;
    padding: 0.3em 0.8em;
    line-height: 1;
}

[data-theme="light"] .deco-stamp {
    color: #000000;
    opacity: 0.07;
}

/* Line / rule decorations */
.deco-rule {
    border: none;
    border-top: 1px solid #ffffff;
    opacity: 0.12;
}

[data-theme="light"] .deco-rule {
    border-top-color: #000000;
    opacity: 0.08;
}

/* Hide ALL decorations on mobile — too cramped */
@media (max-width: 768px) {
    .post-deco {
        display: none;
    }
}

/* On medium screens, hide elements that overflow margins */
@media (max-width: 1200px) {
    .deco-margin {
        display: none;
    }
}


/* ============================================
   MEGA FOOTER (RESTORED)
   ============================================ */
.footer {
    border-top: 1px solid var(--border-color);
    padding: var(--space-64) var(--space-48);
    background: var(--bg-surface);
    font-family: var(--font-mono);
}

.mega-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: var(--space-48);
    max-width: 1200px;
    margin: 0 auto;
}

.mf-col {
    display: flex;
    flex-direction: column;
}

.mf-logo {
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: 2rem;
    margin-bottom: var(--space-8);
    letter-spacing: -1px;
    color: var(--text-primary);
}

.mf-logo .dot {
    color: var(--brand-pop);
}

.mf-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.mf-ethos {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.1rem;
    color: var(--text-tertiary);
    line-height: 1.3;
}

.mf-head {
    font-family: var(--font-mono);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 2px;
    margin-bottom: var(--space-24);
    color: var(--brand-pop);
}

.mf-list {
    list-style: none;
}

.mf-list li {
    margin-bottom: var(--space-12);
}

.mf-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.mf-link:hover {
    color: var(--brand-pop);
    padding-left: 4px;
}

.mf-status-box {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    width: fit-content;
    margin-bottom: var(--space-16);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

/* Footer content (index page) */
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-16);
}

.footer-links {
    display: flex;
    gap: var(--space-24);
    justify-content: center;
    margin-bottom: var(--space-16);
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--brand-pop);
}

.footer-copy {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* Footer (post pages) */
.footer-icons {
    display: flex;
    gap: var(--space-24);
    justify-content: center;
    margin-bottom: var(--space-16);
}

.footer-icons a {
    color: var(--text-secondary);
    transition: color 0.2s;
}

.footer-icons a:hover {
    color: var(--brand-pop);
}

.footer-icons svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.footer-egg {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    opacity: 0.6;
    text-align: center;
    margin-top: var(--space-8);
}


/* ============================================
   RESPONSIVE
   ============================================ */

/* ── Tablet (≤1024px) ── */
@media (max-width: 1024px) {
    .main {
        max-width: 100%;
        padding: 0 var(--space-32);
    }

    .hero-title {
        font-size: 10vw;
    }

    .section {
        padding: var(--space-96) 0;
    }

    .mega-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-32);
    }
}

/* ── Mobile (≤768px) ── */
@media (max-width: 768px) {

    /* ── Layout ── */
    .main {
        padding: 0 var(--space-16);
    }

    .section {
        padding: var(--space-64) 0;
    }

    .manifesto {
        padding: var(--space-48) 0;
    }

    .manifesto-text {
        font-size: 1.1rem;
        padding-left: var(--space-16);
    }

    /* ── Grid → single column ── */
    .grid {
        grid-template-columns: 1fr;
        gap: var(--space-16);
    }

    .grid> :only-child {
        max-width: 100%;
    }

    /* ── Nav ── */
    .nav {
        padding: var(--space-12) var(--space-16);
    }

    .nav-logo {
        font-size: 1rem;
        z-index: 201;
        position: relative;
    }

    .nav-actions {
        gap: var(--space-8);
    }

    .nav-burger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 0;
        z-index: 201;
        width: 44px;
        height: 44px;
        align-items: center;
        padding: 0;
    }

    .nav-burger span {
        display: block;
        width: 22px;
        height: 2px;
        background: #fff;
        transition: transform 0.3s ease, opacity 0.3s ease;
        margin: 4px 0;
    }

    /* Burger → X animation */
    .nav-burger.active span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .nav-burger.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-burger.active span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .nav-links {
        display: flex;
        position: fixed;
        inset: 0;
        background: var(--bg-void);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: var(--space-32);
        z-index: 200;
        transform: translateY(-100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
            opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        opacity: 0;
        pointer-events: none;
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-links .nav-link {
        font-size: var(--text-xl);
        letter-spacing: 3px;
        color: rgba(255, 255, 255, 0.8);
    }

    .theme-toggle {
        z-index: 201;
        position: relative;
    }

    /* ── Hero ── */
    .hero {
        min-height: 85vh;
        padding: var(--space-48) var(--space-16);
        padding-top: calc(var(--space-48) + 60px);
        /* account for fixed nav */
    }

    .hero-stack {
        gap: 0;
    }

    .hero-title {
        font-size: clamp(2.4rem, 10vw, 4rem);
        letter-spacing: -0.04em;
    }

    .hero-byline {
        margin-bottom: var(--space-24);
        font-size: 0.7rem;
    }

    .hero-tagline {
        font-size: clamp(0.95rem, 3.5vw, 1.15rem);
        max-width: 100%;
        margin-bottom: var(--space-24);
    }

    .hero-cta {
        margin-bottom: var(--space-24);
    }

    .hero-quote {
        text-align: center;
        max-width: 100%;
    }

    .q-text {
        font-size: 0.9rem;
    }

    .hero-scroll {
        display: none;
        /* clutters small screens */
    }

    /* ── Section headers ── */
    .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-8);
        margin-bottom: var(--space-32);
        padding-bottom: var(--space-16);
    }

    .section-title {
        font-size: clamp(1.6rem, 7vw, 2.2rem);
    }

    .section-sub {
        font-size: 0.65rem;
    }

    /* ── Cards ── */
    .card {
        padding: var(--space-24) var(--space-16);
        min-height: auto;
    }

    .card-symbol {
        font-size: clamp(5rem, 20vw, 8rem);
    }

    .card-title {
        font-size: clamp(1.3rem, 5vw, 1.7rem);
    }

    .card-desc {
        font-size: 0.88rem;
    }

    .card-pull {
        font-size: 0.8rem;
    }

    .card-foot {
        font-size: 0.65rem;
    }

    .pill {
        font-size: 0.6rem;
    }

    /* ── Article pages ── */
    .article-wrap {
        margin-top: calc(var(--space-64) + 50px);
        /* nav height offset */
        margin-bottom: var(--space-48);
        padding: 0 var(--space-16);
    }

    .article h1 {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
    }

    .article-sub {
        font-size: 1rem;
        margin-bottom: var(--space-32);
    }

    .article p {
        font-size: 1.05rem;
        line-height: 1.7;
    }

    .article h2 {
        font-size: clamp(1.3rem, 5vw, 1.7rem);
        margin-top: var(--space-48);
    }

    .article h3 {
        font-size: 1.15rem;
        margin-top: var(--space-32);
    }

    .article blockquote {
        padding: var(--space-16);
        margin: var(--space-32) 0;
        font-size: 1.05rem;
    }

    .article ul,
    .article ol {
        font-size: 1rem;
        padding-left: 1.2em;
    }

    .math-block {
        padding: var(--space-16);
        margin: var(--space-24) 0;
        font-size: 0.9rem;
    }

    .note {
        padding: var(--space-16);
        margin: var(--space-24) 0;
        font-size: 0.9rem;
    }

    .back {
        margin-bottom: var(--space-32);
    }

    .article-meta {
        flex-wrap: wrap;
        gap: var(--space-8) var(--space-16);
    }

    /* Sidenotes on mobile → inline blocks */
    .sidenote {
        float: none;
        width: 100%;
        margin: var(--space-16) 0;
        margin-right: 0;
        border-left: 2px solid var(--brand-pop);
        background: rgba(255, 255, 255, 0.05);
        padding: var(--space-16);
    }

    /* ── Footer ── */
    .footer {
        padding: var(--space-32) var(--space-16);
        text-align: center;
    }

    .mega-footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-32);
    }

    .footer-content {
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

    .footer-text {
        font-size: 0.8rem;
    }

    .footer-copy {
        font-size: 0.7rem;
    }

    .footer-icons {
        gap: var(--space-16);
    }

    .footer-icons svg {
        width: 20px;
        height: 20px;
    }

    .footer-egg {
        font-size: 0.72rem;
    }

    /* ── Scroll-to-top (mobile override for new ring version) ── */

    /* ── Kill custom cursor ── */
    .cursor-dot,
    .cursor-outline {
        display: none !important;
    }

    *,
    *::before,
    *::after {
        cursor: auto !important;
    }
}

/* ── Small phones (≤480px) ── */
@media (max-width: 480px) {
    .hero {
        min-height: 80vh;
    }

    .hero-title {
        font-size: clamp(1.8rem, 10vw, 2.6rem);
    }

    .hero-tagline {
        font-size: 0.92rem;
    }

    .hero-tagline br {
        display: none;
        /* let text reflow naturally */
    }

    .btn-primary {
        font-size: 0.72rem;
        padding: var(--space-12) var(--space-24);
    }

    .section-title {
        font-size: 1.5rem;
    }

    .card {
        padding: var(--space-16) var(--space-12);
    }

    .card-title {
        font-size: 1.2rem;
    }

    .card-desc {
        font-size: 0.82rem;
    }

    .article-wrap {
        padding: 0 var(--space-12);
    }

    .article h1 {
        font-size: clamp(1.5rem, 8vw, 2rem);
    }

    .article p {
        font-size: 1rem;
    }

    .article blockquote {
        padding: var(--space-12);
        font-size: 0.95rem;
    }

    .mf-logo {
        font-size: 1.5rem;
    }
}

/* Utility Animations */
.reveal {
    opacity: 0;
    transform: translateY(20px) rotate(-0.5deg);
    transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
}

/* Stagger cards — dealt like editorial cards */
.grid .reveal:nth-child(1) {
    transition-delay: 0s;
}

.grid .reveal:nth-child(2) {
    transition-delay: 0.1s;
    transform: translateY(24px) rotate(0.5deg);
}

.grid .reveal:nth-child(2).active {
    transform: translateY(0) rotate(0deg);
}

.grid .reveal:nth-child(3) {
    transition-delay: 0.2s;
    transform: translateY(28px) rotate(-0.3deg);
}

.grid .reveal:nth-child(3).active {
    transform: translateY(0) rotate(0deg);
}

.grid .reveal:nth-child(4) {
    transition-delay: 0.3s;
    transform: translateY(32px) rotate(0.4deg);
}

.grid .reveal:nth-child(4).active {
    transform: translateY(0) rotate(0deg);
}

/* scroll-to-top base (overridden by enhanced version below) */


/* ============================================
   PREFERS-REDUCED-MOTION
   Respects user system preferences (WCAG 2.2.2)
   ============================================ */
@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;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    .hero::before {
        animation: none;
    }

    .deco {
        display: none;
    }

    .cursor-dot,
    .cursor-outline {
        display: none !important;
    }

    .card:hover {
        transform: none;
    }

    .hero-scroll {
        display: none;
    }
}


/* ============================================
   PRINT STYLESHEET
   ============================================ */
@media print {

    /* Hide all chrome */
    .nav,
    .to-top,
    .footer,
    .hero-scroll,
    .post-deco,
    .cursor-dot,
    .cursor-outline,
    .back,
    .hero-cta,
    .search-overlay,
    .reading-bar,
    .related-posts,
    #progressBar {
        display: none !important;
    }

    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 12pt;
        line-height: 1.6;
        background-image: none !important;
    }

    body::after {
        display: none;
    }

    .article-wrap {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    .article h1 {
        font-size: 24pt;
        page-break-after: avoid;
    }

    .article h2,
    .article h3 {
        page-break-after: avoid;
    }

    .article p {
        orphans: 3;
        widows: 3;
        color: #000;
    }

    .article blockquote {
        border-left-color: #666;
        color: #333;
    }

    .article a {
        color: #000;
        text-decoration: underline;
    }

    .article a::after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        font-family: monospace;
        color: #666;
    }

    .article a[href^="#"]::after,
    .article a[href^="mailto:"]::after {
        content: "";
    }

    .note {
        border-left-color: #999;
        background: #f5f5f5 !important;
    }

    .math-block {
        background: #f5f5f5 !important;
        border-color: #ccc;
    }

    .pill {
        border-color: #999;
        color: #333;
    }
}


/* ============================================
   SCROLL-DRIVEN ANIMATIONS (CSS-native)
   Progressive enhancement — only applies in
   supporting browsers. JS fallback remains.
   ============================================ */
@supports (animation-timeline: scroll()) {
    .reveal {
        animation: revealIn linear both;
        animation-timeline: view();
        animation-range: entry 0% entry 30%;
        /* override JS-based transitions */
        opacity: 1;
        transform: none;
        transition: none;
    }

    @keyframes revealIn {
        from {
            opacity: 0;
            transform: translateY(24px) rotate(-0.5deg);
        }

        to {
            opacity: 1;
            transform: translateY(0) rotate(0deg);
        }
    }

    /* Stagger override — not needed with scroll-driven */
    .grid .reveal:nth-child(2),
    .grid .reveal:nth-child(3),
    .grid .reveal:nth-child(4) {
        transition-delay: 0s;
        transform: none;
    }
}


/* ============================================
   AMBIENT SECTION IDENTITY
   Subtle background textures per section
   ============================================ */
.s-physics {
    background-image:
        linear-gradient(rgba(74, 144, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 144, 255, 0.015) 1px, transparent 1px);
    background-size: 48px 48px;
}

[data-theme="light"] .s-physics {
    background-image:
        linear-gradient(rgba(51, 112, 217, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(51, 112, 217, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
}

.s-culture {
    background-image:
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0 L60 30 L30 60 L0 30Z' fill='none' stroke='rgba(232,98,43,0.02)' stroke-width='0.5'/%3E%3C/svg%3E");
    background-size: 60px 60px;
}

[data-theme="light"] .s-culture {
    background-image:
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0 L60 30 L30 60 L0 30Z' fill='none' stroke='rgba(212,85,31,0.04)' stroke-width='0.5'/%3E%3C/svg%3E");
    background-size: 60px 60px;
}

.s-creative {
    background-image:
        radial-gradient(circle, rgba(168, 124, 255, 0.02) 1px, transparent 1px);
    background-size: 32px 32px;
}

[data-theme="light"] .s-creative {
    background-image:
        radial-gradient(circle, rgba(124, 85, 204, 0.035) 1px, transparent 1px);
    background-size: 32px 32px;
}


/* ============================================
   MATH / CODE BLOCK UPGRADES
   ============================================ */
.math-block {
    background: linear-gradient(135deg, var(--bg-surface) 0%, rgba(74, 144, 255, 0.04) 100%);
    border: 1px solid color-mix(in srgb, var(--physics-accent) 15%, var(--border-color));
    border-radius: 4px;
    font-family: var(--font-body);
    position: relative;
}

.math-block::before {
    content: 'MATH';
    position: absolute;
    top: 6px;
    right: 10px;
    font-family: var(--font-mono);
    font-size: 0.55rem;
    letter-spacing: 0.15em;
    color: var(--physics-accent);
    opacity: 0.4;
}


/* ============================================
   PER-ARTICLE SECTION ACCENT
   Post pages set data-section on <html>
   ============================================ */
html[data-section="physics"] {
    --section-accent: var(--physics-accent);
}

html[data-section="culture"] {
    --section-accent: var(--culture-accent);
}

html[data-section="creative"] {
    --section-accent: var(--creative-accent);
}

/* Progress bar uses section accent */
#progressBar {
    background: var(--section-accent, var(--brand-pop)) !important;
}

/* Article links use section accent */
html[data-section] .article a {
    text-decoration-color: var(--section-accent);
}

html[data-section] .article blockquote {
    border-left-color: var(--section-accent);
}

html[data-section] .note {
    border-left-color: var(--section-accent);
}

html[data-section] .note-label {
    color: var(--section-accent);
}


/* ============================================
   VIEW TRANSITIONS
   ============================================ */
@view-transition {
    navigation: auto;
}

::view-transition-old(root) {
    animation: 200ms ease-out both fade-out;
}

::view-transition-new(root) {
    animation: 300ms ease-in both fade-in;
}

@keyframes fade-out {
    to {
        opacity: 0;
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
}

/* Logo glitch easter egg */
@keyframes glitch {
    0% {
        transform: translate(0);
        filter: none;
    }

    20% {
        transform: translate(-3px, 2px);
        filter: hue-rotate(90deg);
    }

    40% {
        transform: translate(3px, -2px);
        filter: hue-rotate(180deg);
    }

    60% {
        transform: translate(-2px, -1px);
        filter: hue-rotate(270deg);
    }

    80% {
        transform: translate(2px, 1px);
        filter: hue-rotate(360deg);
    }

    100% {
        transform: translate(0);
        filter: none;
    }
}


/* ============================================
   TABLE OF CONTENTS (Article pages)
   ============================================ */
.toc {
    margin: var(--space-32) 0 var(--space-48);
    padding: var(--space-24);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
}

.toc-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--section-accent, var(--brand-pop));
    margin-bottom: var(--space-16);
    display: block;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: toc;
}

.toc-list li {
    counter-increment: toc;
    margin-bottom: var(--space-8);
}

.toc-list a {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s, padding-left 0.2s;
    display: block;
    padding: var(--space-4) 0;
}

.toc-list a::before {
    content: counter(toc, decimal-leading-zero) " ";
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-right: var(--space-8);
}

.toc-list a:hover,
.toc-list a.toc-active {
    color: var(--section-accent, var(--brand-pop));
    padding-left: var(--space-8);
}


/* ============================================
   RELATED POSTS
   ============================================ */
.related-posts {
    margin-top: var(--space-96);
    padding-top: var(--space-48);
    border-top: 1px solid var(--border-color);
}

.related-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-tertiary);
    margin-bottom: var(--space-32);
    display: block;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-24);
}

.related-card {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: var(--space-24);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    transition: border-color 0.3s, transform 0.3s;
}

.related-card:hover {
    border-color: var(--section-accent, var(--brand-pop));
    transform: translateY(-2px);
}

.related-card .related-pill {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    margin-bottom: var(--space-8);
    display: block;
}

.related-card .related-title {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-8);
}

.related-card .related-desc {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

@media (max-width: 768px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
}


/* ============================================
   SEARCH OVERLAY
   ============================================ */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20vh;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}

.search-overlay.open {
    opacity: 1;
    pointer-events: all;
}

[data-theme="light"] .search-overlay {
    background: rgba(248, 247, 244, 0.92);
}

.search-box {
    width: 90%;
    max-width: 560px;
}

.search-input {
    width: 100%;
    padding: var(--space-16) var(--space-24);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: var(--brand-pop);
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

.search-results {
    width: 90%;
    max-width: 560px;
    margin-top: var(--space-16);
    max-height: 50vh;
    overflow-y: auto;
}

.search-result {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: var(--space-16) var(--space-24);
    border: 1px solid var(--border-color);
    border-top: none;
    background: var(--bg-surface);
    transition: background 0.15s;
}

.search-result:first-child {
    border-top: 1px solid var(--border-color);
}

.search-result:hover,
.search-result.active {
    background: color-mix(in srgb, var(--brand-pop) 8%, var(--bg-surface));
}

.search-result-title {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
}

.search-result-desc {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.search-hint {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-tertiary);
    margin-top: var(--space-16);
    text-align: center;
}

.search-empty {
    font-family: var(--font-body);
    font-style: italic;
    color: var(--text-tertiary);
    padding: var(--space-24);
    text-align: center;
}


/* ============================================
   KEYBOARD SHORTCUT TOAST
   ============================================ */
.kbd-toast {
    position: fixed;
    bottom: var(--space-32);
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: var(--space-8) var(--space-24);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    white-space: nowrap;
}

.kbd-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

kbd {
    background: var(--bg-void);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    padding: 2px 6px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-primary);
    margin: 0 2px;
}


/* Page exit animation */
.page-exiting {
    opacity: 0.6;
    transform: scale(0.995);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.card-link .card.card-exiting {
    transform: translateY(-6px) scale(1.02);
    border-color: var(--section-accent, var(--brand-pop));
    transition: transform 0.15s ease, border-color 0.1s;
}


/* ============================================
   READING POSITION BAR (resume reading)
   ============================================ */
.reading-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: var(--space-12) var(--space-24);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9998;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.reading-bar.show {
    transform: translateY(0);
}

.reading-bar-text {
    color: var(--text-secondary);
}

.reading-bar-btn {
    background: none;
    border: 1px solid var(--section-accent, var(--brand-pop));
    color: var(--section-accent, var(--brand-pop));
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: var(--space-8) var(--space-16);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.reading-bar-btn:hover {
    background: var(--section-accent, var(--brand-pop));
    color: var(--bg-void);
}

.reading-bar-dismiss {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    cursor: pointer;
    margin-left: var(--space-16);
}

.reading-bar-dismiss:hover {
    color: var(--text-primary);
}


/* ============================================
   SHARE BAR (article bottom)
   ============================================ */
.share-bar {
    display: flex;
    align-items: center;
    gap: var(--space-16);
    margin-top: var(--space-48);
    padding: var(--space-24) 0;
    border-top: 1px solid var(--border-color);
}

.share-bar-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-8);
    padding: var(--space-8) var(--space-16);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    background: none;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.share-btn:hover {
    border-color: var(--section-accent, var(--brand-pop));
    color: var(--section-accent, var(--brand-pop));
}

.share-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.share-btn.copied {
    border-color: var(--accent-green);
    color: var(--accent-green);
}


/* ============================================
   READING TIME BAR (card)
   ============================================ */
.card-time-bar {
    width: 100%;
    height: 2px;
    background: var(--border-color);
    margin-top: var(--space-8);
    border-radius: 1px;
    overflow: hidden;
}

.card-time-fill {
    height: 100%;
    background: var(--section-accent, var(--brand-pop));
    border-radius: 1px;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.card:hover .card-time-fill {
    opacity: 1;
}


/* ============================================
   TOC MOBILE COLLAPSE
   ============================================ */
.toc-toggle {
    display: none;
}

@media (max-width: 768px) {
    .toc-toggle {
        display: inline-flex;
        align-items: center;
        gap: var(--space-8);
        background: none;
        border: none;
        font-family: var(--font-mono);
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.15em;
        color: var(--section-accent, var(--brand-pop));
        cursor: pointer;
        padding: 0;
        width: 100%;
    }

    .toc-toggle::after {
        content: '+';
        margin-left: auto;
        font-size: 1rem;
        transition: transform 0.2s;
    }

    .toc-toggle.open::after {
        content: '\2212';
    }

    .toc-label {
        display: none;
    }

    .toc-list {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .toc-list.toc-open {
        max-height: 500px;
    }
}


/* ╔══════════════════════════════════════════════════════════╗
   ║  WORLD-CLASS ENHANCEMENTS — "BEYOND THE GRID"          ║
   ╚══════════════════════════════════════════════════════════╝ */


/* ============================================
   PRELOADER
   ============================================ */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: var(--bg-void);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.preloader.done {
    opacity: 0;
    transform: scale(1.05);
    pointer-events: none;
}

.preloader-inner {
    text-align: center;
}

.preloader-brand {
    font-family: var(--font-sans);
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    animation: preloaderPulse 1.5s ease-in-out infinite;
}

.preloader-brand .dot {
    color: var(--brand-pop);
}

.preloader-line {
    width: 120px;
    height: 2px;
    background: var(--border-color);
    margin: 20px auto;
    border-radius: 2px;
    overflow: hidden;
}

.preloader-fill {
    width: 100%;
    height: 100%;
    background: var(--brand-pop);
    transform-origin: left;
    animation: preloaderLine 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.preloader-sub {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-tertiary);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

@keyframes preloaderPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes preloaderLine {
    0% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Hide body content during preload */
body:not(.loaded)>*:not(.preloader) {
    opacity: 0;
}

body.loaded>*:not(.preloader) {
    opacity: 1;
    transition: opacity 0.5s ease 0.1s;
}


/* ============================================
   HERO PARTICLE CANVAS
   ============================================ */
.hero-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: all;
    opacity: 0.6;
}

/* ============================================
   FLOATING GRADIENT ORBS
   ============================================ */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    pointer-events: none;
    will-change: transform;
    opacity: 0.5;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(232, 98, 43, 0.15) 0%, transparent 70%);
    top: -10%;
    right: -5%;
    animation: orbFloat1 18s ease-in-out infinite alternate;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(74, 144, 255, 0.1) 0%, transparent 70%);
    bottom: 10%;
    left: -8%;
    animation: orbFloat2 22s ease-in-out infinite alternate;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(168, 124, 255, 0.1) 0%, transparent 70%);
    top: 40%;
    right: 20%;
    animation: orbFloat3 15s ease-in-out infinite alternate;
}

[data-theme="light"] .orb-1 {
    background: radial-gradient(circle, rgba(212, 85, 31, 0.08) 0%, transparent 70%);
}

[data-theme="light"] .orb-2 {
    background: radial-gradient(circle, rgba(51, 112, 217, 0.06) 0%, transparent 70%);
}

[data-theme="light"] .orb-3 {
    background: radial-gradient(circle, rgba(124, 85, 204, 0.06) 0%, transparent 70%);
}

@keyframes orbFloat1 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(-40px, 60px) scale(1.1);
    }

    66% {
        transform: translate(30px, -20px) scale(0.95);
    }

    100% {
        transform: translate(-60px, 40px) scale(1.05);
    }
}

@keyframes orbFloat2 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(50px, -40px) scale(1.15);
    }

    100% {
        transform: translate(-30px, 60px) scale(0.9);
    }
}

@keyframes orbFloat3 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-50px, 30px) scale(1.2);
    }

    100% {
        transform: translate(40px, -50px) scale(0.95);
    }
}


/* ============================================
   HERO ENTRANCE ANIMATIONS
   ============================================ */
.hero-letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(60px) rotateX(-90deg);
    transition: opacity 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-letter.visible {
    opacity: 1;
    transform: translateY(0) rotateX(0);
}

.hero-letter.dot {
    color: var(--brand-pop);
}

/* Override hero-byline from earlier in the file */
.hero .hero-byline {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease 0s, transform 0.6s ease 0s;
}

.hero .hero-byline.visible {
    opacity: 0.7;
    transform: translateY(0);
}

.hero .hero-tagline {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease 0s, transform 0.6s ease 0s;
}

.hero .hero-tagline.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero .hero-cta {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease 0s, transform 0.6s ease 0s;
}

.hero .hero-cta.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero .hero-quote {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.8s ease 0s, transform 0.8s ease 0s;
}

.hero .hero-quote.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero .hero-scroll {
    opacity: 0;
    transition: opacity 0.8s ease 0s;
}

.hero .hero-scroll.visible {
    opacity: 1;
}


/* ============================================
   ENHANCED NAV — Glass Morphism + Glow + Auto-hide
   ============================================ */
.nav {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        background 0.3s,
        box-shadow 0.3s,
        border-color 0.3s;
}

.nav-scrolled {
    background: rgba(5, 5, 5, 0.85) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3),
        0 0 60px rgba(232, 98, 43, 0.04);
    border-bottom: 1px solid rgba(232, 98, 43, 0.1) !important;
}

[data-theme="light"] .nav-scrolled {
    background: rgba(248, 247, 244, 0.92) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08),
        0 0 40px rgba(212, 85, 31, 0.03);
    border-bottom: 1px solid rgba(212, 85, 31, 0.1) !important;
}

.nav-hidden {
    transform: translateY(-100%);
}


/* ============================================
   3D CARD TILT — Shine overlay
   ============================================ */
.card {
    transform-style: preserve-3d;
}

/* Override the old ::after with the new shine gradient */
.card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(600px circle at var(--shine-x, 50%) var(--shine-y, 50%),
            rgba(255, 255, 255, 0.06) 0%,
            transparent 60%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
    z-index: 2;
    box-shadow: none;
}

.card:hover::after {
    opacity: 1;
    box-shadow: none;
}

[data-theme="light"] .card::after {
    background: radial-gradient(600px circle at var(--shine-x, 50%) var(--shine-y, 50%),
            rgba(255, 255, 255, 0.35) 0%,
            transparent 60%);
    box-shadow: none;
}

/* Enhanced card hover glow (per section) */
.card:hover {
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.55),
        0 0 30px -10px rgba(232, 98, 43, 0.1);
}

.s-physics .card:hover {
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.55),
        0 0 30px -10px rgba(74, 144, 255, 0.15);
}

.s-culture .card:hover {
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.55),
        0 0 30px -10px rgba(232, 98, 43, 0.15);
}

.s-creative .card:hover {
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.55),
        0 0 30px -10px rgba(168, 124, 255, 0.15);
}

[data-theme="light"] .card:hover {
    box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.12),
        0 0 20px -8px rgba(212, 85, 31, 0.08);
}


/* ============================================
   MAGNETIC BUTTON ENHANCEMENTS
   ============================================ */
.magnetic-btn {
    transition: transform 0.15s ease, border-color 0.3s, color 0.3s, padding-left 0.3s, letter-spacing 0.3s;
}


/* ============================================
   THEME TRANSITION OVERLAY  
   ============================================ */
.theme-transition-overlay {
    position: fixed;
    inset: 0;
    z-index: 99998;
    pointer-events: none;
    background: var(--bg-void);
    clip-path: circle(0% at var(--tx, 50%) var(--ty, 50%));
    transition: clip-path 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-transition-overlay.active {
    clip-path: circle(150% at var(--tx, 50%) var(--ty, 50%));
}


/* ============================================
   SCROLL-TO-TOP WITH PROGRESS RING
   ============================================ */
.to-top {
    position: fixed;
    bottom: var(--space-32);
    right: var(--space-32);
    width: 48px;
    height: 48px;
    background: var(--bg-surface);
    border: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s;
    pointer-events: none;
    border-radius: 50%;
    overflow: visible;
}

.to-top.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.to-top:hover {
    color: var(--brand-pop);
    border-color: transparent;
}

.to-top:hover .to-top-progress {
    stroke: var(--brand-pop);
}

.to-top-ring {
    position: absolute;
    inset: 0;
    width: 48px;
    height: 48px;
    transform: rotate(-90deg);
}

.to-top-track {
    stroke: var(--border-color);
}

.to-top-progress {
    stroke: var(--text-tertiary);
    transition: stroke 0.2s;
    stroke-linecap: round;
}

.to-top-arrow {
    width: 18px;
    height: 18px;
    position: relative;
    z-index: 1;
}


/* ============================================
   ENHANCED SECTION DIVIDERS
   ============================================ */
.section {
    position: relative;
}

.section::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--section-accent, var(--brand-pop)), transparent);
    opacity: 0.5;
}


/* ============================================
   ENHANCED BUTTON HOVER GLOW
   ============================================ */
.btn-primary {
    overflow: hidden;
}

.btn-primary:hover {
    box-shadow: 0 0 20px -5px rgba(232, 98, 43, 0.3);
}


/* ============================================
   ENHANCED FOOTER — Terminal Scan Effect  
   ============================================ */
.mf-status-box {
    position: relative;
    overflow: hidden;
}

.mf-status-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 230, 57, 0.05), transparent);
    animation: statusScan 3s ease-in-out infinite;
}

@keyframes statusScan {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}


/* ============================================
   NAV LINK GLOW ON HOVER
   ============================================ */
.nav-link:hover {
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
}

[data-theme="light"] .nav-link:hover {
    text-shadow: none;
}

.nav-logo:hover {
    text-shadow: 0 0 20px rgba(232, 98, 43, 0.3);
}


/* ============================================
   SCROLL-DRIVEN SECTION ANIMATIONS (CSS-native override)
   ============================================ */
@supports (animation-timeline: scroll()) {
    .section-head {
        animation: sectionSlideIn linear both;
        animation-timeline: view();
        animation-range: entry 0% entry 40%;
    }

    @keyframes sectionSlideIn {
        from {
            opacity: 0;
            transform: translateX(-30px);
        }

        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
}


/* ============================================
   MOBILE OVERRIDES FOR NEW FEATURES
   ============================================ */
@media (max-width: 768px) {
    .hero-canvas {
        opacity: 0.3;
    }

    .orb {
        display: none;
    }

    .to-top {
        bottom: var(--space-16);
        right: var(--space-16);
        width: 40px;
        height: 40px;
    }

    .to-top-ring {
        width: 40px;
        height: 40px;
    }

    .nav-hidden {
        transform: translateY(-100%);
    }

    .hero-letter {
        transform: translateY(40px) rotateX(-60deg);
    }
}

@media (max-width: 480px) {
    .hero-canvas {
        opacity: 0.2;
    }
}

@media (prefers-reduced-motion: reduce) {
    .preloader {
        display: none;
    }

    body:not(.loaded)>*:not(.preloader) {
        opacity: 1;
    }

    .hero-letter {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero .hero-byline,
    .hero .hero-tagline,
    .hero .hero-cta,
    .hero .hero-quote,
    .hero .hero-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .orb {
        animation: none;
    }

    .hero-canvas {
        display: none;
    }

    .theme-transition-overlay {
        display: none;
    }
}


/* ╔══════════════════════════════════════════════════════════╗
   ║  DESIGN REFINEMENT — "THE $10M POLISH"                  ║
   ╚══════════════════════════════════════════════════════════╝ */


/* ============================================
   ABOUT THE WRITER SECTION
   ============================================ */
.about-section {
    padding: var(--space-64) 0;
    border-bottom: 1px solid var(--border-color);
}

.about-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-48);
    align-items: start;
    max-width: 760px;
}

.about-monogram {
    font-family: var(--font-serif);
    font-size: 5rem;
    font-weight: 300;
    font-style: italic;
    line-height: 1;
    color: var(--text-primary);
    opacity: 0.12;
    user-select: none;
    letter-spacing: -0.05em;
    padding-top: var(--space-8);
}

.about-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--brand-pop);
    display: block;
    margin-bottom: var(--space-12);
}

.about-name {
    font-family: var(--font-body);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 600;
    font-style: italic;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: var(--space-24);
}

.about-bio {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--text-secondary);
    margin-bottom: var(--space-16);
    max-width: 560px;
}

.about-bio-secondary {
    font-size: 0.92rem;
    color: var(--text-tertiary);
    font-style: italic;
}

.about-links {
    display: flex;
    gap: var(--space-24);
    margin-top: var(--space-24);
}

.about-link {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.2s;
    position: relative;
}

.about-link:hover {
    color: var(--brand-pop);
}

.about-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--brand-pop);
    transition: width 0.3s;
}

.about-link:hover::after {
    width: 100%;
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-24);
    }

    .about-monogram {
        font-size: 3.5rem;
    }

    .about-section {
        padding: var(--space-48) 0 var(--space-32);
    }

    .about-name {
        font-size: 1.5rem;
    }

    .about-bio {
        font-size: 0.95rem;
    }
}


/* ============================================
   MANIFESTO COUNT / STATS LINE
   ============================================ */
.manifesto-count {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-tertiary);
    margin-top: var(--space-24);
    padding-left: var(--space-24);
    opacity: 0.7;
}


/* ============================================
   FEATURED CARD BADGE
   ============================================ */
.card-badge {
    position: absolute;
    top: var(--space-16);
    right: var(--space-16);
    font-family: var(--font-mono);
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--bg-void);
    background: var(--section-accent, var(--brand-pop));
    padding: 3px 10px;
    z-index: 3;
    line-height: 1.5;
}

.card-featured {
    border-color: color-mix(in srgb, var(--section-accent, var(--brand-pop)) 30%, var(--border-color));
}

.card-featured::before {
    transform: scaleX(1);
}


/* ============================================
   COLOPHON / CLOSING CTA SECTION
   ============================================ */
.colophon {
    padding: var(--space-64) 0;
    text-align: center;
    position: relative;
}

.colophon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--brand-pop), transparent);
}

.colophon-inner {
    max-width: 500px;
    margin: 0 auto;
}

.colophon-text {
    font-family: var(--font-body);
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-style: italic;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: var(--space-48);
}

.colophon-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-16);
}

.colophon-rss-hint {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-tertiary);
    letter-spacing: 0.05em;
}

.colophon-rss-hint a {
    color: var(--text-secondary);
    text-decoration: underline;
    text-decoration-color: var(--border-color);
    text-underline-offset: 2px;
}

.colophon-rss-hint a:hover {
    color: var(--brand-pop);
    text-decoration-color: var(--brand-pop);
}

@media (max-width: 768px) {
    .colophon {
        padding: var(--space-48) var(--space-16);
    }
}


/* ============================================
   EDITORIAL DROP CAP
   Applied via JS to first content paragraph
   ============================================ */
.article .drop-cap::first-letter {
    font-family: var(--font-serif);
    font-size: 3.8em;
    font-weight: 600;
    float: left;
    line-height: 0.75;
    margin-right: 0.08em;
    margin-top: 0.08em;
    color: var(--section-accent, var(--brand-pop));
}


/* ============================================
   ARTICLE END MARKER (FINIS)
   Three dots in a row — classic editorial "end"
   ============================================ */
.article-finis {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-16);
    padding: var(--space-64) 0 var(--space-32);
}

.article-finis span {
    width: 5px;
    height: 5px;
    background: var(--section-accent, var(--brand-pop));
    border-radius: 50%;
    opacity: 0.5;
}

.article-finis span:nth-child(2) {
    opacity: 0.8;
    width: 6px;
    height: 6px;
}


/* ============================================
   ENHANCED SECTION DIVIDERS — Gradient glow
   ============================================ */
.s-physics::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--physics-accent) 20%, transparent), transparent);
}

.s-culture::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--culture-accent) 20%, transparent), transparent);
}

.s-creative::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--creative-accent) 20%, transparent), transparent);
}


/* ============================================
   CARD READING PROGRESS LABEL
   ============================================ */
.card-time-bar {
    position: relative;
}

.card:hover .card-time-bar::after {
    content: 'reading time';
    position: absolute;
    top: -16px;
    right: 0;
    font-family: var(--font-mono);
    font-size: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    opacity: 0;
    animation: fadeInLabel 0.3s ease 0.15s forwards;
}

@keyframes fadeInLabel {
    to {
        opacity: 0.6;
    }
}


/* ============================================
   LIGHT MODE — REFINED SURFACES
   ============================================ */
[data-theme="light"] .about-monogram {
    opacity: 0.08;
}

[data-theme="light"] .about-bio {
    color: #444444;
}

[data-theme="light"] .colophon-text {
    color: #555555;
}

[data-theme="light"] .card-badge {
    color: #ffffff;
}

[data-theme="light"] .manifesto-count {
    color: #888888;
}

[data-theme="light"] .article-finis span {
    background: var(--section-accent, var(--accent-orange));
}

/* Light mode about section */
[data-theme="light"] .about-section {
    border-bottom-color: #e2dfda;
}

/* Light mode colophon */
[data-theme="light"] .colophon::before {
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent-orange) 30%, transparent), transparent);
}

/* Light mode featured card */
[data-theme="light"] .card-featured {
    border-color: color-mix(in srgb, var(--section-accent, var(--accent-orange)) 20%, #e2dfda);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}


/* ============================================
   SECTION HEAD — REFINED HOVER ON DOT
   Adds a "breathing" glow effect on hover
   ============================================ */
.section-title:hover {
    cursor: default;
}

.section-title .dot {
    position: relative;
}

.section-title:hover .dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: var(--section-accent);
    opacity: 0.15;
    filter: blur(4px);
}


/* ============================================
   CARD HOVER — SUBTLE BORDER GLOW PULSE
   ============================================ */
.card-featured::after {
    opacity: 0.3;
}


/* ============================================
   MOBILE REFINEMENTS FOR NEW SECTIONS
   ============================================ */
@media (max-width: 768px) {
    .manifesto-count {
        font-size: 0.6rem;
        padding-left: var(--space-16);
    }

    .card-badge {
        font-size: 0.5rem;
        top: var(--space-8);
        right: var(--space-8);
    }

    .article-finis {
        padding: var(--space-48) 0 var(--space-24);
    }
}

@media (max-width: 480px) {
    .about-links {
        flex-wrap: wrap;
        gap: var(--space-16);
    }
}


/* ╔══════════════════════════════════════════════════════════╗
   ║  PERFORMANCE OPTIMIZATIONS                               ║
   ╚══════════════════════════════════════════════════════════╝ */

/* GPU-composite fixed/animated elements for smoother scroll */
.nav,
.to-top,
.cursor-dot,
.cursor-outline,
.preloader {
    will-change: transform;
}

/* Paint containment for heavy sections */
.footer,
.colophon,
.about-section {
    contain: layout style;
}

/* Prevent layout shift from late-loading fonts */
.hero-title {
    font-synthesis: none;
    text-rendering: optimizeSpeed;
}

.article p,
.article blockquote {
    text-rendering: optimizeLegibility;
}

/* Reduce overdraw from noise/grid overlays on mobile */
@media (max-width: 768px) {
    body::before {
        /* Halve noise texture size on mobile for cheaper compositing */
        background-size: 200px 200px;
    }

    body::after {
        /* Increase grid spacing on mobile to reduce draw calls */
        background-size: 48px 48px;
    }

    /* Disable parallax decorations on mobile — saves rAF cycles */
    .deco {
        transform: none !important;
    }

    /* Simpler box-shadow on mobile cards */
    .card:hover {
        box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.4);
    }
}

/* Low-end device detection: reduce visual complexity */
@media (max-width: 480px) {
    /* Kill orbs, noise, grid on small screens */
    body::before,
    body::after {
        display: none;
    }

    .orb {
        display: none;
    }

    /* Simpler reveal animation */
    .reveal {
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .reveal.active {
        opacity: 1;
        transform: none;
    }
}

/* Smooth scrolling with reduced motion fallback already handled above */
@media (hover: none) {
    /* Touch devices: disable 3D card tilt and magnetic cursor */
    .card {
        transform: none !important;
    }

    .card::after {
        display: none;
    }

    .cursor-dot,
    .cursor-outline {
        display: none;
    }
}

/* Optimize anchor targets for scroll-to */
[id] {
    scroll-margin-top: 80px;
}