/* ==========================================================================
   SUBHANSH // RETRO TECH MAGAZINE PORTFOLIO
   Inspired by Wired #1, Mondo 2000, HotWired — Ink on Paper
   ========================================================================== */

/* --- RESET & VARIABLES --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Warm Peach Dark Palette */
    --paper: #0e0c0b;
    --paper-dark: #151210;
    --paper-deep: #1a1614;
    --ink: #f0e6dc;
    --ink-light: #c8bfb0;
    --ink-faded: #7a6e62;
    --accent-red: #e8829b;
    --accent-gold: #f4a261;
    --accent-crimson: #c4627a;
    --accent-blood: #8a3a50;
    --peach: #e8a87c;
    --rule: rgba(240,230,220,0.1);
    --link: #e8829b;
    --link-hover: #f4a261;

    /* Typography Scale */
    --font-title: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'IBM Plex Mono', 'Courier New', monospace;
    --font-accent: 'Space Mono', monospace;
    --font-grotesk: 'Space Grotesk', sans-serif;

    --size-hero: clamp(4rem, 10vw, 9rem);
    --size-h1: clamp(2.5rem, 5vw, 4.5rem);
    --size-h2: clamp(1.8rem, 3vw, 2.8rem);
    --size-h3: 1.4rem;
    --size-body: clamp(0.875rem, 1.2vw, 1rem);
    --size-caption: 0.75rem;
    --size-micro: 0.65rem;

    --leading-tight: 0.95;
    --leading-body: 1.7;
    --tracking-tight: -0.03em;
    --tracking-wide: 0.12em;

    /* Glass (dark magazine) */
    --glass-bg: rgba(20, 18, 16, 0.75);
    --glass-border: rgba(232,168,124,0.08);
    --radius-lg: 4px;
    --radius-md: 3px;
    --radius-sm: 2px;
    --ease-out: cubic-bezier(0.55, 0, 0.45, 1);
    --ease-bounce: cubic-bezier(0.22, 1.2, 0.36, 1);
}

html { scroll-behavior: smooth; background: var(--paper); }

body {
    font-family: var(--font-body);
    color: var(--ink);
    background-color: var(--paper);
    background-image:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='0.04'/%3E%3C/svg%3E");
    background-size: 256px 256px;
    overflow-x: hidden;
    cursor: auto;
    line-height: var(--leading-body);
    -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(192, 57, 43, 0.15); color: var(--ink); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--paper-dark); }
::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 3px; }

a { color: var(--link); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--link-hover); }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button { background: none; border: none; color: inherit; cursor: pointer; font-family: inherit; }
input { font-family: inherit; }

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-title);
    font-weight: 700;
    letter-spacing: var(--tracking-tight);
    color: var(--ink);
}

.section-label {
    display: block;
    font-family: var(--font-accent);
    font-size: var(--size-micro);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--ink-faded);
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: var(--size-h1);
    font-weight: 900;
    letter-spacing: var(--tracking-tight);
    line-height: var(--leading-tight);
    margin-bottom: 0.5rem;
    color: var(--ink);
}

.section-tagline {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--ink-faded);
    display: block;
    margin-top: 0.5rem;
}

.section-subtitle {
    font-size: var(--size-body);
    color: var(--ink-light);
    max-width: 60ch;
    margin-top: 0.75rem;
    line-height: var(--leading-body);
}

/* --- NOISE OVERLAY (paper grain) --- */
.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    opacity: 0.03;
    mix-blend-mode: multiply;
    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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
    background-size: 256px 256px;
}

/* --- OBSIDIAN BG (hidden, replaced by paper) --- */
.obsidian-bg { display: none; }

/* --- GLASS PANELS (peach dark cards) --- */
.glass-panel {
    background: rgba(20, 18, 16, 0.75);
    border: 1px solid rgba(232,168,124,0.08);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4), inset 0 1px 0 rgba(232,168,124,0.05);
    position: relative;
    overflow: hidden;
    transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color 0.4s;
}

.glass-panel > * { position: relative; z-index: 3; }

.glass-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(232,168,124,0.03) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
}

.glass-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 1px 0 rgba(232,168,124,0.08);
    pointer-events: none;
    z-index: 2;
}

.glass-panel:hover {
    transform: translateY(-3px);
    border-color: rgba(232,130,155,0.2);
    box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 30px rgba(232,130,155,0.05), inset 0 1px 0 rgba(232,168,124,0.08);
}

.glass-panel > * { position: relative; z-index: 3; }

.glass-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(232,168,124,0.03) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
}

.glass-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 1px 0 rgba(232,168,124,0.08);
    pointer-events: none;
    z-index: 2;
}

.glass-panel:hover {
    transform: translateY(-3px);
    border-color: rgba(232,168,124,0.2);
    box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 30px rgba(232,168,124,0.05), inset 0 1px 0 rgba(232,168,124,0.08);
}

/* --- CUSTOM CURSOR (hidden on paper) --- */
#cursor-dot, #cursor-ring { display: none; }

/* --- SOUND TOGGLE --- */
.sound-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(14,12,11,0.7);
    border: 1px solid rgba(232,168,124,0.1);
    border-radius: 50%;
    color: var(--ink-faded);
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}
.sound-toggle:hover { color: var(--accent-red); border-color: rgba(232,130,155,0.3); box-shadow: 0 0 15px rgba(232,130,155,0.1); }

/* --- CURSOR GLOW TRAIL --- */
.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232,130,155,0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
    mix-blend-mode: screen;
}

/* --- ANIMATED GRADIENT BORDER --- */
@property --border-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.animated-border {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.animated-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: conic-gradient(from var(--border-angle, 0deg), transparent 40%, rgba(232,130,155,0.3) 50%, transparent 60%);
    animation: border-rotate 6s linear infinite;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s;
}

.animated-border:hover::before {
    opacity: 1;
}

@keyframes border-rotate {
    0% { --border-angle: 0deg; }
    100% { --border-angle: 360deg; }
}

/* --- SECTION ENTRANCE ANIMATIONS --- */
.section-container {
    opacity: 1;
    transform: translateY(0);
}

/* --- DRAMATIC HOVER EFFECTS --- */
.glass-panel {
    position: relative;
}

/* Ripple effect on click */
.glass-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 1px 0 rgba(240,232,220,0.08);
    pointer-events: none;
    z-index: 2;
}

/* --- GLOW LINE SEPARATORS --- */
.section-divider {
    position: relative;
    overflow: hidden;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(232,130,155,0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: glow-pulse 4s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.5); }
}

/* --- DRAMATIC SCROLL PROGRESS --- */
.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 3px;
    z-index: 1001;
    background: transparent;
}

.scroll-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-red), var(--accent-gold), var(--accent-red));
    background-size: 200% 100%;
    animation: progress-gradient 3s linear infinite;
    transition: width 0.1s;
    box-shadow: 0 0 10px rgba(232,130,155,0.5), 0 0 20px rgba(232,130,155,0.3);
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(232,130,155,0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: glow-pulse 4s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.5); }
}

/* --- DRAMATIC SCROLL PROGRESS --- */
.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 3px;
    z-index: 1001;
    background: transparent;
}

.scroll-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-red), var(--accent-gold), var(--accent-red));
    background-size: 200% 100%;
    animation: progress-gradient 3s linear infinite;
    transition: width 0.1s;
    box-shadow: 0 0 10px rgba(232,130,155,0.5), 0 0 20px rgba(232,130,155,0.3);
}

@keyframes progress-gradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* --- PREMIUM / NEON PANELS (repurposed as accent cards) --- */
.spectrum-glow-text {
    background: linear-gradient(90deg, var(--accent-red), var(--accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.premium-neon-panel { position: relative; }
.premium-neon-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(192,57,43,0.2), rgba(212,160,23,0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 4;
    opacity: 0.5;
}

/* --- BOOT PRELOADER --- */
.boot-preloader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--paper);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 1s var(--ease-out), transform 0.8s var(--ease-out);
}

.boot-preloader::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 40% at 50% 50%, rgba(232,130,155,0.05) 0%, transparent 70%);
    animation: boot-pulse 4s ease-in-out infinite;
}

@keyframes boot-pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.boot-video { display: none; }
.boot-particles { display: none; }
.boot-gradient-orbs { display: none; }
.boot-corners { display: none; }
.boot-data-streams { display: none; }
.boot-hex-pattern { display: none; }
.boot-status-indicators { display: none; }
.boot-progress-bars { display: none; }
.boot-circuits { display: none; }

.boot-preloader::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(232,130,155,0.4), rgba(244,162,97,0.4), transparent);
    animation: boot-scan 2s ease-in-out infinite;
    z-index: 2;
}

@keyframes boot-scan {
    0% { top: 0; opacity: 1; }
    100% { top: 100%; opacity: 0.3; }
}

.boot-preloader.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
}

.boot-content {
    text-align: center;
    width: 90%;
    max-width: 520px;
    position: relative;
    z-index: 1;
}

.boot-ring-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
}

.boot-ring-svg { width: 100%; height: 100%; }

.boot-percent {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--ink);
    letter-spacing: 0.05em;
}

.boot-percent::after {
    content: '%';
    font-size: 0.7rem;
    opacity: 0.4;
    margin-left: 2px;
}

.boot-status {
    font-family: var(--font-body);
    font-size: var(--size-micro);
    color: var(--ink-faded);
    letter-spacing: 0.15em;
    margin-bottom: 2rem;
    min-height: 1.2em;
}

.boot-status::after {
    content: '|';
    animation: blink 1s step-end infinite;
    color: var(--accent-red);
    margin-left: 2px;
}

.boot-name-reveal {
    font-family: var(--font-title);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    margin-bottom: 0.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--ink);
}

.boot-name-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.boot-name-reveal .glitch-char {
    display: inline-block;
    animation: glitch-char 0.15s ease-in-out;
}

.boot-subtitle-reveal {
    font-family: var(--font-body);
    font-size: var(--size-micro);
    color: var(--ink-faded);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.6s 0.3s;
}
.boot-subtitle-reveal.visible { opacity: 1; }

.boot-terminal {
    text-align: left;
    padding: 1rem;
    font-family: var(--font-body);
    font-size: var(--size-micro);
    color: var(--ink-faded);
    max-height: 180px;
    overflow-y: auto;
    background: rgba(0,0,0,0.05);
    border: 1px solid rgba(232,168,124,0.1);
    border-radius: var(--radius-sm);
    margin-top: 1.5rem;
}

.boot-terminal .terminal-dots { display: flex; gap: 6px; margin-bottom: 0.75rem; }
.boot-terminal .terminal-title-bar { font-size: 0.6rem; color: var(--ink-faded); margin-bottom: 0.75rem; }

.boot-log-line { margin-bottom: 1px; opacity: 0; animation: bootLineIn 0.2s forwards; }
.boot-log-line .timestamp { color: var(--ink-faded); opacity: 0.5; }
.boot-log-line .status { color: var(--ink-light); }

@keyframes bootLineIn {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes glitch-char {
    0% { transform: translate(0, 0) skewX(0); opacity: 0; }
    20% { transform: translate(-3px, 2px) skewX(10deg); opacity: 0.5; }
    40% { transform: translate(2px, -1px) skewX(-5deg); opacity: 0.8; }
    100% { transform: translate(0, 0) skewX(0); opacity: 1; }
}

/* --- NAVIGATION (Peach Dark) --- */
.glass-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(14, 12, 11, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(232,168,124,0.08);
    transition: all 0.4s var(--ease-out);
}

.glass-header.scrolled {
    background: rgba(14, 12, 11, 0.97);
    border-bottom-color: rgba(232,130,155,0.15);
    box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

.glass-header.scrolled {
    background: rgba(14, 12, 11, 0.97);
    border-bottom-color: rgba(232,168,124,0.15);
    box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

.glass-header::before { display: none; }

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-family: var(--font-title);
    font-weight: 900;
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.logo-text { color: var(--ink); }
.logo-sep { color: var(--ink-faded); font-weight: 300; font-family: var(--font-body); }
.logo-sub {
    color: var(--ink-faded);
    font-weight: 400;
    font-size: 0.6rem;
    font-family: var(--font-body);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}

.nav-links { display: flex; gap: 1.5rem; }

.nav-link {
    font-family: var(--font-body);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink-faded);
    transition: color 0.3s;
    position: relative;
}

.nav-link:hover, .nav-link.active { color: var(--accent-red); }

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0; right: 0;
    height: 2px;
    background: var(--accent-red);
    box-shadow: 0 0 8px rgba(232,130,155,0.4);
}

.nav-link::before { display: none; }

.nav-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.6rem;
    color: var(--ink-faded);
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--rule);
    border-radius: 2px;
}

.nav-status::before { display: none; }

.status-dot {
    width: 6px; height: 6px;
    background: #00E676;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

.status-text { transition: color 0.3s; }

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}
.hamburger span {
    width: 20px; height: 2px;
    background: var(--ink);
    transition: all 0.3s;
}

.mobile-nav {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(14, 12, 11, 0.97);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.mobile-nav.open { opacity: 1; pointer-events: auto; }

.mobile-nav-link {
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ink-faded);
    transition: color 0.3s;
}
.mobile-nav-link:hover { color: var(--accent-red); }

/* --- HERO (Peach Dark Cover) --- */
.hero {
    min-height: 100dvh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--paper);
    padding-top: 4rem;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(232,130,155,0.06) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(244,162,97,0.04) 0%, transparent 50%);
    z-index: 0;
    animation: hero-glow 12s ease-in-out infinite alternate;
}

@keyframes hero-glow {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

.hero-video { display: none; }
.hero-overlay { display: none; }
.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.03) 2px,
        rgba(0,0,0,0.03) 4px
    );
    z-index: 3;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: left;
    padding: 2rem 3rem;
    max-width: 1200px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-animate {
    opacity: 0;
    transform: translateY(30px);
}
.hero-animate.visible {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.8rem;
    font-family: var(--font-body);
    font-size: var(--size-micro);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-red);
    border: 1px solid var(--accent-red);
    margin-bottom: 2rem;
}

.badge-pulse {
    width: 6px; height: 6px;
    background: var(--accent-red);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

.hero-title {
    font-size: var(--size-hero);
    font-family: var(--font-title);
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: var(--leading-tight);
    margin-bottom: 1rem;
    color: var(--ink);
    /* Overflow headline effect */
    margin-left: -3vw;
    padding-left: 3vw;
}

.hero-title-glitch::before,
.hero-title-glitch::after { display: none; }

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--ink-light);
    font-weight: 400;
    margin-bottom: 2rem;
    font-family: var(--font-body);
}

.hero-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    max-width: 800px;
}

.skill-badge {
    padding: 0.3rem 0.7rem;
    font-family: var(--font-body);
    font-size: 0.6rem;
    letter-spacing: 0.05em;
    color: var(--ink-faded);
    border: 1px solid rgba(232,168,124,0.08);
    border-radius: 2px;
    background: rgba(255,255,255,0.03);
    transition: all 0.3s;
}

.skill-badge:hover {
    border-color: rgba(232,130,155,0.2);
    color: var(--accent-red);
    box-shadow: 0 0 15px rgba(232,130,155,0.1);
}

.skill-badge.highlight { color: var(--ink); border-color: rgba(240,232,220,0.2); font-weight: 600; }
.skill-badge.accent-teto { color: var(--accent-red); border-color: rgba(232,130,155,0.25); }
.skill-badge.accent-indigo { color: var(--ink-light); border-color: rgba(240,232,220,0.1); }
.skill-badge.accent-magenta { color: var(--accent-gold); border-color: rgba(244,162,97,0.25); }
.skill-badge.accent-rin { color: #27ae60; border-color: rgba(39,174,96,0.25); }

.hero-description {
    font-size: var(--size-body);
    color: var(--ink-light);
    max-width: 65ch;
    line-height: var(--leading-body);
    margin: 0 auto 2rem 0;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

/* --- GLASS BUTTON (peach dark) --- */
.glass-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid var(--accent-red);
    border-radius: 2px;
    padding: 0.75rem 1.5rem;
    color: var(--accent-red);
    font-family: var(--font-body);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s var(--ease-out);
    overflow: hidden;
}

.glass-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease-out);
    z-index: -1;
}

.glass-btn:hover {
    color: var(--paper);
    border-color: var(--accent-red);
    box-shadow: 0 0 30px rgba(232,130,155,0.2);
}

.glass-btn:hover::before {
    transform: scaleX(1);
}

.btn-primary { background: var(--accent-red); color: var(--paper); border-color: var(--accent-red); }
.btn-primary::before { background: var(--accent-crimson); }
.btn-primary:hover { background: var(--accent-red); box-shadow: 0 0 40px rgba(232,130,155,0.3); }

/* --- SCROLL INDICATOR --- */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: var(--size-micro);
    letter-spacing: 0.15em;
    color: var(--ink-faded);
}

.scroll-mouse {
    width: 20px; height: 32px;
    border: 1.5px solid var(--ink-faded);
    border-radius: 10px;
    position: relative;
}

.scroll-wheel {
    width: 3px; height: 6px;
    background: var(--ink-faded);
    border-radius: 2px;
    position: absolute;
    top: 6px; left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel 2s infinite;
}

/* --- SECTIONS --- */
section {
    padding: 6rem 0;
    position: relative;
}

.section-with-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
}

.section-with-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(14, 12, 11, 0.92);
    z-index: 0;
    pointer-events: none;
}

.section-with-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 40% at 50% 30%, rgba(232,130,155,0.03) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
}

.section-with-bg .glass-panel {
    box-shadow: 0 4px 20px rgba(0,0,0,0.4), inset 0 1px 0 rgba(232,168,124,0.05);
}

[data-theme="classical"] { --section-accent: var(--accent-gold); }
[data-theme="vocaloid"] { --section-accent: #27ae60; }
[data-theme="rumi"] { --section-accent: #2980b9; }
[data-theme="friday"] { --section-accent: var(--accent-gold); }
[data-theme="teto"] { --section-accent: var(--accent-red); }

.section-with-bg > * { position: relative; z-index: 1; }

.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 3rem;
}

.section-header { margin-bottom: 3rem; }

/* --- MAGAZINE RULES --- */
.magazine-rule {
    border: none;
    border-top: 1px solid var(--rule);
    margin: 3rem 0;
}

.magazine-rule-double {
    border: none;
    border-top: 3px double rgba(240,232,220,0.15);
    margin: 4rem 0;
}

.section-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(232,130,155,0.3) 20%, rgba(244,162,97,0.3) 50%, rgba(232,130,155,0.3) 80%, transparent 100%);
    margin: 0;
    position: relative;
}

.section-divider::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(232,130,155,0.6), transparent);
    animation: divider-sweep 6s ease-in-out infinite;
}

@keyframes divider-sweep {
    0% { left: -60%; }
    100% { left: 160%; }
}

/* --- ROADMAP --- */
.roadmap-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: start;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.timeline-node {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--rule);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.3);
}

.timeline-dot {
    width: 8px; height: 8px;
    background: var(--accent-red);
    border-radius: 50%;
    flex-shrink: 0;
}

.timeline-label {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 0.9rem;
}

.timeline-desc {
    font-size: 0.75rem;
    color: var(--ink-faded);
    margin-left: auto;
}

.roadmap-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.stat-item {
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--rule);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.3);
}

.stat-number {
    display: block;
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--accent-red);
}

.stat-label {
    font-family: var(--font-body);
    font-size: 0.6rem;
    color: var(--ink-faded);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.roadmap-right { display: flex; flex-direction: column; gap: 1.5rem; }

.roadmap-step { padding: 2rem; }

.step-number {
    font-family: var(--font-title);
    font-size: 3rem;
    font-weight: 900;
    color: rgba(26,26,26,0.08);
    line-height: 1;
    display: block;
    margin-bottom: 0.5rem;
}

.step-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.step-text {
    font-size: 0.9rem;
    color: var(--ink-light);
    line-height: var(--leading-body);
    margin-bottom: 1rem;
}

.step-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.tag {
    padding: 0.25rem 0.6rem;
    font-family: var(--font-body);
    font-size: 0.55rem;
    color: var(--ink-faded);
    border: 1px solid rgba(232,168,124,0.08);
    border-radius: 2px;
    background: rgba(255,255,255,0.03);
    transition: all 0.3s;
}

.tag:hover {
    border-color: rgba(232,130,155,0.2);
    color: var(--accent-red);
}

.tag:hover {
    border-color: rgba(232,130,155,0.2);
    color: var(--accent-red);
}

/* --- ABOUT --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 2.5rem;
    align-items: start;
}

.about-left { display: flex; flex-direction: column; gap: 1.5rem; }

.profile-card {
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.profile-avatar {
    width: 90px; height: 90px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.15);
    flex-shrink: 0;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.9) contrast(1.1); }

.profile-label { font-family: var(--font-body); font-size: 0.6rem; color: var(--ink-faded); letter-spacing: 0.1em; text-transform: uppercase; }
.profile-name { font-size: 1.5rem; margin: 0.25rem 0; font-family: var(--font-title); font-weight: 900; }
.profile-alias { font-family: var(--font-body); font-size: 0.7rem; color: var(--ink-faded); }

.profile-bio { padding: 2rem; }
.profile-bio p { font-size: 0.9rem; color: var(--ink-light); line-height: var(--leading-body); }

/* Drop cap */
.profile-bio p:first-of-type::first-letter {
    font-family: var(--font-title);
    font-size: 3.5rem;
    float: left;
    line-height: 0.8;
    padding-right: 0.5rem;
    padding-top: 0.1rem;
    color: var(--accent-red);
    font-weight: 900;
}

.about-right { display: flex; flex-direction: column; gap: 1.5rem; }

.synchronizer-card { padding: 2rem; }
.sync-label { font-family: var(--font-body); font-size: 0.6rem; color: var(--accent-red); letter-spacing: 0.1em; text-transform: uppercase; }
.sync-title { font-size: 1.1rem; margin: 0.25rem 0 1rem; }
.sync-prompt {
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: var(--ink-faded);
    line-height: 1.6;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(0,0,0,0.03);
    border: 1px solid var(--rule);
    border-radius: var(--radius-sm);
}
.sync-input-group { display: flex; gap: 0.75rem; }
.sync-input {
    flex: 1;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(232,168,124,0.08);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 0.7rem;
    outline: none;
    transition: all 0.3s;
}
.sync-input:focus { border-color: rgba(232,130,155,0.3); box-shadow: 0 0 15px rgba(232,130,155,0.1); }

.matrix-title { font-size: 0.85rem; margin-bottom: 1rem; font-family: var(--font-title); font-weight: 700; }
.matrix-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.matrix-card { padding: 1.5rem; }
.matrix-role { display: block; font-family: var(--font-title); font-weight: 700; font-size: 0.85rem; margin-bottom: 0.25rem; }
.matrix-desc { font-size: 0.75rem; color: var(--ink-faded); }

.skills-title { font-size: 0.85rem; margin-bottom: 1rem; font-family: var(--font-title); font-weight: 700; }
.skills-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skill-tag {
    padding: 0.35rem 0.7rem;
    font-family: var(--font-body);
    font-size: 0.6rem;
    color: var(--ink-faded);
    border: 1px solid rgba(232,168,124,0.08);
    border-radius: 2px;
    background: rgba(255,255,255,0.03);
    transition: all 0.3s;
}

.skill-tag:hover {
    border-color: rgba(232,130,155,0.2);
    color: var(--accent-red);
}

.skill-tag:hover {
    border-color: rgba(232,130,155,0.2);
    color: var(--accent-red);
}

.metrics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.metric-card {
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--rule);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.3);
}
.metric-number {
    display: block;
    font-family: var(--font-title);
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent-red);
}
.metric-label {
    font-family: var(--font-body);
    font-size: 0.6rem;
    color: var(--ink-faded);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* --- SHOWCASE (RUMI/FRIDAY) --- */
.showcase-layout { display: grid; grid-template-columns: 1fr 1.1fr; gap: 3.5rem; align-items: start; }
.showcase-layout.showcase-reverse { direction: rtl; }
.showcase-layout.showcase-reverse > * { direction: ltr; }

.showcase-text { display: flex; flex-direction: column; gap: 1.5rem; }
.showcase-desc { font-size: 0.9rem; color: var(--ink-light); line-height: var(--leading-body); }

.showcase-highlights { display: flex; flex-direction: column; gap: 0.75rem; }
.highlight-card { padding: 1.25rem; }
.highlight-label { display: block; font-family: var(--font-title); font-weight: 700; font-size: 0.85rem; margin-bottom: 0.5rem; }
.highlight-text { font-size: 0.8rem; color: var(--ink-light); line-height: 1.6; }

/* --- TERMINAL --- */
.terminal-dots { display: flex; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-red { background: #e74c3c; box-shadow: 0 0 6px rgba(231,76,60,0.4); }
.dot-yellow { background: #f39c12; box-shadow: 0 0 6px rgba(243,156,18,0.4); }
.dot-green { background: #27ae60; box-shadow: 0 0 6px rgba(39,174,96,0.4); }
.terminal-title-bar { font-family: var(--font-body); font-size: 0.65rem; color: var(--ink-faded); margin-top: 0.5rem; }

.rumi-workbench, .friday-terminal, .contact-terminal { padding: 1.25rem; }
.workbench-header, .terminal-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.workbench-title { font-family: var(--font-body); font-size: 0.7rem; color: var(--ink-faded); }

.workbench-console, .terminal-output {
    font-family: var(--font-body);
    font-size: 0.65rem;
    color: var(--ink-light);
    line-height: 1.8;
    min-height: 150px;
    max-height: 250px;
    overflow-y: auto;
    padding: 0.75rem;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(232,168,124,0.06);
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.terminal-line { margin-bottom: 2px; }
.terminal-line .highlight { color: var(--ink); font-weight: 600; }

.terminal-input-line { display: flex; align-items: center; gap: 0.5rem; }
.prompt-text { font-family: var(--font-body); font-size: 0.65rem; color: var(--accent-red); white-space: nowrap; }
.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 0.65rem;
    outline: none;
}

.terminal-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; border-bottom: 1px solid rgba(232,168,124,0.08); padding-bottom: 0.5rem; }
.tab-btn { font-family: var(--font-body); font-size: 0.6rem; letter-spacing: 0.1em; color: var(--ink-faded); padding: 0.4rem 0.75rem; border-radius: 2px; transition: all 0.3s; text-transform: uppercase; }
.tab-btn.active { color: var(--ink); background: rgba(232,130,155,0.08); font-weight: 600; }
.tab-btn:hover { color: var(--accent-red); }

.tab-content { display: none; }
.tab-content.active { display: block; }

.memory-header { font-family: var(--font-body); font-size: 0.6rem; color: var(--ink-faded); margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; }
.memory-list { display: flex; flex-direction: column; gap: 0.5rem; }
.memory-item { padding: 0.5rem 0.75rem; background: rgba(0,0,0,0.2); border: 1px solid rgba(232,168,124,0.06); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 0.6rem; display: flex; justify-content: space-between; }
.memory-strength { color: #27ae60; }

.brain-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.5rem; }
.brain-module { padding: 0.6rem; background: rgba(0,0,0,0.2); border: 1px solid rgba(232,168,124,0.06); border-radius: var(--radius-sm); text-align: center; }
.brain-module-name { font-family: var(--font-body); font-size: 0.5rem; color: var(--ink-faded); display: block; text-transform: uppercase; letter-spacing: 0.05em; }
.brain-module-status { font-size: 0.6rem; margin-top: 0.25rem; }
.brain-module-status.online { color: #27ae60; }
.brain-module-status.idle { color: var(--accent-gold); }

.graph-visualizer { margin-top: 1rem; }
.graph-visualizer canvas { width: 100%; border-radius: var(--radius-sm); background: rgba(0,0,0,0.03); border: 1px solid var(--rule); }
.graph-legend { display: flex; gap: 1rem; margin-top: 0.5rem; }
.legend-item { display: flex; align-items: center; gap: 0.4rem; font-family: var(--font-body); font-size: 0.6rem; color: var(--ink-faded); }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* --- PROJECTS --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 1.5rem;
}

.case-file { padding: 2rem; }
.case-file-image { border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 1.5rem; max-height: 200px; }
.case-file-image img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.8) contrast(1.1); }
.case-file-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.75rem; }
.case-file-number { font-family: var(--font-title); font-size: 2rem; font-weight: 900; color: rgba(26,26,26,0.1); }
.case-file-status { font-family: var(--font-body); font-size: 0.55rem; letter-spacing: 0.1em; padding: 0.2rem 0.5rem; border-radius: 2px; background: rgba(39,174,96,0.15); color: #27ae60; text-transform: uppercase; border: 1px solid rgba(39,174,96,0.2); }
.case-file-title { font-size: 1.5rem; margin-bottom: 0.25rem; }
.case-file-tagline { font-family: var(--font-body); font-size: 0.7rem; color: var(--ink-faded); margin-bottom: 1.5rem; }
.case-file-section { margin-bottom: 1.25rem; }
.case-file-label { font-family: var(--font-body); font-size: 0.55rem; letter-spacing: 0.15em; color: var(--ink-faded); margin-bottom: 0.5rem; text-transform: uppercase; }
.case-file-section p { font-size: 0.85rem; color: var(--ink-light); line-height: 1.6; }
.case-file-list li { font-size: 0.85rem; color: var(--ink-light); line-height: 1.6; padding-left: 1rem; position: relative; margin-bottom: 0.3rem; }
.case-file-list li::before { content: '\203A'; position: absolute; left: 0; color: var(--accent-red); font-weight: 700; }
.case-file-list li strong { color: var(--ink); }
.case-file-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.5rem; }
.tech-tag { padding: 0.2rem 0.5rem; font-family: var(--font-body); font-size: 0.5rem; color: var(--ink-faded); border: 1px solid rgba(232,168,124,0.06); border-radius: 2px; background: rgba(255,255,255,0.03); transition: all 0.3s; }
.tech-tag:hover { border-color: rgba(232,130,155,0.2); color: var(--accent-red); }
.case-file-link { margin-top: auto; }

.discovery-quotes { display: flex; flex-direction: column; gap: 0.5rem; }
.discovery-quote {
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    color: var(--ink-light);
    font-style: italic;
    border-left: 3px solid var(--accent-red);
    background: rgba(255,255,255,0.04);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Pull quote */
.pull-quote {
    font-family: var(--font-title);
    font-size: var(--size-h2);
    font-style: italic;
    color: var(--ink);
    border-left: 4px solid var(--accent-red);
    padding-left: 1.5rem;
    margin: 2.5rem 0;
    position: relative;
}

.pull-quote::before {
    content: '\201C';
    font-size: 6rem;
    position: absolute;
    left: -0.2rem;
    top: -2rem;
    color: var(--accent-red);
    opacity: 0.15;
    font-style: normal;
}

/* --- RESEARCH --- */
.architecture-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 2rem; }
.architecture-card { padding: 2rem; }
.arch-number { font-family: var(--font-body); font-size: 0.55rem; color: var(--accent-red); letter-spacing: 0.15em; text-transform: uppercase; font-weight: 600; }
.arch-title { font-size: 1.1rem; margin: 0.5rem 0 1rem; }
.arch-detail { display: flex; flex-direction: column; gap: 0.75rem; }
.arch-item { display: flex; flex-direction: column; gap: 0.15rem; }
.arch-item-label { font-family: var(--font-body); font-size: 0.7rem; color: var(--ink); font-weight: 600; }
.arch-item-desc { font-size: 0.8rem; color: var(--ink-faded); }

.system-map-container { padding: 2rem; }
.system-map-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.system-map-title { font-size: 1rem; }
.system-map-stats { display: flex; gap: 1.5rem; font-family: var(--font-body); font-size: 0.6rem; color: var(--ink-faded); text-transform: uppercase; letter-spacing: 0.05em; }
.system-map-svg { min-height: 300px; position: relative; }

/* --- GITHUB --- */
.github-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.repos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.repo-shimmer {
    height: 120px;
    background: linear-gradient(90deg, rgba(0,0,0,0.03) 25%, rgba(0,0,0,0.06) 50%, rgba(0,0,0,0.03) 75%);
    background-size: 200% 100%;
    animation: shimmer-loading 1.5s infinite;
}

.repo-card { padding: 1.25rem; border: 1px solid rgba(232,168,124,0.06); border-radius: var(--radius-sm); background: rgba(20,18,16,0.5); transition: all 0.3s; }
.repo-card:hover { border-color: rgba(232,130,155,0.15); box-shadow: 0 4px 20px rgba(0,0,0,0.3); }
.repo-name { font-family: var(--font-body); font-size: 0.8rem; font-weight: 600; margin-bottom: 0.5rem; }
.repo-desc { font-size: 0.75rem; color: var(--ink-light); line-height: 1.5; margin-bottom: 0.75rem; }
.repo-meta { display: flex; gap: 1rem; font-family: var(--font-body); font-size: 0.55rem; color: var(--ink-faded); }
.repo-lang { display: flex; align-items: center; gap: 0.3rem; }
.repo-lang-dot { width: 8px; height: 8px; border-radius: 50%; }

.heatmap-card { padding: 1.5rem; border: 1px solid rgba(232,168,124,0.06); border-radius: var(--radius-sm); background: rgba(20,18,16,0.5); }
.heatmap-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.heatmap-title { font-family: var(--font-body); font-size: 0.65rem; color: var(--ink-faded); text-transform: uppercase; letter-spacing: 0.1em; }
.heatmap-user { font-family: var(--font-body); font-size: 0.6rem; color: var(--ink-faded); }
.heatmap-grid { display: grid; grid-template-columns: repeat(26, 1fr); gap: 2px; }
.heatmap-cell { width: 100%; aspect-ratio: 1; border-radius: 1px; background: rgba(232,168,124,0.04); }
.heatmap-cell.level-1 { background: rgba(232,130,155,0.2); }
.heatmap-cell.level-2 { background: rgba(232,130,155,0.4); }
.heatmap-cell.level-3 { background: rgba(232,130,155,0.7); }

/* --- KNOWLEDGE GRAPH --- */
.kg-container { padding: 1.5rem; }
.kg-container canvas { width: 100%; height: 500px; border-radius: var(--radius-sm); background: rgba(0,0,0,0.2); border: 1px solid rgba(232,168,124,0.06); }

.kg-legend { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: center; margin: 1.5rem 0; }

.kg-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.kg-stat { padding: 1.25rem; text-align: center; border: 1px solid rgba(232,168,124,0.06); border-radius: var(--radius-sm); background: rgba(20,18,16,0.5); transition: all 0.3s; }
.kg-stat:hover { border-color: rgba(232,130,155,0.15); box-shadow: 0 0 20px rgba(232,130,155,0.05); }
.kg-stat-number { display: block; font-family: var(--font-title); font-size: 1.75rem; font-weight: 900; color: var(--accent-red); }
.kg-stat-label { font-family: var(--font-body); font-size: 0.55rem; color: var(--ink-faded); text-transform: uppercase; letter-spacing: 0.05em; }

/* --- DISCOVERY TICKER --- */
.discovery-ticker {
    overflow: hidden;
    white-space: nowrap;
    padding: 1rem 0;
    margin: 0;
    border-radius: 0;
    border-top: 1px solid rgba(232,130,155,0.15);
    border-bottom: 1px solid rgba(232,130,155,0.15);
    background: rgba(14, 12, 11, 0.8);
    position: relative;
}

.discovery-ticker::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--paper) 0%, transparent 10%, transparent 90%, var(--paper) 100%);
    z-index: 2;
    pointer-events: none;
}

.ticker-track {
    display: inline-flex;
    animation: ticker-scroll 60s linear infinite;
}
.ticker-track:hover { animation-play-state: paused; }

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 2rem;
    font-family: var(--font-body);
    font-size: 0.65rem;
    color: var(--ink-faded);
}

.ticker-domain {
    color: var(--accent-red);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-shadow: 0 0 10px rgba(232,130,155,0.3);
}

/* --- CONTACT --- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.contact-links { display: flex; flex-direction: column; gap: 0.75rem; }

.contact-link-card {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s;
    border: 1px solid rgba(232,168,124,0.08);
    border-radius: var(--radius-sm);
    background: rgba(20,18,16,0.5);
}

.contact-link-card.muted { opacity: 0.5; }
.contact-link-card svg { flex-shrink: 0; color: var(--ink-faded); }
.contact-link-label { font-family: var(--font-title); font-weight: 700; font-size: 0.85rem; }
.contact-link-value { font-family: var(--font-body); font-size: 0.65rem; color: var(--ink-faded); margin-left: auto; }

.contact-link-card:hover {
    border-color: rgba(232,130,155,0.25);
    background: rgba(232,130,155,0.05);
    box-shadow: 0 0 20px rgba(232,130,155,0.08);
}

/* --- PUBLICATIONS --- */
.publications-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1.5rem; }
.publication-card { padding: 2rem; }
.pub-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.pub-badge { font-family: var(--font-body); font-size: 0.55rem; letter-spacing: 0.15em; padding: 0.2rem 0.5rem; border-radius: 2px; background: rgba(232,130,155,0.15); color: var(--accent-red); text-transform: uppercase; border: 1px solid rgba(232,130,155,0.2); }
.pub-score { font-family: var(--font-body); font-size: 0.7rem; font-weight: 600; color: #27ae60; }
.pub-title { font-size: 1.1rem; margin-bottom: 0.75rem; line-height: 1.4; }
.pub-desc { font-size: 0.8rem; color: var(--ink-light); line-height: 1.6; margin-bottom: 1rem; }
.pub-highlights { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.pub-highlight { padding: 0.2rem 0.5rem; font-family: var(--font-body); font-size: 0.5rem; color: var(--ink-faded); border: 1px solid rgba(232,168,124,0.06); border-radius: 2px; background: rgba(255,255,255,0.03); transition: all 0.3s; }
.pub-highlight:hover { border-color: rgba(232,130,155,0.2); color: var(--accent-red); }
.pub-meta { display: flex; gap: 1.5rem; font-family: var(--font-body); font-size: 0.55rem; color: var(--ink-faded); }

/* --- RECOGNITION --- */
.recognition-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.recognition-card { padding: 2rem; text-align: center; }
.recognition-icon { margin-bottom: 1rem; color: var(--accent-red); display: flex; justify-content: center; }
.recognition-title { font-size: 1.1rem; margin-bottom: 0.75rem; }
.recognition-desc { font-size: 0.8rem; color: var(--ink-light); line-height: 1.6; }

/* --- TOOLS --- */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.tool-card { padding: 1.5rem; }
.tool-category { font-family: var(--font-title); font-size: 0.9rem; font-weight: 700; margin-bottom: 1rem; color: var(--ink); }
.tool-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tool-tag { padding: 0.2rem 0.5rem; font-family: var(--font-body); font-size: 0.5rem; color: var(--ink-faded); border: 1px solid rgba(232,168,124,0.06); border-radius: 2px; background: rgba(255,255,255,0.03); transition: all 0.3s; }
.tool-tag:hover { border-color: rgba(232,130,155,0.2); color: var(--accent-red); }

/* --- PERSONAL --- */
.personal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.personal-card { padding: 2rem; text-align: center; }
.personal-icon { margin-bottom: 1rem; color: var(--accent-red); display: flex; justify-content: center; }
.personal-title { font-size: 1rem; margin-bottom: 0.5rem; }
.personal-desc { font-size: 0.8rem; color: var(--ink-light); line-height: 1.6; }

/* --- RESEARCH CARDS --- */
.research-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.research-card { padding: 2rem; }
.research-icon { margin-bottom: 1rem; color: var(--accent-red); }
.research-title { font-size: 1.1rem; margin-bottom: 0.75rem; }
.research-desc { font-size: 0.8rem; color: var(--ink-light); line-height: 1.6; margin-bottom: 1rem; }
.research-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* --- FOOTER (Peach Dark colophon) --- */
.footer {
    padding: 3rem;
    border-top: 3px double rgba(232,168,124,0.1);
    text-align: center;
    background: var(--paper);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 200px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-red), transparent);
}

.footer-copy { font-family: var(--font-body); font-size: 0.7rem; color: var(--ink-faded); margin-bottom: 0.25rem; }
.footer-tagline { font-family: var(--font-body); font-size: 0.6rem; color: var(--ink-faded); opacity: 0.4; font-style: italic; }

/* --- SCROLL DEPTH --- */
.scroll-depth { display: none; }

/* --- TEXT REVEAL --- */
.text-split-char-reveal span {
    display: inline-block;
    opacity: 0;
    filter: blur(8px);
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: calc(var(--char-index, 0) * 0.04s);
}

.text-split-char-reveal.revealed span {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* --- SCROLL REVEAL --- */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.67s var(--ease-out);
}

/* --- TILT --- */
.tilt-card { transition: transform 0.15s ease-out; will-change: transform; }
.tilt-card.is-tilting {
    transform: perspective(1000px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) scale3d(1.01, 1.01, 1.01) !important;
}

/* --- MAGNETIC --- */
.magnetic-btn { transition: transform 0.2s ease-out; }

/* --- KEYFRAMES --- */
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes scroll-wheel {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

@keyframes shimmer-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* --- FLOATING ORBS (subtle on paper) --- */
.floating-orb { display: none; }

/* --- GRADIENT BLOBS (hidden on paper) --- */
.gradient-blobs { display: none; }

/* --- STAGGER GRID --- */
.stagger-grid > .glass-panel {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

/* --- SECTION ENTRANCE --- */
section.section-active .section-container {
    animation: section-enter 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes section-enter {
    from { opacity: 0.8; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Section title underline reveal */
.section-title::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: var(--accent-red);
    margin-top: 0.5rem;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-header.visible .section-title::after {
    width: 80px;
}

/* --- BLUR REVEAL --- */
.blur-reveal {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- CLIP-PATH REVEAL --- */
.clip-reveal {
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.clip-reveal.visible { clip-path: inset(0 0% 0 0); }

/* --- GLOW HOVER (subtle on paper) --- */
.glass-panel.glow-hover { transition: all 0.4s var(--ease-out); }
.glass-panel.glow-hover:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* --- VELOCITY LINE (hidden) --- */
.velocity-line { display: none; }

/* --- SCROLL RING (hidden) --- */
.scroll-ring-indicator { display: none; }

/* --- MORPH BORDER --- */
.morph-border { position: relative; }
.morph-border::before { display: none; }

/* --- GLITCH TEXT --- */
.glitch-text { position: relative; display: inline-block; }
.glitch-text::before, .glitch-text::after { display: none; }

/* --- COUNTER --- */
.counter-animate { display: inline-block; transition: all 0.3s ease; }

/* --- SKILL BADGE HOVER --- */
.skill-badge { transition: all 0.3s var(--ease-out); }
.skill-badge:hover { transform: translateY(-1px); }

/* --- TYPEWRITER --- */
.typewriter-cursor::after {
    content: '|';
    animation: blink 1s step-end infinite;
    color: var(--ink);
    font-weight: 100;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .roadmap-layout { grid-template-columns: 1fr; }
    .about-grid { grid-template-columns: 1fr; }
    .showcase-layout { grid-template-columns: 1fr; }
    .showcase-layout.showcase-reverse { direction: ltr; }
    .architecture-grid { grid-template-columns: 1fr 1fr; }
    .github-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    section { padding: 4rem 0; }
    .nav-links, .nav-status { display: none; }
    .hamburger { display: flex; }
    .glass-header { border-bottom-width: 1px; }
    .header-inner { padding: 0.75rem 1.5rem; }
    .section-container { padding: 0 1.5rem; }
    .hero-title { font-size: clamp(2.5rem, 12vw, 5rem); margin-left: -1vw; padding-left: 1vw; }
    .projects-grid { grid-template-columns: 1fr; }
    .architecture-grid { grid-template-columns: 1fr; }
    .kg-stats { grid-template-columns: 1fr 1fr; }
    .matrix-grid { grid-template-columns: 1fr; }
    .repos-grid { grid-template-columns: 1fr; }
    .brain-grid { grid-template-columns: 1fr 1fr; }
    .roadmap-stats { grid-template-columns: 1fr 1fr; }
    body { cursor: auto; }
}

@media (max-width: 480px) {
    .section-container { padding: 0 1rem; }
    .header-inner { padding: 0.75rem 1rem; }
    .hero-content { padding: 1.5rem 1rem; }
    .hero-skills { gap: 0.3rem; }
    .skill-badge { font-size: 0.5rem; padding: 0.2rem 0.4rem; }
    .roadmap-step { padding: 1.25rem; }
    .case-file { padding: 1.25rem; }
    .hero-buttons { flex-direction: column; align-items: flex-start; }
}

/* --- REDUCED MOTION --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .noise-overlay { display: none; }
    .ticker-track { animation: none; }
}

/* --- DRAMATIC INTERACTIVE ELEMENTS --- */

/* Animated gradient border on hover */
.glass-panel {
    position: relative;
}

.glass-panel::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, transparent 40%, rgba(232,130,155,0.15) 50%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s;
    z-index: 0;
    pointer-events: none;
}

.glass-panel:hover::before {
    opacity: 1;
}

/* Glowing section titles */
.section-title {
    text-shadow: 0 0 40px rgba(232,130,155,0.1);
}

/* Stat number glow */
.stat-number, .metric-number, .kg-stat-number {
    text-shadow: 0 0 20px rgba(232,130,155,0.2);
}

/* Animated underline on section headers */
.section-header {
    position: relative;
}

/* Card lift effect */
.glass-panel {
    transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color 0.4s;
}

/* Pulsing accent dots */
.badge-pulse, .status-dot {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 4px currentColor; }
    50% { box-shadow: 0 0 12px currentColor, 0 0 20px currentColor; }
}

/* Smooth section transitions */
section {
    transition: opacity 0.3s;
}

/* Interactive timeline nodes */
.timeline-node {
    transition: all 0.3s var(--ease-out);
    cursor: default;
}

.timeline-node:hover {
    border-color: rgba(232,130,155,0.2);
    transform: translateX(4px);
}

/* Interactive research cards */
.research-card {
    transition: all 0.4s var(--ease-out);
}

.research-card:hover {
    border-color: rgba(230,57,70,0.15);
}

/* Publication card score glow */
.pub-score {
    text-shadow: 0 0 10px rgba(39,174,96,0.3);
}

/* Case file number dramatic */
.case-file-number {
    transition: all 0.4s var(--ease-out);
}

.case-file:hover .case-file-number {
    color: rgba(232,130,155,0.15);
}

/* Nav status pulse */
.nav-status {
    transition: all 0.4s var(--ease-out);
}

.nav-status:hover {
    border-color: rgba(39,174,96,0.3);
    background: rgba(39,174,96,0.05);
}

/* Step number hover */
.step-number {
    transition: color 0.4s var(--ease-out);
}

.roadmap-step:hover .step-number {
    color: rgba(232,130,155,0.12);
}

/* Recognition icon pulse */
.recognition-icon {
    transition: transform 0.3s var(--ease-out);
}

.recognition-card:hover .recognition-icon {
    transform: scale(1.1);
}

/* Personal card icon color shift */
.personal-icon {
    transition: color 0.3s, transform 0.3s;
}

.personal-card:hover .personal-icon {
    color: var(--accent-red);
    transform: scale(1.1);
}

/* Hero badge pulse */
.hero-badge {
    animation: badge-breathe 3s ease-in-out infinite;
}

@keyframes badge-breathe {
    0%, 100% { border-color: rgba(232,130,155,0.3); }
    50% { border-color: rgba(232,130,155,0.6); box-shadow: 0 0 15px rgba(232,130,155,0.1); }
}

/* Scroll progress glow */
.scroll-progress-bar {
    box-shadow: 0 0 10px rgba(232,130,155,0.5), 0 0 20px rgba(232,130,155,0.3);
}

/* Button press effect */
.glass-btn:active {
    transform: scale(0.97);
}

/* Discovery quote border glow */
.discovery-quote {
    transition: all 0.3s;
}

.discovery-quote:hover {
    border-left-color: var(--accent-gold);
    background: rgba(232,130,155,0.03);
}

/* Terminal input focus glow */
.terminal-input:focus {
    text-shadow: 0 0 5px rgba(232,130,155,0.2);
}

/* Matrix card hover */
.matrix-card {
    transition: all 0.3s var(--ease-out);
}

.matrix-card:hover {
    border-color: rgba(232,130,155,0.15);
}

/* Metric card hover */
.metric-card {
    transition: all 0.3s var(--ease-out);
}

.metric-card:hover {
    border-color: rgba(232,130,155,0.15);
    transform: translateY(-2px);
}

/* Stat item hover */
.stat-item {
    transition: all 0.3s var(--ease-out);
}

.stat-item:hover {
    border-color: rgba(232,130,155,0.15);
    transform: translateY(-2px);
}

/* Highlight card hover */
.highlight-card {
    transition: all 0.3s var(--ease-out);
}

.highlight-card:hover {
    border-color: rgba(232,130,155,0.15);
}

/* Architecture card hover */
.architecture-card {
    transition: all 0.3s var(--ease-out);
}

.architecture-card:hover {
    border-color: rgba(232,130,155,0.15);
}

/* Publication card hover */
.publication-card {
    transition: all 0.3s var(--ease-out);
}

.publication-card:hover {
    border-color: rgba(232,130,155,0.15);
}

/* Recognition card hover */
.recognition-card {
    transition: all 0.3s var(--ease-out);
}

.recognition-card:hover {
    border-color: rgba(232,130,155,0.15);
}

/* Tool card hover */
.tool-card {
    transition: all 0.3s var(--ease-out);
}

.tool-card:hover {
    border-color: rgba(232,130,155,0.15);
}

/* Profile card hover */
.profile-card {
    transition: all 0.3s var(--ease-out);
}

.profile-card:hover {
    border-color: rgba(232,130,155,0.15);
}

/* Profile avatar glow on hover */
.profile-avatar {
    transition: all 0.3s;
}

.profile-card:hover .profile-avatar {
    border-color: var(--accent-red);
    box-shadow: 0 0 20px rgba(232,130,155,0.15);
}

/* Synchronizer card hover */
.synchronizer-card {
    transition: all 0.3s var(--ease-out);
}

.synchronizer-card:hover {
    border-color: rgba(232,130,155,0.15);
}

/* RUMI workbench glow */
.rumi-workbench {
    transition: all 0.3s var(--ease-out);
}

.rumi-workbench:hover {
    border-color: rgba(232,130,155,0.1);
}

/* FRIDAY terminal glow */
.friday-terminal {
    transition: all 0.3s var(--ease-out);
}

.friday-terminal:hover {
    border-color: rgba(232,130,155,0.1);
}

/* Contact terminal glow */
.contact-terminal {
    transition: all 0.3s var(--ease-out);
}

.contact-terminal:hover {
    border-color: rgba(232,130,155,0.1);
}

/* Boot ring glow */
.boot-ring-svg {
    filter: drop-shadow(0 0 10px rgba(232,130,155,0.2));
}

/* Hero title text shadow */
.hero-title {
    text-shadow: 0 0 60px rgba(232,130,155,0.08);
}

/* Section label accent */
.section-label {
    color: var(--accent-red);
    opacity: 0.7;
}

/* Drop cap color */
.profile-bio p:first-of-type::first-letter {
    color: var(--accent-red);
    text-shadow: 0 0 20px rgba(232,130,155,0.2);
}

/* Pull quote border */
.pull-quote {
    border-left-color: var(--accent-red);
    box-shadow: -4px 0 20px rgba(232,130,155,0.05);
}

/* Discovery ticker domain glow */
.ticker-domain {
    text-shadow: 0 0 10px rgba(232,130,155,0.3);
}

/* Scrollbar styling */
::-webkit-scrollbar-thumb {
    background: rgba(232,130,155,0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(232,130,155,0.5);
}

/* Selection color */
::selection {
    background: rgba(232,130,155,0.2);
    color: var(--ink);
}

/* Hero parallax smooth transition */
.hero-animate {
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* ============================================
   TABLE OF CONTENTS — Magazine TOC Overlay
   ============================================ */
.toc-toggle {
    background: none;
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.6);
    font-family: var(--font-accent);
    font-size: 0.5rem;
    letter-spacing: 0.2em;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 0.5rem;
}

.toc-toggle:hover {
    border-color: rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.9);
}

.toc-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    justify-content: flex-end;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.toc-overlay.active {
    pointer-events: all;
    opacity: 1;
}

.toc-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.toc-overlay.active::before {
    opacity: 1;
}

.toc-panel {
    position: relative;
    width: 420px;
    max-width: 90vw;
    height: 100vh;
    overflow-y: auto;
    background: #faf6ef;
    border-left: 2px solid var(--ink);
    padding: 2.5rem 2rem;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: var(--font-body);
}

.toc-overlay.active .toc-panel {
    transform: translateX(0);
}

.toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
}

.toc-masthead {
    font-family: var(--font-title);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--ink);
}

.toc-close {
    font-size: 1.8rem;
    color: var(--ink);
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.toc-close:hover {
    color: var(--accent-red);
}

.toc-issue-line {
    font-family: var(--font-accent);
    font-size: 0.5rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-faded);
    margin-bottom: 1rem;
}

.toc-divider {
    border-top: 2px double var(--ink);
    margin: 1rem 0;
}

.toc-list {
    display: flex;
    flex-direction: column;
}

.toc-item {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--rule);
    text-decoration: none;
    color: var(--ink);
    transition: all 0.3s ease;
    cursor: pointer;
}

.toc-item:hover {
    padding-left: 0.3rem;
}

.toc-number {
    font-family: var(--font-accent);
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink-faded);
    min-width: 2rem;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toc-item:hover .toc-number {
    font-size: 1.6rem;
    color: var(--accent-red);
}

.toc-category {
    font-family: var(--font-accent);
    font-size: 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--ink-faded);
    min-width: 5rem;
}

.toc-title {
    font-family: var(--font-title);
    font-size: 1rem;
    font-weight: 500;
    color: var(--ink);
    flex: 1;
}

.toc-item:hover .toc-title {
    color: var(--accent-red);
}

.toc-footer-line {
    font-family: var(--font-accent);
    font-size: 0.45rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-faded);
    text-align: center;
    margin-top: 0.5rem;
    opacity: 0.6;
}

/* ============================================
   MASTHEAD STRIP — Magazine Header Bar
   ============================================ */
.masthead-strip {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1001;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    padding: 0.4rem 1rem;
    background: rgba(1,1,3,0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-family: var(--font-accent);
    font-size: 0.5rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
}

.masthead-dot {
    opacity: 0.4;
}

/* ============================================
   INK BLEED HEADLINES — Print Effect
   ============================================ */
.section-title {
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    color: transparent;
    -webkit-text-stroke: 0;
    text-shadow:
        0.5px 0.5px 0 rgba(26,26,26,0.15),
        -0.3px 0.3px 0 rgba(26,26,26,0.08),
        0.2px -0.2px 1px rgba(26,26,26,0.05);
    pointer-events: none;
    z-index: -1;
}

/* ============================================
   HALFTONE HOVER — Print Texture on Cards
   ============================================ */
.case-file {
    position: relative;
    overflow: hidden;
}

.case-file::after {
    content: '';
    position: absolute;
    inset: 0;
    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.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
    background-size: 150px 150px;
    opacity: 0;
    mix-blend-mode: multiply;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.case-file:hover::after {
    opacity: 0.06;
}

/* ============================================
   PRINT REGISTRATION MARKS
   ============================================ */
.reg-marks {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
}

.reg-mark {
    position: absolute;
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: rgba(0,0,0,0.08);
    line-height: 1;
}

.reg-tl { top: 12px; left: 12px; }
.reg-tr { top: 12px; right: 12px; }
.reg-bl { bottom: 12px; left: 12px; }
.reg-br { bottom: 12px; right: 12px; }
.reg-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.5rem;
    color: rgba(0,0,0,0.04);
}

/* ============================================
   PULL QUOTES — Editorial Style
   ============================================ */
.pull-quote {
    font-family: var(--font-title);
    font-size: 1.3rem;
    font-style: italic;
    font-weight: 500;
    color: var(--ink);
    border-left: 3px solid var(--accent-red);
    padding: 0.8rem 0 0.8rem 1.2rem;
    margin: 1.5rem 0;
    position: relative;
    line-height: 1.5;
}

.pull-quote::before {
    content: '\201C';
    font-size: 4rem;
    position: absolute;
    left: -0.1rem;
    top: -0.8rem;
    color: var(--accent-red);
    opacity: 0.15;
    font-style: normal;
    font-family: var(--font-title);
    line-height: 1;
}

.pull-quote p {
    margin: 0;
}

/* ============================================
   MAGAZINE COLOPHON — Ink on Paper
   ============================================ */
.magazine-footer {
    margin-top: 6rem;
    padding: 0 3rem;
    font-family: var(--font-body);
    color: var(--ink);
}

.colophon-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2.5rem 0;
}

.colophon-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
}

.colophon-title {
    font-family: var(--font-title);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink);
}

.colophon-dots {
    color: var(--ink-faded);
    font-size: 0.6rem;
    letter-spacing: 0.3em;
}

.colophon-issue {
    text-align: center;
    font-family: var(--font-accent);
    font-size: 0.6rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--ink-faded);
    margin: 0.5rem 0 1rem;
}

.colophon-rule {
    width: 100%;
    margin: 1rem 0;
}

.colophon-rule-double {
    border-top: 2px double var(--ink);
}

.colophon-rule-thin {
    border-top: 1px solid var(--rule);
}

.colophon-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 1.5rem 0;
}

.colophon-label {
    font-family: var(--font-accent);
    font-size: 0.55rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-faded);
    margin-bottom: 0.5rem;
}

.colophon-small {
    font-size: 0.65rem;
    color: var(--ink-faded);
    line-height: 1.8;
}

.colophon-staff {
    display: grid;
    grid-template-columns: auto auto;
    gap: 0.2rem 1.2rem;
    font-size: 0.65rem;
}

.colophon-staff span:nth-child(odd) {
    color: var(--ink-faded);
}

.colophon-staff span:nth-child(even) {
    color: var(--ink-light);
    font-weight: 500;
}

.colophon-legal {
    font-size: 0.55rem;
    font-style: italic;
    color: var(--ink-faded);
    text-align: center;
    max-width: 600px;
    margin: 1rem auto;
    line-height: 1.7;
    opacity: 0.7;
}

.colophon-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.colophon-copy {
    font-size: 0.6rem;
    color: var(--ink-faded);
}

.colophon-links {
    display: flex;
    gap: 1.5rem;
}

.colophon-links a {
    font-family: var(--font-accent);
    font-size: 0.55rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink-faded);
    text-decoration: none;
    transition: color 0.3s ease;
}

.colophon-links a:hover {
    color: var(--accent-red);
}

.colophon-page {
    font-family: var(--font-accent);
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    color: var(--ink-faded);
    font-style: italic;
}

/* ============================================
   SECTION PAGE NUMBERS
   ============================================ */
.section-container {
    position: relative;
}

.section-page-number {
    position: absolute;
    top: 2rem;
    right: 0;
    font-family: var(--font-accent);
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    color: var(--ink-faded);
    opacity: 0.4;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}
