/* ==========================================================================
   FOV Studio — design tokens (mirror of the FOV Studio Design System tokens.json)
   Change a value here and in the design system together.
   ========================================================================== */
:root {
  /* Palette reference (marigold photo): slate #222d36 · spruce #324242 · rust #8a5330 · teal #55706b · ochre #ac7d4d
     Swatches are used as-is for surfaces and lines; text/accent colors are lighter tints of the same hues for WCAG AA. */
  /* Surfaces */
  --bg-000: #161e25;   /* page background — deepened slate */
  --bg-100: #222d36;   /* cards, console, contact box — slate swatch */
  --bg-200: #2a3640;   /* raised: media placeholders, hover fills, code */
  /* Lines */
  --line-100: #324242; /* decorative hairlines, map dots — spruce swatch (not for controls) */
  --line-200: #6a817c; /* control borders — teal family: 4.1:1 on bg-000, 3.4:1 on bg-100 */
  /* Ink (warm off-white, follows the photo's paper tone) */
  --ink-100: #ece6db;  /* headings, primary text — 13.6:1 */
  --ink-200: #d2cbbf;  /* long-form article body — 10.5:1 */
  --ink-300: #a3aca8;  /* secondary text, labels, metadata — 7.2:1 (6:1 on bg-100) */
  /* Field accents — tints of the swatches */
  --ochre: #c99b68;    /* fov.studio + Virtual Production (ochre #ac7d4d, lifted) — 6.7:1 */
  --teal: #8fb0a8;     /* Game Development (teal #55706b, lifted) — 7.2:1 */
  --rust: #d08a5c;     /* AI (rust #8a5330, lifted) — 6:1 */
  --accent: var(--ochre);
  --on-accent: #161e25;/* text on any accent fill — ≥6:1 */
  /* Status (forms, notices) */
  --success: #9cbf9a;
  --warning: #d4a877;
  --error: #e09a8a;
  --info: #9cbdb4;

  /* Type */
  --font-display: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --text-xs: 0.75rem;   /* 12 */
  --text-sm: 0.875rem;  /* 14 */
  --text-base: 1rem;    /* 16 */
  --text-lg: 1.125rem;  /* 18 */
  --text-xl: 1.25rem;   /* 20 */
  --text-2xl: 1.5rem;   /* 24 */
  --text-3xl: 1.875rem; /* 30 */
  --text-4xl: 2.5rem;   /* 40 */
  --text-5xl: 3.5rem;   /* 56 */
  --text-6xl: 5rem;     /* 80 */

  /* Spacing — 4px base */
  --space-1: 0.25rem;  /* 4 */
  --space-2: 0.5rem;   /* 8 */
  --space-3: 0.75rem;  /* 12 */
  --space-4: 1rem;     /* 16 */
  --space-5: 1.25rem;  /* 20 */
  --space-6: 1.5rem;   /* 24 */
  --space-8: 2rem;     /* 32 */
  --space-10: 2.5rem;  /* 40 */
  --space-12: 3rem;    /* 48 */
  --space-16: 4rem;    /* 64 */
  --space-24: 6rem;    /* 96 */
  --space-30: 7.5rem;  /* 120 */

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  /* Elevation (dark UI: borders first, shadow only on hover lift) */
  --shadow-lift: 0 12px 32px -8px rgba(0, 0, 0, 0.6);
  --focus-ring: 0 0 0 2px #161e25, 0 0 0 4px var(--accent);

  /* Motion */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --dur-fast: 150ms;
  --dur-normal: 250ms;

  /* Layout */
  --container: 1160px;
  --gutter: var(--space-4);
  --header-h: 64px;
  --target: 44px; /* minimum touch target */
}

@media (min-width: 768px)  { :root { --gutter: var(--space-8); } }
@media (min-width: 1280px) { :root { --gutter: var(--space-10); } }

/* Per-site accent: set on <body> */
.site-main, .site-vp { --accent: var(--ochre); }
.site-gamedev        { --accent: var(--teal); }
.site-ai             { --accent: var(--rust); }

/* ==========================================================================
   FOV Studio — components (mobile-first; breakpoints 640 / 768 / 1024 / 1280)
   Uses only tokens from tokens.css.
   ========================================================================== */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--space-4)); }
body {
  margin: 0;
  background: var(--bg-000);
  color: var(--ink-100);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }
::selection { background: var(--accent); color: var(--on-accent); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0; letter-spacing: -0.02em; color: var(--ink-100); }
h1 { font-size: clamp(2.75rem, 9vw, var(--text-6xl)); line-height: 1.02; }
h2 { font-size: clamp(var(--text-3xl), 4vw, var(--text-4xl)); line-height: 1.1; }
h3 { font-size: var(--text-xl); line-height: 1.3; letter-spacing: -0.01em; }
p { margin: 0; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -9999px; top: var(--space-4); z-index: 100; }
.skip-link:focus { left: var(--space-4); background: var(--accent); color: var(--on-accent); padding: var(--space-2) var(--space-4); border-radius: var(--radius-md); font-weight: 600; }

/* ---------- Label (mono eyebrow) ---------- */
.label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-300);
}
.label--accent { color: var(--accent); }
.rec { display: inline-flex; align-items: center; gap: var(--space-2); }
.rec::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }

/* ---------- Header + nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(22, 30, 37, 0.88);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-100);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: var(--header-h); }
.logo {
  display: inline-flex; align-items: center; gap: var(--space-3);
  min-height: var(--target);
  font-family: var(--font-mono); font-weight: 600; font-size: var(--text-sm); letter-spacing: 0.08em;
  color: var(--ink-100);
}
.logo:hover { text-decoration: none; }
.logo-mark { width: 22px; height: 22px; color: var(--accent); flex: none; }
.logo-sub { color: var(--accent); }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--target); height: var(--target);
  background: none; color: var(--ink-100);
  border: 1px solid var(--line-200); border-radius: var(--radius-md); cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }
.nav {
  display: none;
  position: absolute; left: 0; right: 0; top: var(--header-h);
  flex-direction: column;
  background: var(--bg-000); border-bottom: 1px solid var(--line-100);
  padding: var(--space-2) var(--gutter) var(--space-4);
}
.nav.is-open { display: flex; }
.nav a {
  display: flex; align-items: center; min-height: 48px;
  padding: 0 var(--space-3);
  color: var(--ink-300); font-size: var(--text-lg); border-radius: var(--radius-md);
  transition: color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink-100); background: var(--bg-200); text-decoration: none; }

@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .nav { display: flex; position: static; flex-direction: row; gap: var(--space-1); padding: 0; background: none; border: 0; }
  .nav a { min-height: var(--target); font-size: var(--text-sm); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 48px; padding: 0 var(--space-6);
  border-radius: var(--radius-pill);
  font-family: var(--font-body); font-weight: 600; font-size: var(--text-base); line-height: 1;
  border: 1px solid var(--line-200); background: transparent; color: var(--ink-100);
  cursor: pointer; user-select: none;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.btn:hover { text-decoration: none; border-color: var(--ink-300); background: var(--bg-200); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent); border-color: var(--accent); filter: brightness(1.08); }
.btn[aria-disabled="true"], .btn:disabled { opacity: 0.5; pointer-events: none; }

/* ---------- Hero + viewfinder ---------- */
.hero { padding: var(--space-12) 0 var(--space-16); }
.viewfinder { position: relative; padding: var(--space-8) var(--space-6); }
.viewfinder::before, .viewfinder::after,
.vf-b::before, .vf-b::after {
  content: ""; position: absolute; width: 20px; height: 20px; border: 2px solid var(--accent);
}
.viewfinder::before { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.viewfinder::after  { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.vf-b { position: absolute; inset: 0; pointer-events: none; }
.vf-b::before { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.vf-b::after  { bottom: 0; right: 0; border-left: 0; border-top: 0; }

.hero-meta { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); margin-bottom: var(--space-6); }
.hero h1 { max-width: 14ch; }
.hero .lead { margin-top: var(--space-6); max-width: 60ch; font-size: var(--text-lg); line-height: 1.6; color: var(--ink-300); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }

@media (min-width: 768px) {
  .hero { padding: var(--space-24) 0 var(--space-24); }
  .viewfinder { padding: var(--space-16) var(--space-12); }
  .viewfinder::before, .viewfinder::after, .vf-b::before, .vf-b::after { width: 28px; height: 28px; }
  .hero .lead { font-size: var(--text-xl); }
  .hero-actions { margin-top: var(--space-10); }
}

/* ---------- Sections ---------- */
.section { padding: var(--space-16) 0; border-top: 1px solid var(--line-100); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-10); }
.section-head .label { display: block; margin-bottom: var(--space-3); }
.section-head p { color: var(--ink-300); max-width: 52ch; }
.section-title { margin-top: var(--space-3); }
@media (min-width: 768px) { .section { padding: var(--space-24) 0; } }

.prose { max-width: 68ch; color: var(--ink-300); font-size: var(--text-lg); }
.prose p + p { margin-top: var(--space-4); }
.prose strong { color: var(--ink-100); }

.grid { display: grid; gap: var(--space-5); grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); gap: var(--space-8); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) and (max-width: 1023px) { .grid--3 > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (min-width: 1024px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Card ---------- */
.card {
  display: flex; flex-direction: column; gap: var(--space-3);
  background: var(--bg-100); color: var(--ink-100);
  border: 1px solid var(--line-100); border-radius: var(--radius-lg);
  padding: var(--space-6);
}
a.card { transition: border-color var(--dur-normal) var(--ease), transform var(--dur-normal) var(--ease), box-shadow var(--dur-normal) var(--ease); }
a.card:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.card p { color: var(--ink-300); }
.card-foot { margin-top: auto; padding-top: var(--space-3); display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.card-foot .arrow:only-child { margin-left: auto; }
.arrow { color: var(--accent); font-family: var(--font-mono); font-size: var(--text-sm); }

/* Field card (main page → subdomains): each sets its own accent */
.field-card { padding: var(--space-8) var(--space-6); min-height: 260px; }
.field-card.f-vp      { --accent: var(--ochre); }
.field-card.f-gamedev { --accent: var(--teal); }
.field-card.f-ai      { --accent: var(--rust); }
.field-icon { width: 40px; height: 40px; color: var(--accent); }

/* Media frame (16:9) — placeholder until an image/video is added */
.media {
  aspect-ratio: 16 / 9; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-200); border: 1px dashed var(--line-200); border-radius: var(--radius-md);
  color: var(--ink-300); font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.1em; text-transform: uppercase;
}
.media:has(img, iframe, video) { border: 0; }
.media img, .media iframe, .media video { width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }

.project-card { padding: var(--space-3) var(--space-3) var(--space-6); }
.card-body a.arrow { display: inline-flex; align-items: center; min-height: var(--target); align-self: flex-start; }
.card-body { padding: var(--space-1) var(--space-2) 0; display: flex; flex-direction: column; gap: var(--space-2); }

/* ---------- Video (click-to-play YouTube) ---------- */
.video-card { padding: var(--space-3) var(--space-3) var(--space-6); margin: 0; }
.video {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--radius-md); background: var(--bg-200);
}
.video img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; transition: opacity var(--dur-normal) var(--ease), transform var(--dur-normal) var(--ease); }
.video:hover img { opacity: 1; transform: scale(1.02); }
.video-play {
  position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--accent); color: var(--on-accent);
  box-shadow: 0 0 0 6px rgba(22, 30, 37, 0.5);
  transition: transform var(--dur-fast) var(--ease);
}
.video-play svg { width: 26px; height: 26px; margin-left: 3px; }
.video:hover .video-play, .video:focus-visible .video-play { transform: scale(1.08); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.video-caption { display: block; padding: var(--space-1) var(--space-2) 0; color: var(--ink-300); }

/* ---------- Tag ---------- */
.tags { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; margin: 0; padding: 0; }
.tag {
  display: inline-flex; align-items: center; justify-self: start;
  font-family: var(--font-mono); font-size: var(--text-xs); line-height: 1.5;
  border: 1px solid var(--line-200); border-radius: var(--radius-pill);
  padding: var(--space-1) var(--space-3); color: var(--ink-300);
}
.tag--accent { color: var(--accent); border-color: var(--accent); }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 1fr; gap: var(--space-2); padding: var(--space-6) 0; border-bottom: 1px solid var(--line-100); }
.timeline li:first-child { padding-top: 0; }
.when { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--ink-300); }
.where { color: var(--accent); font-size: var(--text-sm); margin: var(--space-1) 0 var(--space-2); }
.timeline p { color: var(--ink-300); }
@media (min-width: 640px) {
  .timeline li { grid-template-columns: 180px 1fr; gap: var(--space-2) var(--space-8); padding: var(--space-8) 0; }
  .when { padding-top: var(--space-1); }
}

/* ---------- World map (International experience) ----------
   Equirectangular crop: Europe → Southeast Asia, lon 12°W → 112°E, lat 62°N → 8°S.
   Points use --lat / --lon in decimal degrees. Change the four bounds only together with world-dots.txt. */
.world-map {
  --lon0: -12; --lon-span: 124; --lat0: 62; --lat-span: 70;
  position: relative; width: 100%; aspect-ratio: 1000 / 564.5; margin-top: var(--space-4);
}
.world-map__land { position: absolute; inset: 0; width: 100%; height: 100%; }
.world-map__land path { stroke: var(--line-100); stroke-width: 4.2; stroke-linecap: round; fill: none; }
.map-points { list-style: none; margin: 0; padding: 0; }
.map-point {
  position: absolute;
  left: calc((var(--lon) - var(--lon0)) / var(--lon-span) * 100%);
  top: calc((var(--lat0) - var(--lat)) / var(--lat-span) * 100%);
  width: 0; height: 0;
  z-index: 1;
}
.map-point:hover, .map-point:focus-within, .map-point.is-open { z-index: 3; }
.map-pin {
  position: absolute; left: calc(var(--target) / -2); top: calc(var(--target) / -2);
  width: var(--target); height: var(--target);
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; padding: 0; cursor: pointer; border-radius: 50%;
}
.map-pin::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(22, 30, 37, 0.9), 0 0 0 5px var(--accent);
  transition: transform var(--dur-fast) var(--ease);
}
.map-point:hover .map-pin::before, .map-pin:focus-visible::before, .map-point.is-open .map-pin::before, .map-point.is-active .map-pin::before { transform: scale(1.35); }
.map-point.is-active .map-pin::before { box-shadow: 0 0 0 4px rgba(22, 30, 37, 0.9), 0 0 0 6px var(--accent), 0 0 0 12px rgba(201, 155, 104, 0.18); }
.map-pin:focus-visible { box-shadow: none; }
.map-pin:focus-visible::before { box-shadow: 0 0 0 4px var(--bg-000), 0 0 0 6px var(--accent); }

.map-note {
  position: absolute; left: 0; bottom: var(--space-4);
  transform: translateX(-50%);
  width: max-content; max-width: 260px;
  background: var(--bg-100); border: 1px solid var(--line-200); border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  box-shadow: var(--shadow-lift);
  visibility: hidden; opacity: 0;
  transition: opacity var(--dur-fast) var(--ease), visibility var(--dur-fast);
  pointer-events: none;
}
.map-note strong { display: block; font-family: var(--font-display); font-weight: 600; font-size: var(--text-base); line-height: 1.3; color: var(--ink-100); margin-top: var(--space-1); }
.map-note p { color: var(--ink-300); font-size: var(--text-sm); line-height: 1.5; margin-top: var(--space-1); }
.map-point:hover .map-note, .map-pin:focus-visible + .map-note, .map-point.is-open .map-note { visibility: visible; opacity: 1; }
/* Edge handling (classes added by main.js) */
.map-point.note-left  .map-note { transform: translateX(calc(-100% + var(--space-4))); }
.map-point.note-right .map-note { transform: translateX(calc(var(--space-4) * -1)); }
.map-point.note-below .map-note { bottom: auto; top: var(--space-4); }


/* ---------- Console (experience log under the map) ---------- */
.console {
  margin-top: var(--space-6);
  background: var(--bg-100); border: 1px solid var(--line-100); border-radius: var(--radius-lg);
  overflow: hidden;
  font-family: var(--font-mono); font-size: var(--text-sm); line-height: 1.7;
}
.console-bar {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line-100);
}
.console-dots { display: inline-flex; gap: 6px; }
.console-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-200); display: block; }
.console-dots i:first-child { background: var(--accent); }
.console-hint { margin-left: auto; display: none; }
@media (min-width: 640px) { .console-hint { display: inline; } }
.console-out {
  padding: var(--space-4); min-height: 240px; max-height: 360px; overflow-y: auto;
  color: var(--ink-200);
}
.console-line { margin: 0; white-space: pre-wrap; word-break: break-word; }
.console-line + .console-line { margin-top: 2px; }
.console-gap { margin-top: var(--space-4) !important; }
.console-prompt { color: var(--accent); }
.console-cmd { color: var(--ink-100); }
.console-dim { color: var(--ink-300); }
.console-key { color: var(--ink-300); display: inline-block; min-width: 7ch; }
.console-title { color: var(--ink-100); font-weight: 600; }
.console-bullet { color: var(--accent); }
.console-err { color: var(--error); }
.console-caret {
  display: inline-block; width: 0.6em; height: 1.1em; margin-left: 2px; vertical-align: text-bottom;
  background: var(--accent); animation: console-blink 1s steps(1) infinite;
}
@keyframes console-blink { 50% { opacity: 0; } }
.console-form {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4); border-top: 1px solid var(--line-100);
}
.console-form .console-prompt { white-space: nowrap; }
.console-input {
  flex: 1; min-width: 0; min-height: var(--target);
  background: transparent; border: 0; outline: none;
  color: var(--ink-100); font: inherit; caret-color: var(--accent);
}
.console-input::placeholder { color: var(--ink-300); }
.console-input:focus-visible { box-shadow: none; }
.console-input::-webkit-calendar-picker-indicator { display: none !important; }
.console-li { padding-left: 4ch; text-indent: -2ch; }
.console-form:focus-within { box-shadow: inset 0 0 0 2px var(--accent); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.console-run {
  min-height: var(--target); padding: 0 var(--space-4);
  background: transparent; color: var(--ink-100); font: inherit;
  border: 1px solid var(--line-200); border-radius: var(--radius-md); cursor: pointer;
}
.console-run:hover { background: var(--bg-200); border-color: var(--ink-300); }
@media (max-width: 639px) { .console-form .console-prompt { display: none; } }

/* Console: one input line until a command runs, then it opens over the map */
.console:not(.is-expanded) .console-bar,
.console:not(.is-expanded) .console-out,
.console:not(.is-expanded) .console-chips { display: none; }
.console:not(.is-expanded) .console-form { border-top: 0; }
.console:not(.is-expanded) .console-form:focus-within { border-radius: var(--radius-lg); }
.map-stage { position: relative; }
.console { position: relative; z-index: 4; transition: box-shadow var(--dur-normal) var(--ease); }
.console.is-expanded {
  position: absolute; left: 0; right: 0; bottom: 0; top: 0; margin-top: 0;
  display: flex; flex-direction: column;
  background: rgba(34, 45, 54, 0.9);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-color: var(--line-200);
  box-shadow: var(--shadow-lift);
}
.console.is-expanded .console-out { flex: 1; max-height: none; min-height: 0; }
.console-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--target); height: var(--target); margin: calc(var(--space-2) * -1) calc(var(--space-2) * -1) calc(var(--space-2) * -1) 0;
  background: none; border: 0; border-radius: var(--radius-md); color: var(--ink-300); cursor: pointer;
}
.console-toggle:hover { color: var(--ink-100); background: var(--bg-200); }
.console-toggle svg { width: 18px; height: 18px; }
.console-toggle .i-collapse { display: none; }
.console.is-expanded .console-toggle .i-expand { display: none; }
.console.is-expanded .console-toggle .i-collapse { display: inline; }
.console-hint kbd { font: inherit; color: var(--accent); }
.console-chips {
  display: flex; gap: var(--space-2); overflow-x: auto; scrollbar-width: none;
  padding: 0 var(--space-4) var(--space-3);
}
.console-chips::-webkit-scrollbar { display: none; }
.console-chips button {
  flex: none; min-height: var(--target); padding: 0 var(--space-3);
  background: transparent; color: var(--ink-300); font: inherit; font-size: var(--text-xs); letter-spacing: 0.04em;
  border: 1px solid var(--line-200); border-radius: var(--radius-pill); cursor: pointer;
}
.console-chips button:hover { color: var(--ink-100); border-color: var(--ink-300); }
.console-chips button[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.console-link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.console-section { color: var(--accent); }
.console-cols { display: inline-block; min-width: 26ch; color: var(--ink-100); }
@media (max-width: 639px) { .console-cols { min-width: 0; display: block; } }
@media (max-width: 639px) {
  .console.is-expanded { position: fixed; inset: var(--space-2); z-index: 60; }
}

.map-legend { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); margin-top: var(--space-6); }

/* Phones: the console under the map shows the details, so hover notes are hidden */
@media (max-width: 639px) { .map-note { display: none; } }

.skill-group h3 { margin-bottom: var(--space-4); }

/* ---------- Post list ---------- */
.posts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-100); }
.post-item a {
  display: grid; grid-template-columns: 1fr; gap: var(--space-2); align-items: baseline;
  padding: var(--space-6) 0; border-bottom: 1px solid var(--line-100); color: var(--ink-100);
}
.post-item a:hover { text-decoration: none; }
.post-item a:hover h3 { color: var(--accent); }
.post-item time { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--ink-300); }
.post-item p { color: var(--ink-300); margin-top: var(--space-1); }
@media (min-width: 640px) { .post-item a { grid-template-columns: 140px 1fr auto; gap: var(--space-2) var(--space-8); } }

/* ---------- Article ---------- */
.article { padding: var(--space-12) 0 var(--space-16); }
.article-head, .article-body { max-width: 720px; margin-inline: auto; }
.article-head { margin-bottom: var(--space-10); }
.article-head h1 { font-size: clamp(var(--text-3xl), 6vw, var(--text-5xl)); line-height: 1.08; margin: var(--space-4) 0 var(--space-5); max-width: none; }
.article-body { color: var(--ink-200); font-size: var(--text-lg); line-height: 1.75; }
.article-body > * + * { margin-top: var(--space-5); }
.article-body h2 { font-size: var(--text-2xl); margin-top: var(--space-12); }
.article-body figure { margin: var(--space-10) 0; }
.article-body figcaption { margin-top: var(--space-3); font-size: var(--text-sm); color: var(--ink-300); }
.article-body blockquote { margin: var(--space-10) 0; padding-left: var(--space-5); border-left: 2px solid var(--accent); color: var(--ink-100); font-size: var(--text-xl); }
.article-body code { font-family: var(--font-mono); font-size: 0.875em; background: var(--bg-200); padding: 2px var(--space-2); border-radius: var(--radius-sm); }
.article-body pre { background: var(--bg-100); border: 1px solid var(--line-100); border-radius: var(--radius-lg); padding: var(--space-5); overflow-x: auto; }
.article-body pre code { background: none; padding: 0; }
.back-link { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--target); font-family: var(--font-mono); font-size: var(--text-sm); }
@media (min-width: 768px) { .article { padding: var(--space-24) 0; } }

/* ---------- Contact box ---------- */
.contact-box {
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-6);
  background: var(--bg-100); border: 1px solid var(--line-100); border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-6);
}
.contact-box h2 { max-width: 18ch; }
.contact-links { display: flex; flex-wrap: wrap; gap: var(--space-3); }
@media (min-width: 1024px) {
  .contact-box { flex-direction: row; align-items: center; justify-content: space-between; padding: var(--space-16); }
}

.contact-text { color: var(--ink-300); margin-top: var(--space-4); max-width: 56ch; }
.empty-state { color: var(--ink-300); padding: var(--space-8) 0; border-top: 1px solid var(--line-100); border-bottom: 1px solid var(--line-100); }
.subsection-title { margin: var(--space-16) 0 var(--space-8); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line-100); padding: var(--space-8) 0; color: var(--ink-300); font-size: var(--text-sm); }
.site-footer .container { display: flex; flex-direction: column; gap: var(--space-3); }
.site-footer a { color: var(--ink-300); }
.site-footer a:hover { color: var(--ink-100); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 var(--space-2); margin-left: calc(var(--space-3) * -1); }
.footer-links a { display: inline-flex; align-items: center; min-height: var(--target); padding: 0 var(--space-3); }
@media (min-width: 768px) {
  .site-footer .container { flex-direction: row; align-items: center; justify-content: space-between; }
  .footer-links { margin-left: 0; margin-right: calc(var(--space-3) * -1); }
}

/* ---------- Motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  a.card:hover { transform: none; }
}
