/* Layout concept: a wheel that spins up, slows down and stops on a reward. The wheel's six colours are the only saturated colour on the site; everything else is ink and cool paper. */
:root {
  --bg: #FFFFFF;
  --surface: #FAFAF9;
  --ink: #0F1B2D;
  --muted: #4F6073;
  --line: #E6E8EB;
  --accent: #2F5BEA;
  --accent-soft: #DDE6FC;
  --c1: #FF5A1F;
  --c2: #F5B82E;
  --c3: #14A39A;
  --c4: #2F5BEA;
  --c5: #7A55E0;
  --c6: #1DB36B;
  --font-display: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0C1521;
    --surface: #131F2E;
    --ink: #E8EEF5;
    --muted: #94A5B8;
    --line: #25354A;
    --accent: #8DB2FF;
    --accent-soft: #1B2B47;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0C1521;
  --surface: #131F2E;
  --ink: #E8EEF5;
  --muted: #94A5B8;
  --line: #25354A;
  --accent: #8DB2FF;
  --accent-soft: #1B2B47;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  padding-inline: 20px;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
.wrap { max-width: 1120px; margin-inline: auto; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.08; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(40px, 6.2vw, 76px); font-weight: 800; }
h2 { font-size: clamp(26px, 3.2vw, 38px); }
h3 { font-size: 20px; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.lede { font-size: clamp(18px, 2vw, 22px); color: var(--muted); max-width: 52ch; }

/* Nav */
nav.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); margin-inline: -20px; padding-inline: 20px; border-bottom: 1px solid var(--line); }
nav.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; padding-block: 12px; }
nav.top .brand { font-family: var(--font-display); font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
nav.top ul { display: flex; flex-wrap: wrap; gap: 4px 22px; list-style: none; padding: 0; margin: 0; font-size: 15px; }
nav.top ul a { color: var(--muted); text-decoration: none; }
nav.top ul a:hover { color: var(--ink); }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 40px 56px; align-items: center; padding-block: 56px 72px; }
@media (max-width: 860px) { .hero { grid-template-columns: minmax(0, 1fr); padding-block: 36px 48px; } }
.hero .eyebrow { margin-bottom: 18px; }
.hero h1 { margin-bottom: 22px; }
.hero .links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; padding: 7px 14px; border-radius: 999px; font-size: 15px; }
.pill:hover { border-color: var(--ink); }
.pill.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.who { display: flex; align-items: center; gap: 14px; margin-top: 30px; color: var(--muted); font-size: 15px; }
.who img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: 50% 18%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }

/* Wheel */
.wheelbox { display: grid; gap: 16px; justify-items: center; }
#wheel { width: min(100%, 440px); height: auto; display: block; touch-action: manipulation; cursor: pointer; }
.stages { display: flex; gap: 8px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.stages span { padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; }
.stages span.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.stream { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; min-height: 34px; max-width: 440px; }
.tok { font-family: var(--font-mono); font-size: 13px; line-height: 1; border: 1.5px solid var(--ink); border-radius: 7px; padding: 6px 9px; color: var(--ink); }
.tok.gold { background: #F5B82E; color: #0F1B2D; border-color: #0F1B2D; }
.tok.ok { background: #1DB36B; border-color: #1DB36B; color: #fff; font-weight: 500; }
.spin { font: inherit; font-weight: 600; background: var(--ink); color: var(--bg); border: 0; border-radius: 999px; padding: 10px 26px; cursor: pointer; }
.spin:disabled { opacity: 0.55; cursor: progress; }
.reward { width: 100%; max-width: 440px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 16px 18px; display: grid; gap: 6px; min-height: 132px; }
.reward .tagline { display: flex; align-items: center; gap: 8px; }
.reward .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c4); flex: none; }
.reward h3 { font-size: 19px; }
.reward p { color: var(--muted); font-size: 15px; }

/* Sections */
section { padding-block: 56px; border-top: 1px solid var(--line); }
section > .wrap > header { display: grid; gap: 10px; margin-bottom: 28px; }
.now { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.now div { border-top: 3px solid var(--c1); padding-top: 12px; }
.now div:nth-child(2) { border-color: var(--c3); }
.now div:nth-child(3) { border-color: var(--c5); }
.now h3 { margin-bottom: 6px; }
.now p { color: var(--muted); font-size: 16px; }

.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 20px; }
.project { display: grid; gap: 10px; align-content: start; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 22px; text-decoration: none; color: var(--ink); }
.project:hover { border-color: var(--ink); }
.project .chip { justify-self: start; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 8px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); }
.project p { color: var(--muted); font-size: 15.5px; }
.project .go { font-weight: 600; color: var(--accent); margin-top: 4px; }

.pubs { list-style: none; padding: 0; margin: 0; display: grid; }
.pub { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 18px; padding-block: 18px; border-bottom: 1px solid var(--line); }
@media (max-width: 560px) { .pub { grid-template-columns: minmax(0, 1fr); } }
.pub .yr { font-family: var(--font-mono); color: var(--muted); font-size: 14px; padding-top: 3px; }
.pub h3 { font-size: 18px; line-height: 1.3; letter-spacing: -0.005em; margin-bottom: 4px; }
.pub .au { color: var(--muted); font-size: 15px; }
.pub .au b { color: var(--ink); font-weight: 600; }
.pub .ven { font-size: 15px; margin-top: 4px; }
.pub .lk { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: 14.5px; }
.pub .cite { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.scholar { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; color: var(--muted); font-size: 15px; }

.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.video { display: grid; gap: 8px; text-decoration: none; color: var(--ink); }
.video .thumb { aspect-ratio: 16 / 9; background: var(--ink); border-radius: 8px; overflow: hidden; position: relative; }
.video .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video .thumb::after { content: ""; position: absolute; left: 50%; top: 50%; width: 52px; height: 36px; margin: -18px 0 0 -26px; border-radius: 10px; background: var(--c1); }
.video .thumb::before { content: ""; position: absolute; left: 50%; top: 50%; margin: -8px 0 0 -4px; border-left: 14px solid #fff; border-top: 8px solid transparent; border-bottom: 8px solid transparent; z-index: 1; }
.video h3 { font-size: 16px; }
.video span { color: var(--muted); font-size: 14px; }
.upnext { border: 1px dashed var(--line); border-radius: 8px; padding: 18px; color: var(--muted); font-size: 15px; display: grid; gap: 8px; align-content: center; }

.path { list-style: none; padding: 0; margin: 0; display: grid; }
.path li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 24px; padding-block: 16px; border-bottom: 1px solid var(--line); }
@media (max-width: 640px) { .path li { grid-template-columns: minmax(0, 1fr); } }
.path .when { font-family: var(--font-mono); font-size: 13.5px; color: var(--muted); padding-top: 3px; }
.path h3 { font-size: 18px; }
.recog { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 40px; }
.recog li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 16px; padding-block: 12px; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.recog .yr { font-family: var(--font-mono); font-size: 13.5px; color: var(--muted); padding-top: 2px; }
.path p { color: var(--muted); font-size: 15.5px; margin-top: 2px; }

.contact { display: flex; flex-wrap: wrap; gap: 10px; }
footer { padding-block: 40px 64px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

/* Project pages */
.proj-hero { padding-block: 56px 36px; display: grid; gap: 18px; }
.status { justify-self: start; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; color: var(--muted); }
.status i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c6); margin-right: 8px; }
.status.early i { background: var(--c2); }
.prose { max-width: 66ch; display: grid; gap: 16px; }
.prose h2 { margin-top: 20px; }
.prose ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 20px; margin-block: 12px; }
.fact { border-top: 3px solid var(--c4); padding-top: 10px; }
.fact b { display: block; font-family: var(--font-display); font-size: 34px; letter-spacing: -0.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.fact span { color: var(--muted); font-size: 14.5px; }
.fig { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 18px; overflow-x: auto; }
.fig svg { display: block; width: 100%; min-width: 560px; height: auto; }
.fig figcaption { color: var(--muted); font-size: 14px; margin-top: 8px; }
.note { border: 1px solid var(--line); border-left: 4px solid var(--c2); background: var(--surface); padding: 12px 16px; border-radius: 6px; color: var(--muted); font-size: 15.5px; max-width: 66ch; }
svg text { font-family: var(--font-body); fill: var(--ink); }
svg .mu { fill: var(--muted); }
svg .ln { stroke: var(--ink); fill: none; }
svg .bx { fill: var(--surface); stroke: var(--ink); }

/* Paper pages */
.fig img { display: block; width: 100%; height: auto; border-radius: 6px; background: #fff; }
.fig.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.fig.pair figcaption { grid-column: 1 / -1; }
.paper-meta { display: flex; flex-wrap: wrap; gap: 10px; }
.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.tbl table { border-collapse: collapse; width: 100%; min-width: 620px; font-size: 15px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 9px 12px; text-align: right; border-bottom: 1px solid var(--line); }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl thead th { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.tbl tr.ours td { font-weight: 600; background: var(--accent-soft); }
.tbl caption { caption-side: bottom; text-align: left; padding: 10px 12px; color: var(--muted); font-size: 14px; }
.featured { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 20px; }
.featured .project img { width: 100%; height: auto; border-radius: 6px; background: #fff; border: 1px solid var(--line); }
.statement { max-width: 70ch; display: grid; gap: 16px; }
.statement h2 { margin-top: 18px; }
.featured .project img { height: 220px; object-fit: contain; }

/* Wheel surprise */
.wheelbox { position: relative; }
.stream:empty { display: none; }
.burst { position: absolute; left: 50%; top: 42%; width: 0; height: 0; pointer-events: none; z-index: 5; }
.burst span { position: absolute; left: 0; top: 0; font-size: 24px; transform: translate(-50%, -50%); animation: fly 1.6s cubic-bezier(.2,.7,.3,1) forwards; }
.burst-thanks { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%) scale(.4); font-family: var(--font-display); font-weight: 800; font-size: 44px; white-space: nowrap; color: var(--ink); background: #F5B82E; border: 3px solid #0F1B2D; border-radius: 14px; padding: 6px 18px; color: #0F1B2D; animation: pop 2.4s ease forwards; }
@keyframes fly { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.3); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.1) rotate(40deg); } }
@keyframes pop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); } 18% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); } 30% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -70%) scale(1); } }
.reward .visits { font-size: 13px; color: var(--accent); margin-top: 4px; }
.pub h3 a { color: var(--accent); text-decoration: none; }
.pub h3 a:hover { text-decoration: underline; }
.reward .landed { font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.reward .fact-text { color: var(--ink); }

.pill svg, .pill i { width: 1.1em; height: 1.1em; font-size: 17px; }
.pill .fa-youtube { color: #FF0000; } .pill .fa-linkedin { color: #0A66C2; } .pill .fa-google-scholar { color: #4285F4; }
.pill.primary .fa-google-scholar { color: #8DB2FF; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Lighter, quieter type (white background, Karpathy-style) */
body { font-size: 16px; line-height: 1.65; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
h1 { font-size: clamp(30px, 3.6vw, 42px); font-weight: 600; }
h2 { font-size: clamp(22px, 2.2vw, 27px); }
h3 { font-size: 17px; letter-spacing: -0.005em; }
.lede { font-size: clamp(16px, 1.5vw, 18px); max-width: 60ch; }
.hero { padding-block: 48px 56px; }
.hero h1 { margin-bottom: 16px; }
.proj-hero h1 { font-size: clamp(28px, 3.2vw, 38px); }
.pub h3 { font-size: 16.5px; font-weight: 600; }
.fact b { font-size: 24px; font-weight: 600; }
.poster .big { font-size: 30px; font-weight: 700; }
.poster .band h2 { font-size: clamp(20px, 2.4vw, 26px); }
nav.top .brand { font-weight: 600; }
.statement p, .prose p { font-family: "Source Serif 4", Georgia, serif; font-size: 17.5px; line-height: 1.7; }
section { padding-block: 48px; }

/* One line of profile links at the top of the hero */
.toplinks { display: flex; flex-wrap: wrap; gap: 6px 11px; margin: 14px 0 22px; font-size: 14.5px; }
.toplinks .lk-i { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); text-decoration: none; padding: 2px 0; border-bottom: 1px solid transparent; }
.toplinks .lk-i:hover { border-bottom-color: var(--ink); }
.toplinks svg, .toplinks i { width: 1.05em; height: 1.05em; color: var(--muted); }
.toplinks .lk-i:hover svg { color: var(--ink); }
.toplinks .fa-google-scholar { color: #4285F4; } .toplinks .fa-linkedin { color: #0A66C2; }
/* Projects: first one wide, then two side by side */
.projects.proj-1-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.projects.proj-1-2 > :first-child { grid-column: 1 / -1; }
@media (max-width: 700px) { .projects.proj-1-2 { grid-template-columns: minmax(0, 1fr); } }

/* Hero: internship line and profile card */
.seeking { margin-top: 14px; color: #C62828; font-weight: 600; font-size: 16.5px; }
.profile { display: flex; gap: 18px; align-items: center; margin-top: 28px; }
.profile img { width: 104px; height: 104px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; box-shadow: 0 0 0 1px var(--line); flex: none; }
.groups { margin: 0; display: grid; gap: 7px; }
.groups > div { display: grid; grid-template-columns: 138px minmax(0, 1fr); align-items: center; gap: 8px; }
.groups dt { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.groups dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 15px; }
.groups a { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 7px; }
.groups a:hover { color: var(--accent); }
.groups svg, .groups i { width: 1.15em; height: 1.15em; font-size: 18px; }
.groups .fa-linkedin { color: #0A66C2; } .groups .fa-google-scholar { color: #4285F4; } .groups .fa-envelope { color: #EA4335; }
@media (max-width: 560px) { .profile { flex-direction: column; align-items: flex-start; } .groups > div { grid-template-columns: 112px minmax(0, 1fr); gap: 4px; } .groups dt { font-size: 10px; letter-spacing: .03em; } .groups dd { font-size: 14px; gap: 4px 9px; } }
.groups .fa-kaggle { color: #20BEFF; }
.groups a.mail { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.groups .fa-envelope { color: var(--accent) !important; }
.profile + .seeking { margin-top: 22px; }
.groups > div { min-height: 26px; }
.groups .fa-youtube { color: #FF0000; }
.groups svg.fa-kaggle { width: 0.7em; height: 0.95em; }
/* One card per row, with space between */
.featured { grid-template-columns: minmax(0, 1fr) !important; gap: 28px; }
.featured .project { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); grid-template-areas: "img chip" "img h" "img p" "img go"; column-gap: 28px; align-content: center; padding: 24px; }
.featured .project img { grid-area: img; align-self: center; height: 200px; }
.featured .project .chip { grid-area: chip; }
.featured .project h3 { grid-area: h; }
.featured .project p { grid-area: p; }
.featured .project .go { grid-area: go; }
@media (max-width: 760px) { .featured .project { grid-template-columns: minmax(0, 1fr); grid-template-areas: "chip" "img" "h" "p" "go"; } }
.projects.proj-1-2 { grid-template-columns: minmax(0, 1fr) !important; gap: 20px; }
.hero h1 { font-size: clamp(26px, 2.75vw, 35px); }
/* Keep the page still while the wheel plays: reserve space for the words, button and surprise card */
.hero { align-items: start; }
.stream, .stream:empty { display: flex; min-height: 78px; align-content: flex-start; }
.spin[hidden] { display: inline-block !important; visibility: hidden; }
.reward { min-height: 150px; }
/* Smaller wheel, and a calm thank-you */
#wheel { width: min(100%, 330px); }
.wheelbox { gap: 12px; }
.stream, .stream:empty { min-height: 64px; max-width: 380px; }
.tok { font-size: 12px; padding: 5px 8px; }
.reward { max-width: 380px; min-height: 128px; padding: 14px 16px; }
.burst span { font-size: 16px; opacity: 0; animation: drift 1.8s ease-out forwards; }
@keyframes drift { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.6); } 25% { opacity: .9; } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1); } }
.burst-thanks { font-family: var(--font-body); font-weight: 600; font-size: 26px; color: #0F1B2D; background: rgba(255,255,255,.94); border: 0; border-radius: 999px; padding: 8px 22px; box-shadow: 0 8px 30px rgba(15,27,45,.18); animation: soft 2.1s ease forwards; }
@keyframes soft { 0% { opacity: 0; transform: translate(-50%, -40%); } 20% { opacity: 1; transform: translate(-50%, -50%); } 78% { opacity: 1; transform: translate(-50%, -50%); } 100% { opacity: 0; transform: translate(-50%, -56%); } }
#wheel { width: min(100%, 285px); }
.wheelbox { gap: 10px; }
.spin { padding: 8px 20px; font-size: 14.5px; }
.reward { min-height: 112px; padding: 12px 16px; gap: 4px; }
.reward h3 { font-size: 16px; }
.reward p { font-size: 14px; }
.reward { min-height: 100px; }
.stream, .stream:empty { min-height: 58px; }
.tok-br { flex-basis: 100%; height: 0; }
/* Compact surprise box */
.reward { max-width: 400px; min-height: 0; padding: 10px 14px; gap: 2px; border-radius: 8px; }
.reward .tagline { font-size: 10.5px; }
.reward h3 { font-size: 14.5px; line-height: 1.3; }
.reward p { font-size: 13.5px; line-height: 1.45; }
.reward { align-content: start; }
.reward .tagline { margin-bottom: 2px; }
.reward h3, .reward p, .stream { text-wrap: pretty; }

/* thank-you line streams left to right like LLM output, not from the centre */
.stream, .stream:empty { display: flex; justify-content: flex-start; align-content: flex-start; width: 100%; max-width: 340px; min-height: 0; }
.stream.typing::after { content: ""; width: 7px; height: 13px; align-self: center; background: var(--ink); border-radius: 1px; animation: caret .8s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
/* smaller surprise box, button after it */
.reward { max-width: 340px; padding: 9px 12px; }
.reward .tagline { font-size: 10px; }
.reward h3 { font-size: 13.5px; }
.reward p { font-size: 12.5px; line-height: 1.45; }
.wheelbox .spin { margin-top: 2px; font-size: 13.5px; padding: 7px 18px; }
/* the thank-you badge stays for a while */
.burst-thanks { animation: soft 4.6s ease forwards; }
@keyframes soft { 0% { opacity: 0; transform: translate(-50%, -40%); } 8% { opacity: 1; transform: translate(-50%, -50%); } 88% { opacity: 1; transform: translate(-50%, -50%); } 100% { opacity: 0; transform: translate(-50%, -56%); } }
footer .quote em { font-family: var(--font-serif, "Source Serif 4", serif); }
.stream .tok { font-size: 11.5px; padding: 2px 6px; }
.stream { gap: 5px; }

/* the card reads like an agent answering */
.reward .tagline.agent { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .02em; text-transform: none; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.reward .pulse { width: 7px; height: 7px; border-radius: 50%; background: #1DB36B; flex: none; animation: pulse 1s ease-in-out infinite; }
.reward .pulse.done { animation: none; }
@keyframes pulse { 50% { opacity: .25; } }

/* each word fades in gently */
.stream .tok { animation: tokin .45s ease both; }
@keyframes tokin { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* links in the path read as links */
.path h3 a, .path p a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.path h3 a:hover, .path p a:hover { text-decoration-thickness: 2px; }
.reward .tagline.agent { font-family: var(--font-body); font-size: 11.5px; font-weight: 500; }

/* the wheel is clickable */
#wheel { cursor: pointer; }
/* ---------- Chinni ---------- */
.chinni { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: grid; justify-items: end; gap: 10px; font-family: var(--font-body); }
.chinni [hidden] { display: none !important; }
.ch-fab { display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; background: #fff; color: var(--ink); border-radius: 999px; padding: 6px 14px 6px 6px; box-shadow: 0 6px 24px rgba(15,27,45,.16), 0 0 0 1px rgba(15,27,45,.06); font: 600 14px/1 var(--font-body); }
.ch-av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #4C4AA6 50%, #F2AE57 50%); color: #fff; font-size: 14px; flex: none; }
.ch-fab:hover { box-shadow: 0 8px 28px rgba(15,27,45,.22), 0 0 0 1px rgba(15,27,45,.08); }
.ch-bubble { position: relative; max-width: 260px; background: #fff; border-radius: 14px 14px 4px 14px; padding: 12px 14px; box-shadow: 0 8px 30px rgba(15,27,45,.16), 0 0 0 1px rgba(15,27,45,.06); animation: chin .35s ease both; }
.ch-bubble p { font-size: 14px; line-height: 1.45; color: var(--ink); cursor: pointer; padding-right: 14px; }
.ch-yes { margin-top: 8px; border: 0; cursor: pointer; background: var(--ink); color: #fff; border-radius: 999px; padding: 6px 14px; font: 600 13px/1 var(--font-body); }
.ch-x, .ch-close { position: absolute; top: 6px; right: 8px; border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 18px; line-height: 1; padding: 2px 4px; }
.ch-panel { position: relative; width: 320px; background: #fff; border-radius: 16px; box-shadow: 0 12px 40px rgba(15,27,45,.18), 0 0 0 1px rgba(15,27,45,.06); overflow: hidden; animation: chin .3s ease both; }
.ch-panel .ch-head { display: flex; align-items: center; gap: 10px; padding: 12px 40px 12px 14px; border-bottom: 1px solid var(--line); }
.ch-panel .ch-head b { display: block; font-size: 14px; }
.ch-panel .ch-head small { display: block; font-size: 12px; color: var(--muted); }
.ch-close { top: 12px; right: 10px; }
.ch-body { padding: 14px; min-height: 140px; display: grid; gap: 4px; align-content: start; }
.ch-label { font-size: 11.5px; font-weight: 600; color: var(--accent); }
.ch-body h3 { font-size: 15px; line-height: 1.3; }
.ch-text, .ch-hi { font-size: 13.5px; line-height: 1.5; color: var(--ink); text-wrap: pretty; }
.ch-hi { color: var(--muted); }
.ch-panel .ch-foot { padding: 0 14px 14px; }
.ch-next { border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--ink); border-radius: 999px; padding: 7px 14px; font: 600 13px/1 var(--font-body); }
.ch-next:hover { border-color: var(--ink); }
@keyframes chin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) {
  .chinni { right: 12px; bottom: 12px; }
  .ch-fab .ch-name { display: none; }
  .ch-fab { padding: 5px; }
  .chinni.open { left: 0; right: 0; bottom: 0; justify-items: stretch; }
  .chinni.open .ch-fab { display: none; }
  .ch-panel { width: auto; border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom); }
}

/* LinkedIn, X and YouTube sit together on one line */
.contact-row { display: flex; flex-wrap: nowrap; gap: 10px; flex-basis: 100%; }
@media (max-width: 760px) { .contact-row { flex-wrap: wrap; } }

/* email, LinkedIn, X and YouTube on one line */
@media (min-width: 1000px) { .contact { flex-wrap: nowrap; } }
/* Chinni follows light and dark mode */
.ch-fab, .ch-bubble, .ch-panel, .ch-next { background: var(--bg); color: var(--ink); }
.ch-panel { box-shadow: 0 12px 40px rgba(0,0,0,.28), 0 0 0 1px var(--line); }
.ch-fab { box-shadow: 0 6px 24px rgba(0,0,0,.22), 0 0 0 1px var(--line); }
.ch-panel .ch-head b, .ch-body h3, .ch-text { color: var(--ink); }
.ch-yes { background: var(--ink); color: var(--bg); }
