/* =========================================================
   casper@workshop — site styles
   Dark ("matrix") is the default. Light is opt-in via the
   toggle and stored in localStorage (see theme-init.js).
   ========================================================= */

:root {
  color-scheme: dark;

  --bg: #030806;
  --bg-glow: #0b2a18;
  --surface: rgba(9, 22, 15, 0.78);
  --surface-solid: #08140d;
  --surface-hi: rgba(16, 38, 26, 0.9);
  --border: #173d28;
  --border-hi: #2fd67c;
  --text: #d9f7e4;
  --text-dim: #93bba3;
  --text-faint: #5f8470;

  --accent: #39ff88;
  --accent-ink: #02170a;
  --accent-soft: rgba(57, 255, 136, 0.1);
  --cyan: #3ee6ff;
  --amber: #ffc94d;
  --magenta: #ff6bd5;
  --violet: #b69cff;
  --red: #ff6b6b;

  --glow: 0 0 22px rgba(57, 255, 136, 0.28);
  --text-glow: 0 0 18px rgba(57, 255, 136, 0.45);
  --dots: rgba(57, 255, 136, 0.06);
  --scanline: rgba(0, 0, 0, 0.16);
  --rain-rgb: 57, 255, 136;

  --radius: 16px;
  --radius-sm: 10px;
  --mono: "Cascadia Code", "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Consolas,
    "Liberation Mono", monospace;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

:root[data-theme="light"] {
  color-scheme: light;

  --bg: #e7efe8;
  --bg-glow: #d3e6d7;
  --surface: rgba(246, 251, 247, 0.86);
  --surface-solid: #f2f7f3;
  --surface-hi: #ffffff;
  --border: #bcd3c2;
  --border-hi: #0e8a46;
  --text: #0c2416;
  --text-dim: #3b5b48;
  --text-faint: #6a8775;

  --accent: #0a8a43;
  --accent-ink: #f1fff6;
  --accent-soft: rgba(10, 138, 67, 0.09);
  --cyan: #00708a;
  --amber: #8a5a00;
  --magenta: #a1287f;
  --violet: #6b46c1;
  --red: #b3261e;

  --glow: 0 6px 24px rgba(12, 60, 32, 0.1);
  --text-glow: none;
  --dots: rgba(10, 90, 45, 0.08);
  --scanline: transparent;
  --rain-rgb: 10, 138, 67;
}

/* ---------- base ---------- */

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

/* `hidden` must win over component display rules (e.g. a social link without a URL) */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, var(--bg-glow), transparent 70%),
    radial-gradient(var(--dots) 1px, transparent 1px);
  background-size: 100% 100%, 22px 22px;
  background-attachment: fixed;
  overflow-x: hidden;
}

/* faint CRT scanlines — static, never animated */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, var(--scanline) 3px, transparent 4px);
  opacity: 0.35;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

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

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0;
}

.wrap {
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

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

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.nav .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 60px;
}

.logo-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.5px;
  box-shadow: var(--glow);
}

.logo-mark:hover {
  text-decoration: none;
}

/* the nav is a shell prompt: casper@workshop:~/windows$ cd ~/web▍ */
.shell {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: clip;
  color: var(--text-faint);
  font-size: 14px;
}

.shell .host {
  color: var(--accent);
  font-weight: 700;
}

.shell .path {
  color: var(--cyan);
}

.shell-typed {
  color: var(--text);
}

.shell-out {
  color: var(--accent);
}

.shell-out:not(:empty) {
  margin-left: 1.5ch;
}

/* ---------- tree ~ : contents in the left margin on wide screens ---------- */

.tree {
  display: none;
}

/* shown only when the left margin has room for it; content stays centred */
@media (min-width: 1740px) {
  .tree {
    display: block;
    position: fixed;
    z-index: 40;
    top: 84px;
    left: 16px; /* always far left */
    width: 244px;
    max-height: calc(100vh - 104px);
    overflow-y: auto;
    padding: 14px 12px;
    border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface-solid) 82%, transparent);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    font-size: 11.5px;
    line-height: 1.8;
    scrollbar-width: thin;
  }

  /* the matrix command moves from the hero to under the tree */
  .hero .cmdline {
    display: none;
  }
}

.tree-matrix {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 6px 2px;
  border-top: 1px dashed var(--border);
  color: var(--accent);
}

.tree-matrix .run {
  padding: 2px 5px 2px 7px;
  gap: 8px;
}

.tree-matrix .run-key {
  font-size: 10.5px;
}

.tree-title {
  margin: 0 0 6px;
  color: var(--text-faint);
}

.tree ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tree a {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 0 6px;
  border-radius: 6px;
  color: var(--text-dim);
}

.tree a:hover {
  color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}

.tree a.d0,
.tree a.d1 {
  color: var(--text);
}

.tree-pre {
  white-space: pre;
  color: var(--text-faint);
}

.tree a.is-here {
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 2px 0 0 var(--accent);
}

.caret-sm {
  width: 0.55em;
  height: 1em;
  vertical-align: -0.15em;
}

.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  color: var(--text-dim);
  padding: 6px 10px;
  border-radius: 8px;
}

.nav-links a:hover {
  color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 17px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.icon-btn:hover {
  border-color: var(--border-hi);
  box-shadow: var(--glow);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  min-height: min(92vh, 860px);
  display: flex;
  align-items: center;
  padding: 72px 0 64px;
  overflow: hidden;
}

#rain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0; /* off by default — "matrix --enable" fades it in */
  transition: opacity 0.8s ease;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
}

.hero.rain-on #rain {
  opacity: 0.55;
}

.hero.rain-instant #rain {
  transition: none;
}

:root[data-theme="light"] .hero.rain-on #rain {
  opacity: 0.3;
}

/* the runnable command above whoami */
.cmdline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 8px;
  margin: 0;
  color: var(--text-dim);
  font-size: 15px;
}

.run {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 3px 6px 3px 8px;
  margin-left: -2px;
  border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 5%, transparent);
  color: var(--text-dim);
  font: inherit;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.run:hover,
.run:focus-visible,
.run.is-typing {
  color: var(--text);
  border-style: solid;
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: var(--glow);
}

.run-text {
  min-width: 15ch; /* the button keeps its width while the command is typed */
  text-align: left;
}

.run-key {
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--accent);
  font: inherit;
  font-size: 11.5px;
}

.run.is-typing .run-key {
  visibility: hidden;
}

.cmdline {
  margin-bottom: 14px;
}

.hero-inner {
  position: relative;
  max-width: 820px;
  min-width: 0;
}

/* a soft shade behind the hero text, so the rain never fights the words */
.hero-inner::before {
  content: "";
  position: absolute;
  inset: -48px -72px;
  z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--bg) 82%, transparent), transparent);
  pointer-events: none;
}

.prompt {
  margin: 0 0 18px;
  color: var(--text-dim);
  font-size: 15px;
}

.ps1 {
  color: var(--accent);
}

.ps1-path {
  color: var(--cyan);
}

.caret {
  display: inline-block;
  width: 0.6em;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -0.18em;
  background: var(--accent);
  animation: blink 1.2s steps(1) infinite;
}

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

.hero h1 {
  font-size: clamp(40px, 6.4vw, 80px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  text-shadow: var(--text-glow);
}

.hero h1 .accent {
  color: var(--accent);
}

.lead {
  margin: 20px 0 0;
  max-width: 640px;
  font-size: clamp(16px, 2.1vw, 19px);
  color: var(--text-dim);
}

.lead strong {
  color: var(--text);
  font-weight: 600;
}

/* "ls ~" — the three folders; a click types "cd ~/…" in the nav and jumps */
.cmd.ls {
  margin: 34px 0 10px;
}

.doors {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 760px;
}

.door {
  --door: var(--accent);
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 2px 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.door.windows {
  --door: var(--cyan);
}

.door.web {
  --door: var(--violet);
}

.door:hover {
  text-decoration: none;
  border-color: var(--door);
  box-shadow: 0 0 0 1px var(--door), 0 0 28px color-mix(in srgb, var(--door) 30%, transparent);
  transform: translateY(-2px);
}

.door-icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 23px;
  background: color-mix(in srgb, var(--door) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--door) 40%, transparent);
}

.door-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--door-text, var(--door));
}

.door-sub {
  grid-column: 2;
  font-size: 12.5px;
  color: var(--text-dim);
}

:root[data-theme="light"] .door {
  --door-text: color-mix(in srgb, var(--door) 55%, #000);
}

.ai-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 24px;
  max-width: 760px;
  padding: 12px 16px;
  border-left: 3px solid var(--amber);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: color-mix(in srgb, var(--amber) 7%, transparent);
  color: var(--text-dim);
  font-size: 14px;
}

.ai-note .ico {
  font-size: 18px;
  line-height: 1.4;
}

.ai-note b {
  color: var(--amber);
  font-weight: 600;
}

/* ---------- sections ---------- */

section {
  padding: 72px 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 28px;
}

.cmd {
  margin: 0 0 6px;
  color: var(--text-faint);
  font-size: 14px;
}

.cmd::before {
  content: "$ ";
  color: var(--accent);
}

.section-head h2 {
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.02em;
}

/* ---------- about ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 24px;
}

.about-text p {
  margin: 0 0 14px;
  color: var(--text-dim);
}

.about-text p:last-of-type {
  margin-bottom: 0;
}

.about-text strong {
  color: var(--text);
  font-weight: 600;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.stat {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}

.stat b {
  display: block;
  font-size: 26px;
  line-height: 1.1;
  color: var(--accent);
  text-shadow: var(--text-glow);
}

.stat span {
  font-size: 12.5px;
  color: var(--text-dim);
}

.timeline-title {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--text-faint);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--border), var(--accent));
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  padding: 8px 0;
}

.tl-dot {
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 20px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
}

/* "26 years later …" — the jump in the timeline */
.timeline li.tl-gap {
  padding: 0;
  align-items: center;
}

.timeline li.tl-gap .tl-dot {
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--text-faint);
  font-size: 22px;
  line-height: 1;
}

.timeline li.tl-gap .tl-more {
  font-style: italic;
  color: var(--text-faint);
}

.timeline li:last-child .tl-dot {
  border-color: var(--accent);
  box-shadow: var(--glow);
}

.tl-when {
  display: block;
  font-size: 12.5px;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tl-what {
  display: block;
  color: var(--text);
  font-weight: 600;
}

.tl-more {
  display: block;
  font-size: 13.5px;
  color: var(--text-dim);
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s, color 0.2s;
}

.social svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.social:hover {
  text-decoration: none;
  color: var(--accent);
  border-color: var(--border-hi);
  box-shadow: var(--glow);
}

.social[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

/* ---------- private — four lines at the very bottom ---------- */

.life {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.life li {
  --life: var(--accent);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-family: var(--sans);
  font-size: 16.5px;
  color: var(--text-dim);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.life li:hover {
  border-color: color-mix(in srgb, var(--life) 55%, var(--border));
  box-shadow: 0 0 28px color-mix(in srgb, var(--life) 14%, transparent);
}

.life b {
  color: var(--life);
  font-weight: 600;
}

.life-ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  font-size: 25px;
  background: color-mix(in srgb, var(--life) 12%, var(--surface-solid));
  border: 1px solid color-mix(in srgb, var(--life) 40%, transparent);
}

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

/* ---------- system · windows · web sections ---------- */

.apps-section + .apps-section {
  padding-top: 24px;
}

.apps-section h2:focus {
  outline: none;
}

.count-pill {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 13px;
}

.platform-intro {
  margin: -8px 0 24px;
  color: var(--text-dim);
  max-width: 720px;
}

/* ---------- app cards ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr));
  gap: 20px;
  align-items: stretch;
}

.card {
  --app: var(--accent);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
  animation: card-in 0.45s ease both;
}

.card::before {
  /* app colour hairline on top */
  content: "";
  position: absolute;
  top: -1px;
  left: 22px;
  right: 22px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--app), transparent);
  opacity: 0.8;
}

.card:hover,
.card:target,
.card.is-target {
  border-color: color-mix(in srgb, var(--app) 60%, var(--border));
  box-shadow: 0 0 32px color-mix(in srgb, var(--app) 16%, transparent);
}

.card.is-wide {
  grid-column: 1 / -1;
}

/* transform only: a card must never be stuck invisible (hidden tabs pause animations) */
@keyframes card-in {
  from {
    transform: translateY(8px);
  }
}

.card-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
}

.app-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 15px;
  font-size: 30px;
  background:
    radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--app) 38%, transparent), transparent 70%),
    color-mix(in srgb, var(--app) 10%, var(--surface-solid));
  border: 1px solid color-mix(in srgb, var(--app) 45%, transparent);
  box-shadow: 0 0 20px color-mix(in srgb, var(--app) 18%, transparent);
}

.card-path {
  display: block;
  font-size: 12px;
  color: var(--text-faint);
}

.card h3 {
  font-size: 20px;
  letter-spacing: -0.01em;
}

.tagline {
  margin: 2px 0 0;
  font-size: 13.5px;
  color: var(--app);
}

.badge {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--app);
  border: 1px solid color-mix(in srgb, var(--app) 45%, transparent);
  background: color-mix(in srgb, var(--app) 9%, transparent);
}

.desc {
  margin: 0;
  color: var(--text-dim);
  font-size: 14.5px;
}

/* media (poster + play) */
.media {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
  cursor: pointer;
  aspect-ratio: 16 / 10;
}

.media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: opacity 0.25s, transform 0.4s;
}

.media:hover img {
  opacity: 1;
  transform: scale(1.02);
}

.media .play {
  position: absolute;
  inset: auto auto 12px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  background: rgba(2, 10, 6, 0.82);
  color: #e8fff1;
  font-size: 13px;
  border: 1px solid rgba(57, 255, 136, 0.5);
}

.media .play i {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #39ff88;
  color: #02170a;
  font-style: normal;
  font-size: 11px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-dim);
  background: var(--surface-solid);
  border: 1px solid var(--border);
}

/* expandable "more" */
.more {
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}

.more summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 13.5px;
  user-select: none;
}

.more summary::-webkit-details-marker {
  display: none;
}

.more summary::before {
  content: "+";
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--app);
  font-weight: 700;
  transition: transform 0.2s;
}

.more[open] summary::before {
  content: "−";
}

.more summary:hover {
  color: var(--app);
}

.bullets {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.bullets li {
  position: relative;
  padding-left: 22px;
  font-size: 13.5px;
  color: var(--text-dim);
}

.bullets li::before {
  content: "▸";
  position: absolute;
  left: 4px;
  color: var(--app);
}

.card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: auto;
  padding-top: 4px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  background: var(--surface-solid);
}

.status.soon {
  color: var(--amber);
  border-color: color-mix(in srgb, var(--amber) 40%, transparent);
  background: color-mix(in srgb, var(--amber) 8%, transparent);
}

.status.live {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: var(--accent-soft);
}

.status.live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--app) 55%, transparent);
  background: color-mix(in srgb, var(--app) 12%, transparent);
  color: var(--app);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.2s, background 0.2s;
}

.btn:hover {
  text-decoration: none;
  background: color-mix(in srgb, var(--app) 20%, transparent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--app) 30%, transparent);
}

/* ---------- video dialog ---------- */

.player {
  width: min(1100px, 100% - 32px);
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  background: #000;
  color: #e8fff1;
  box-shadow: 0 0 60px rgba(57, 255, 136, 0.25);
}

.player::backdrop {
  background: rgba(1, 6, 3, 0.86);
  backdrop-filter: blur(4px);
}

.player-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 18px;
  background: #06120b;
  border-bottom: 1px solid #173d28;
  font-size: 13px;
  color: #93bba3;
}

.player-bar b {
  color: #39ff88;
  font-weight: 600;
}

.player-count {
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid #173d28;
  color: #39ff88;
  font-size: 12.5px;
  white-space: nowrap;
}

.player-count:empty {
  display: none;
}

.player-body {
  position: relative;
}

/* ‹ › — big, on both sides of the picture */
.player-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-top: -26px;
  border-radius: 50%;
  border: 1px solid rgba(57, 255, 136, 0.55);
  background: rgba(2, 10, 6, 0.78);
  color: #e8fff1;
  font: inherit;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.player-nav:hover {
  background: rgba(10, 40, 22, 0.92);
  box-shadow: 0 0 22px rgba(57, 255, 136, 0.35);
}

.player-nav.prev {
  left: 14px;
}

.player-nav.next {
  right: 14px;
}

/* the strip of thumbnails under the picture */
.player-strip {
  display: flex;
  gap: 8px;
  padding: 10px 12px 12px;
  overflow-x: auto;
  background: #06120b;
  border-top: 1px solid #173d28;
  scrollbar-width: thin;
}

.player-strip:empty {
  display: none;
}

.player-strip button {
  flex: none;
  display: grid;
  gap: 4px;
  width: 128px;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid #173d28;
  background: transparent;
  color: #93bba3;
  font: inherit;
  font-size: 11.5px;
  text-align: left;
  cursor: pointer;
}

.player-strip button img {
  width: 100%;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
  background: #000;
}

.player-strip button span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.player-strip button[aria-pressed="true"] {
  color: #39ff88;
  border-color: #39ff88;
  background: rgba(57, 255, 136, 0.1);
}

/* phones: small arrows at the very edge, the note on its own line under the title */
@media (max-width: 640px) {
  .player-bar {
    flex-wrap: wrap;
    row-gap: 6px;
  }

  #player-note {
    order: 3;
    flex-basis: 100%;
    font-size: 12px;
  }

  .player-nav {
    width: 34px;
    height: 34px;
    margin-top: -17px;
    font-size: 20px;
  }

  .player-nav.prev {
    left: 6px;
  }

  .player-nav.next {
    right: 6px;
  }

  .player-strip button {
    width: 96px;
  }

  .player-strip button img {
    height: 52px;
  }
}

/* dots on a card: there is more than one thing to see */
.media-dots {
  position: absolute;
  right: 12px;
  bottom: 16px;
  display: flex;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(2, 10, 6, 0.75);
}

.media-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(232, 255, 241, 0.45);
}

.media-dots i.on {
  background: #39ff88;
}

.player-close {
  margin-left: auto;
  border: 1px solid #173d28;
  background: transparent;
  color: #d9f7e4;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
}

.player video {
  display: block;
  width: 100%;
  max-height: calc(100vh - 230px);
  background: #000;
}

/* ---------- footer ---------- */

footer {
  padding: 48px 0 64px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 13.5px;
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
}

.eof {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.2em;
}

footer a {
  color: var(--text-dim);
}

/* ---------- prose, app colours, small bits ---------- */

/* mono for the chrome, a sans for sentences people actually read */
.lead,
.desc,
.bullets li,
.about-text p,
.platform-intro,
.ai-note,
.tl-more,
.panel noscript,
footer p {
  font-family: var(--sans);
}

.desc {
  font-size: 15.5px;
  line-height: 1.6;
}

.bullets li {
  font-size: 14.5px;
}

.lead {
  line-height: 1.55;
}

/* neon app colours are fine on black; darken them for text on the light theme */
.card {
  --app-text: var(--app);
}

:root[data-theme="light"] .card {
  --app-text: color-mix(in srgb, var(--app) 48%, #000);
}

.tagline,
.badge,
.btn,
.more summary:hover,
.more summary::before,
.bullets li::before {
  color: var(--app-text);
}

.card-path {
  color: color-mix(in srgb, var(--app-text) 55%, var(--text-faint));
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
}

.skip:focus {
  top: 12px;
}

.i-moon,
:root[data-theme="light"] .i-sun {
  display: none;
}

:root[data-theme="light"] .i-moon {
  display: block;
}

#player-stage img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 230px);
  object-fit: contain;
  background: #000;
}

/* ---------- card body + feature cards ---------- */

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

/* the picture stays at the top — opening "more" grows the text downwards, the picture does not move */
.card.is-feature {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: flex-start;
  gap: 28px;
}

/* picture and text get the same width — every card looks alike, a calmer page */
.card.is-feature .media {
  flex: 1 1 0;
  min-width: 0;
}

.card.is-feature .card-body {
  flex: 1 1 0;
}

/* a phone screenshot (portrait) stands on a dark stage instead of being cropped */
.media.is-phone {
  aspect-ratio: 4 / 5;
  background:
    radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--app) 24%, transparent), transparent 70%),
    var(--surface-solid);
}

.media.is-phone img {
  object-fit: contain;
  padding: 18px;
  opacity: 1;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
}

.media.is-phone:hover img {
  transform: scale(1.03);
}

/* a small screenshot (a card, a dialog) shown whole in the middle of a 16:10 stage */
.media.is-contain {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--app) 20%, transparent), transparent 70%),
    var(--surface-solid);
}

.media.is-contain img {
  width: auto;
  height: auto;
  max-width: 82%;
  max-height: 82%;
  object-fit: contain;
  opacity: 1;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}

.media.is-contain:hover img {
  transform: scale(1.03);
}

/* in a wide card a phone screenshot stands in the middle of a 16:10 stage as wide as the text */
.card.is-feature .media.is-phone {
  aspect-ratio: 16 / 10;
}

@media (max-width: 900px) {
  .card.is-feature {
    flex-direction: column;
    align-items: stretch;
  }

  .card.is-feature .media {
    flex: none;
  }

  /* stacked on a phone: the portrait stage again, or the screenshot gets too small */
  .card.is-feature .media.is-phone {
    aspect-ratio: 4 / 5;
  }
}

/* ---------- neofetch panel (hero, wide screens) ---------- */

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 48px;
  align-items: center;
}

.fetch {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 0 40px color-mix(in srgb, var(--accent) 10%, transparent), var(--glow);
  overflow: hidden;
  font-size: 13px;
}

.fetch-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 12px;
}

.fetch-bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--red);
  opacity: 0.8;
}

.fetch-bar i:nth-child(2) {
  background: var(--amber);
}

.fetch-bar i:nth-child(3) {
  background: var(--accent);
}

.fetch-bar span {
  margin-left: 8px;
}

.fetch-body {
  display: grid;
  gap: 18px;
  padding: 20px 20px 8px;
}

.fetch-logo {
  margin: 0;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.05;
  text-shadow: var(--text-glow);
}

.fetch-info {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 14px;
  margin: 0;
}

.fetch-info dt {
  color: var(--accent);
  font-weight: 700;
}

.fetch-info dd {
  margin: 0;
  color: var(--text);
}

.fetch-user {
  grid-column: 1 / -1;
  color: var(--accent) !important;
}

.fetch-user span {
  color: var(--text-faint);
}

.fetch-rule {
  grid-column: 1 / -1;
  height: 1px;
  margin: 4px 0 6px !important;
  background: repeating-linear-gradient(90deg, var(--border-hi) 0 6px, transparent 6px 10px);
  opacity: 0.6;
}

.fetch-colors {
  display: flex;
  gap: 0;
  padding: 12px 20px 20px;
}

.fetch-colors i {
  flex: 1;
  height: 14px;
}

.fetch-colors i:first-child {
  border-radius: 4px 0 0 4px;
}

.fetch-colors i:last-child {
  border-radius: 0 4px 4px 0;
}

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

  .fetch {
    display: none;
  }
}

/* ---------- responsive ---------- */

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

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 14.5px;
  }

  .shell .at {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 40px 0 48px;
  }

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

  section {
    padding: 56px 0;
  }

  .card {
    padding: 18px;
  }

  .badge {
    position: static;
    justify-self: start;
    width: fit-content;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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