/* ═══════════════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════════════ */

:root {
    /* Palette */
    --bg-base: #0E0E10;
    --bg-elevated: #141417;
    --text-primary: #EAEAEA;
    --text-secondary: #9B9BA1;
    --divider: rgba(255, 255, 255, 0.06);
    --accent: rgba(234, 234, 234, 0.85);

    /* Fonts */
    --font-serif: 'Cormorant Garamond', 'Georgia', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;

    /* Sizes */
    --size-h1: clamp(44px, 6.5vw, 88px);
    --size-h2: clamp(28px, 3.4vw, 42px);
    --size-body: 18px;
    --size-label: 12px;
    --size-mono: 12px;
    --size-nav: 14px;

    /* Spacing */
    --space-section: clamp(88px, 12vw, 160px);
    --space-container: clamp(24px, 5vw, 80px);

    /* Misc */
    --transition: 200ms ease;
    --reveal-ease: cubic-bezier(0.22, 1, 0.36, 1);
}


/* ═══════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════ */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: var(--size-body);
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Globally hide native cursor when custom cursor logic is active */
body.has-custom-cursor,
body.has-custom-cursor * {
    cursor: none !important;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

::selection {
    background: var(--text-primary);
    color: var(--bg-base);
}


/* ═══════════════════════════════════════════════════
   SURFACE — Grain + Radial Light
   ═══════════════════════════════════════════════════ */

/* Subtle grain texture */
.overlay-grain {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.025;
    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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px 200px;
}

/* Radial light diffusion — top-left warm */
body::before {
    content: '';
    position: fixed;
    top: -20%;
    left: -15%;
    width: 70vw;
    height: 70vh;
    background: radial-gradient(ellipse at center,
            rgba(180, 170, 155, 0.06) 0%,
            transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* Radial light diffusion — bottom-right cool */
body::after {
    content: '';
    position: fixed;
    bottom: -25%;
    right: -15%;
    width: 65vw;
    height: 65vh;
    background: radial-gradient(ellipse at center,
            rgba(140, 150, 170, 0.05) 0%,
            transparent 70%);
    pointer-events: none;
    z-index: -1;
}


/* ═══════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════ */

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding-left: var(--space-container);
    padding-right: var(--space-container);
}

.section {
    padding-top: var(--space-section);
    padding-bottom: var(--space-section);
    position: relative;
}

/* Section dividers */
.section+.section::before,
.image-block+.section::before,
.section+.image-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: var(--space-container);
    right: var(--space-container);
    height: 1px;
    background: var(--divider);
    max-width: calc(1100px - var(--space-container) * 2);
}

/* Alternate section backgrounds */
.section--thesis,
.section--decision-lens,
.section--ecosystem,
.section--background,
.section--engage,
.section--horizon {
    background-color: var(--bg-elevated);
}


/* ═══════════════════════════════════════════════════
   SCROLL REVEAL
   ═══════════════════════════════════════════════════ */

.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 550ms var(--reveal-ease),
        transform 550ms var(--reveal-ease);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* ═══════════════════════════════════════════════════
   SECTION LABEL
   ═══════════════════════════════════════════════════ */

.section__label {
    display: block;
    font-size: var(--size-label);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-secondary);
    margin-bottom: 72px;
    font-variant: small-caps;
}


/* ═══════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════ */

.section--hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding-bottom: 120px;
}

.hero__headline {
    font-family: var(--font-serif);
    font-size: var(--size-h1);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.025em;
    max-width: 900px;
    color: var(--text-primary);
}

.hero__sub {
    margin-top: 36px;
    font-size: var(--size-body);
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 62ch;
    line-height: 1.65;
}

.hero__advisory {
    margin-top: 2px;
    font-size: var(--size-body);
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 62ch;
    line-height: 1.65;
}

.hero__link {
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: border-color var(--transition);
}

.hero__link:hover {
    border-color: var(--text-primary);
}

.hero__signals {
    display: flex;
    gap: 24px;
    margin-top: 44px;
    font-family: var(--font-mono);
    font-size: var(--size-mono);
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

.hero__signals span {
    position: relative;
}

.hero__signals span:not(:last-child)::after {
    content: '·';
    position: absolute;
    right: -14px;
    color: rgba(255, 255, 255, 0.15);
}

.scroll-indicator {
    position: absolute;
    bottom: 48px;
    left: var(--space-container);
    font-size: 20px;
    color: var(--text-secondary);
    opacity: 1;
    transition: opacity 600ms ease;
    animation: pulse 2.4s ease-in-out infinite;
}

.scroll-indicator.hidden {
    opacity: 0;
    pointer-events: none;
}

@keyframes pulse {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(8px);
    }
}


/* ═══════════════════════════════════════════════════
   THESIS
   ═══════════════════════════════════════════════════ */

.thesis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.thesis-card {
    background-color: var(--bg-elevated);
    border: 1px solid var(--divider);
    padding: 28px;
}

.thesis-card__text {
    font-family: var(--font-serif);
    font-size: clamp(1.25rem, 2vw, 1.6rem);
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin: 0;
}


/* ═══════════════════════════════════════════════════
   IMAGE BLOCK
   ═══════════════════════════════════════════════════ */

.image-block {
    padding-top: calc(var(--space-section) * 0.55);
    padding-bottom: calc(var(--space-section) * 0.55);
}

.image-figure {
    margin: 0;
    max-width: 800px;
    /* left-aligned, not full-width */
}

.image-figure__img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(25%) contrast(1.05);
    transition: filter 400ms ease;
}

.image-figure__img:hover {
    filter: grayscale(0%) contrast(1.02);
}

.image-caption {
    font-family: var(--font-mono);
    font-size: var(--size-mono);
    color: var(--text-secondary);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--divider);
    font-variant: small-caps;
}


/* ═══════════════════════════════════════════════════
   ECOSYSTEM
   ═══════════════════════════════════════════════════ */

.ecosystem__title {
    font-family: var(--font-serif);
    font-size: var(--size-h2);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.015em;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.ecosystem__lead {
    font-size: var(--size-body);
    color: var(--text-secondary);
    line-height: 1.65;
    max-width: 62ch;
    margin-bottom: 56px;
}

.ecosystem__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: start;
}

.ecosystem__figure {
    margin: 0;
}

.ecosystem__img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(20%) contrast(1.05);
}

.ecosystem__caption {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--divider);
}

.ecosystem__caption-label {
    font-family: var(--font-mono);
    font-size: var(--size-mono);
    color: var(--text-secondary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-variant: small-caps;
}

.ecosystem__caption-sub {
    font-family: var(--font-mono);
    font-size: var(--size-mono);
    color: rgba(155, 155, 161, 0.6);
    letter-spacing: 0.05em;
}

.ecosystem__body {
    font-size: var(--size-body);
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 32px;
    max-width: 48ch;
}

.ecosystem__facts {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: var(--size-mono);
    color: var(--text-secondary);
    letter-spacing: 0.03em;
    line-height: 1.5;
}

.ecosystem__facts li {
    padding-left: 16px;
    position: relative;
}

.ecosystem__facts li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: rgba(255, 255, 255, 0.15);
}


/* ═══════════════════════════════════════════════════
   TRAJECTORY STRIP
   ═══════════════════════════════════════════════════ */

.trajectory {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 0;
    margin-bottom: 40px;
    font-family: var(--font-mono);
    font-size: var(--size-mono);
    letter-spacing: 0.05em;
}

.trajectory__node {
    color: var(--text-secondary);
}

.trajectory__arrow {
    color: rgba(255, 255, 255, 0.15);
    font-size: 14px;
}


/* ═══════════════════════════════════════════════════
   TIMELINE (Work / Education)
   ═══════════════════════════════════════════════════ */

.timeline__item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 28px 0;
    border-bottom: 1px solid var(--divider);
    transition: opacity var(--transition);
}

.timeline__item:first-child {
    border-top: 1px solid var(--divider);
}

.timeline:hover .timeline__item {
    opacity: 0.4;
}

.timeline:hover .timeline__item:hover {
    opacity: 1;
}

.timeline__content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timeline__role {
    font-family: var(--font-serif);
    font-size: clamp(18px, 2.2vw, 26px);
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.timeline__org {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 400;
}

.timeline__desc {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.55;
    margin-top: 8px;
    max-width: 56ch;
}

.timeline__meta {
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: right;
    flex-shrink: 0;
}

.timeline__date {
    font-size: var(--size-label);
    color: var(--text-secondary);
    font-weight: 400;
    white-space: nowrap;
}

.mono-tag {
    font-family: var(--font-mono);
    font-size: var(--size-mono);
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    white-space: nowrap;
}


/* ═══════════════════════════════════════════════════
   LONG GAME
   ═══════════════════════════════════════════════════ */

.horizon__statements {
    margin-top: 32px;
}

.horizon__line {
    font-family: var(--font-serif);
    font-size: clamp(26px, 3.2vw, 44px);
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.25;
    margin-bottom: 16px;
    letter-spacing: -0.015em;
}

.horizon__line:last-child {
    margin-bottom: 0;
}


/* ═══════════════════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════════════════ */

.section--contact {
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.contact__headline {
    font-family: var(--font-serif);
    font-size: clamp(32px, 4.2vw, 54px);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
    max-width: 800px;
    margin-bottom: 48px;
}

.contact__links {
    display: flex;
    gap: 40px;
}

.contact__link {
    font-size: var(--size-body);
    color: var(--text-secondary);
    position: relative;
    transition: color var(--transition);
}

.contact__link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text-primary);
    transition: width var(--transition);
}

.contact__link:hover {
    color: var(--text-primary);
}

.contact__link:hover::after {
    width: 100%;
}


/* ═══════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════ */

.footer {
    padding: 40px 0;
    padding-bottom: 120px;
}

.footer__copy {
    font-size: var(--size-label);
    color: var(--text-secondary);
}


/* ═══════════════════════════════════════════════════
   BOTTOM NAV
   ═══════════════════════════════════════════════════ */

.bottom-nav {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;

    display: flex;
    align-items: center;
    gap: 32px;

    background: rgba(20, 20, 23, 0.85);
    color: var(--text-primary);
    padding: 14px 28px;
    border-radius: 100px;
    border: 1px solid var(--divider);

    font-size: var(--size-nav);
    font-weight: 500;

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    transition: opacity var(--transition), transform var(--transition);
}

.bottom-nav__name {
    font-weight: 700;
    white-space: nowrap;
    padding-right: 16px;
    border-right: 1px solid var(--divider);
}

.bottom-nav__links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.bottom-nav__link {
    color: var(--text-secondary);
    transition: color var(--transition);
    white-space: nowrap;
}

.bottom-nav__link:hover,
.bottom-nav__link.active {
    color: var(--text-primary);
}

.bottom-nav__link--external {
    color: rgba(155, 155, 161, 0.5);
}

.bottom-nav__link--external:hover {
    color: var(--text-primary);
}


/* ═══════════════════════════════════════════════════
   CURSOR HALO (elements injected by cursor-lens.js)
   ═══════════════════════════════════════════════════ */

.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-primary);
    pointer-events: none;
    z-index: 9996;
    opacity: 0;
    transition: opacity 0.3s ease,
        width 0.25s ease, height 0.25s ease,
        background 0.25s ease;
    will-change: transform;
}

.cursor-dot.is-active {
    opacity: 1;
}

.cursor-dot.is-hovering {
    width: 8px;
    height: 8px;
    background: var(--accent);
}

.cursor-halo {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(234, 234, 234, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 9995;
    opacity: 0;
    transition: opacity 0.35s ease,
        width 0.3s ease, height 0.3s ease;
    will-change: transform;
}

.cursor-halo.is-active {
    opacity: 1;
}

.cursor-halo.is-hovering {
    width: 32px;
    height: 32px;
    background: radial-gradient(circle, rgba(234, 234, 234, 0.10) 0%, transparent 70%);
}


/* ═══════════════════════════════════════════════════
   ENGAGE
   ═══════════════════════════════════════════════════ */

.engage__list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.engage__list li {
    position: relative;
    padding-left: 20px;
}

.engage__list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--text-secondary);
}


/* ═══════════════════════════════════════════════════
   SIGNALS
   ═══════════════════════════════════════════════════ */

.section--signals {
    padding-bottom: 24px;
}

.signals__list {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

.signals__item {
    position: relative;
}

.signals__item:not(:last-child)::after {
    content: '·';
    position: absolute;
    right: -14px;
    color: rgba(255, 255, 255, 0.15);
}



/* ═══════════════════════════════════════════════════
   RESPONSIVE — TABLET
   ═══════════════════════════════════════════════════ */

@media (max-width: 768px) {
    :root {
        --size-body: 17px;
    }

    .section__label {
        margin-bottom: 48px;
    }

    .timeline__item {
        flex-direction: column;
        gap: 8px;
    }

    .timeline__meta {
        text-align: left;
    }

    .contact__links {
        flex-direction: column;
        gap: 20px;
    }

    .bottom-nav {
        left: 16px;
        right: 16px;
        transform: none;
        gap: 16px;
        padding: 12px 20px;
        border-radius: 16px;
    }

    .bottom-nav__links {
        gap: 16px;
    }

    .thesis-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .ecosystem__grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .hero__signals {
        flex-wrap: wrap;
        gap: 12px 20px;
    }

    .trajectory {
        flex-wrap: wrap;
        gap: 10px;
    }

    .image-figure {
        max-width: 100%;
    }
}


/* ═══════════════════════════════════════════════════
   RESPONSIVE — MOBILE
   ═══════════════════════════════════════════════════ */

@media (max-width: 480px) {
    :root {
        --size-body: 16px;
    }

    .bottom-nav__name {
        display: none;
    }

    .bottom-nav {
        justify-content: center;
    }

    .bottom-nav__links {
        gap: 20px;
    }

    .thesis__grid {
        gap: 32px;
    }
}


/* ═══════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    .cursor-dot,
    .cursor-halo {
        display: none;
    }
}