/* =====================================================================
   Personal hub — styles
   ---------------------------------------------------------------------
   Design tokens (colors, spacing, shadows, radii) live in :root and
   [data-theme="dark"]. No hardcoded colors outside these blocks.
   ===================================================================== */

/* ---------- Design tokens: light ---------- */
:root {
  color-scheme: light;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;

  --bg: #faf9f6;
  --surface: #ffffff;
  --surface-2: #f4f2ed;
  --surface-3: #ece9e2;
  --text: #191d22;
  --text-2: #565f6b;
  --border: #e3dfd6;
  --border-strong: #cec8bb;

  --accent: #0c7a6e;
  --accent-strong: #0a675c;
  --accent-soft: rgba(12, 122, 110, 0.09);
  --accent-contrast: #ffffff;
  --link: #0a6f63;

  --shadow-sm: 0 1px 2px rgba(25, 29, 34, 0.05), 0 1px 3px rgba(25, 29, 34, 0.06);
  --shadow-md: 0 2px 4px rgba(25, 29, 34, 0.04), 0 8px 20px rgba(25, 29, 34, 0.08);
  --shadow-lg: 0 12px 40px rgba(25, 29, 34, 0.12);

  --header-bg: rgba(250, 249, 246, 0.82);
  --hero-glow: rgba(12, 122, 110, 0.08);
  --grid-line: rgba(25, 29, 34, 0.045);

  --radius: 14px;
  --radius-sm: 9px;
  --focus-ring: 0 0 0 3px rgba(12, 122, 110, 0.35);

  --header-h: 64px;
  --container: 1100px;
  --pad: clamp(1.25rem, 4vw, 2rem);
  --section-y: clamp(4.5rem, 10vw, 7.5rem);
}

/* ---------- Design tokens: dark ---------- */
[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0b0e12;
  --surface: #11151b;
  --surface-2: #171c23;
  --surface-3: #1d232b;
  --text: #e9ebee;
  --text-2: #98a2ad;
  --border: #232a33;
  --border-strong: #313a46;

  --accent: #5ebfb0;
  --accent-strong: #7bd0c3;
  --accent-soft: rgba(94, 191, 176, 0.12);
  --accent-contrast: #0b0e12;
  --link: #6fc7b9;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.35), 0 10px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 44px rgba(0, 0, 0, 0.55);

  --header-bg: rgba(11, 14, 18, 0.8);
  --hero-glow: rgba(94, 191, 176, 0.09);
  --grid-line: rgba(255, 255, 255, 0.04);

  --focus-ring: 0 0 0 3px rgba(94, 191, 176, 0.4);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.25s ease, color 0.25s ease;
}

img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0; }
figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

::selection { background: var(--accent-soft); }

/* ---------- Layout helpers ---------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section {
  padding-block: var(--section-y);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.section-head { margin-bottom: var(--space-7); max-width: 62ch; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-3);
}

.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; letter-spacing: -0.025em; }
.section-sub { margin-top: var(--space-3); color: var(--text-2); font-size: 1.02rem; line-height: 1.55; max-width: 58ch; }
.section-note { margin-top: var(--space-5); color: var(--text-2); font-size: 0.93rem; }

.text-link { font-weight: 600; }
.text-link:hover { text-decoration: underline; }

.mono { font-family: var(--font-mono); }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 200;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top 0.2s ease;
}
.skip-link:focus { top: var(--space-4); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand-mark { font-family: var(--font-mono); font-weight: 700; color: var(--accent); }
.brand-cursor { animation: blink 1.2s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.nav-links { display: flex; align-items: center; gap: 0.25rem; }

.nav-link {
  display: inline-block;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-weight: 550;
  font-size: 0.93rem;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.nav-link:hover { color: var(--text); background: var(--accent-soft); text-decoration: none; }
.nav-link.is-active { color: var(--accent); }

.nav-actions { display: flex; align-items: center; gap: var(--space-2); }

/* Language switcher — minimal EN | RU */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}
.lang-link {
  color: var(--text-2);
  font-weight: 600;
  padding: 0.4rem 0.32rem;
  border-radius: 7px;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.lang-link:hover { color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.lang-current { color: var(--accent); font-weight: 700; padding: 0.4rem 0.32rem; }
.lang-sep { color: var(--border-strong); user-select: none; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: var(--text-2);
  transition: color 0.2s ease, background-color 0.2s ease;
}
.icon-btn:hover { color: var(--text); background: var(--accent-soft); }
.icon { width: 20px; height: 20px; display: block; }

.menu-toggle { display: none; }

/* Theme toggle icons: dark theme shows the sun (switch to light), and vice versa */
.icon-sun { display: none; }
.icon-moon { display: block; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.72rem 1.35rem;
  border-radius: 11px;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { cursor: not-allowed; opacity: 0.55; box-shadow: none; transform: none !important; }

.btn-primary { background: var(--accent); color: var(--accent-contrast); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-strong); color: var(--accent-contrast); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

.btn-sm { padding: 0.5rem 0.95rem; font-size: 0.88rem; }
.btn-block { width: 100%; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background-color 0.25s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(4.5rem, 11vw, 8rem) clamp(3.5rem, 9vw, 6.5rem);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 75%);
  mask-image: linear-gradient(to bottom, black 0%, transparent 75%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(58% 46% at 50% 0%, var(--hero-glow), transparent 72%);
  pointer-events: none;
}
.hero .container { position: relative; }

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-2);
  margin-bottom: var(--space-5);
  letter-spacing: 0.02em;
}
.hero-kicker .prompt { color: var(--accent); margin-right: 0.35rem; }

/* The identity: big mono wordmark with a live cursor */
.hero-name {
  font-family: var(--font-mono);
  font-size: clamp(2.8rem, 9vw, 5.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.hero-name .accent { color: var(--accent); }
.hero-cursor { color: var(--accent); animation: blink 1.2s steps(1) infinite; }

.hero-role {
  margin-top: 1.1rem;
  font-family: var(--font-mono);
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  letter-spacing: 0.04em;
  color: var(--accent);
}

.hero-title {
  margin-top: var(--space-6);
  font-size: clamp(1.5rem, 3.4vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.18;
  max-width: 26ch;
}
.hero-title em { font-style: normal; color: var(--accent); }

.hero-text {
  margin-top: 1.4rem;
  font-size: clamp(1.02rem, 1.6vw, 1.15rem);
  color: var(--text-2);
  max-width: 58ch;
  line-height: 1.6;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }

.hero-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-6); }
.hero-tags li {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--text-2);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
}

/* ---------- Projects ----------
   #projects-grid is a plain container; the actual grids live inside:
   .projects-featured (tier cards) and .projects-compact (rows). */
.projects-grid { display: block; }
#projects { padding-bottom: calc(var(--section-y) * 0.75); }
#projects .section-note { margin-top: var(--space-4); }

.project-card { overflow: hidden; display: flex; flex-direction: column; }
.project-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.project-card:hover .project-media img { transform: scale(1.03); }
.project-type {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-contrast);
  background: var(--accent);
  padding: 0.3rem 0.6rem;
  border-radius: 7px;
}
.project-body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: 0.7rem; flex: 1; }
.project-title-row { display: flex; align-items: center; gap: 0.6rem; justify-content: space-between; }
.project-title { font-size: 1.2rem; font-weight: 700; }
.status-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}
.status-badge.commercial { color: var(--accent-contrast); background: var(--accent); }
.project-desc { color: var(--text-2); font-size: 0.95rem; line-height: 1.55; }
.project-why {
  margin-top: 0.1rem;
  font-size: 0.85rem;
  color: var(--text-2);
  opacity: 0.85;
  padding-left: 0.8rem;
  border-left: 2px solid var(--border-strong);
}
.project-tech { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: auto; }
.chip {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-2);
  border: 1px solid var(--border);
  background: var(--surface-2);
  padding: 0.28rem 0.6rem;
  border-radius: 7px;
}
.project-link { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; font-size: 0.92rem; color: var(--link); margin-top: 0.2rem; }
.project-link .arrow { transition: transform 0.2s ease; }
.project-link:hover { text-decoration: none; }
.project-link:hover .arrow { transform: translateX(3px); }

/* Group label inside sections: "Selected work" / "More projects" */
.group-title {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-7) 0 var(--space-4);
}
.group-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.section-head + .group-title { margin-top: 0; }

/* Selected work — featured tier */
.projects-featured {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.4rem;
}
.projects-featured .project-title { font-size: 1.25rem; }
.project-card.commercial { border-top: 3px solid var(--accent); }
.project-card.commercial .project-body { padding-top: 1.1rem; }
.commercial-note {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-2);
  opacity: 0.8;
  letter-spacing: 0.03em;
}
.commercial-note a.commercial-note-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}
.commercial-note a.commercial-note-link:hover {
  color: var(--link);
}
.commercial-note .arrow {
  display: inline-block;
  margin-left: 0.3rem;
  transition: transform 0.2s ease;
}
.commercial-note a.commercial-note-link:hover .arrow {
  transform: translateX(3px);
}

/* Flagship — full-width featured card */
.project-card--flagship { grid-column: 1 / -1; }
@media (min-width: 768px) {
  .project-card--flagship {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    align-items: stretch;
  }
  .project-card--flagship .project-media {
    aspect-ratio: auto;
    border-bottom: 0;
    border-right: 1px solid var(--border);
  }
  .project-card--flagship .project-body { padding: 1.6rem 1.8rem; gap: 0.8rem; }
  .project-card--flagship .project-title { font-size: 1.35rem; }
}

/* More projects — compact rows */
.projects-compact { display: grid; gap: 0.75rem; }
.compact-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding: 1.05rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.compact-row:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.compact-main { flex: 1 1 280px; min-width: 0; }
.compact-title-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.compact-title { font-size: 1.05rem; font-weight: 700; }
.compact-desc { margin-top: 0.25rem; color: var(--text-2); font-size: 0.88rem; line-height: 1.5; }
.compact-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.55rem; }
.compact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--link);
  white-space: nowrap;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.compact-link .arrow { transition: transform 0.2s ease; }
.compact-link:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.compact-link:hover .arrow { transform: translateX(3px); }

/* ---------- Build areas ---------- */
.section-alt { background: var(--surface-2); border-block: 1px solid var(--border); }
#build .section-head { margin-bottom: var(--space-6); }
.build-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1.4rem;
}
.build-card { padding: 1.5rem 1.6rem; display: flex; flex-direction: column; gap: 0.8rem; }
.build-title { font-size: 1.15rem; font-weight: 700; }
.build-title::before { content: "> "; font-family: var(--font-mono); color: var(--accent); }
.build-desc { color: var(--text-2); font-size: 0.93rem; line-height: 1.55; }
.build-tech { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: auto; }

/* ---------- Currently building (terminal card) ---------- */
.terminal-card {
  max-width: 760px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.terminal-dots { display: inline-flex; gap: 0.38rem; }
.terminal-dots .dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal-dots .dot-r { background: #e05252; }
.terminal-dots .dot-y { background: #d9a53d; }
.terminal-dots .dot-g { background: #4caf7d; }
.terminal-fname {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-2);
  letter-spacing: 0.02em;
}
.terminal-body { padding: 1.15rem 1.3rem 1.35rem; font-family: var(--font-mono); }
.term-cmd { font-size: 0.9rem; color: var(--text-2); margin-bottom: 0.9rem; }
.term-prompt { color: var(--accent); margin-right: 0.5rem; }
.term-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem;
  font-size: 0.92rem;
  line-height: 1.7;
  padding-block: 0.18rem;
}
.term-bullet { color: var(--accent); }
.term-text { color: var(--text); }
.term-link { color: var(--accent); font-weight: 600; white-space: nowrap; }
.term-link:hover { text-decoration: underline; }

/* ---------- Game ---------- */
.section-game { background: var(--surface-2); border-block: 1px solid var(--border); }

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(1.6rem, 4vw, 3rem);
  align-items: start;
}
.game-media { display: grid; gap: 1rem; }
.game-cover {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.game-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
.game-shot img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.game-shot figcaption {
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-2);
  letter-spacing: 0.04em;
}
.game-info { position: sticky; top: calc(var(--header-h) + 1.5rem); }
.game-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.45; } }
.game-desc { margin-top: 1.1rem; color: var(--text-2); line-height: 1.6; }
.game-facts { margin-top: 1.4rem; display: grid; gap: 0.55rem; }
.game-facts li { display: flex; gap: 0.6rem; font-size: 0.9rem; }
.fact-label {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-2);
  min-width: 6.5rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.game-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.8rem; }

/* ---------- Team ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.4rem;
}
.team-card { padding: 1.6rem; }
.team-top { display: flex; align-items: center; gap: 1rem; }
.team-avatar {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--border);
}
.team-name { font-size: 1.2rem; font-weight: 700; }
.team-role { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent); margin-top: 0.15rem; letter-spacing: 0.03em; }
.team-about { margin-top: 1.1rem; color: var(--text-2); font-size: 0.95rem; line-height: 1.55; }
.team-note { margin-top: 0.8rem; font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-2); }
.team-links { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.4rem; }
.team-link svg { display: block; }
.team-link-ext { opacity: 0.55; }

/* ---------- Two paths (home fork: developer / game) ---------- */
.section-paths { background: var(--surface-2); border-block: 1px solid var(--border); }
.paths-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1.4rem; }
.path-card { padding: 1.6rem; display: flex; flex-direction: column; gap: 1.2rem; }
.path-head { display: flex; align-items: flex-start; gap: 1rem; }
.path-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  flex: none;
}
.path-title { font-size: 1.25rem; font-weight: 700; }
.path-message { margin-top: 0.3rem; color: var(--text-2); font-size: 0.93rem; line-height: 1.55; }
.path-links { display: grid; gap: 0.35rem; margin-top: auto; }
.path-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--link);
  padding: 0.35rem 0;
  transition: color 0.18s ease;
}
.path-link:hover { text-decoration: none; color: var(--accent); }
.path-link .arrow { transition: transform 0.2s ease; }
.path-link:hover .arrow { transform: translateX(3px); }
.path-link svg { opacity: 0.7; }

/* ---------- Game teaser (home: one asset + CTA) ---------- */
.game-teaser-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 2rem; align-items: center; }
.game-teaser-media {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.game-teaser-media img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.game-teaser-info { display: grid; gap: 1.1rem; }

/* ---------- Social groups (Find me, grouped discovery) ---------- */
.social-group-head {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-top: 0.8rem;
  padding: 0 0.2rem;
}
.social-group-head:first-child { margin-top: 0; }

/* ---------- UndeadOverhaul page (/game/) ---------- */
.game-page-hero {
  position: relative;
  padding-block: clamp(3rem, 7vw, 5rem) clamp(2.5rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.game-page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 70%);
  mask-image: linear-gradient(to bottom, black 0%, transparent 70%);
  pointer-events: none;
}
.game-page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 50% at 50% 0%, var(--hero-glow), transparent 70%);
  pointer-events: none;
}
.game-page-hero .container { position: relative; }
.game-breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-2);
  margin-bottom: var(--space-5);
}
.game-breadcrumb a { color: var(--accent); font-weight: 600; }
.game-breadcrumb a:hover { text-decoration: underline; }
.game-page-title {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.game-page-tagline {
  margin-top: 0.65rem;
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2vw, 1.2rem);
  letter-spacing: 0.03em;
  color: var(--accent);
}
.game-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 2.5rem;
  align-items: center;
  margin-top: var(--space-6);
}
.game-hero-copy { display: grid; gap: 1.2rem; }
.game-hero-cover {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.game-section { padding-block: var(--section-y); scroll-margin-top: calc(var(--header-h) + 1rem); }
.game-col { max-width: 820px; }
.game-support .support-card { border: 1px solid var(--border-strong); }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(1.6rem, 4vw, 3rem);
  align-items: start;
}
#about .section-head { margin-bottom: var(--space-6); }
.about-text { color: var(--text-2); font-size: 1.02rem; line-height: 1.65; }
.about-text p { max-width: 58ch; }
.about-text p + p { margin-top: 1rem; }

/* ---------- Work with me ---------- */
#work { padding-top: calc(var(--section-y) * 0.3); }
.contact-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  flex-wrap: wrap;
  padding: clamp(1.6rem, 4vw, 2.5rem);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, var(--accent-soft), transparent 55%),
    var(--surface);
  box-shadow: var(--shadow-sm);
}
.contact-text h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -0.02em; }
.contact-text p { margin-top: var(--space-2); color: var(--text-2); max-width: 54ch; line-height: 1.55; }
.contact-band .btn { flex: none; }

/* ---------- Socials ---------- */
.section-socials { background: var(--surface-2); border-block: 1px solid var(--border); }
.social-list { display: grid; gap: 0.8rem; }
.social-row {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.25s ease;
}
.social-row:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateX(4px); text-decoration: none; }
.social-icon {
  width: 44px;
  height: 44px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
}
.social-icon svg { display: block; }
.social-text { display: grid; gap: 0.1rem; min-width: 0; }
.social-label { font-weight: 700; font-size: 1rem; }
.social-handle { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-2); }
.social-note { font-size: 0.85rem; color: var(--text-2); line-height: 1.45; }
.social-arrow { margin-left: auto; color: var(--text-2); transition: transform 0.18s ease, color 0.18s ease; }
.social-row:hover .social-arrow { transform: translate(3px, -3px); color: var(--accent); }

/* ---------- Support ---------- */
.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.4rem;
}
.support-card { padding: 1.7rem; display: flex; flex-direction: column; gap: 0.9rem; }
.support-title { font-size: 1.2rem; font-weight: 700; }
.support-desc { color: var(--text-2); font-size: 0.93rem; line-height: 1.55; }
.support-card .btn { margin-top: auto; }
.support-card .btn svg { flex: none; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding-block: 2.6rem; background: var(--surface-2); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; justify-content: space-between; }
.footer-copy { color: var(--text-2); font-size: 0.9rem; }
.footer-tag { font-family: var(--font-mono); font-size: 0.76rem; color: var(--text-2); margin-top: 0.3rem; max-width: 46ch; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-2);
  font-size: 0.88rem;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.footer-link:hover { color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.footer-link svg { width: 15px; height: 15px; }
.footer-link-muted { opacity: 0.5; cursor: default; }

/* ---------- Reveal-on-scroll ----------
   Elements get hidden only after main.js adds .js to <html>,
   so nothing is ever hidden when JavaScript is unavailable.
   Uses animation (not transition) so it never interferes with
   hover transitions on cards/buttons. */
.js .reveal { opacity: 0; }
.js .reveal.in { animation: reveal-in 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) forwards; }
@keyframes reveal-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.js .projects-featured .reveal.in:nth-child(2) { animation-delay: 0.06s; }
.js .projects-featured .reveal.in:nth-child(3) { animation-delay: 0.12s; }
.js .projects-featured .reveal.in:nth-child(4) { animation-delay: 0.18s; }
.js .team-grid .reveal.in:nth-child(2) { animation-delay: 0.08s; }

/* ---------- Resume / professional profile ----------
   A more document-like layer under the personal hub. Inherits the
   design system (colors, typography, cards, chips, buttons) and only
   adds layout primitives specific to a structured professional page. */
.resume-hero {
  position: relative;
  padding-block: clamp(3.5rem, 8vw, 5.5rem) clamp(2.75rem, 6vw, 4rem);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.resume-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 70%);
  mask-image: linear-gradient(to bottom, black 0%, transparent 70%);
  pointer-events: none;
}
.resume-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 50% at 50% 0%, var(--hero-glow), transparent 70%);
  pointer-events: none;
}
.resume-hero .container { position: relative; }

.resume-breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-2);
  margin-bottom: var(--space-5);
}
.resume-breadcrumb a { color: var(--accent); font-weight: 600; }
.resume-breadcrumb a:hover { text-decoration: underline; }

.resume-name {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.resume-role {
  margin-top: 0.65rem;
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2vw, 1.2rem);
  letter-spacing: 0.03em;
  color: var(--accent);
}

.resume-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  row-gap: 0.35rem;
  margin-top: 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.83rem;
  color: var(--text-2);
}
.resume-meta li { display: inline-flex; align-items: baseline; }
.resume-meta li + li::before { content: "·"; margin: 0 0.8rem; color: var(--border-strong); }
.resume-meta a { color: var(--text-2); }
.resume-meta a:hover { color: var(--accent); text-decoration: underline; }

.resume-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem; margin-top: var(--space-6); }
.resume-pdf-note {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-2);
}

/* Narrower, document-like reading column */
.resume-col { max-width: 780px; }
.resume-section { padding-block: var(--section-y); scroll-margin-top: calc(var(--header-h) + 1rem); }
.resume-sec-head { margin-bottom: var(--space-6); max-width: 60ch; }
.resume-sec-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -0.025em; }
.resume-summary { color: var(--text); font-size: 1.06rem; line-height: 1.7; }

/* Experience groups + entries */
.resume-group + .resume-group { margin-top: var(--space-7); }
.resume-group-title {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.resume-group-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.resume-entries { display: grid; gap: 1rem; }
.resume-entry {
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.resume-entry:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }

/* Commercial / deepest experience gets a visible accent edge */
.resume-group--highlight .resume-entry { border-left: 3px solid var(--accent); }

.resume-entry-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.2rem;
}
.resume-entry-company { font-size: 1.15rem; font-weight: 700; }
.resume-entry-role { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); margin-top: 0.2rem; }
.resume-entry-date { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-2); white-space: nowrap; }

.resume-entry-points { margin-top: 1rem; display: grid; gap: 0.45rem; }
.resume-entry-points li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.6;
}
.resume-entry-points li::before { content: "–"; position: absolute; left: 0; color: var(--accent); }

.resume-entry-tech { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.9rem; }
.resume-entry-result {
  margin-top: 0.9rem;
  font-size: 0.9rem;
  color: var(--text);
  padding-left: 0.9rem;
  border-left: 2px solid var(--accent);
  line-height: 1.55;
}
.resume-entry-result strong { color: var(--accent); }

/* Skills grid */
.resume-skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 1rem;
}
.resume-skill {
  padding: 1.2rem 1.3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.resume-skill-cat {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.7rem;
}
.resume-skill-items { display: flex; flex-wrap: wrap; gap: 0.45rem; }

/* Contact */
.resume-section-contact { background: var(--surface-2); border-block: 1px solid var(--border); }
.resume-contact-sub { margin-top: -0.4rem; margin-bottom: var(--space-5); color: var(--text-2); line-height: 1.6; max-width: 54ch; }
.resume-contact { display: grid; gap: 0.8rem; }
.resume-contact-row {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.25s ease;
}
.resume-contact-row:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateX(4px); text-decoration: none; }
.resume-contact-icon {
  width: 44px;
  height: 44px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
}
.resume-contact-icon svg { display: block; }
.resume-contact-text { display: grid; gap: 0.1rem; min-width: 0; }
.resume-contact-label { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.06em; }
.resume-contact-value { font-weight: 600; word-break: break-word; }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .game-layout { grid-template-columns: 1fr; }
  .game-info { position: static; }
  .about-grid { grid-template-columns: 1fr; }
  .game-hero-layout { grid-template-columns: 1fr; }
  .game-teaser-layout { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  :root { --header-h: 56px; }

  .nav { height: var(--header-h); }
  .menu-toggle { display: inline-flex; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    background: var(--header-bg);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 0.75rem 1rem 1rem;
    animation: menu-in 0.18s ease;
  }
  .nav-links.open { display: flex; }
  @keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

  .nav-link { padding: 0.8rem 1rem; font-size: 1rem; }

  .icon-close { display: none; }
  .menu-open .icon-menu { display: none; }
  .menu-open .icon-close { display: block; }

  .icon-btn { width: 34px; height: 34px; }

  .game-gallery { grid-template-columns: 1fr 1fr; }
  .game-shot img {
    aspect-ratio: auto;
    height: auto;
    object-fit: contain;
  }
  .team-links .btn { flex: 1; }

  .compact-row { align-items: flex-start; }
  .compact-link { padding-left: 0; }

  /* Resume: dates stack under the company name, bullets keep air */
  .resume-entry-head { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
  .resume-entry-date { white-space: normal; }
  .resume-meta li + li::before { content: ""; margin: 0; }
  .resume-meta { gap: 0.1rem 0.9rem; }
}

@media (max-width: 480px) {
  .game-gallery { grid-template-columns: 1fr; }
  .hero-cta .btn { width: 100%; }
  .social-row { gap: 0.85rem; padding: 0.9rem 1rem; }
  .contact-band { flex-direction: column; align-items: stretch; }
  .contact-band .btn { width: 100%; }
  .footer-inner { flex-direction: column; align-items: flex-start; }

  /* Resume: full-width CTA, tighter cards */
  .resume-actions .btn { width: 100%; }
  .resume-entry { padding: 1.15rem 1.15rem; }
  .resume-contact-row { gap: 0.85rem; padding: 0.9rem 1rem; }
  .resume-name { font-size: clamp(1.9rem, 9vw, 2.5rem); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
