/* ---------------------------------------------------------
   thrushith.com
   Dark, editorial, a little bit terminal.
--------------------------------------------------------- */

:root {
    --bg: #0e0d0b;
    --bg-raised: #161512;
    --bg-sunk: #0a0908;
    --line: #2a2823;
    --line-strong: #3d3a33;
    --text: #ece7dc;
    --text-dim: #a29c8f;
    --text-faint: #6d685e;
    --accent: #f2a541;
    --accent-ink: #1a1206;

    --serif: "Instrument Serif", Georgia, serif;
    --sans: "Inter Tight", system-ui, -apple-system, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

    --gutter: clamp(1rem, 4vw, 3rem);
    --max: 1180px;
    --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

a {
    color: inherit;
    text-decoration: none;
}

[hidden] {
    display: none !important;
}

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

ul,
ol {
    list-style: none;
}

/* Film grain, keeps the flat dark from feeling sterile */
.grain {
    position: fixed;
    inset: -50%;
    z-index: 100;
    pointer-events: none;
    opacity: .05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Top bar ---------- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1rem var(--gutter);
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s;
}

.topbar.scrolled {
    border-bottom-color: var(--line);
}

.mark {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.9rem;
    line-height: 1;
    letter-spacing: -.02em;
}

.mark > span:not(.spread-w) {
    color: var(--accent);
}

.nav {
    display: flex;
    gap: 1.75rem;
    font-family: var(--mono);
    font-size: .78rem;
    text-transform: lowercase;
}

.nav a {
    color: var(--text-dim);
    transition: color .2s;
}

.nav a > span:not(.spread-w) {
    color: var(--text-faint);
    margin-right: .35rem;
    transition: color .2s;
}

.nav a:hover,
.nav a.active {
    color: var(--text);
}

.nav a.active > span:not(.spread-w) {
    color: var(--accent);
}

.nav-toggle {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    background: none;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    cursor: pointer;
    position: relative;
}

.nav-toggle span {
    position: absolute;
    left: 50%;
    width: 1rem;
    height: 1.5px;
    background: var(--text);
    transform: translateX(-50%);
    transition: transform .3s var(--ease), top .3s var(--ease);
}

.nav-toggle span:first-child {
    top: 42%;
}

.nav-toggle span:last-child {
    top: 58%;
}

.nav-toggle[aria-expanded="true"] span:first-child {
    top: 50%;
    transform: translateX(-50%) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
    top: 50%;
    transform: translateX(-50%) rotate(-45deg);
}

/* ---------- Layout ---------- */

main {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.section {
    padding: clamp(3.5rem, 8vw, 6rem) 0;
    border-top: 1px solid var(--line);
}

.section-head {
    display: flex;
    align-items: baseline;
    gap: 1.25rem;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
    flex-wrap: wrap;
}

.index {
    font-family: var(--mono);
    font-size: .8rem;
    color: var(--accent);
}

.section-head h2 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(2.6rem, 6vw, 4.5rem);
    line-height: 1;
    letter-spacing: -.02em;
}

.head-link {
    margin-left: auto;
    font-family: var(--mono);
    font-size: .8rem;
    color: var(--text-dim);
    border-bottom: 1px solid var(--line-strong);
    padding-bottom: 2px;
    transition: color .2s, border-color .2s;
}

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

/* ---------- Buttons & small bits ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .85rem 1.4rem;
    border-radius: 999px;
    font-family: var(--mono);
    font-size: .82rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .25s var(--ease), background .2s, color .2s, border-color .2s;
}

.btn i {
    font-size: .75em;
    transition: transform .25s var(--ease);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-solid {
    background: var(--accent);
    color: var(--accent-ink);
}

.btn-solid:hover {
    background: var(--text);
}

.btn-ghost {
    background: transparent;
    border-color: var(--line-strong);
    color: var(--text);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
    outline: none;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: 1rem;
}

.tags > span {
    font-family: var(--mono);
    font-size: .7rem;
    color: var(--text-dim);
    padding: .2rem .6rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
}

.inline-link {
    color: var(--text);
    background-image: linear-gradient(var(--accent), var(--accent));
    background-size: 100% 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size .3s var(--ease), color .2s;
}

.inline-link:hover {
    color: var(--accent-ink);
    background-size: 100% 100%;
}

/* ---------- Hero ---------- */

.hero {
    min-height: calc(100svh - 4.5rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 0 3rem;
}

.prompt {
    font-family: var(--mono);
    font-size: clamp(.78rem, 1.4vw, .9rem);
    color: var(--text-dim);
    margin-bottom: 1.5rem;
}

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

.prompt i {
    font-style: normal;
    color: var(--text-faint);
    margin: 0 .25rem;
}

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

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

.hero-name {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(3rem, min(13vw, 24vh), 11.5rem);
    line-height: .88;
    letter-spacing: -.035em;
    margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.hero-name .line {
    display: block;
    overflow: hidden;
}

.hero-name .italic {
    font-style: italic;
    color: var(--accent);
    padding-left: clamp(0rem, 8vw, 7rem);
}

.hero-foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero-lede {
    max-width: 34rem;
    font-size: clamp(1.05rem, 1.8vw, 1.25rem);
    color: var(--text-dim);
    line-height: 1.55;
}

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

.hero-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: clamp(3rem, 7vw, 5rem);
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    font-size: .92rem;
    color: var(--text-dim);
}

.hero-meta li > span:not(.spread-w) {
    display: block;
    font-family: var(--mono);
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-faint);
    margin-bottom: .3rem;
}

.hero-meta a {
    color: var(--text);
    border-bottom: 1px solid var(--line-strong);
    transition: border-color .2s, color .2s;
}

.hero-meta a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* Hero entrance */
.hero .prompt,
.hero-name .line,
.hero-foot,
.hero-meta {
    animation: rise .9s var(--ease) both;
}

.hero-name .line:nth-child(1) {
    animation-delay: .08s;
}

.hero-name .line:nth-child(2) {
    animation-delay: .18s;
}

.hero-foot {
    animation-delay: .32s;
}

.hero-meta {
    animation-delay: .45s;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
}

/* ---------- About ---------- */

.about {
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.about-big {
    font-family: var(--serif);
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.12;
    color: var(--text);
    letter-spacing: -.015em;
    margin-bottom: 1.75rem;
}

.about-big em {
    color: var(--accent);
}

.about-copy {
    color: var(--text-dim);
    max-width: 38rem;
}

/* Animated SO-101 arm */
.robot-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg-sunk);
    padding: 1rem 1rem .9rem;
}

.robot {
    display: block;
    width: 100%;
    height: auto;
}

.robot .cam rect {
    fill: var(--bg-raised);
    stroke: var(--line-strong);
}

.robot .lens {
    fill: var(--bg-sunk);
    stroke: var(--accent);
    stroke-width: 2;
}

.robot .cam-cone {
    fill: var(--accent);
    opacity: .05;
}

.robot .rec {
    fill: #f87171;
}

.robot .table {
    stroke: var(--line-strong);
    stroke-width: 2;
}

.robot .zone {
    fill: var(--line-strong);
}

.robot .ball {
    fill: var(--accent);
}

.robot .arm-base {
    fill: var(--bg-raised);
    stroke: var(--line-strong);
}

.robot .arm-link {
    fill: #2c2a25;
    stroke: var(--line-strong);
}

.robot .arm-palm,
.robot .arm-finger {
    fill: var(--text-dim);
}

.robot .arm-joint {
    fill: var(--bg-sunk);
    stroke: var(--accent);
    stroke-width: 3;
}

.robot-card figcaption {
    margin-top: .6rem;
    font-family: var(--mono);
    font-size: .72rem;
    color: var(--text-faint);
}

.robot-card figcaption > span:not(.spread-w) {
    color: var(--accent);
}

/* What I focus on */
.focus {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.focus-card {
    padding: 1.4rem 1.25rem 1.5rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg-raised);
    transition: border-color .3s, transform .4s var(--ease);
}

.focus-card:hover {
    border-color: var(--line-strong);
    transform: translateY(-3px);
}

.focus-card > i {
    font-size: 1.3rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.focus-card h3 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 1.6rem;
    line-height: 1.1;
    margin-bottom: .6rem;
}

.focus-card p {
    font-size: .92rem;
    color: var(--text-dim);
    line-height: 1.55;
}

.facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(1rem, 3vw, 2.5rem);
    margin-top: clamp(3rem, 6vw, 4.5rem);
}

.facts div {
    border-top: 1px solid var(--line-strong);
    padding-top: 1rem;
}

.facts dt {
    font-family: var(--serif);
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1;
    margin-bottom: .5rem;
}

.facts dd {
    font-size: .85rem;
    color: var(--text-faint);
    line-height: 1.45;
}

/* ---------- Experience ---------- */

.jobs {
    border-top: 1px solid var(--line);
}

.job {
    display: grid;
    grid-template-columns: 13rem minmax(0, 1fr);
    gap: 2rem;
    padding: 2.25rem 0;
    border-bottom: 1px solid var(--line);
    position: relative;
}

.job::before {
    content: "";
    position: absolute;
    left: 0;
    top: -1px;
    height: 1px;
    width: 0;
    background: var(--accent);
    transition: width .6s var(--ease);
}

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

.job:hover::before {
    width: 100%;
}

.job-when {
    font-family: var(--mono);
    font-size: .78rem;
    color: var(--text-faint);
    padding-top: .45rem;
}

.job h3 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    line-height: 1.15;
    transition: color .2s;
}

.job:hover h3 {
    color: var(--accent);
}

.job-org {
    color: var(--text-dim);
    margin-bottom: 1rem;
}

.job ul li {
    position: relative;
    padding-left: 1.4rem;
    color: var(--text-dim);
    margin-bottom: .45rem;
    max-width: 46rem;
}

.job ul li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--text-faint);
    font-family: var(--mono);
    font-size: .85em;
}

.job-minor h3 {
    font-size: clamp(1.3rem, 2.4vw, 1.6rem);
}

/* ---------- Projects ---------- */

.projects {
    display: grid;
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

.project {
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: center;
    padding: clamp(1rem, 2vw, 1.25rem);
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--bg-raised);
    transition: border-color .3s, transform .4s var(--ease);
}

.project:nth-child(even) {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
}

.project:nth-child(even) .project-media {
    order: 2;
}

.project:hover {
    border-color: var(--line-strong);
    transform: translateY(-4px);
}

.project-media {
    overflow: hidden;
    border-radius: 4px;
    aspect-ratio: 16 / 10;
    background: var(--bg-sunk);
}

.project-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(.75);
    transition: transform .8s var(--ease), filter .4s;
}

.project:hover .project-media img {
    transform: scale(1.04);
    filter: saturate(1);
}

/* Results chart stands in for a screenshot on the robotics project */
.project-chart {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.1rem;
    padding: clamp(1.25rem, 4vw, 2.5rem);
    border: 1px solid var(--line);
    background:
        linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 2.5rem,
        var(--bg-sunk);
}

.chart-title,
.chart-note {
    font-family: var(--mono);
    font-size: .72rem;
    color: var(--text-faint);
}

.chart-title {
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-dim);
}

.bar-row {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr) 4.5rem;
    align-items: center;
    gap: .9rem;
    font-family: var(--mono);
    font-size: .8rem;
}

.bar {
    height: .9rem;
    background: var(--bg-raised);
    border-radius: 2px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    width: 0;
    background: var(--line-strong);
    transition: width 1.4s var(--ease) .3s;
}

.bar-fill.accent {
    background: var(--accent);
}

.reveal.in .bar-fill {
    width: var(--v);
}

.bar-value {
    text-align: right;
    color: var(--text);
}

.project-body {
    padding: .5rem .5rem .5rem 0;
}

.project:nth-child(even) .project-body {
    padding: .5rem 0 .5rem .5rem;
}

.project-no {
    font-family: var(--mono);
    font-size: .72rem;
    color: var(--accent);
}

.project h3 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(1.9rem, 3.6vw, 2.7rem);
    line-height: 1.05;
    margin: .5rem 0 .9rem;
}

.project-body>p:not(.tags) {
    color: var(--text-dim);
}

.project-cta {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: 1.5rem;
    font-family: var(--mono);
    font-size: .8rem;
    color: var(--text);
}

.project-cta i {
    font-size: .75em;
    transition: transform .3s var(--ease);
}

.project:hover .project-cta {
    color: var(--accent);
}

.project:hover .project-cta i {
    transform: translateX(4px);
}

/* ---------- Toolkit ---------- */

.readout {
    font-family: var(--mono);
    font-size: .85rem;
    color: var(--text-dim);
    padding: .9rem 1.1rem;
    margin-bottom: 2rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--bg-sunk);
    min-height: 3.2rem;
}

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

#readout.lit {
    color: var(--text);
}

.stack-row {
    display: grid;
    grid-template-columns: 11rem minmax(0, 1fr);
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--line);
}

.stack-row:last-child {
    border-bottom: 1px solid var(--line);
}

.stack-row h3 {
    font-family: var(--mono);
    font-weight: 400;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--accent);
    padding-top: .5rem;
}

.tiles {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    perspective: 600px;
}

.tile {
    --rx: 0deg;
    --ry: 0deg;
    width: 6.4rem;
    height: 6.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text-dim);
    font: inherit;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transform: rotateX(var(--rx)) rotateY(var(--ry));
    transition: transform .35s var(--ease), border-color .25s, color .25s, background .25s;
}

/* soft brand-colored glow that follows the cursor */
.tile::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--brand) 22%, transparent), transparent 65%);
    opacity: 0;
    transition: opacity .3s;
}

.tile i {
    font-size: 1.9rem;
    line-height: 1;
    position: relative;
    transition: transform .4s var(--ease), color .25s;
}

.tile > span {
    font-family: var(--mono);
    font-size: .66rem;
    color: var(--text-dim);
    position: relative;
    white-space: nowrap;
}

.tile:hover,
.tile:focus-visible,
.tile.on {
    border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
    color: var(--brand);
    outline: none;
}

.tile:hover::before,
.tile:focus-visible::before,
.tile.on::before {
    opacity: 1;
}

.tile:hover i,
.tile:focus-visible i {
    transform: translateY(-3px) scale(1.12);
}

.tile:hover > span,
.tile.on > span {
    color: var(--text);
}

.tile.pop i {
    animation: pop .5s var(--ease);
}

@keyframes pop {
    40% {
        transform: scale(1.35) rotate(-8deg);
    }
}

/* Logos missing from devicon (Hugging Face, LangChain) are drawn as masks in currentColor */
.icon-mask {
    display: inline-block;
    width: 1.9rem;
    height: 1.9rem;
    background: currentColor;
    -webkit-mask: var(--icon) center / contain no-repeat;
    mask: var(--icon) center / contain no-repeat;
}

/* ---------- Letter spread on hover ---------- */

.spread-ch {
    display: inline-block;
    transition: transform .28s cubic-bezier(.2, .8, .3, 1), color .28s;
}

.spread-w {
    display: inline-block;
    white-space: nowrap;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- Education / activities ---------- */

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
}

.split-title {
    font-family: var(--mono);
    font-weight: 400;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-faint);
    margin-bottom: 1rem;
}

.ledger li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 0;
    border-top: 1px solid var(--line);
}

.ledger li:last-child {
    border-bottom: 1px solid var(--line);
}

.ledger strong {
    display: block;
    font-family: var(--serif);
    font-weight: 400;
    font-size: 1.5rem;
    line-height: 1.2;
}

.ledger li > div > span {
    color: var(--text-dim);
    font-size: .92rem;
}

.ledger-side {
    flex-shrink: 0;
    text-align: right;
    font-family: var(--mono);
    font-size: .75rem;
    color: var(--text-faint);
    padding-top: .35rem;
}

.verify {
    color: var(--text-dim);
    border-bottom: 1px solid var(--line-strong);
    transition: color .2s, border-color .2s;
}

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

.ledger-side em {
    display: block;
    font-style: normal;
    color: var(--accent);
    margin-bottom: .2rem;
}

/* ---------- Contact ---------- */

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

.contact-big {
    font-family: var(--serif);
    font-size: clamp(2rem, 4.2vw, 3.2rem);
    line-height: 1.1;
    letter-spacing: -.01em;
    margin-bottom: 2rem;
}

.contact-big em {
    color: var(--accent);
}

.mail {
    display: inline-block;
    font-family: var(--mono);
    font-size: clamp(.9rem, 1.8vw, 1.1rem);
    border-bottom: 1px solid var(--accent);
    padding-bottom: 3px;
    margin-bottom: 2rem;
    word-break: break-all;
    transition: color .2s;
}

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

.contact-links li {
    margin-bottom: .6rem;
}

.contact-links a {
    font-family: var(--mono);
    font-size: .82rem;
    color: var(--text-dim);
    transition: color .2s;
    word-break: break-word;
}

.contact-links a i {
    width: 1.2rem;
    color: var(--text-faint);
}

.contact-links a:hover {
    color: var(--text);
}

.terminal {
    background: var(--bg-sunk);
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    padding: 0 1.5rem 1.5rem;
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin: 0 -1.5rem 1.25rem;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--line);
}

.terminal-bar > span {
    width: .65rem;
    height: .65rem;
    border-radius: 50%;
    background: var(--line-strong);
}

.terminal-bar p {
    margin-left: auto;
    font-family: var(--mono);
    font-size: .72rem;
    color: var(--text-faint);
}

.hp {
    position: absolute;
    left: -9999px;
}

.field {
    display: block;
    margin-bottom: 1.25rem;
}

.field > span {
    display: block;
    font-family: var(--mono);
    font-size: .78rem;
    color: var(--accent);
    margin-bottom: .35rem;
}

.field b {
    color: var(--text-faint);
    font-weight: 400;
    margin-left: .2rem;
}

.field input,
.field textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--line-strong);
    padding: .5rem 0;
    color: var(--text);
    font-family: var(--mono);
    font-size: .92rem;
    resize: vertical;
    transition: border-color .2s;
}

.field input::placeholder,
.field textarea::placeholder {
    color: var(--text-faint);
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-bottom-color: var(--accent);
}

.form-status {
    min-height: 1.4rem;
    margin-top: 1rem;
    font-family: var(--mono);
    font-size: .8rem;
    color: var(--text-dim);
}

.form-status.error {
    color: #f87171;
}

.terminal.sending button[type="submit"] {
    opacity: .6;
    pointer-events: none;
}

.form-done {
    padding: .5rem 0 .25rem;
    animation: rise .6s var(--ease) both;
}

.done-line {
    font-family: var(--mono);
    font-size: .85rem;
    margin-bottom: .4rem;
}

.done-line .caret,
.done-line .ok {
    color: var(--accent);
}

.done-line.dim {
    color: var(--text-dim);
}

.done-big {
    font-family: var(--serif);
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    line-height: 1.15;
    margin: 1.25rem 0 .75rem;
}

.done-big em {
    color: var(--accent);
}

.form-done .btn {
    margin-top: 1.25rem;
}

.terminal .btn {
    margin-top: .5rem;
}

/* ---------- Footer ---------- */

.footer {
    max-width: var(--max);
    margin: 0 auto;
    padding: 2rem var(--gutter) 2.5rem;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-family: var(--mono);
    font-size: .75rem;
    color: var(--text-faint);
}

.footer a:hover {
    color: var(--accent);
}

/* ---------- Scroll reveal ---------- */

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .9s var(--ease), transform .9s var(--ease);
}

.reveal.in {
    opacity: 1;
    transform: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
    .nav {
        position: fixed;
        inset: 4.4rem 0 auto 0;
        flex-direction: column;
        gap: 0;
        padding: .5rem var(--gutter) 1.5rem;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
        font-size: 1rem;
        max-height: calc(100svh - 4.4rem);
        overflow-y: auto;
        transform: translateY(-120%);
        transition: transform .4s var(--ease);
    }

    .nav.open {
        transform: none;
    }

    .nav a {
        padding: .9rem 0;
        border-bottom: 1px solid var(--line);
    }

    .nav-toggle {
        display: block;
    }

    .about,
    .contact-grid,
    .split {
        grid-template-columns: 1fr;
    }


    .project,
    .project:nth-child(even) {
        grid-template-columns: 1fr;
    }

    .project:nth-child(even) .project-media {
        order: 0;
    }

    .project-body,
    .project:nth-child(even) .project-body {
        padding: 0 .25rem .5rem;
    }

    .stack-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .focus {
        grid-template-columns: repeat(2, 1fr);
    }

    .robot-card {
        max-width: 34rem;
    }
}

@media (max-width: 640px) {
    .hero-meta {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .job {
        grid-template-columns: 1fr;
        gap: .5rem;
    }

    .job-when {
        padding-top: 0;
    }

    .facts {
        grid-template-columns: 1fr;
    }

    .focus {
        grid-template-columns: 1fr;
    }

    .bar-row {
        grid-template-columns: 4.2rem minmax(0, 1fr) 3.8rem;
        gap: .6rem;
        font-size: .72rem;
    }

    .tiles {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .tile {
        width: 100%;
    }

    .head-link {
        margin-left: 0;
        width: 100%;
    }

    .ledger li {
        flex-direction: column;
        gap: .4rem;
    }

    .ledger-side {
        text-align: left;
        padding-top: 0;
    }

    .verify {
    color: var(--text-dim);
    border-bottom: 1px solid var(--line-strong);
    transition: color .2s, border-color .2s;
}

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

.ledger-side em {
        display: inline;
        margin-right: .75rem;
    }
}

/* Touch screens: bigger tap targets and press feedback in place of hover */
@media (pointer: coarse) {

    .hero-meta a,
    .verify,
    .contact-links a,
    .footer a,
    .head-link,
    .mail {
        display: inline-block;
        padding-block: .7rem;
    }

    .contact-links li {
        margin-bottom: 0;
    }

    .project:active {
        transform: translateY(-2px);
        border-color: var(--line-strong);
    }

    .btn:active {
        transform: scale(.97);
    }

    .tile:active i {
        transform: scale(1.12);
    }
}

@media (max-width: 640px) {

    /* 16px stops iOS Safari from zooming into the form */
    .field input,
    .field textarea {
        font-size: 16px;
    }

    .tile > span {
        font-size: .74rem;
    }

    .tags > span {
        font-size: .76rem;
    }

    .hero-meta li > span:not(.spread-w),
    .chart-title,
    .chart-note,
    .project-no,
    .split-title,
    .stack-row h3 {
        font-size: .76rem;
    }

    .bar-row {
        font-size: .76rem;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    .bar-fill {
        width: var(--v);
    }
}
