/* =========================================================
   Bryan Chae - immersive portfolio
   Light brand · orange accent · Rowan serif · WebGL hero
   ========================================================= */

:root {
    --bg: #f6f5f2;
    --bg-soft: #efede8;
    --ink: #1a1714;
    --ink-soft: #57514a;
    --ink-faint: #8d857b;
    --line: rgba(26, 23, 20, 0.10);
    --line-soft: rgba(26, 23, 20, 0.06);
    --accent: #d97706;
    --accent-soft: rgba(217, 119, 6, 0.12);
    --panel: rgba(246, 245, 242, 0.72);
    --serif: 'Rowan-Regular', Georgia, serif;
    --display: 'Zodiak-Variable', 'Rowan-Regular', Georgia, serif;
    --maxw: 1180px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    background-color: var(--bg);
    background-image:
        radial-gradient(circle, rgba(26, 23, 20, 0.07) 1px, transparent 1px),
        linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
        linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
    background-size: 18px 18px;
    background-position: -0.5px -0.5px, 8.5px 0, 0 8.5px;
    color: var(--ink);
    font-family: var(--serif);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Lenis */
html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

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

a {
    color: inherit;
}

.accent {
    color: var(--accent);
}

.bracket {
    color: var(--accent);
    font-weight: 700;
}

.nowrap {
    white-space: nowrap;
}

/* ---------------------------------------------------------
   WebGL canvas (fixed, behind everything)
   --------------------------------------------------------- */
.webgl {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

main,
.site-header {
    position: relative;
    z-index: 2;
}

/* ---------------------------------------------------------
   Custom cursor
   --------------------------------------------------------- */
.cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    pointer-events: none;
    mix-blend-mode: multiply;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cursor.ready {
    opacity: 1;
}

.cursor-dot {
    position: fixed;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    transform: translate(-50%, -50%);
}

.cursor-ring {
    position: fixed;
    width: 34px;
    height: 34px;
    border: 1.5px solid rgba(217, 119, 6, 0.55);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.25s var(--ease), height 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease);
}

.cursor.is-hover .cursor-ring {
    width: 56px;
    height: 56px;
    background: var(--accent-soft);
    border-color: transparent;
}

.cursor.is-view .cursor-ring {
    width: 84px;
    height: 84px;
    background: var(--accent);
    border-color: transparent;
}

.cursor.is-view .cursor-dot {
    opacity: 0;
}

.cursor-ring::after {
    content: 'view';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.cursor.is-view .cursor-ring::after {
    opacity: 1;
}

/* ---------------------------------------------------------
   Loader — video-game boot screen
   --------------------------------------------------------- */
.loader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: #100b07;
    color: #f3e8d6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    will-change: transform;
    transition: transform 0.85s var(--ease);
}

/* curtain-wipe to reveal the site underneath */
.loader.done {
    transform: translateY(-100%);
    pointer-events: none;
}

/* CRT vignette */
.loader::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    box-shadow: inset 0 0 220px rgba(0, 0, 0, 0.9);
}

.loader-scanlines {
    position: absolute;
    inset: -50% 0;
    z-index: 2;
    pointer-events: none;
    background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.28) 0 1px, transparent 1px 3px);
    opacity: 0.45;
    animation: scan 6s linear infinite;
}

@keyframes scan {
    to { transform: translateY(120px); }
}

.loader-inner {
    position: relative;
    z-index: 3;
    width: min(620px, 88vw);
}

.loader-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #948876;
    margin-bottom: 1.6rem;
}

.loader-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
}

.blink-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    animation: blink 1s steps(1) infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.loader-title {
    font-family: 'Press Start 2P', ui-monospace, monospace;
    font-weight: 400;
    font-size: clamp(0.95rem, 3vw, 1.7rem);
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #fbf3e6;
    text-shadow: 0 0 18px rgba(217, 119, 6, 0.35);
    margin-bottom: 1.8rem;
}

.loader-title .b {
    color: var(--accent);
}

.loader-log {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8rem;
    line-height: 1.85;
    color: #b6aa97;
    min-height: 11.1em;
    margin-bottom: 1.4rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.loader-log .line {
    opacity: 0;
    transform: translateX(-6px);
    animation: logIn 0.28s var(--ease) forwards;
}

@keyframes logIn {
    to { opacity: 1; transform: none; }
}

.loader-log .ok { color: var(--accent); }

.loader-log .ready {
    color: #fbf3e6;
    font-weight: 700;
    text-shadow: 0 0 12px rgba(217, 119, 6, 0.6);
}

.loader-barwrap {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.loader-blocks {
    display: flex;
    gap: 4px;
    flex: 1;
}

.loader-blocks .blk {
    flex: 1;
    height: 16px;
    border: 1px solid rgba(217, 119, 6, 0.30);
    transition: background 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.loader-blocks .blk.on {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(217, 119, 6, 0.7);
}

.loader-pct {
    font-family: 'Press Start 2P', ui-monospace, monospace;
    font-size: 0.9rem;
    color: var(--accent);
    min-width: 3.4em;
    text-align: right;
}

.loader-hint {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.72rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: #948876;
}

.loader.ready { cursor: pointer; }

/* subtle blinking arcade prompt — plain text, no button */
.loader-hint.ready {
    color: var(--accent);
    cursor: pointer;
    animation: blink 1.1s steps(1) infinite;
}

.loader-hint.ready:hover,
.loader-hint.ready:focus-visible {
    color: #fbf3e6;
    outline: none;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.caret {
    color: var(--accent);
    animation: blink 1s steps(1) infinite;
}

@media (prefers-reduced-motion: reduce) {
    .loader-scanlines,
    .blink-dot,
    .caret,
    .loader-hint.ready { animation: none; }

    .loader-log .line { opacity: 1; transform: none; animation: none; }

    .loader { transition: opacity 0.3s ease; }

    .loader.done { transform: none; opacity: 0; visibility: hidden; }
}

/* ---------------------------------------------------------
   Scroll progress rail
   --------------------------------------------------------- */
.scroll-rail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    z-index: 9998;
    background: transparent;
}

.scroll-rail span {
    display: block;
    height: 100%;
    width: 0%;
    background: var(--accent);
}

/* ---------------------------------------------------------
   Header / Nav
   --------------------------------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 1.1rem 2rem;
    z-index: 100;
    transition: transform 0.4s var(--ease);
}

.site-header.hide {
    transform: translateY(-120%);
}

.name {
    font-family: var(--serif);
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--ink);
}

.nav-tabs {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-tabs-box {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.3rem;
}

.nav-indicator {
    position: absolute;
    top: 0.3rem;
    bottom: 0.3rem;
    left: 0;
    width: 0;
    background: var(--accent-soft);
    border-radius: 10px;
    pointer-events: none;
    opacity: 0;
}

.nav-indicator.ready {
    opacity: 1;
    transition: left 0.35s var(--ease), width 0.35s var(--ease);
}

.nav-link {
    position: relative;
    z-index: 1;
    text-decoration: none;
    color: var(--ink-soft);
    font-family: var(--serif);
    font-size: 1rem;
    font-weight: 700;
    padding: 0.45rem 1.15rem;
    border-radius: 10px;
    transition: color 0.2s ease;
}

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

.resume-btn {
    margin-left: auto;
    font-family: var(--serif);
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
    padding: 0.55rem 1.3rem;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), color 0.25s var(--ease);
}

.resume-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 6px 22px rgba(217, 119, 6, 0.18);
}

/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--serif);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    padding: 0.85rem 1.6rem;
    border-radius: 14px;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 10px 30px rgba(217, 119, 6, 0.28);
}

.btn-primary:hover {
    box-shadow: 0 14px 40px rgba(217, 119, 6, 0.4);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.6);
    border: 1.5px solid var(--line);
    color: var(--ink);
}

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

.btn-icon {
    width: 18px;
    height: 18px;
}

/* ---------------------------------------------------------
   HERO
   --------------------------------------------------------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 7rem 2rem 4rem;
    max-width: var(--maxw);
    margin: 0 auto;
}

.hero-inner {
    max-width: 880px;
}

.hero-eyebrow {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: 1.4rem;
}

.hero-title {
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(2.6rem, 7vw, 5.6rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 1.8rem;
}

.hero-title .line {
    display: block;
    overflow: hidden;
    /* room so ascenders/descenders aren't clipped by the reveal mask */
    padding: 0.1em 0.04em 0.18em;
    margin-bottom: -0.16em;
}

.hero-title .word {
    display: inline-block;
    transform: translateY(120%);
    will-change: transform;
}

.hero-title .word.accent {
    color: var(--accent);
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.45rem);
    line-height: 1.55;
    color: var(--ink-soft);
    max-width: 620px;
    margin-bottom: 2.4rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.scroll-cue {
    position: absolute;
    bottom: 2.2rem;
    left: 2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: var(--ink-faint);
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.scroll-cue-line {
    width: 60px;
    height: 1px;
    background: var(--ink-faint);
    position: relative;
    overflow: hidden;
}

.scroll-cue-line::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    transform: translateX(-100%);
    animation: cue 1.8s var(--ease) infinite;
}

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

/* ---------------------------------------------------------
   Generic section
   --------------------------------------------------------- */
.section {
    position: relative;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 7rem 2rem;
    background: var(--panel);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    border-radius: 28px;
}

/* stack the frosted panels with a hair of breathing room so the
   blob shows between sections */
.section + .section,
.marquee + .section {
    margin-top: 1.5rem;
}

.section-head {
    display: flex;
    align-items: baseline;
    gap: 1.2rem;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: 1.4rem;
}

.section-index {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.1em;
}

.section-title {
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(1.9rem, 4vw, 3rem);
    line-height: 1.1;
    letter-spacing: -0.01em;
}

/* ---------------------------------------------------------
   ABOUT
   --------------------------------------------------------- */
.about-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 3.5rem;
    align-items: start;
}

.about-lead {
    font-size: clamp(1.35rem, 2.5vw, 1.8rem);
    line-height: 1.4;
    color: var(--ink);
    margin-bottom: 1.5rem;
}

.about-text p {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--ink-soft);
}

.about-facts {
    list-style: none;
    margin-top: 2.2rem;
    border-top: 1px solid var(--line);
}

.about-facts li {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
}

.fact-k {
    flex: 0 0 130px;
    font-weight: 700;
    color: var(--ink);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.fact-v {
    color: var(--ink-soft);
    font-size: 1.05rem;
}

.about-photo {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(26, 23, 20, 0.16);
}

.about-photo img {
    width: 100%;
    display: block;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    transition: transform 0.8s var(--ease);
}

.about-photo:hover img {
    transform: scale(1.04);
}

.about-photo figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.4rem 1.2rem 1rem;
    color: #fff;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent);
}

/* ---------------------------------------------------------
   EXPERIENCE timeline
   --------------------------------------------------------- */
.timeline {
    list-style: none;
    position: relative;
    --path: 0%;
}

/* dim base route */
.timeline::before {
    content: '';
    position: absolute;
    left: 168px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--line);
}

/* orange route that draws as you scroll the section */
.timeline::after {
    content: '';
    position: absolute;
    left: 168px;
    top: 6px;
    width: 2px;
    height: var(--path);
    background: var(--accent);
    box-shadow: 0 0 10px rgba(217, 119, 6, 0.5);
    transition: height 0.08s linear;
}

.xp {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 2.5rem;
    padding: 2.2rem 0;
    border-bottom: 1px solid var(--line);
    position: relative;
    transition: filter 0.3s var(--ease);
}

.xp:last-child {
    border-bottom: none;
}

/* node — "locked" by default, lights up when the route reaches it */
.xp::before {
    content: '';
    position: absolute;
    left: 161px;
    top: 2.7rem;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid rgba(217, 119, 6, 0.35);
    transition: transform 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
    z-index: 1;
}

.xp.is-unlocked::before {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 0 5px var(--accent-soft), 0 0 14px rgba(217, 119, 6, 0.55);
}

.xp:hover::before {
    transform: scale(1.3);
}

/* hover lights the route this role led to (itself + the more-recent roles
   above it); the rest dim back */
.timeline.is-hovering .xp {
    filter: opacity(0.38);
}

.timeline.is-hovering .xp.route-lit {
    filter: none;
}

.timeline.is-hovering .xp.route-lit::before {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 0 5px var(--accent-soft), 0 0 14px rgba(217, 119, 6, 0.55);
}

.xp-meta {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    text-align: right;
    padding-right: 1.5rem;
}

.xp-date {
    font-weight: 700;
    color: var(--ink);
    font-size: 0.95rem;
}

.xp-loc {
    color: var(--ink-faint);
    font-size: 0.85rem;
}

.xp-level {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: var(--ink-faint);
    transition: color 0.3s var(--ease);
}

.xp.is-unlocked .xp-level {
    color: var(--accent);
}

.xp-body {
    padding-left: 1.8rem;
}

.xp-body h3 {
    font-family: var(--serif);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.7rem;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.6rem;
}

.xp-co {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
}

.xp-body p {
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--ink-soft);
    max-width: 640px;
}

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

.project-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 1.8rem;
    min-height: 260px;
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}

.project-card:not(.is-static):hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 24px 50px rgba(26, 23, 20, 0.12);
}

.project-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.4rem;
}

.project-tag {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-faint);
    border: 1px solid var(--line);
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
}

.project-arrow {
    font-size: 1.3rem;
    color: var(--accent);
    transition: transform 0.35s var(--ease);
}

.project-card:hover .project-arrow {
    transform: translate(4px, -4px);
}

.project-card h3 {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.project-tagline {
    color: var(--accent);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.9rem;
}

.project-desc {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ink-soft);
}

/* ---------------------------------------------------------
   SKILLS
   --------------------------------------------------------- */
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tags span {
    font-size: 1.05rem;
    color: var(--ink-soft);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--line);
    padding: 0.6rem 1.3rem;
    border-radius: 30px;
    /* transform is driven per-frame by JS (cursor repel); only tween color */
    transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
    cursor: default;
    will-change: transform;
}

/* highlighted as the cursor sweeps near */
.skill-tags span.near {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 6px 18px rgba(217, 119, 6, 0.18);
}

/* ---------------------------------------------------------
   MARQUEE
   --------------------------------------------------------- */
.marquee {
    overflow: hidden;
    padding: 2.4rem 0;
    margin-top: 1.5rem;
    white-space: nowrap;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
    display: inline-flex;
    align-items: center;
    gap: 1.6rem;
    animation: marquee 28s linear infinite;
}

.marquee-track span {
    font-family: var(--display);
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.marquee-track .dot {
    color: var(--accent);
}

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

/* ---------------------------------------------------------
   LOGOS
   --------------------------------------------------------- */
.logos {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.logos-group {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.logos-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.logos-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2.5rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 70px;
}

.logo img {
    max-width: 150px;
    max-height: 46px;
    object-fit: contain;
    filter: grayscale(1) opacity(0.45);
    transition: filter 0.35s var(--ease), transform 0.35s var(--ease);
}

.logo img:hover {
    filter: grayscale(0) opacity(1);
    transform: scale(1.06);
}

.logos-row.featured .logo {
    height: 90px;
}

.logos-row.featured .logo img {
    max-width: 200px;
    max-height: 72px;
}

/* ---------------------------------------------------------
   CONNECT
   --------------------------------------------------------- */
.connect-lead {
    font-size: clamp(1.3rem, 3vw, 2rem);
    line-height: 1.4;
    color: var(--ink);
    max-width: 720px;
    margin-bottom: 2.5rem;
}

.connect-links {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--line);
}

.connect-link {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.6rem 0.5rem;
    text-decoration: none;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    transition: padding 0.35s var(--ease), color 0.35s var(--ease);
}

.connect-link:hover {
    padding-left: 1.6rem;
    color: var(--accent);
}

.connect-link-label {
    flex: 0 0 130px;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-faint);
    transition: color 0.35s var(--ease);
}

.connect-link:hover .connect-link-label {
    color: var(--accent);
}

.connect-link-val {
    flex: 1;
    font-family: var(--serif);
    font-size: clamp(1.3rem, 3vw, 2rem);
    font-weight: 700;
}

.connect-arrow {
    font-size: 1.5rem;
    color: var(--accent);
    transition: transform 0.35s var(--ease);
}

.connect-link:hover .connect-arrow {
    transform: translate(5px, -5px);
}

/* ---------------------------------------------------------
   FOOTER
   --------------------------------------------------------- */
.site-footer {
    max-width: var(--maxw);
    margin: 3rem auto 0;
    padding: 2.5rem 2rem 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    color: var(--ink-faint);
    font-size: 0.85rem;
    border-top: 1px solid var(--line);
}

.footer-mid {
    letter-spacing: 0.04em;
}

.back-to-top {
    font-family: var(--serif);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.6);
    border: 1.5px solid var(--line);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
}

.back-to-top:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ---------------------------------------------------------
   Reveal animation base (GSAP sets the rest)
   --------------------------------------------------------- */
.reveal-up {
    opacity: 0;
    transform: translateY(34px);
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 900px) {
    .nav-tabs {
        display: none;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .about-photo {
        max-width: 360px;
    }

    .timeline::before,
    .timeline::after {
        display: none;
    }

    .xp {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        border-left: 2px solid var(--line);
        padding-left: 1.1rem;
        transition: border-color 0.3s var(--ease);
    }

    .xp.is-unlocked {
        border-left-color: var(--accent);
    }

    .xp::before {
        display: none;
    }

    .xp-meta {
        flex-direction: row;
        gap: 1rem;
        text-align: left;
        padding-right: 0;
        align-items: baseline;
    }

    .xp-body {
        padding-left: 0;
    }
}

@media (max-width: 640px) {
    .site-header {
        padding: 1rem 1.2rem;
    }

    .hero {
        padding: 6rem 1.3rem 4rem;
    }

    .scroll-cue {
        left: 1.3rem;
    }

    .section {
        padding: 4.5rem 1.3rem;
        border-radius: 20px;
    }

    .section-head {
        flex-direction: column;
        gap: 0.5rem;
    }

    .fact-k {
        flex-basis: 100px;
    }

    .connect-link-label {
        display: none;
    }

    .cursor {
        display: none;
    }
}

/* ---------------------------------------------------------
   Reduced motion
   --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .reveal-up {
        opacity: 1;
        transform: none;
    }

    .hero-title .word {
        transform: none;
    }

    .marquee-track,
    .scroll-cue-line::after {
        animation: none;
    }
}
