/* =====================================================
   MIHIR CHAUHAN — MODEL CARD / SPEC SHEET · 2026
   Palette:  paper #F2F1EB · surface #FBFAF6 · ink #16181D
             working blue #1B2EE6 · status green #0B8A4F
   Type:     Archivo (display: expanded 125%) · IBM Plex Mono (data)
   ===================================================== */

:root {
    --paper: #F2F1EB;
    --surface: #FBFAF6;
    --ink: #16181D;
    --ink-soft: #4B4F57;
    --ink-mute: #8B8E94;
    --blue: #1828CE;
    --blue-soft: rgba(24, 40, 206, 0.07);
    --green: #0B8A4F;
    --line: #D9D7CC;
    --line-strong: #AFADA1;
    --dark: #131419;
    --dark-line: #2C2E36;
    --cream: #F2F1EB;            /* constant — for on-dark surfaces in both themes */
    --topbar-bg: rgba(242, 241, 235, 0.88);

    --font-display: 'Archivo', -apple-system, sans-serif;
    --font-mono: 'IBM Plex Mono', 'Consolas', monospace;

    --wrap: 1120px;
    --pad: clamp(1.25rem, 4vw, 2.5rem);
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--font-display);
    font-size: 1rem;
    line-height: 1.65;
    background: var(--paper);
    color: var(--ink);
    overflow-x: clip;
}

::selection { background: var(--blue); color: var(--paper); }

/* ===== DARK THEME ===== */
html[data-theme="dark"] {
    --paper: #101116;
    --surface: #16171D;
    --ink: #E9E7DE;
    --ink-soft: #B0B2B8;
    --ink-mute: #71747C;
    --blue: #8B96FF;
    --blue-soft: rgba(139, 150, 255, 0.09);
    --green: #34D399;
    --line: #26272F;
    --line-strong: #3A3C46;
    --dark: #0B0C0F;
    --dark-line: #26272F;
    --topbar-bg: rgba(16, 17, 22, 0.88);
}
html.theme-anim body,
html.theme-anim .topbar,
html.theme-anim .section-alt,
html.theme-anim .bench,
html.theme-anim .eval-card,
html.theme-anim .cite,
html.theme-anim .overview-aside,
html.theme-anim .mini-card {
    transition: background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}

.mono { font-family: var(--font-mono); }

.wrap {
    max-width: var(--wrap);
    margin: 0 auto;
    padding-left: var(--pad);
    padding-right: var(--pad);
}

/* ===== STATUS DOT ===== */
.dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--green);
    margin-right: 0.5em;
    animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ===== TEXT LINK ===== */
.text-link {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--blue);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease;
}
.text-link:hover { border-bottom-color: var(--blue); }

/* ===== TAGS ===== */
.tag-row { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.tag {
    font-size: 0.68rem;
    letter-spacing: 0.03em;
    padding: 0.3rem 0.65rem;
    border: 1px solid var(--line-strong);
    color: var(--ink-soft);
    background: transparent;
    white-space: nowrap;
    max-width: 100%;
    transition: all 0.15s ease;
}
@media (max-width: 720px) {
    .tag { white-space: normal; }
}
.tag:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
.tag-lg { font-size: 0.74rem; padding: 0.42rem 0.8rem; }

/* ===== BUTTONS ===== */
.btn {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 0.85rem 1.6rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1.5px solid var(--ink);
    cursor: pointer;
    transition: all 0.18s ease;
    background: transparent;
    color: var(--ink);
}
.btn-primary {
    background: var(--ink);
    color: var(--paper);
}
.btn-primary:hover { background: var(--blue); border-color: var(--blue); transform: translateY(-2px); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); transform: translateY(-2px); }
.btn-suffix { font-size: 0.7rem; opacity: 0.65; }
.btn-light {
    border-color: var(--cream);
    color: #131419;
    background: var(--cream);
}
.btn-light:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

/* =====================================================
   TOP BAR
   ===================================================== */
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem var(--pad);
    background: var(--topbar-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}
.topbar.scrolled { border-bottom-color: var(--line); }

.topbar-id {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
}
.topbar-mark {
    display: block;
    width: 24px;
    color: var(--blue);
    flex-shrink: 0;
    transition: color 0.2s ease;
}
.topbar-mark svg { display: block; width: 100%; height: auto; }
.topbar-id:hover .topbar-mark { color: var(--ink); }

.topbar-nav { display: flex; gap: 0.25rem; }

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink-soft);
    padding: 0.45rem 0.7rem;
    transition: color 0.15s ease, background 0.15s ease;
}
.nav-num { color: var(--ink-mute); margin-right: 0.45em; }
.nav-link:hover, .nav-link.active { color: var(--blue); background: var(--blue-soft); }
.nav-link:hover .nav-num, .nav-link.active .nav-num { color: var(--blue); }
.nav-link-cta { border: 1px solid var(--line-strong); }
.nav-link-cta:hover { border-color: var(--blue); }

/* Mobile menu */
.menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}
.menu-btn span {
    width: 24px; height: 2px;
    background: var(--ink);
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.menu-btn.open span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 880px) {
    .menu-btn { display: flex; }
    .topbar-nav {
        position: fixed;
        top: 54px; left: 0; right: 0;
        flex-direction: column;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
        padding: 1rem var(--pad) 1.5rem;
        gap: 0.25rem;
        transform: translateY(-130%);
        transition: transform 0.25s ease;
    }
    .topbar-nav.open { transform: translateY(0); }
    .nav-link { padding: 0.7rem 0.5rem; font-size: 0.8rem; }
    .nav-link-cta { border: none; }
}

/* =====================================================
   HERO — THE MODEL CARD
   ===================================================== */
.hero {
    padding-top: clamp(7rem, 14vh, 10rem);
    padding-bottom: 0;
    position: relative;
}

.hero-eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    color: var(--ink-mute);
    margin-bottom: 1.2rem;
}

.hero-name {
    font-stretch: 125%;
    font-weight: 850;
    font-size: clamp(3.2rem, 11vw, 7.5rem);
    line-height: 0.92;
    letter-spacing: -0.025em;
    text-transform: uppercase;
    margin-bottom: clamp(2rem, 5vh, 3.5rem);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: start;
    margin-bottom: clamp(2rem, 5vh, 3rem);
}

/* Spec card — the signature element */
.spec-card {
    border-top: 2px solid var(--ink);
}
.spec-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1rem;
    padding: 0.95rem 0;
    border-bottom: 1px solid var(--line);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}
.spec-row.in { opacity: 1; transform: translateY(0); }
.spec-key {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: var(--ink-mute);
    padding-top: 0.2em;
}
.spec-val { font-size: 0.98rem; font-weight: 500; }

/* Photo */
.hero-photo-wrap { position: relative; }
.hero-photo {
    width: 100%;
    aspect-ratio: 4 / 4.6;
    object-fit: cover;
    border: 1px solid var(--line-strong);
    transition: transform 0.25s ease;
    will-change: transform;
}
.photo-caption {
    display: block;
    margin-top: 0.6rem;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: var(--ink-mute);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding-bottom: clamp(2.5rem, 6vh, 4rem);
}
.hero-links { display: flex; gap: 1.5rem; margin-left: auto; }

/* Ruler strip */
.ruler {
    height: 22px;
    border-top: 1px solid var(--line-strong);
    background-image: repeating-linear-gradient(
        90deg,
        var(--line-strong) 0, var(--line-strong) 1px,
        transparent 1px, transparent 10px
    );
    background-size: 100% 8px;
    background-repeat: no-repeat;
    background-position: top;
}

@media (max-width: 880px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-photo-wrap { max-width: 320px; }
    .spec-row { grid-template-columns: 110px 1fr; }
    .hero-links { margin-left: 0; width: 100%; }
}

/* =====================================================
   BENCHMARKS STRIP
   ===================================================== */
.bench {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.bench-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}
.bench-item {
    padding: 2rem 1.5rem;
    border-left: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.bench-item:first-child { border-left: none; }
.bench-num {
    font-stretch: 115%;
    font-weight: 800;
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--blue);
}
.bench-label {
    font-size: 0.64rem;
    letter-spacing: 0.08em;
    color: var(--ink-mute);
}

@media (max-width: 880px) {
    .bench-grid { grid-template-columns: repeat(2, 1fr); }
    .bench-item:nth-child(3) { border-left: none; }
    .bench-item:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* =====================================================
   SECTIONS
   ===================================================== */
.section { padding: clamp(4rem, 10vh, 7rem) 0; scroll-margin-top: 64px; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.sec-head { margin-bottom: clamp(2.5rem, 6vh, 4rem); }
.sec-num {
    display: block;
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    color: var(--blue);
    margin-bottom: 0.6rem;
}
.sec-title {
    font-stretch: 122%;
    font-weight: 820;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}
.sec-sub {
    margin-top: 0.9rem;
    color: var(--ink-soft);
    max-width: 48ch;
}

.subsec-title {
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    color: var(--ink-mute);
    margin: clamp(3rem, 7vh, 4.5rem) 0 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
}

/* Reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* =====================================================
   01 OVERVIEW
   ===================================================== */
.overview-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}
.lead {
    font-size: clamp(1.2rem, 2.2vw, 1.5rem);
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: -0.01em;
    margin-bottom: 1.4rem;
}
.overview-text p:not(.lead) {
    color: var(--ink-soft);
    margin-bottom: 1.1rem;
    max-width: 62ch;
}
.overview-text strong { color: var(--ink); font-weight: 650; }

.overview-aside {
    border: 1px solid var(--line-strong);
    padding: 1.6rem;
    background: var(--surface);
}
.aside-title {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    color: var(--ink-mute);
    margin-bottom: 1rem;
}
.learn-list { list-style: none; }
.learn-list li {
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.92rem;
    font-weight: 500;
}
.learn-list li:last-child { border-bottom: none; }
.learn-list li::before {
    content: '→';
    color: var(--blue);
    margin-right: 0.6em;
    font-family: var(--font-mono);
}

@media (max-width: 880px) {
    .overview-grid { grid-template-columns: 1fr; }
}

/* =====================================================
   02 TRAINING RUN (EXPERIENCE LOG)
   ===================================================== */
.log { list-style: none; }
.log-entry {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: clamp(1.2rem, 3vw, 2.5rem);
    padding: clamp(1.6rem, 4vh, 2.4rem) 0;
    border-top: 1px solid var(--line-strong);
}
.log-entry:last-child { border-bottom: 1px solid var(--line-strong); }

.log-rail {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: flex-start;
}
.log-id {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: var(--ink-mute);
}
.log-status {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    padding: 0.3rem 0.6rem;
}
.status-run { color: var(--green); border: 1px solid currentColor; }
.status-done { color: var(--ink-mute); border: 1px solid var(--line-strong); }
.log-status .dot { margin-right: 0.45em; }

.log-date {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    color: var(--ink-mute);
    margin-bottom: 0.5rem;
}
.log-role {
    font-stretch: 115%;
    font-weight: 750;
    font-size: clamp(1.25rem, 2.4vw, 1.6rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
}
.log-org {
    color: var(--blue);
    font-weight: 550;
    font-size: 0.92rem;
    margin: 0.25rem 0 0.9rem;
}
.log-points {
    list-style: none;
    margin-bottom: 1.1rem;
    max-width: 70ch;
}
.log-points li {
    position: relative;
    padding-left: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--ink-soft);
    font-size: 0.93rem;
}
.log-points li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--line-strong);
}
.is-running .log-points li::before { color: var(--green); }

@media (max-width: 720px) {
    .log-entry { grid-template-columns: 1fr; gap: 0.9rem; }
    .log-rail { flex-direction: row; align-items: center; }
}

/* =====================================================
   03 EVALUATIONS (PROJECTS)
   ===================================================== */
.evals {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.4rem;
}

.eval-card {
    background: var(--surface);
    border: 1px solid var(--line-strong);
    padding: clamp(1.4rem, 3vw, 2rem);
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.eval-card:hover {
    border-color: var(--blue);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px -16px rgba(27, 46, 230, 0.25);
}

.eval-head { display: flex; gap: 1rem; align-items: baseline; }
.eval-id {
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    color: var(--blue);
    white-space: nowrap;
}
.eval-title {
    font-stretch: 118%;
    font-weight: 780;
    font-size: 1.35rem;
    line-height: 1.1;
    letter-spacing: -0.01em;
}
.eval-sub {
    font-size: 0.8rem;
    color: var(--ink-mute);
    margin-top: 0.25rem;
}
.eval-desc {
    font-size: 0.91rem;
    color: var(--ink-soft);
    flex: 1;
}

/* Demo video */
.eval-video video {
    width: 100%;
    display: block;
    border: 1px solid var(--line-strong);
    background: var(--ink);
}
.video-caption {
    display: block;
    margin-top: 0.45rem;
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    color: var(--ink-mute);
}

.metric-row {
    display: flex;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.metric {
    flex: 1 1 auto;
    min-width: 92px;
    padding: 0.75rem 0.9rem 0.7rem;
    border-left: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.metric:first-child { border-left: none; }
.metric-v {
    font-stretch: 112%;
    font-weight: 800;
    font-size: 1.15rem;
    line-height: 1;
    color: var(--blue);
}
.metric-k {
    font-size: 0.56rem;
    letter-spacing: 0.07em;
    color: var(--ink-mute);
}

.eval-foot { display: flex; flex-direction: column; gap: 0.8rem; }
.link-row { display: flex; gap: 1.2rem; }

/* Additional runs */
.evals-compact { grid-template-columns: repeat(2, 1fr); }
.mini-card {
    border: 1px solid var(--line);
    background: transparent;
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.mini-card:hover { border-color: var(--blue); background: var(--surface); }
.mini-metric {
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--blue);
}
.mini-title { font-weight: 700; font-size: 1.05rem; font-stretch: 112%; }
.mini-desc { font-size: 0.86rem; color: var(--ink-soft); flex: 1; }

@media (max-width: 880px) {
    .evals, .evals-compact { grid-template-columns: 1fr; }
}

/* =====================================================
   04 CAPABILITIES
   ===================================================== */
.cap-matrix { display: flex; flex-direction: column; }
.cap-row {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1.5rem;
    padding: 1.4rem 0;
    border-top: 1px solid var(--line);
    align-items: start;
}
.cap-row:last-child { border-bottom: 1px solid var(--line); }
.cap-group {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--ink);
    padding-top: 0.4rem;
}

@media (max-width: 720px) {
    .cap-row { grid-template-columns: 1fr; gap: 0.8rem; }
}

/* =====================================================
   05 CITATIONS
   ===================================================== */
.cites { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.cite {
    display: flex;
    gap: 1.2rem;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    padding: 1.8rem;
    transition: border-color 0.2s ease;
}
.cite:hover { border-color: var(--blue); }
.cite-type {
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    color: var(--blue);
    white-space: nowrap;
    padding-top: 0.35rem;
}
.cite-title { font-stretch: 112%; font-weight: 750; font-size: 1.1rem; line-height: 1.25; }
.cite-meta { font-size: 0.78rem; color: var(--ink-mute); margin: 0.3rem 0 0.7rem; }
.cite-desc { font-size: 0.88rem; color: var(--ink-soft); margin-bottom: 0.9rem; }

@media (max-width: 880px) {
    .cites { grid-template-columns: 1fr; }
}

/* =====================================================
   06 INFERENCE (CONTACT) — dark section
   ===================================================== */
.section-dark {
    background: var(--dark);
    color: var(--cream);
}
.section-dark .sec-sub { color: rgba(242, 241, 235, 0.6); }
.section-dark ::selection { background: var(--cream); color: #131419; }

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

.contact-meta { border-top: 2px solid var(--cream); }
.meta-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--dark-line);
    align-items: baseline;
}
.meta-row .spec-key { color: rgba(242, 241, 235, 0.45); }
.meta-row a {
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.15s ease;
    word-break: break-word;
}
.meta-row a:hover { color: #8B96FF; }

.contact-form { display: flex; flex-direction: column; gap: 1.2rem; }
.form-group { display: flex; flex-direction: column; gap: 0.45rem; }
.form-group label {
    font-size: 0.66rem;
    letter-spacing: 0.12em;
    color: rgba(242, 241, 235, 0.5);
}
.form-group input,
.form-group textarea {
    font-family: var(--font-display);
    font-size: 0.95rem;
    color: var(--cream);
    background: transparent;
    border: 1px solid var(--dark-line);
    padding: 0.85rem 1rem;
    transition: border-color 0.15s ease;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(242, 241, 235, 0.3); }
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8B96FF;
}
.form-group textarea { resize: vertical; min-height: 140px; }

.btn-submit { align-self: flex-start; }
.form-status { font-size: 0.72rem; letter-spacing: 0.04em; min-height: 1.2em; }
.form-status.ok { color: #4ADE80; }
.form-status.err { color: #F87171; }

@media (max-width: 880px) {
    .contact-grid { grid-template-columns: 1fr; }
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
    background: var(--dark);
    color: rgba(242, 241, 235, 0.45);
    border-top: 1px solid var(--dark-line);
    padding: 1.4rem 0;
}
.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.66rem;
    letter-spacing: 0.08em;
}
.footer .text-link { color: rgba(242, 241, 235, 0.7); font-size: 0.66rem; }
.footer .text-link:hover { color: var(--cream); border-bottom-color: var(--cream); }

@media (max-width: 600px) {
    .footer-mid { display: none; }
}

/* =====================================================
   BOOT SEQUENCE
   ===================================================== */
.boot {
    position: fixed;
    inset: 0;
    z-index: 900;
    background: var(--paper);
    display: flex;
    align-items: flex-end;
    transition: transform 0.65s cubic-bezier(0.76, 0, 0.24, 1), visibility 0s 0.65s;
}
.boot.done { transform: translateY(-101%); visibility: hidden; }
html.no-boot .boot { display: none; }
body.booting { overflow: hidden; }

.boot-inner {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 2.5rem var(--pad);
}
.boot-lines {
    display: flex;
    flex-direction: column;
    gap: 0.3em;
    min-height: 6.5em;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: var(--ink-mute);
}
.boot-lines .ok { color: var(--green); }
.boot-meter { display: flex; align-items: center; gap: 1.2rem; margin-top: 1.4rem; }
.boot-pct { font-size: 0.74rem; min-width: 4ch; color: var(--ink); }
.boot-bar { flex: 1; height: 2px; background: var(--line); position: relative; overflow: hidden; }
.boot-fill { position: absolute; top: 0; left: 0; bottom: 0; width: 0%; background: var(--blue); }

/* =====================================================
   CHROME — progress bar & grain
   ===================================================== */
.progress {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 2px;
    background: var(--blue);
    transform: scaleX(0);
    transform-origin: 0 0;
    z-index: 300;
    pointer-events: none;
}

.grain {
    position: fixed;
    inset: 0;
    z-index: 250;
    pointer-events: none;
    opacity: 0.045;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='220' height='220' filter='url(%23n)'/></svg>");
}
html[data-theme="dark"] .grain { opacity: 0.07; }

/* =====================================================
   HERO NAME — split letters, kinetic type
   ===================================================== */
.hero-name .hn-line {
    display: block;
    overflow: hidden;
    padding-bottom: 0.05em;
    margin-bottom: -0.05em;
}
.hero-name .ch {
    display: inline-block;
    transform: translateY(118%);
    transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--d, 0s);
    will-change: transform;
}
body.booted .hero-name .ch { transform: translateY(0); }

/* =====================================================
   TOPBAR TOOLS — theme toggle
   ===================================================== */
.topbar-tools { display: flex; align-items: center; gap: 0.6rem; }
.theme-btn {
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    padding: 0.42rem 0.75rem;
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--ink-soft);
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.theme-btn:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }

/* =====================================================
   MARQUEE
   ===================================================== */
.marquee {
    overflow: hidden;
    padding: 0.95rem 0;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}
.marquee-track {
    display: flex;
    align-items: center;
    gap: 2.75rem;
    width: max-content;
    animation: marquee 36s linear infinite;
    will-change: transform;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    color: var(--ink-mute);
    white-space: nowrap;
}
.marquee-track i {
    width: 7px; height: 7px;
    background: var(--blue);
    transform: rotate(45deg);
    flex-shrink: 0;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* =====================================================
   CONTACT — oversized CTA
   ===================================================== */
.contact-big {
    display: block;
    text-decoration: none;
    margin-bottom: clamp(2.5rem, 7vh, 4.5rem);
}
.contact-big-line {
    display: block;
    font-stretch: 122%;
    font-weight: 850;
    font-size: clamp(2.4rem, 8vw, 5.8rem);
    line-height: 0.98;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(242, 241, 235, 0.8);
    transition: color 0.3s ease;
}
.contact-big:hover .contact-big-line,
.contact-big:focus-visible .contact-big-line { color: var(--cream); }
@supports not (-webkit-text-stroke: 1px black) {
    .contact-big-line { color: var(--cream); }
}
.contact-big-arrow {
    display: inline-block;
    color: #8B96FF;
    -webkit-text-stroke: 0;
    transition: transform 0.3s ease;
}
.contact-big:hover .contact-big-arrow { transform: translateX(0.18em); }

/* Floating "EMAIL ME" pill that trails the pointer over the CTA */
.cta-tip {
    position: fixed;
    top: 0; left: 0;
    z-index: 600;
    pointer-events: none;
}
.cta-tip-inner {
    display: inline-block;
    transform: translate(16px, -36px) scale(0.7);
    padding: 0.5em 1em;
    border-radius: 999px;
    background: var(--blue);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.cta-tip.on .cta-tip-inner {
    opacity: 1;
    transform: translate(16px, -36px) scale(1);
}

/* =====================================================
   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, .spec-row { opacity: 1; transform: none; }
    .hero-name .ch { transform: none !important; }
    .marquee-track { animation: none; }
    .boot { display: none; }
}

/* =====================================================
   PRINT
   ===================================================== */
@media print {
    .topbar, .menu-btn, .contact-form, .footer { display: none; }
    .boot, .grain, .progress, .marquee, .contact-big { display: none; }
    body { background: #fff; color: #000; }
    .section-dark { background: #fff; color: #000; }
}