/* Akash Dasarraju: a résumé with a campus underneath it. Cool paper and deep green ink for reading; UT Dallas at
   night for the map, where the places you can visit glow orange. */
:root {
  --paper: #edf0ea;
  --ink: #13221b;
  --ink-2: #3a4a42;
  --muted: #56655d;
  --rule: #cbd4cd;
  --orange: #e0650f;
  --orange-ink: #b04b04;
  --night: #0b1613;
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --sans: var(--display);
  --mono: var(--display);   /* one face everywhere; labels and readouts keep their tracking and tabular figures */
  --s-orange: #ff8a3d; --s-dim: #8fa39a;
  --brief-w: min(370px, 30vw);           /* the tour's explanation panel; the HUD and the flat screen sit beside it */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #17241f; --ink: #e4ece6; --ink-2: #bac7bf; --muted: #93a299; --rule: #3f584c; --orange: #ff8a3d; --orange-ink: #ff9d5c;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] { --paper: #17241f; --ink: #e4ece6; --ink-2: #bac7bf; --muted: #93a299; --rule: #3f584c; --orange: #ff8a3d; --orange-ink: #ff9d5c; color-scheme: dark; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--sans); font-variant-numeric: tabular-nums; }
[id] { scroll-margin-top: 72px; }

/* ---------- the bar across the top, once you've scrolled past the hero ---------- */
.top { position: fixed; z-index: 6; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 18px; padding: 10px 32px; font-size: 14px; font-weight: 600; visibility: hidden;
  background: color-mix(in srgb, var(--paper) 82%, transparent); border-bottom: 1px solid var(--rule); backdrop-filter: blur(10px);
  transform: translateY(-100%); transition: transform 0.35s cubic-bezier(.2, .8, .2, 1), visibility 0s 0.35s; }
.top.show { transform: none; visibility: visible; transition: transform 0.35s cubic-bezier(.2, .8, .2, 1); }
.top-links { display: flex; gap: 22px; }
.top .top-cv { padding: 6px 12px; border: 1.5px solid var(--ink); border-radius: 7px; color: var(--ink); }
.top .top-cv:hover { background: var(--ink); color: var(--paper); }
.top .top-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-left: -8px; color: var(--ink); }
.top .top-icon svg { width: 20px; height: 20px; }
/* light/dark: the icon shows where you'd go (a moon on the light page, a sun on the dark one) */
.theme-btn { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px; background: none; color: var(--ink); cursor: pointer; }
.theme-btn svg { width: 20px; height: 20px; }
.theme-btn:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; } :root[data-theme="dark"] .theme-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-btn .i-sun { display: block; } :root:not([data-theme="light"]) .theme-btn .i-moon { display: none; } }
.hero-theme { position: absolute; top: 14px; right: 18px; z-index: 2; }
.top a { text-decoration: none; color: var(--ink-2); }
.top a:hover { color: var(--orange-ink); }
.top .top-name { margin-right: auto; color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
body.touring .top { display: none; }
html:not(.can-peek) .hover-only { display: none; }      /* set by main.js where links can be hovered for a peek */
body.touring { overflow: hidden; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 2px; }

/* ---------- hero: name on the left, campus at night on the right ---------- */
/* the intro (src/boot.js): the page waits under a night cover, the hero's entrance held until it's gone */
html.intro-on body { overflow: hidden; }
html.intro-on body::after { content: ""; position: fixed; inset: 0; z-index: 40; background: #050806; }
html.intro-on .hero, html.intro-on .hero *, html.intro-on .hero *::before, html.intro-on .hero *::after { animation-play-state: paused !important; }
.boot { position: fixed; inset: 0; z-index: 41; display: block; width: 100%; height: 100%; cursor: pointer; transition: opacity 0.4s; }
.boot.out { opacity: 0; pointer-events: none; }
/* skipping the film: a real button, in reach of a thumb, from the first frame */
.skip-intro { position: fixed; right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); z-index: 42; min-height: 44px; padding: 0 18px; border: 1px solid rgba(255, 244, 232, 0.45); border-radius: 10px; background: rgba(4, 6, 5, 0.72); color: #fff4e8; font: 600 15px/1 var(--display); cursor: pointer; transition: opacity 0.4s, background 0.15s, border-color 0.15s; }
.skip-intro:hover { background: rgba(4, 6, 5, 0.92); border-color: #fff4e8; }
.skip-intro.out { opacity: 0; pointer-events: none; }
/* the film is opt-in: a quiet button under the intro paragraph */
.film-btn { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; margin: 4px 0 2px; padding: 0 16px 0 13px; border: 1px solid var(--rule); border-radius: 10px; background: transparent; color: var(--ink); font: 600 15px/1 var(--display); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.film-btn:hover { border-color: var(--ink-2); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.film-btn svg { width: 11px; height: 13px; }
.film-btn[hidden] { display: none; }
.hero { position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 56px; align-items: center;
  max-width: 1240px; margin: 0 auto; padding: 48px 32px 40px; min-height: min(80vh, 720px);
}
.hero h1 { margin: 0 0 28px; font: 800 clamp(56px, 8.4vw, 118px)/0.86 var(--display); font-variation-settings: "opsz" 96; letter-spacing: -0.045em; }
.hero h1 span { display: block; }
.hero h1 span + span { margin-left: 0.42em; }
.intro { margin: 0 0 18px; max-width: 32em; font-size: clamp(18px, 1.5vw, 20px); line-height: 1.55; color: var(--ink-2); }
.how { margin: 0 0 28px; max-width: 34em; font-size: 15px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.how svg { width: 13px; height: 16px; flex: none; color: var(--orange); }
.skip { position: absolute; z-index: 30; left: 16px; top: -60px; padding: 10px 14px; border-radius: 8px; background: var(--ink); color: var(--paper); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.ask { margin: 0 0 18px; max-width: 26em; font: 600 clamp(19px, 1.7vw, 23px)/1.35 var(--display); letter-spacing: -0.01em; color: var(--ink); text-wrap: balance; }
.contact { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 26px; }
.icon-link { display: grid; place-items: center; width: 44px; height: 44px; border: 1.5px solid var(--rule); border-radius: 10px; color: var(--ink); transition: border-color 0.15s, color 0.15s, background 0.15s; }
.icon-link svg { width: 21px; height: 21px; }
.icon-link:hover, .icon-link:focus-visible { border-color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.cv-link { display: inline-flex; align-items: center; gap: 8px; height: 44px; margin-left: 4px; padding: 0 16px 0 13px; border-radius: 10px; background: var(--ink); color: var(--paper); font-weight: 600; font-size: 15px; text-decoration: none; transition: background 0.15s; }
.cv-link svg { width: 18px; height: 18px; }
.cv-link:hover, .cv-link:focus-visible { background: color-mix(in srgb, var(--ink) 82%, var(--paper)); }

/* the night plate */
.plan {
  position: relative; margin: 0; aspect-ratio: 1; max-height: 72vh; justify-self: center; width: 100%;
  background: radial-gradient(70% 70% at 50% 48%, #13241f, var(--night) 72%); border-radius: 28px;
  box-shadow: inset 0 0 0 1px #1d302a, 0 30px 60px -30px rgba(9, 22, 18, 0.55);
  animation: plateIn 0.7s cubic-bezier(.2, .8, .2, 1) both; transform-style: preserve-3d; will-change: transform;
}
.plan-art { position: absolute; inset: 0; width: 100%; height: 100%;
  -webkit-mask-image: radial-gradient(closest-side, #000 70%, transparent); mask-image: radial-gradient(closest-side, #000 70%, transparent); }
.plan-roads { fill: none; stroke: #1f3a32; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.plan-lit { fill: url(#lit); animation: fadeIn 1s 1.3s both; }
.plan-buildings { fill: none; stroke: #4b8373; stroke-width: 1; stroke-linejoin: round; stroke-dasharray: 1; animation: draw 1.8s 0.3s cubic-bezier(.4, 0, .2, 1) both; }
.plan-hot { fill: rgba(255, 122, 34, 0.32); stroke: #ff8a3d; stroke-width: 1.8; stroke-linejoin: round; stroke-dasharray: 1; filter: drop-shadow(0 0 6px rgba(255, 122, 34, 0.9));
  animation: draw 1s 1.5s ease-out both, glow 3.2s 2.6s ease-in-out infinite; }
.plan-leaders { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; animation: fadeIn 0.5s 2.1s both; }
.plan-leaders path { fill: none; stroke: #ff8a3d; stroke-width: 1.6; }
.plan-leaders circle { fill: #ff8a3d; stroke: var(--night); stroke-width: 3; }
.plan figcaption { position: absolute; left: 26px; bottom: 20px; font-size: 13px; font-style: italic; color: #6f8f84; }
.plan figcaption b { font-weight: 500; font-style: normal; color: #9fb8ad; }
/* a sweep across the plate now and then, like the scan in the tour */
.plan::after { content: ""; position: absolute; left: 10%; right: 10%; top: 2%; height: 2px; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 138, 61, 0.6), transparent); box-shadow: 0 0 14px rgba(255, 138, 61, 0.7); animation: sweep 9s cubic-bezier(.45, 0, .55, 1) 4s infinite; }
@keyframes sweep { 0% { top: 2%; opacity: 0; } 6% { opacity: 1; } 52% { top: 97%; opacity: 1; } 58%, 100% { top: 97%; opacity: 0; } }
/* hovering a link on the page lights its building and its pin */
.plan-hot.lit { fill: rgba(255, 138, 61, 0.7); stroke-width: 2.6; filter: drop-shadow(0 0 16px rgba(255, 138, 61, 1)); animation: draw 1s 1.5s ease-out both; }
.pin.lit { background: #ff8a3d; color: #1a0b02; }
.pin.lit small { color: #4a2006; }
.pin {
  position: absolute; left: calc(var(--x) / 1000 * 100%); top: calc(var(--y) / 1000 * 100%); transform: translate(0, -50%);
  padding: 7px 13px 8px; background: rgba(9, 20, 17, 0.88); border: 1.5px solid #ff8a3d; border-radius: 8px;
  font: 600 15px/1.2 var(--sans); color: #f6f1ea; text-decoration: none; white-space: nowrap;
  box-shadow: 0 0 18px -4px rgba(255, 122, 34, 0.6); transition: background 0.15s, color 0.15s;
  animation: pinIn 0.45s calc(2.2s + var(--d) * 0.12s) cubic-bezier(.2, .9, .3, 1.3) both;
}
.pin small { display: block; font-size: 12px; font-weight: 500; color: var(--s-dim); }
.pin.below { transform: translate(-50%, 0); }
.pin:hover, .pin:focus-visible { background: #ff8a3d; color: #1a0b02; }
.pin:hover small, .pin:focus-visible small { color: #4a2006; }
@keyframes plateIn { from { opacity: 0; transform: scale(0.97); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes glow { 50% { filter: drop-shadow(0 0 14px rgba(255, 122, 34, 1)); } }
@keyframes pinIn { from { opacity: 0; translate: 0 8px; } }

/* a look at the room's screen, floated next to the link you're over */
.peek { position: fixed; z-index: 5; width: 340px; padding: 6px; background: #0b0f14; border: 1px solid #263040; border-radius: 10px; box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.8); pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity 0.2s, transform 0.2s; }
.peek.on { opacity: 1; transform: none; }
.peek canvas { display: block; width: 100%; height: auto; border-radius: 6px; }
.peek p { margin: 6px 4px 2px; font: 500 12px var(--mono); color: #93a3b1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.peek p b { color: var(--s-orange); font-weight: 600; margin-right: 6px; }

/* entries come in as you reach them */
.js [data-reveal] { opacity: 0; translate: 0 14px; transition: opacity 0.6s ease, translate 0.6s ease, border-color 0.2s, transform 0.2s, box-shadow 0.2s; }
.js .in { opacity: 1; translate: 0 0; }

/* ---------- work: six cards, each showing its room's screen ---------- */
.work { max-width: 1240px; margin: 0 auto; padding: 36px 32px 48px; }
.work-h { margin: 0 0 22px; font: 700 clamp(28px, 3.4vw, 40px)/1.08 var(--display); letter-spacing: -0.025em; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.cards.research { margin-top: 56px; }
.lab-note { align-self: stretch; padding: 4px 8px 0 0; }
.lab-note .work-h { margin-bottom: 12px; }
.lab-meta { margin: 0 0 14px; font-weight: 600; color: var(--ink); }
.lab-note p:last-child { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.card { display: flex; flex-direction: column; overflow: hidden; border: 1.5px solid var(--rule); border-radius: 16px; background: color-mix(in srgb, var(--paper) 60%, transparent); color: inherit; text-decoration: none;
  transition: border-color 0.2s, transform 0.25s, box-shadow 0.25s; }
.card:has(.card-top:hover), .card:has(.card-link:focus-visible) { border-color: var(--orange); transform: translateY(-3px); box-shadow: 0 24px 40px -26px rgba(224, 101, 15, 0.7); }
.card-top { position: relative; display: grid; }
.card-link { color: inherit; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: color-mix(in srgb, var(--orange) 50%, transparent); }
.card-top:hover .card-link { text-decoration-color: var(--orange); }
.card-link::after { content: ""; position: absolute; inset: 0; }
.card-link:focus-visible { outline: none; }
.shot { position: relative; aspect-ratio: 16 / 9.6; background: #0b0f14; border-bottom: 1px solid var(--rule); overflow: hidden; }
.shot-stat { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; margin: 0; padding: 26px 14px 10px; font: 700 24px/1 var(--display); letter-spacing: -0.02em; color: #fff7ee;
  background: linear-gradient(transparent, rgba(5, 8, 12, 0.92) 55%); pointer-events: none; }
.shot-stat small { display: block; margin-top: 4px; font: 500 12.5px/1.3 var(--sans); letter-spacing: 0; color: #c9d4dd; }
.shot canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.shot::after { content: "live"; position: absolute; z-index: 1; right: 10px; top: 8px; padding: 2px 7px; border-radius: 4px; font: 600 10px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: #ffd2ad; background: rgba(0, 0, 0, 0.55); opacity: 0; transition: opacity 0.2s; }
.card-top:hover .shot::after { opacity: 1; }
.card-body { padding: 16px 18px 18px; }
.card h3 { margin: 0 0 6px; font: 600 21px/1.2 var(--display); letter-spacing: -0.015em; }
.card-body { display: flex; flex-direction: column; }
.card-body > p { margin: 0 0 14px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.card-body b { font-weight: 600; color: var(--ink); }
.card-body > .card-go { display: flex; align-items: center; gap: 7px; margin: auto 0 0; font-size: 14px; font-weight: 600; color: var(--orange-ink); }
.card-go svg { width: 11px; height: 14px; flex: none; color: var(--orange); }
.card-more { border-top: 1px solid var(--rule); }
.card-more summary { display: flex; align-items: center; gap: 8px; padding: 11px 18px; min-height: 44px; cursor: pointer; list-style: none; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.card-more summary::-webkit-details-marker { display: none; }
.card-more summary::after { content: ""; width: 7px; height: 7px; margin-left: auto; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 0.2s; }
.card-more[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.card-more summary:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 4%, transparent); }
.card-more summary:focus-visible { outline-offset: -3px; }
.card-more .meta { margin: 0 18px 8px; font-size: 13.5px; }
.card-more ul { margin: 0 18px 16px; padding-left: 1.1em; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.card-more li { margin: 6px 0; }
.card-more li::marker { color: var(--muted); }
.card-top:hover .card-go, .card:has(.card-link:focus-visible) .card-go { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ---------- résumé ---------- */
.resume { max-width: 1240px; margin: 0 auto; padding: 8px 32px 40px; }
.resume > section { display: grid; grid-template-columns: 240px minmax(0, 780px); column-gap: 56px; padding: 44px 0 48px; border-top: 2px solid var(--ink); }
.resume > section > h2 { margin: 0; align-self: start; position: sticky; top: 72px; font: 700 28px/1.1 var(--display); letter-spacing: -0.02em; }
.resume > section > h2 ~ * { grid-column: 2; }
.entry + .entry { margin-top: 40px; }
.entry-head { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 14px; }
.entry-head h3 { margin: 0; font: 600 22px/1.25 var(--display); letter-spacing: -0.015em; }
.meta { flex-basis: 100%; margin: 4px 0 12px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; color: var(--muted); font-size: 15px; }
.meta time { font-variant-numeric: tabular-nums; }
@media (pointer: coarse) { .meta a { display: inline-block; padding: 4px 0; } }
.entry ul { margin: 0; padding-left: 1.1em; }
.entry li { margin: 7px 0; max-width: 68ch; }
.entry li::marker { color: var(--muted); }

/* a way into the room for a whole entry */
a.room {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px 3px 8px; border: 1.5px solid color-mix(in srgb, var(--orange) 55%, transparent);
  border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--orange-ink); text-decoration: none; transform: translateY(-3px);
  transition: background 0.15s, color 0.15s;
}
a.room svg { width: 9px; height: 12px; color: var(--orange); }
a.room:hover, a.room:focus-visible { background: var(--orange); border-color: var(--orange); color: #1a0b02; }
a.room:hover svg, a.room:focus-visible svg { color: #1a0b02; }

/* a phrase that opens a tour */
a.place {
  color: var(--orange-ink); font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--orange) 45%, transparent); white-space: normal;
}
a.place svg { width: 11px; height: 14px; margin-left: 4px; vertical-align: -1px; color: var(--orange); }
@media (pointer: coarse) { a.place { padding: 3px 0; } }
a.place:hover { text-decoration-color: var(--orange); background: color-mix(in srgb, var(--orange) 10%, transparent); border-radius: 3px; }

.skills { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0; }
.skills dt { color: var(--muted); }
.skills dd { margin: 0; }
/* ---------- contact ---------- */
.cta { max-width: 1240px; margin: 0 auto; padding: 56px 32px 64px; border-top: 2px solid var(--ink); }
.cta h2 { max-width: 20ch; margin: 0 0 26px; font: 700 clamp(30px, 4.4vw, 56px)/1.05 var(--display); letter-spacing: -0.03em; text-wrap: balance; }
.cta-mail { display: inline-block; font: 600 clamp(20px, 2.6vw, 30px)/1.2 var(--display); letter-spacing: -0.02em; color: var(--orange-ink); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 8px; text-decoration-color: color-mix(in srgb, var(--orange) 45%, transparent); }
.cta-mail:hover { text-decoration-color: currentColor; }
.cta-links { margin: 26px 0 0; }
footer { max-width: 1240px; margin: 0 auto; padding: 24px 32px 48px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--rule); }

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; gap: 0; padding: 36px 16px 28px; min-height: 0; }
  .hero-text { display: contents; }
  .hero h1 { margin-bottom: 16px; }
  .hero h1 span + span { margin-left: 0; }
    .plan { max-height: none; width: 100%; margin: 40px 0 0; border-radius: 20px; }
  .pin { display: flex; flex-direction: column; justify-content: center; min-height: 44px; font-size: 13px; padding: 5px 10px 6px; }
  .pin small { font-size: 11px; }
  .plan figcaption { left: 16px; bottom: 12px; font-size: 12px; }
  .top { padding: 8px 8px 8px 16px; gap: 10px; font-size: 13px; }
  .top .top-name { display: none; }
  .top-links { flex: 1; min-width: 0; gap: 16px; }
  .m-hide { display: none; }
  .top-links a { padding: 8px 0; white-space: nowrap; }
  .top .top-icon { margin-left: -4px; }
  .cards { gap: 12px; }
  .shot { aspect-ratio: 16 / 7; }
  .card-body { padding: 12px 14px 14px; }
  .card h3 { font-size: 18px; }
  .card-body > p { margin-bottom: 10px; font-size: 13.5px; line-height: 1.45; }
  .card-body > .card-go { font-size: 13px; }
  .card-more summary { padding: 10px 14px; }
  .card-more .meta, .card-more ul { margin-left: 14px; margin-right: 14px; }
  .cards.research { margin-top: 40px; }
  .work-h { margin-bottom: 16px; }
  .work { padding: 28px 16px 36px; }
  .cards { grid-template-columns: 1fr; }
  .cta { padding: 40px 16px 48px; }
  .peek { display: none; }
  .resume { padding: 0 16px 32px; }
  .resume > section { grid-template-columns: 1fr; padding: 28px 0 32px; }
  .resume > section > h2 { position: static; margin-bottom: 18px; font-size: 24px; }
  .resume > section > h2 ~ * { grid-column: 1; }
  footer { padding: 20px 16px; }
}

@media (min-width: 881px) and (max-width: 1100px) { .cards { grid-template-columns: 1fr 1fr; } }

/* ---------- the hello: me in the corner, saying the page is interactive (src/intro.js) ---------- */
.hello { position: fixed; z-index: 8; right: 18px; bottom: 10px; display: flex; align-items: flex-end; gap: 4px; pointer-events: none; }
.hello-me { width: 200px; height: 260px; transform: translateY(30px); opacity: 0; transition: transform 0.5s cubic-bezier(.2, .9, .3, 1.3), opacity 0.3s; filter: drop-shadow(0 0 18px rgba(255, 122, 34, 0.45)); }
.hello-say { order: -1; position: relative; max-width: 270px; margin-bottom: 150px; padding: 14px 16px 12px; pointer-events: auto;
  background: var(--night); color: #f2f6f3; border: 1.5px solid #ff8a3d; border-radius: 14px; box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7), 0 0 22px -6px rgba(255, 122, 34, 0.6);
  opacity: 0; transform: translateY(8px) scale(0.96); transform-origin: bottom right; transition: opacity 0.3s 0.45s, transform 0.4s 0.45s cubic-bezier(.2, .9, .3, 1.3); }
.hello-say::after { content: ""; position: absolute; right: -9px; bottom: 22px; width: 14px; height: 14px; background: var(--night); border-right: 1.5px solid #ff8a3d; border-top: 1.5px solid #ff8a3d; transform: rotate(45deg); }
.hello-say p { margin: 0 0 10px; min-height: 4.4em; font-size: 15px; line-height: 1.45; }
.hello-ok { min-height: 44px; font: 600 13px var(--sans); color: #1a0b02; background: #ff8a3d; border: 0; border-radius: 7px; padding: 6px 12px; cursor: pointer; }
.hello.on .hello-me { transform: none; opacity: 1; }
.hello.on .hello-say { opacity: 1; transform: none; }
/* while it talks, the orange links on the page glow once */
body.hinting a.place, body.hinting a.room { animation: hint 1.6s ease-in-out 2; }   /* not the map pins: they have their own entrance */
@keyframes hint { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--orange) 35%, transparent); background: color-mix(in srgb, var(--orange) 14%, transparent); } }
@media (max-width: 880px) {
  .hello { left: 8px; right: 8px; bottom: 8px; gap: 0; }
  .hello-me { width: 84px; height: 109px; flex: none; }
  .hello-say { order: 1; flex: 1; max-width: none; margin: 0 0 6px; padding: 11px 12px 10px; transform-origin: bottom left; }
  .hello-say::after { right: auto; left: -9px; bottom: 30px; border: 0; border-left: 1.5px solid #ff8a3d; border-bottom: 1.5px solid #ff8a3d; }
  .hello-say p { min-height: 0; margin-bottom: 8px; font-size: 13.5px; }
}

/* ---------- the tour ---------- */
.tour { position: fixed; inset: 0; z-index: 10; background: #050806; }
.tour[hidden] { display: none; }
#tour-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.warp { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 20; pointer-events: none; }
.warp[hidden] { display: none; }
.tour-bar { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 12px; padding: 16px 20px; z-index: 3; }
.tour-where { margin: 0 auto 0 4px; color: #e9efe9; font-size: 15px; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8); }
.tour-where b { color: var(--s-orange); margin-right: 6px; }
.tour-btn { min-height: 44px; font: 600 14px var(--sans); color: #e9efe9; background: rgba(10, 18, 15, 0.7); border: 1px solid rgba(233, 239, 233, 0.3); border-radius: 6px; padding: 8px 14px; cursor: pointer; backdrop-filter: blur(6px); }
.tour-btn:hover { border-color: #e9efe9; }
.tour-btn:focus-visible { outline: 2px solid var(--s-orange); outline-offset: 2px; }
#tour-skip { color: #1a0b02; background: var(--s-orange); border-color: var(--s-orange); }
#tour-skip:hover { background: #ffa463; }
.tour-btn[hidden] { display: none; }
.tour-status { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; color: var(--s-dim); font: 14px var(--mono); }
/* the readout along the bottom: where we are over campus, then how to look round the room */
.tour-hud { position: absolute; left: calc(var(--brief-w) + 40px); bottom: 18px; z-index: 3; margin: 0; font: 500 12.5px var(--mono); letter-spacing: 0.08em; color: var(--s-orange); text-shadow: 0 0 10px rgba(255, 138, 61, 0.6), 0 1px 6px #000; white-space: pre; pointer-events: none; }
.tour-hud::after { content: "▮"; margin-left: 6px; animation: blink 1s steps(2) infinite; }
.tour-hud[hidden] { display: none; }
@keyframes blink { 50% { opacity: 0; } }

/* the room's name, decoding over the scene on the way in */
.room-title { position: absolute; z-index: 2; left: 50%; top: 42%; transform: translate(-50%, -50%); margin: 0; text-align: center; pointer-events: none; width: calc(100vw - 32px); transition: opacity 0.8s, transform 0.8s; }
.room-title[hidden] { display: none; }
.tour.reading .room-title { left: calc(50% + var(--brief-w) / 2 + 10px); width: calc(100vw - var(--brief-w) - 72px); }
.room-title.out { opacity: 0; transform: translate(-50%, -58%); }
.rt-k { display: inline-block; margin: 0 0 10px; padding: 3px 8px; border-radius: 4px; background: rgba(5, 8, 6, 0.72); font: 600 13px var(--mono); letter-spacing: 0.14em; color: var(--s-orange); text-transform: uppercase; }
.rt-t { margin: 0; font: 700 clamp(32px, 6vw, 72px)/1.05 var(--mono); letter-spacing: -0.01em; color: #fff7ee; text-shadow: 0 0 24px rgba(255, 122, 34, 0.75), 0 0 2px #fff; text-transform: uppercase; }
.rt-s { margin: 12px 0 0; font: 500 15px var(--mono); color: #c9d4dd; text-shadow: 0 1px 8px #000; }

/* the explanation, laid over the room */
.brief {
  position: absolute; z-index: 2; left: 20px; top: 72px; bottom: 20px; width: var(--brief-w); overflow: auto;
  padding: 20px 22px 22px; color: #eef3f7;
  background: rgba(6, 10, 18, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 12px; backdrop-filter: blur(6px);
  animation: briefIn 0.6s cubic-bezier(.2, .8, .2, 1);
}
.brief[hidden] { display: none; }
.b-next { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.b-also-k { margin: 0 0 6px !important; font: 600 11px var(--mono) !important; letter-spacing: 0.08em; text-transform: uppercase; color: #c3ced8 !important; }
.b-also { display: flex; flex-wrap: wrap; gap: 6px; }
.b-also button { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; min-height: 44px; padding: 6px 11px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 600; color: #fff; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 138, 61, 0.55); }
.b-also button:hover { border-color: var(--s-orange); background: rgba(255, 138, 61, 0.14); }
.b-also button:focus-visible { outline: 2px solid var(--s-orange); outline-offset: 2px; }
.b-more { margin: 4px 0 6px; }
.b-more summary { display: flex; align-items: baseline; gap: 10px; min-height: 40px; padding: 8px 0; cursor: pointer; list-style: none; }
.b-more summary::-webkit-details-marker { display: none; }
.b-more summary::before { content: "+"; font: 600 15px var(--mono); color: var(--s-orange); }
.b-more[open] summary::before { content: "\2212"; }
.b-more summary span { font-weight: 400; font-size: 12.5px; color: #a9b6c2; }
.b-next p { margin: 12px 0 0; font-size: 13.5px; color: #c9d4dd; }
.b-next a { color: var(--s-orange); font-weight: 600; }
@keyframes briefIn { from { opacity: 0; transform: translateX(-16px); } }
.b-kicker { margin: 0 0 6px; font-size: 13px; color: #93a3b1; font-weight: 600; }
.brief h2 { margin: 0 0 10px; font: 700 27px/1.12 var(--sans); letter-spacing: -0.015em; outline: none; text-wrap: balance; }
.b-lede { margin: 0 0 14px; font-size: 15px; line-height: 1.5; color: #c9d4dd; }
.b-how { margin: 0; font: 600 14px var(--sans); color: #fff; }
.b-rec { margin: 0 0 12px; }
.b-rec[hidden] { display: none; }
.b-rec td:first-child { font-family: var(--sans); }
.b-rec tr.best td, .b-rec tr.best td:first-child { color: #fff; font-weight: 600; }
.b-rec-k { margin: 0 0 2px !important; font: 600 11px var(--mono) !important; letter-spacing: 0.08em; text-transform: uppercase; color: #c3ced8 !important; }
.b-play .b-rec-note { margin: 0 !important; font-size: 13px !important; color: #dbe3ea !important; }
.b-play .b-pitch { margin: 12px 0 0; }
.b-play .b-small { margin: 10px 0 0 !important; font-size: 12.5px !important; color: #a9b6c2 !important; }
.b-steps { margin: 0 0 14px; padding: 0; list-style: none; counter-reset: st; display: grid; gap: 3px; }
.b-steps li { counter-increment: st; position: relative; }
.b-steps button { all: unset; box-sizing: border-box; display: block; width: 100%; cursor: pointer; padding: 7px 10px 7px 36px; border-radius: 7px; font-size: 14.5px; line-height: 1.45; color: #c3ced8; transition: background 0.3s, color 0.3s; }
.b-steps button:hover { color: #dfe7ee; background: rgba(255, 255, 255, 0.05); }
.b-steps button:focus-visible { outline: 2px solid var(--s-orange); outline-offset: -2px; }
.b-steps li::before { content: counter(st); position: absolute; left: 10px; top: 8px; width: 18px; height: 18px; border-radius: 4px; display: grid; place-items: center; font: 600 11px var(--mono); background: rgba(255, 255, 255, 0.1); color: #c3ced8; pointer-events: none; }
.b-steps li.now button { background: rgba(255, 138, 61, 0.16); color: #fff; }
.b-steps li.now::before { background: var(--s-orange); color: #1a0b02; }
.b-role { margin: 0 0 14px; font-size: 14.5px; line-height: 1.5; color: #d7e0e7; }
/* run it on a real model */
.b-status { min-height: 1em; font-size: 13px !important; color: #e8eef3 !important; }
/* the tour's game (src/play/): the same box, with the game's own controls inside */
.b-play { margin: 4px 0 18px; padding: 14px 14px 12px; border: 1px solid rgba(255, 138, 61, 0.45); border-radius: 10px; background: rgba(255, 138, 61, 0.07); }
.b-play h3 { margin: 0 0 6px; font: 600 16px/1.3 var(--sans); color: #fff; }
.b-play p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.5; color: #c9d4dd; }
.b-play .b-go, .g-btn { min-height: 44px; font: 600 14px var(--sans); color: #1a0b02; background: var(--s-orange); border: 0; border-radius: 7px; padding: 9px 14px; cursor: pointer; }
.b-play .b-go[hidden], .b-game[hidden] { display: none; }
.g-btn:disabled, .g-ghost:disabled { opacity: 0.5; cursor: default; }
.g-ghost { min-height: 44px; font: 600 13px var(--sans); color: #e8eef3; background: transparent; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 7px; padding: 7px 11px; cursor: pointer; }
.g-ghost:hover:not(:disabled) { border-color: #fff; }
.g-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.g-count { font: 500 12.5px var(--mono); color: #93a3b1; }
.g-count.bad { color: #ff8f9a; }
.b-play .g-label { margin: 10px 0 5px; font-size: 12.5px; color: #93a3b1; display: block; }
.b-play .g-note b { color: #fff; font-weight: 600; }
.g-what { display: grid; gap: 8px; margin: 0 0 12px; padding: 10px 12px; border-left: 3px solid var(--s-orange); border-radius: 0 8px 8px 0; background: rgba(255, 255, 255, 0.045); }
.g-what p { margin: 0 !important; font-size: 13px !important; line-height: 1.45; color: #c9d4dd; }
.g-what b { display: block; margin-bottom: 2px; font: 600 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--s-orange); }
.g-score { width: 100%; margin: 6px 0 8px; border-collapse: collapse; font: 12.5px var(--mono); color: #c9d4dd; }
.g-score th { padding: 2px 8px 4px 0; text-align: left; font-weight: 500; color: #93a3b1; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.g-score td { padding: 4px 8px 4px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); vertical-align: top; }
.g-score tr.best td { color: #fff; }
.g-score tr.best td:first-child { color: var(--s-orange); }
.g-ok { color: #4fd47a; }
.g-seg { gap: 4px; margin-bottom: 4px; }
.g-seg .g-ghost { padding: 5px 10px; font-size: 12.5px; }
.g-seg .g-ghost[aria-pressed="true"] { background: rgba(255, 138, 61, 0.22); border-color: var(--s-orange); color: #fff; }
.g-dev b { color: #fff; }
.g-goals { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13px; line-height: 1.45; color: #93a3b1; }
.g-goals li { padding: 7px 10px; border-radius: 7px; background: rgba(0, 0, 0, 0.22); border: 1px solid rgba(255, 255, 255, 0.08); }
.g-goals b { color: #dfe7ee; font-weight: 600; margin-right: 4px; }
.g-goals li.got { border-color: rgba(79, 212, 122, 0.5); }
.g-goals li.got b { color: #4fd47a; }
.g-goals span { display: block; margin-top: 3px; color: #c9d4dd; }
.g-tokens { display: flex; flex-wrap: wrap; gap: 3px; margin: 0 0 10px; }
.g-tok { all: unset; box-sizing: border-box; cursor: pointer; padding: 1px 5px; border-radius: 4px; font: 12.5px var(--mono); color: #c9d4dd; background: rgba(0, 0, 0, 0.28); border: 1px solid rgba(255, 255, 255, 0.1); }
.g-tok:hover { border-color: rgba(255, 255, 255, 0.4); }
.g-tok:focus-visible { outline: 2px solid var(--s-orange); outline-offset: 1px; }
.g-tok[aria-pressed="true"] { background: rgba(255, 138, 61, 0.25); border-color: var(--s-orange); color: #fff; }
.g-ending { margin: 0 0 10px; font: 12.5px/1.6 var(--mono); color: #c9d4dd; }
.g-ending b { color: var(--s-orange); font-weight: 600; }
.g-verdict { margin: 6px 0 0; font-size: 13px; line-height: 1.45; color: #e8eef3; }
.b-play .g-result { min-height: 1em; margin: 10px 0 0; font-size: 13px; color: #e8eef3; }
.g-list { display: grid; gap: 4px; margin: 0 0 10px; padding: 0; list-style: none; }
.g-pool { max-height: 250px; overflow: auto; padding-right: 4px; }
.g-item { all: unset; box-sizing: border-box; display: block; cursor: pointer; padding: 6px 9px; border-radius: 6px; font-size: 13px; line-height: 1.4; color: #c9d4dd; background: rgba(0, 0, 0, 0.28); border: 1px solid rgba(255, 255, 255, 0.1); }
.g-item:hover { border-color: rgba(255, 255, 255, 0.4); }
.g-item:focus-visible, .g-board button:focus-visible, .g-btn:focus-visible, .g-ghost:focus-visible { outline: 2px solid var(--s-orange); outline-offset: 1px; }
.g-item[aria-pressed="true"], .g-item[aria-checked="true"] { background: rgba(255, 138, 61, 0.22); border-color: var(--s-orange); color: #fff; }
.g-item b { color: var(--s-orange); font-weight: 600; margin-right: 4px; }
.g-turn { position: relative; padding-right: 38px; cursor: grab; }
.g-cost { position: absolute; right: 8px; top: 6px; font: 500 11.5px var(--mono); color: #93a3b1; }
.g-in { min-height: 40px; padding: 4px; border: 1px dashed rgba(255, 255, 255, 0.3); border-radius: 8px; }
.g-list.over { border-color: var(--s-orange); background: rgba(255, 138, 61, 0.1); }
.g-empty { padding: 6px 9px; font-size: 12.5px; color: #93a3b1; list-style: none; }
.g-meter { height: 8px; margin: 0 0 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.g-meter i { display: block; height: 100%; width: 0; background: var(--s-orange); transition: width 0.25s; }
.g-board { display: grid; grid-template-columns: repeat(3, 52px); gap: 4px; margin: 0 0 10px; }
.g-board button { height: 52px; font: 700 22px var(--mono); color: #7fb6ff; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 6px; cursor: pointer; }
.g-board button[data-mark="O"] { color: var(--s-orange); }
.g-board button:disabled { cursor: default; }
.g-board button:not(:disabled):hover { border-color: #fff; }
.b-play textarea { width: 100%; resize: vertical; font: 13px/1.45 var(--mono); color: #e8eef3; background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 6px; padding: 8px; }
.g-ranks { margin: 0; padding: 0 0 0 20px; display: grid; gap: 4px; font-size: 13px; color: #c9d4dd; }
.g-ranks b { color: #fff; font-weight: 600; }
.g-ranks code { font: 12.5px var(--mono); color: #ffd2ad; overflow-wrap: anywhere; }
.g-ranks .g-empty { margin-left: -20px; }
.b-role b { color: var(--s-orange); }
.flat-game { position: absolute; inset: 0; display: grid; place-items: center; padding: 72px 20px 20px calc(var(--brief-w) + 40px); background: #070b12; }
.flat-game[hidden] { display: none; }
.flat-game canvas { width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; border: 8px solid #10151d; }

@media (max-width: 880px) {
  .tour-where { display: none; }
  .tour-hud { left: 8px; bottom: calc(58vh + 14px); font-size: 11px; }
  .brief { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; max-height: 58vh; padding: 16px 16px 18px; }
  .brief h2 { font-size: 22px; }
  .b-rec tbody tr:not(.best) { display: none; }
  .b-rec-k { display: none; }
  .b-rec .g-score { margin-bottom: 4px; }
  .b-lede { font-size: 14.5px; }
  .flat-game { padding: 72px 8px 60vh; align-items: start; }
  .rt-s { font-size: 13px; }
  .tour.reading .room-title { left: 50%; top: 24%; width: calc(100vw - 32px); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0s !important; animation: none !important; }
}

/* screen-reader-only text */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* on paper: everything shown, nothing that only works on screen */
@media print {
  .top, .hello, .peek, .tour, .warp, .how, .card-go, .shot, a.room, .cta-links { display: none !important; }
  .js [data-reveal] { opacity: 1; translate: none; }
  .card { break-inside: avoid; }
}
