/* ====================================================
   VARIABLES — dark is the default
   ==================================================== */
:root {
    --bg:        #0F0C0A;
    --surface:   #1A1410;
    --surface-2: #221C16;
    --text:      #F0EBE3;
    --text-2:    #B8A898;
    --text-3:    #7A6858;
    --accent:    #FF4C29;   /* hot coral       */
    --hot:       #FFB347;   /* warm amber      */
    --border:    #2E2420;
    --border-2:  #231C18;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans:  'Space Grotesk', system-ui, sans-serif;
    --max-w:      1100px;
    --pad:        40px;
}

/* Day mode overrides */
.day-mode {
    --bg:        #FAF6F0;
    --surface:   #F2EBE0;
    --surface-2: #E8DCCC;
    --text:      #1A1208;
    --text-2:    #4A3828;
    --text-3:    #8A7060;
    --accent:    #E03A18;   /* deeper coral on light */
    --hot:       #CC8800;
    --border:    #D8C8B8;
    --border-2:  #E8DDD0;
}

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

html {
    font-size: 18px;
    scroll-behavior: smooth;
    cursor: none;  /* replaced by custom cursor */
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-weight: 400;
    line-height: 1.7;
    transition: background 0.4s, color 0.4s;
    overflow-x: hidden;
}

/* Show default cursor on touch devices */
@media (pointer: coarse) {
    html { cursor: auto; }
}

/* Global grain texture */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.35;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='0.07'/%3E%3C/svg%3E");
}

/* ====================================================
   CUSTOM CURSOR
   ==================================================== */
.cursor-dot {
    position: fixed;
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: transform 0.08s, width 0.2s, height 0.2s, background 0.2s;
}

.cursor-ring {
    position: fixed;
    width: 36px;
    height: 36px;
    border: 1.5px solid var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.06s, width 0.25s, height 0.25s, border-color 0.2s, opacity 0.2s;
    opacity: 0.5;
}

.cursor-ring.is-hovering {
    width: 60px;
    height: 60px;
    opacity: 0.9;
    border-color: var(--hot);
}

.cursor-dot.is-hovering {
    background: var(--hot);
    transform: translate(-50%, -50%) scale(1.8);
}

@media (pointer: coarse) {
    .cursor-dot, .cursor-ring { display: none; }
}

/* ====================================================
   VINYL MUSIC PLAYER
   ==================================================== */
.music-player {
    position: fixed;
    bottom: 28px;
    left: 28px;
    z-index: 400;
    background: none;
    border: none;
    cursor: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 0;
}

.vinyl-wrap {
    position: relative;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    isolation: isolate;
}

/* Neo conic gradient halo — faint at rest, vivid when playing */
.vinyl-wrap::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        #FF4C29, #FF9500, #C850FF, #00CFFF, #4CFFA0, #FF4C29
    );
    opacity: 0.22;
    transition: opacity 0.5s ease;
    z-index: -1;
    filter: blur(4px);
    animation: neo-halo 10s linear infinite;
}

.music-player:hover .vinyl-wrap::before {
    opacity: 0.55;
    animation-duration: 5s;
}

.music-player.is-playing .vinyl-wrap::before {
    opacity: 0.9;
    animation-duration: 2s;
}

@keyframes neo-halo {
    to { transform: rotate(360deg); }
}

/* Pulse ring — purple/cyan neo pulse */
.music-player.is-playing .vinyl-wrap::after {
    content: '';
    position: absolute;
    inset: -9px;
    border-radius: 50%;
    border: 1.5px solid rgba(190, 80, 255, 0.85);
    animation: neo-pulse 2.2s ease-out infinite;
    pointer-events: none;
}

@keyframes neo-pulse {
    0%   { transform: scale(1);   opacity: 0.9; border-color: rgba(190,80,255,0.85); }
    50%  { border-color: rgba(0,210,255,0.55); }
    100% { transform: scale(1.65); opacity: 0; }
}

.vinyl-svg {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
    filter: drop-shadow(0 0 10px rgba(255, 76, 41, 0.45))
            drop-shadow(0 0 4px rgba(140, 50, 220, 0.3));
    transition: filter 0.4s;
}

.music-player:hover .vinyl-svg {
    filter: drop-shadow(0 0 10px rgba(180, 60, 255, 0.6))
            drop-shadow(0 0 22px rgba(255, 76, 41, 0.25));
}

.music-player.is-playing .vinyl-svg {
    filter: drop-shadow(0 0 14px rgba(180, 60, 255, 0.65))
            drop-shadow(0 0 28px rgba(0, 200, 255, 0.22));
}

/* Spinning state */
.vinyl-svg.is-spinning {
    animation: vinyl-spin 2.4s linear infinite;
}

@keyframes vinyl-spin {
    to { transform: rotate(360deg); }
}

/* Arm / needle */
.vinyl-arm {
    position: absolute;
    top: -4px;
    right: -6px;
    width: 28px;
    height: 3px;
    background: var(--text-3);
    border-radius: 2px;
    transform-origin: right center;
    transform: rotate(-38deg);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s, box-shadow 0.3s;
}

.vinyl-arm.on-record {
    transform: rotate(-10deg);
    background: var(--accent);
    box-shadow: 0 0 8px rgba(255,76,41,0.7), 0 0 18px rgba(255,76,41,0.3);
}

.player-hint {
    font-family: var(--font-sans);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-3);
    transition: color 0.2s, text-shadow 0.3s;
    pointer-events: none;
}

.music-player:hover .player-hint,
.music-player.is-playing .player-hint {
    color: var(--accent);
}

.music-player.is-playing .player-hint {
    text-shadow: 0 0 12px rgba(255, 76, 41, 0.55);
}

/* ====================================================
   BOOK COVER
   ==================================================== */
.cover-page {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: left center;
    transition: transform 1.4s cubic-bezier(0.77, 0, 0.175, 1);
    will-change: transform;
    backface-visibility: hidden;
    overflow: hidden;
}

.cover-page.is-opening {
    transform: perspective(2400px) rotateY(-180deg);
    pointer-events: none;
}

.cover-page.is-gone { display: none; }

/* Animated background blobs */
.cover-blobs { position: absolute; inset: 0; pointer-events: none; }

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    animation: blob-float 18s ease-in-out infinite;
    pointer-events: none;
}

.blob-1 {
    width: 500px; height: 500px;
    background: var(--accent);
    opacity: 0.06;
    top: -150px; right: -100px;
    animation-delay: 0s;
}

.blob-2 {
    width: 350px; height: 350px;
    background: var(--hot);
    opacity: 0.07;
    bottom: 0; left: -80px;
    animation-delay: -6s;
}

.blob-3 {
    width: 280px; height: 280px;
    background: var(--accent);
    opacity: 0.04;
    top: 40%; left: 40%;
    animation-delay: -12s;
}

@keyframes blob-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%  { transform: translate(40px, -40px) scale(1.06); }
    66%  { transform: translate(-30px, 30px) scale(0.95); }
}

/* Grain on cover */
.grain {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)' opacity='0.12'/%3E%3C/svg%3E");
}

/* Cover double border frame */
.cover-frame {
    position: relative;
    border: 1px solid rgba(255,76,41,0.25);
    margin: 40px;
    width: calc(100% - 80px);
    height: calc(100% - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.cover-frame::before {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(255,76,41,0.1);
    pointer-events: none;
}

/* Spine shadow on cover */
.cover-page::after {
    content: '';
    position: absolute;
    left: 0; top: 0;
    width: 60px; height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.5) 0%, transparent 100%);
    pointer-events: none;
}

.cover-inner {
    text-align: center;
    padding: 40px 60px;
    max-width: 600px;
}

.cover-eyebrow {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 6px;
    color: var(--text-3);
    margin-bottom: 20px;
}

/* Name with glitch pseudo-elements */
.cover-name {
    position: relative;
    display: inline-block;
    font-family: var(--font-serif);
    font-size: clamp(3.2rem, 9vw, 6.5rem);
    font-weight: 700;
    font-style: italic;
    color: var(--text);
    line-height: 1.05;
    margin-bottom: 24px;
}

/* Typewriter cursor */
.tw-cursor {
    display: inline-block;
    color: var(--accent);
    font-weight: 300;
    font-style: normal;
    margin-left: 2px;
    animation: tw-blink 0.65s step-end infinite;
}

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

.cover-bar {
    width: 64px;
    height: 2px;
    background: var(--accent);
    margin: 0 auto 20px;
    box-shadow: 0 0 12px rgba(255,76,41,0.5);
}

.cover-tagline {
    font-style: italic;
    font-size: 1rem;
    color: var(--text-2);
    margin-bottom: 6px;
}

.cover-roles {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 3.5px;
    color: var(--text-3);
    margin-bottom: 40px;
}

.enter-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 14px 32px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: none;
    transition: background 0.25s, transform 0.2s, box-shadow 0.25s;
    margin-bottom: 32px;
}

.enter-btn:hover {
    background: #fff;
    box-shadow: 0 0 24px rgba(255,76,41,0.35);
    transform: translateY(-2px);
}

.cover-edition {
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--text-3);
    opacity: 0.5;
}

/* ====================================================
   MAIN CONTENT
   ==================================================== */
.main-content {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0s linear 0.7s;
}

.main-content.is-visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.7s ease;
}

/* ====================================================
   BOOKMARK PROGRESS
   ==================================================== */
.bookmark-rail {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 160px;
    background: var(--border);
    border-radius: 2px;
    z-index: 200;
}

.bookmark-progress {
    width: 100%;
    height: 0%;
    background: var(--accent);
    border-radius: 2px;
    transition: height 0.1s linear;
    box-shadow: 0 0 8px rgba(255,76,41,0.4);
}

/* ====================================================
   STICKY HEADER
   ==================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    transition: background 0.4s, border-color 0.4s;
}

.site-header::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.25;
}

.site-header > * {
    position: relative;
}

.site-header .header-inner-row {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 14px var(--pad);
    display: flex;
    align-items: center;
    gap: 28px;
}

/* Use flexbox directly on header */
.site-header {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 14px var(--pad);
    max-width: 100%;
}

.logo-mark {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
    text-decoration: none;
    border: 1.5px solid var(--border);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 1px;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

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

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    flex-wrap: wrap;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-2);
    text-decoration: none;
    padding: 5px 12px;
    letter-spacing: 0.5px;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.nav-num {
    font-size: 0.6rem;
    color: var(--text-3);
    font-weight: 400;
    letter-spacing: 1px;
}

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

.theme-toggle-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-2);
    padding: 7px 14px;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    letter-spacing: 1px;
    cursor: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: border-color 0.2s, color 0.2s;
    white-space: nowrap;
    margin-left: auto;
}

.theme-toggle-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.toggle-icon { font-size: 0.9rem; }

/* ====================================================
   MARQUEE BANNER
   ==================================================== */
.marquee-strip {
    overflow: hidden;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    background: var(--surface);
}

.marquee-track {
    display: flex;
    align-items: center;
    gap: 28px;
    white-space: nowrap;
    animation: marquee-scroll 22s linear infinite;
}

.marquee-strip--reverse .marquee-track {
    animation-direction: reverse;
    animation-duration: 28s;
}

.marquee-track span {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--text-3);
    font-weight: 500;
}

.marquee-track em {
    color: var(--accent);
    font-style: normal;
    font-size: 10px;
}

@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ====================================================
   CHAPTERS (shared)
   ==================================================== */
.chapter {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 90px var(--pad);
    border-bottom: 1px solid var(--border);
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.chapter.in-view {
    opacity: 1;
    transform: translateY(0);
}

.chapter-header-block {
    text-align: center;
    margin-bottom: 60px;
}

.chapter-eyebrow {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 6px;
    color: var(--accent);
    margin-bottom: 12px;
}

.chapter-heading {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 400;
    font-style: italic;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 14px;
}

.chapter-ornament {
    color: var(--text-3);
    letter-spacing: 4px;
    font-size: 0.8rem;
}

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

/* ====================================================
   HORIZONTAL CAREER TIMELINE
   ==================================================== */
.timeline-section {
    margin-top: 52px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.timeline-header-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 5px;
    color: var(--text-3);
    margin-bottom: 0;
}

.timeline-wrap {
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--surface-2);
}

.timeline-wrap::-webkit-scrollbar { height: 3px; }
.timeline-wrap::-webkit-scrollbar-track { background: var(--surface-2); }
.timeline-wrap::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }

.timeline-track {
    display: flex;
    min-width: max-content;
    position: relative;
    height: 168px;
}

/* Horizontal connecting line at dot level */
.timeline-track::before {
    content: '';
    position: absolute;
    top: 84px;
    left: 0; right: 0;
    height: 1px;
    background: var(--border);
}

.tl-item {
    width: 148px;
    flex-shrink: 0;
    position: relative;
    height: 168px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 6px;
}

/* Above the line */
.tl-above .tl-content  { height: 70px; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 8px; text-align: center; }
.tl-above .tl-spacer   { flex: 1; }

/* Below the line */
.tl-below .tl-spacer   { height: 70px; flex-shrink: 0; }
.tl-below .tl-content  { flex: 1; display: flex; flex-direction: column; justify-content: flex-start; padding-top: 8px; text-align: center; }

.tl-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--border);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: border-color 0.2s;
}

.tl-item:hover .tl-dot          { border-color: var(--accent); }
.tl-dot--milestone               { border-color: var(--accent); width: 12px; height: 12px; }
.tl-dot--current                 { background: var(--accent); border-color: var(--accent); width: 13px; height: 13px; box-shadow: 0 0 10px rgba(255,76,41,0.45); }

.tl-year  { display: block; font-size: 0.58rem; color: var(--accent); text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; margin-bottom: 3px; }
.tl-role  { display: block; font-size: 0.7rem; color: var(--text); line-height: 1.3; }
.tl-org   { display: block; font-size: 0.58rem; color: var(--text-3); font-style: italic; margin-top: 2px; }

.tl-item.current .tl-role { color: var(--accent); }

/* ====================================================
   TIMELINE — HORIZONTAL SCROLLING RAIL
   ==================================================== */
.tl-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.tl-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 5px;
    color: var(--text-3);
}

.tl-scroll {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    padding: 4px 0 14px;
    margin-top: 24px;
}
.tl-scroll::-webkit-scrollbar { height: 2px; }
.tl-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.tl-track {
    display: flex;
    align-items: stretch;
    position: relative;
    min-width: max-content;
    padding: 0 32px;
}

.tl-spine {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--border) 4%, var(--border) 96%, transparent 100%);
    transform: translateY(-50%);
    pointer-events: none;
}

.tl-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 112px;
    min-height: 148px;
    position: relative;
    cursor: default;
}

.tl-up {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 12px;
    text-align: center;
    gap: 2px;
}

.tl-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    background: var(--bg);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s;
}
.tl-node:hover .tl-dot { transform: scale(1.6); background: rgba(255,76,41,0.18); }

.tl-dn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 12px;
    text-align: center;
    gap: 2px;
}

.tl-yr { font-size: 0.54rem; color: var(--accent); text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; white-space: nowrap; }
.tl-rl { font-size: 0.63rem; color: var(--text); line-height: 1.3; font-weight: 500; }
.tl-og { font-size: 0.54rem; color: var(--text-3); font-style: italic; }

/* Alternating: flip content above the spine */
.tl-node--alt .tl-up { order: 2; justify-content: flex-start; padding-top: 12px; padding-bottom: 0; }
.tl-node--alt .tl-dot { order: 1; }
.tl-node--alt .tl-dn { order: 0; justify-content: flex-end; padding-bottom: 12px; padding-top: 0; }

/* Milestone — same ring, no size change */

/* Current / Now — filled orange, subtle glow only */
.tl-node--now .tl-dot {
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(255,76,41,0.2);
    animation: tl-glow 2s ease-in-out infinite;
}
.tl-node--now .tl-yr { color: var(--hot); }

@keyframes tl-glow {
    0%, 100% { box-shadow: 0 0 0 4px rgba(255,76,41,0.18); }
    50%       { box-shadow: 0 0 0 8px rgba(255,76,41,0.07); }
}

/* Scroll-hint fade on the right edge */
.tl-section { position: relative; }
.tl-section::after {
    content: '';
    position: absolute;
    top: calc(50% + 10px);
    right: 0;
    width: 56px;
    height: 100px;
    transform: translateY(-50%);
    background: linear-gradient(90deg, transparent, var(--bg) 90%);
    pointer-events: none;
    z-index: 3;
}

/* ── Timeline responsive ── */

/* Tablet (≤ 900px): tighten node width slightly */
@media (max-width: 900px) {
    .tl-node { width: 104px; }
}

/* Small tablet / large phone (≤ 768px) */
@media (max-width: 768px) {
    .tl-node { width: 96px; min-height: 136px; }
    .tl-up   { padding-bottom: 10px; }
    .tl-dn   { padding-top: 10px; }
    .tl-track { padding: 0 24px; }
}

/* Mobile (≤ 680px): remove zigzag, keep all years above / roles below */
@media (max-width: 680px) {
    .tl-node { width: 88px; min-height: 122px; }
    .tl-track { padding: 0 16px; }

    /* Reset alt nodes to standard layout */
    .tl-node--alt .tl-up  { order: 0; justify-content: flex-end;  padding-bottom: 10px; padding-top: 0; }
    .tl-node--alt .tl-dot { order: 0; }
    .tl-node--alt .tl-dn  { order: 0; justify-content: flex-start; padding-top: 10px;   padding-bottom: 0; }

    .tl-yr { font-size: 0.5rem;  letter-spacing: 1px; }
    .tl-rl { font-size: 0.58rem; }
    .tl-og { font-size: 0.5rem; }
    .tl-up { padding-bottom: 10px; }
    .tl-dn { padding-top: 10px; }
}

/* Small phone (≤ 480px) */
@media (max-width: 480px) {
    .tl-node  { width: 80px; min-height: 110px; }
    .tl-track { padding: 0 12px; }
    .tl-yr    { font-size: 0.46rem; }
    .tl-rl    { font-size: 0.54rem; }
    .tl-og    { font-size: 0.46rem; }
    .tl-up    { padding-bottom: 8px; }
    .tl-dn    { padding-top: 8px; }
    /* Slightly thicker scrollbar so it's easier to grab */
    .tl-scroll::-webkit-scrollbar { height: 3px; }
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.02rem;
    color: var(--text-2);
}

.about-text strong { color: var(--text); }

/* About photo */
.about-photo-wrap {
    position: relative;
    overflow: hidden;
    border: 2px solid var(--accent);
}

.about-photo-wrap::after {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(255,76,41,0.18);
    pointer-events: none;
    z-index: 1;
}

.about-photo {
    width: 100%;
    height: 360px;
    object-fit: cover;
    object-position: center 15%;
    display: block;
    filter: grayscale(10%);
    transition: filter 0.4s, transform 0.5s;
}

.about-photo:hover {
    filter: grayscale(0%);
    transform: scale(1.02);
}

.drop-cap-para::first-letter {
    font-family: var(--font-serif);
    font-size: 4.2em;
    font-weight: 700;
    float: left;
    line-height: 0.72;
    margin-right: 6px;
    margin-top: 10px;
    color: var(--accent);
}

.pull-quote {
    border-left: 3px solid var(--accent);
    padding: 14px 22px;
    margin: 32px 0;
    font-style: italic;
    font-size: 1.15rem;
    color: var(--text-2);
    line-height: 1.6;
    box-shadow: -6px 0 20px rgba(255,76,41,0.06);
}

.pull-quote cite {
    display: block;
    font-size: 0.78rem;
    font-style: normal;
    margin-top: 10px;
    color: var(--text-3);
    letter-spacing: 1px;
}

.skills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 26px;
}

.skill-chip {
    padding: 5px 13px;
    border: 1px solid var(--border);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-2);
    background: var(--surface);
    transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.skill-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 10px rgba(255,76,41,0.15);
}

/* ====================================================
   LIBRARY CARD
   ==================================================== */
.library-card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 26px 26px 20px;
    position: relative;
    box-shadow: 3px 3px 0 rgba(255,76,41,0.06), 6px 6px 0 rgba(255,76,41,0.03);
}

/* Corner fold */
.library-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 0; height: 0;
    border-style: solid;
    border-width: 0 22px 22px 0;
    border-color: transparent var(--bg) transparent transparent;
}

.library-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.exlibris-stamp {
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--text-3);
    border: 1px solid var(--border);
    padding: 4px 8px;
}

.library-monogram {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
}

.library-card-title {
    font-family: var(--font-serif);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.library-card-subtitle {
    font-size: 0.68rem;
    color: var(--text-3);
    letter-spacing: 1.5px;
    margin-bottom: 14px;
}

.checkout-table {
    width: 100%;
    border-collapse: collapse;
}

.checkout-table th {
    text-align: left;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--text-3);
    padding: 5px 8px;
    border-bottom: 1px solid var(--border);
}

.checkout-table td {
    padding: 7px 8px;
    color: var(--text-2);
    border-bottom: 1px dotted var(--border-2);
    font-size: 0.82rem;
}

.checkout-table td:first-child {
    color: var(--accent);
    font-size: 0.75rem;
    white-space: nowrap;
}

.checkout-table .check { text-align: center; color: var(--text-3); }

.checkout-table .current-entry td { color: var(--text); font-style: italic; }
.checkout-table .current-entry .check { color: var(--accent); font-style: normal; }

.library-stamp-row {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    margin-bottom: 10px;
}

.library-stamp-seal {
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-3);
    border: 1.5px solid var(--border);
    padding: 5px 9px;
    opacity: 0.5;
    transform: rotate(-8deg);
    line-height: 1.3;
    text-align: center;
}

.library-stamp-seal.rotated { transform: rotate(6deg); }

.library-footer-text {
    font-size: 0.62rem;
    text-align: center;
    color: var(--text-3);
    opacity: 0.4;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-style: italic;
}

/* ====================================================
   PROJECTS
   ==================================================== */
.genre-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-2);
    padding: 8px 20px;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px;
}

.project-card {
    position: relative;
    border: 1px solid var(--border);
    background: var(--surface);
    overflow: hidden;
    /* 3D tilt driven by JS */
    transform-style: preserve-3d;
    transition: box-shadow 0.3s;
    will-change: transform;
}

.project-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,76,41,0.1);
}

.project-card.hidden-card { display: none; }

/* Accent top edge on hover */
.project-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s;
}

.project-card:hover::before { transform: scaleX(1); }

.project-num {
    position: absolute;
    top: 10px;
    right: 12px;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 2rem;
    color: var(--border);
    line-height: 1;
    pointer-events: none;
    user-select: none;
    transition: color 0.3s;
}

.project-card:hover .project-num { color: rgba(255,76,41,0.15); }

.project-img-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.project-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-3);
}

.project-body { padding: 20px 20px 24px; }

.project-tag {
    display: inline-block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--accent);
    margin-bottom: 8px;
}

.project-name {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.3;
}

.project-desc {
    font-size: 0.86rem;
    color: var(--text-2);
    margin-bottom: 14px;
    line-height: 1.65;
}

.project-marginalia {
    padding: 10px 12px;
    background: var(--surface-2);
    border-left: 2px solid var(--accent);
    margin-bottom: 14px;
    box-shadow: -4px 0 12px rgba(255,76,41,0.04);
}

.marginalia-item {
    display: flex;
    gap: 12px;
    margin-bottom: 3px;
    font-size: 0.76rem;
}

.marginalia-item:last-child { margin-bottom: 0; }

.marginalia-key {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent);
    min-width: 36px;
    padding-top: 1px;
}

.marginalia-val { color: var(--text-2); }

.project-link {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--text-3);
    text-decoration: none;
    letter-spacing: 1px;
    border-bottom: 1px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.project-link:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ====================================================
   BLOG
   ==================================================== */
.blog-list { display: flex; flex-direction: column; }

.blog-entry {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 32px;
    padding: 36px 0;
    border-bottom: 1px solid var(--border);
    align-items: flex-start;
    transition: background 0.2s;
}

.blog-entry:first-child { border-top: 1px solid var(--border); }

.blog-entry:hover { background: rgba(255,76,41,0.015); }

.blog-num {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    padding-top: 5px;
    text-align: right;
}

.blog-date {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-3);
    margin-bottom: 8px;
}

.blog-title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 400;
    font-style: italic;
    color: var(--text);
    margin-bottom: 10px;
    line-height: 1.3;
    transition: color 0.2s;
}

.blog-entry:hover .blog-title { color: var(--accent); }

.blog-excerpt {
    font-size: 0.9rem;
    color: var(--text-2);
    margin-bottom: 12px;
    line-height: 1.7;
}

.read-link {
    display: inline-block;
    font-size: 0.78rem;
    color: var(--text-3);
    text-decoration: none;
    letter-spacing: 1px;
    border-bottom: 1px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.read-link:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ====================================================
   CONTACT
   ==================================================== */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-intro p {
    font-size: 1.02rem;
    color: var(--text-2);
    margin-bottom: 32px;
}

.contact-links-list { display: flex; flex-direction: column; }

.contact-link-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.92rem;
    color: var(--text-2);
    text-decoration: none;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
    letter-spacing: 0.5px;
    transition: color 0.2s, padding-left 0.25s, border-color 0.2s;
}
.contact-link-item svg {
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.contact-link-item:hover svg { opacity: 1; }

.contact-link-item:first-child { border-top: 1px solid var(--border); }

.contact-link-item:hover {
    color: var(--accent);
    padding-left: 10px;
    border-bottom-color: var(--accent);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 3.5px;
    color: var(--accent);
}

.form-field input,
.form-field textarea {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 12px 16px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    width: 100%;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(255,76,41,0.08);
}

.submit-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 13px 28px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    cursor: none;
    transition: background 0.2s, box-shadow 0.2s;
    align-self: flex-start;
}

.submit-btn:hover {
    background: #fff;
    box-shadow: 0 0 20px rgba(255,76,41,0.3);
}

.submit-btn:disabled { opacity: 0.6; }

.form-note {
    font-size: 0.82rem;
    color: var(--accent);
    font-style: italic;
    min-height: 1.2em;
}

/* ====================================================
   FOOTER
   ==================================================== */
.site-footer {
    text-align: center;
    padding: 60px var(--pad);
    border-top: 1px solid var(--border);
}

.footer-ornament {
    letter-spacing: 18px;
    color: var(--accent);
    opacity: 0.3;
    margin-bottom: 16px;
    font-size: 11px;
}

.footer-name {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.1rem;
    color: var(--text-2);
    margin-bottom: 8px;
}

.footer-colophon {
    font-size: 0.67rem;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--text-3);
    opacity: 0.5;
}

/* ====================================================
   MUSIC MOOD POPUP (small card above vinyl)
   ==================================================== */

/* Small popup floats above the vinyl */
.mood-popup {
    position: fixed;
    bottom: 118px;
    left: 16px;
    z-index: 600;
    width: 210px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 -8px 32px rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
}

.mood-popup::after {
    content: '';
    position: absolute;
    bottom: -7px;
    left: 30px;
    width: 12px;
    height: 12px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    transform: rotate(45deg);
}

.mood-popup.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.mood-popup-header {
    padding: 12px 14px 8px;
    border-bottom: 1px solid var(--border);
}

.mood-popup-q {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 0.88rem;
    color: var(--text);
    display: block;
}

.mood-popup-sub {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-3);
    display: block;
    margin-top: 3px;
}

.mood-list {
    padding: 8px 0;
}

.mood-btn {
    width: 100%;
    background: none;
    border: none;
    padding: 9px 14px;
    cursor: none;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    transition: background 0.15s;
}

.mood-btn:hover {
    background: rgba(255,76,41,0.07);
}

.mood-btn.is-active {
    background: rgba(255,76,41,0.1);
}

.mood-emoji { font-size: 1.1rem; line-height: 1; flex-shrink: 0; }

.mood-text { display: flex; flex-direction: column; gap: 1px; }

.mood-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text);
}

.mood-desc {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-3);
}

/* Hidden Spotify iframe — off-screen, audio only */
.spotify-hidden {
    position: fixed;
    top: -9999px;
    left: -9999px;
    width: 300px;
    height: 80px;
    pointer-events: none;
    opacity: 0;
}

/* Minimal "Now Playing" bar */
.spotify-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 450;
    background: var(--bg);
    border-top: 1px solid var(--accent);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 20px 0 108px;
    height: 44px;
}

.spotify-panel.is-open { transform: translateY(0); }

/* Animated waveform bars */
.now-playing-wave {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 16px;
    flex-shrink: 0;
}

.now-playing-wave span {
    display: block;
    width: 3px;
    background: var(--accent);
    border-radius: 2px;
    animation: wave-bar 1.2s ease-in-out infinite;
}

.now-playing-wave span:nth-child(1) { height: 8px;  animation-delay: 0s; }
.now-playing-wave span:nth-child(2) { height: 14px; animation-delay: 0.15s; }
.now-playing-wave span:nth-child(3) { height: 10px; animation-delay: 0.3s; }
.now-playing-wave span:nth-child(4) { height: 16px; animation-delay: 0.1s; }
.now-playing-wave span:nth-child(5) { height: 6px;  animation-delay: 0.25s; }

@keyframes wave-bar {
    0%, 100% { transform: scaleY(0.4); opacity: 0.5; }
    50%       { transform: scaleY(1);   opacity: 1; }
}

.now-playing-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
}

.now-playing-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-3);
}

.now-playing-mood {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 0.85rem;
    color: var(--text);
}

.now-playing-source {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-3);
}

.spotify-close {
    background: none;
    border: none;
    color: var(--text-3);
    font-size: 0.9rem;
    cursor: none;
    flex-shrink: 0;
    padding: 4px 8px;
    transition: color 0.2s;
    line-height: 1;
}

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

/* ====================================================
   RESPONSIVE
   ==================================================== */
/* ── Tablet (≤ 900px) ── */
@media (max-width: 900px) {
    .about-layout,
    .contact-layout { grid-template-columns: 1fr; }
    .about-right-col { order: -1; }
    .about-photo { height: 340px; object-position: center 15%; }

    .projects-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }

    .skills-row { gap: 8px; }
}

/* ── Large phone / small tablet (≤ 768px) ── */
@media (max-width: 768px) {
    .cover-inner { padding: 32px 32px; }

    .chapter-heading { font-size: clamp(2rem, 6vw, 3.2rem); }

    /* tl-scroll handles all widths natively */

    .filter-row {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }
    .filter-row::-webkit-scrollbar { display: none; }
    .filter-btn { flex-shrink: 0; }
}

/* ── Mobile nav fix (≤ 680px) ── */
@media (max-width: 680px) {
    html { font-size: 16px; }
    :root { --pad: 20px; }

    /* Header: scrollable nav */
    .site-header { padding: 10px var(--pad); gap: 10px; }
    .main-nav {
        flex: 1;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 0;
    }
    .main-nav::-webkit-scrollbar { display: none; }
    .nav-num  { display: none; }
    .nav-link { padding: 6px 10px; font-size: 0.65rem; letter-spacing: 1px; white-space: nowrap; }
    .toggle-label { display: none; }

    /* Cover */
    .cover-frame  { margin: 14px; width: calc(100% - 28px); height: calc(100% - 28px); }
    .cover-inner  { padding: 24px 20px; }
    .cover-edition { font-size: 0.55rem; }

    /* Chapters */
    .chapter { padding: 52px var(--pad); }
    .chapter-heading { font-size: clamp(1.9rem, 7vw, 3rem); }

    /* Projects */
    .projects-grid { grid-template-columns: 1fr; gap: 20px; }


    /* Skills */
    .skill-chip { font-size: 0.6rem; padding: 4px 10px; }

    /* Blog */
    .blog-entry { grid-template-columns: 1fr; gap: 4px; }
    .blog-num   { text-align: left; }

    /* Bookmark rail */
    .bookmark-rail { right: 6px; width: 3px; height: 100px; }

    /* Music player */
    .music-player { bottom: 16px; left: 16px; }
    .vinyl-wrap   { width: 58px; height: 58px; }

    /* Mood popup — stay above vinyl */
    .mood-popup { bottom: 110px; left: 0; }
}

/* ── Small phone (≤ 480px) ── */
@media (max-width: 480px) {
    :root { --pad: 16px; }

    /* Cover name smaller */
    .cover-name    { font-size: clamp(2.2rem, 10vw, 3.2rem); }
    .cover-tagline { font-size: 0.88rem; }
    .cover-roles   { font-size: 0.72rem; }
    .cover-frame   { margin: 10px; width: calc(100% - 20px); height: calc(100% - 20px); }
    .cover-inner   { padding: 20px 16px; }

    /* Chapters */
    .chapter { padding: 40px var(--pad); }
    .chapter-heading { font-size: clamp(1.7rem, 9vw, 2.6rem); }
    .chapter-num     { font-size: clamp(4rem, 18vw, 8rem); }

    /* About photo — taller on small phone so face stays visible */
    .about-photo { height: 300px; object-position: center 15%; }


    /* Contact form fields full width */
    .form-field { width: 100%; }

    /* Vinyl even smaller */
    .music-player { bottom: 12px; left: 12px; }
    .vinyl-wrap   { width: 50px; height: 50px; }

    /* Mood popup full-width on tiny screen */
    .mood-popup {
        left: 4px;
        right: 4px;
        bottom: 86px;
        min-width: unset;
        max-width: none;
    }

    /* Now-playing bar */
    .now-playing-bar { left: 4px; right: 4px; }

    /* Hide bookmark rail on very small */
    .bookmark-rail { display: none; }
}

/* ====================================================
   SCROLL REVEAL SYSTEM
   ==================================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible {
    opacity: 1;
    transform: none;
}
.reveal-left {
    opacity: 0;
    transform: translateX(-28px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left.is-visible { opacity: 1; transform: none; }

.reveal-scale {
    opacity: 0;
    transform: scale(0.94) translateY(16px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-scale.is-visible { opacity: 1; transform: none; }

.d1 { transition-delay: 0.06s !important; }
.d2 { transition-delay: 0.12s !important; }
.d3 { transition-delay: 0.18s !important; }
.d4 { transition-delay: 0.26s !important; }
.d5 { transition-delay: 0.34s !important; }

/* ====================================================
   PAGE ENTRANCE (inner pages only)
   ==================================================== */
@keyframes page-fade-in {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
}
.inner-page {
    animation: page-fade-in 0.75s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ====================================================
   ENHANCED MICRO-INTERACTIONS
   ==================================================== */

/* Project entries lift */
.project-entry {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.4s ease !important;
}
.project-entry:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22) !important;
}

/* Blog entries slide */
.blog-entry {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
.blog-entry:hover { transform: translateX(6px) !important; }

/* Timeline node hover (handled in tl-node above) */

/* Nav animated underline */
.nav-link { position: relative; }
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* cs-section stagger */
.cs-section { transition: none; }

/* Metric cards pop */
.metric-card {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease !important;
}
.metric-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 16px 40px rgba(0,0,0,0.2) !important;
}

/* Persona cards */
.persona-card {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
.persona-card:hover { transform: translateY(-4px) scale(1.02) !important; }

/* Pull quote slide-in */
.pull-quote, blockquote {
    border-left-width: 0;
    transition: border-left-width 0.4s ease, padding-left 0.4s ease;
}
.pull-quote.is-visible, blockquote.is-visible {
    border-left-width: 3px;
}

/* ====================================================
   OPEN FOR JOBS BADGE
   ==================================================== */
.open-for-jobs-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 8px 18px;
    border: 1px solid var(--accent);
    border-radius: 40px;
    font-size: 0.72rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(255, 76, 41, 0.06);
}
.ofj-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    animation: ofj-pulse 1.8s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes ofj-pulse {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(255,76,41,0.4); }
    50%       { opacity: 0.8; transform: scale(1.15); box-shadow: 0 0 0 5px rgba(255,76,41,0); }
}

/* ====================================================
   BLOG ILLUSTRATIONS
   ==================================================== */
.blog-illus {
    width: 100%;
    margin: 2.2em 0;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    background: var(--surface);
}
.blog-illus svg { display: block; width: 100%; height: auto; }

.blog-illus-label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-3);
    text-align: center;
    padding: 10px 0 12px;
    border-top: 1px solid var(--border);
}
