/* =====================================================================
   Design tokens — swap these to re-theme the whole site.
   Neutral, light, restrained: one accent, no gradients on the page.
===================================================================== */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-2: #f6f7f9;
  --surface: #ffffff;
  --border: #e6e8ec;
  --border-strong: #d4d8df;
  --text: #0f172a;
  --muted: #4b5563;
  --dim: #8a94a6;
  --accent: #2563eb;
  --accent-ink: #1d4ed8;
  --ink: #111827;              /* primary buttons */
  --ink-hover: #000000;
  --on-ink: #ffffff;           /* text on primary buttons */
  --on-ink-muted: #cbd5e1;
  --nav-bg: rgba(255, 255, 255, 0.85);
  --ok: #16a34a;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --max: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --phone-w: 320px;

  /* Phone screen (follows iOS light / dark) */
  --phone-ring: #3a3a3c;
  --ph-screen: #f2f2f7;
  --ph-surface: #ffffff;
  --ph-card: #f3f4f6;
  --ph-line: #ececf1;
  --ph-text: #111111;
  --ph-muted: #4b5563;
  --ph-dim: #8a94a6;
  --ph-dock: rgba(255, 255, 255, 0.55);
  --ph-dock-border: rgba(255, 255, 255, 0.6);
  --ph-wall:
    radial-gradient(120% 80% at 10% 0%, #dbe7ff 0%, transparent 55%),
    radial-gradient(90% 70% at 100% 30%, #ffe3d6 0%, transparent 55%),
    radial-gradient(90% 70% at 40% 110%, #d9f3ea 0%, transparent 55%),
    #eef1f6;
}

/* Dark theme. Two identical blocks: one follows the OS when no choice was
   stored, the other applies the explicit choice from the toggle. Keep them in sync. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e1013; --bg-2: #15181d; --surface: #121418;
    --border: #232730; --border-strong: #323845;
    --text: #e8eaf0; --muted: #a6afbd; --dim: #717b8a;
    --accent: #6d9cff; --accent-ink: #8db1ff;
    --ink: #f2f3f5; --ink-hover: #ffffff; --on-ink: #0e1013; --on-ink-muted: #4b5563;
    --nav-bg: rgba(14, 16, 19, 0.8);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4); --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
    --phone-ring: #4a4a4e;
    --ph-screen: #000000; --ph-surface: #000000; --ph-card: #1c1c1e; --ph-line: #2c2c2e;
    --ph-text: #f5f5f7; --ph-muted: #a1a1a6; --ph-dim: #6e6e73;
    --ph-dock: rgba(60, 60, 67, 0.55); --ph-dock-border: rgba(255, 255, 255, 0.08);
    --ph-wall:
      radial-gradient(120% 80% at 10% 0%, #1b2a4a 0%, transparent 55%),
      radial-gradient(90% 70% at 100% 30%, #3a1f2e 0%, transparent 55%),
      radial-gradient(90% 70% at 40% 110%, #0f2f2a 0%, transparent 55%),
      #0b0f1a;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1013; --bg-2: #15181d; --surface: #121418;
  --border: #232730; --border-strong: #323845;
  --text: #e8eaf0; --muted: #a6afbd; --dim: #717b8a;
  --accent: #6d9cff; --accent-ink: #8db1ff;
  --ink: #f2f3f5; --ink-hover: #ffffff; --on-ink: #0e1013; --on-ink-muted: #4b5563;
  --nav-bg: rgba(14, 16, 19, 0.8);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4); --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --phone-ring: #4a4a4e;
  --ph-screen: #000000; --ph-surface: #000000; --ph-card: #1c1c1e; --ph-line: #2c2c2e;
  --ph-text: #f5f5f7; --ph-muted: #a1a1a6; --ph-dim: #6e6e73;
  --ph-dock: rgba(60, 60, 67, 0.55); --ph-dock-border: rgba(255, 255, 255, 0.08);
  --ph-wall:
    radial-gradient(120% 80% at 10% 0%, #1b2a4a 0%, transparent 55%),
    radial-gradient(90% 70% at 100% 30%, #3a1f2e 0%, transparent 55%),
    radial-gradient(90% 70% at 40% 110%, #0f2f2a 0%, transparent 55%),
    #0b0f1a;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--text);
  line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 28px;
  padding: 0 var(--gutter); height: 60px;
  background: var(--nav-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 28px; width: 100%; max-width: var(--max); margin: 0 auto; }
.brand { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 26px; height: 26px; border-radius: 8px; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; font-size: 11px; font-weight: 700; letter-spacing: 0; }
.nav-links { display: flex; gap: 20px; margin-left: auto; font-size: 14px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.nav .btn { white-space: nowrap; }
@media (max-width: 1000px) { .nav-links { display: none; } .nav-actions { margin-left: auto; } }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.lang { display: inline-flex; height: 34px; padding: 3px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); gap: 2px; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; height: 100%; padding: 0 9px; border-radius: 7px; font-size: 12px; font-weight: 600; color: var(--dim); transition: background .18s, color .18s; }
.lang-btn svg { width: 18px; height: 12px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12); flex-shrink: 0; }
.lang-btn:hover { color: var(--text); }
.lang-btn[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
@media (max-width: 420px) { .lang-btn span { display: none; } .lang-btn { padding: 0 7px; } }
.theme-toggle { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); display: grid; place-items: center; color: var(--muted); flex-shrink: 0; transition: background .18s, color .18s; }
.theme-toggle:hover { background: var(--bg-2); color: var(--text); }
.theme-toggle svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: block; }
}
@media (max-width: 760px) { .nav-links { display: none; } .nav-actions { margin-left: auto; } }

/* ---------- Buttons, chips, labels ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 10px;
  font-weight: 600; font-size: 14px; border: 1px solid var(--border-strong); background: var(--surface);
  transition: background .18s, border-color .18s, transform .18s var(--ease), box-shadow .18s;
}
.btn:hover { background: var(--bg-2); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.btn-primary:hover { background: var(--ink-hover); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn svg { width: 16px; height: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; font-weight: 500; padding: 4px 9px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--border); color: var(--muted); }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-2); font-size: 13px; font-weight: 500; color: var(--muted); }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.mono { font-family: var(--mono); font-size: 12px; color: var(--dim); }

/* ---------- Layout ---------- */
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--border); }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 34px); margin-top: 10px; }
.lede { color: var(--muted); font-size: 16px; margin-top: 12px; }
.lede a { color: var(--accent); font-weight: 500; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(40px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero-left { position: relative; min-height: 440px; }
.hero-intro, .app-panel { transition: opacity .3s var(--ease), transform .3s var(--ease); }
.hero-intro.is-hidden { opacity: 0; transform: translateY(6px); pointer-events: none; position: absolute; inset: 0; }
.avatar-row { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); }
.avatar-fallback { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, #5b8cff, #a86bff); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 17px; letter-spacing: .02em; box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 1px 2px rgba(0,0,0,.15); }
.name { font-size: clamp(36px, 5vw, 56px); font-weight: 800; letter-spacing: -0.03em; }
.title { font-size: clamp(17px, 2vw, 21px); color: var(--muted); margin-top: 8px; font-weight: 500; }
.tagline { font-size: 17px; color: var(--muted); margin-top: 18px; max-width: 52ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.stats { display: grid; grid-template-columns: repeat(4, auto); gap: 8px 28px; margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--border); }
.stats li { display: flex; flex-direction: column; }
.stats b { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.stats span { font-size: 12.5px; color: var(--dim); max-width: 12ch; line-height: 1.35; }
.hint { margin-top: 26px; font-size: 13px; color: var(--dim); display: inline-flex; align-items: center; gap: 8px; }
.hint svg { width: 16px; height: 16px; stroke: currentColor; }
@media (max-width: 560px) { .stats { grid-template-columns: repeat(2, auto); } }

/* App panel (left column, desktop) */
.app-panel { position: relative; padding: 26px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); animation: panel-in .3s var(--ease); }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } }
.panel-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); color: var(--muted); display: grid; place-items: center; }
.panel-close:hover { background: var(--bg-2); }
.panel-close svg { width: 14px; height: 14px; stroke: currentColor; }
.panel-head { display: flex; gap: 14px; align-items: center; padding-right: 40px; }
.panel-icon { width: 60px; height: 60px; border-radius: 14px; border: 1px solid var(--border); }
.panel-name { font-size: 24px; }
.panel-role { color: var(--muted); font-size: 14px; font-weight: 500; margin-top: 2px; }
.panel-meta { color: var(--dim); font-size: 12.5px; margin-top: 2px; }
.panel-summary { margin-top: 16px; color: var(--muted); font-size: 15px; }
.panel-metrics { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.panel-metrics li { display: flex; flex-direction: column; padding: 10px 14px; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); min-width: 110px; }
.panel-metrics b { font-size: 18px; font-weight: 700; }
.panel-metrics span { font-size: 11.5px; color: var(--dim); }
.panel-h { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin-top: 20px; }
.panel-highlights { margin-top: 10px; display: grid; gap: 8px; }
.panel-highlights li { position: relative; padding-left: 16px; font-size: 14px; color: var(--muted); }
.panel-highlights li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.app-panel .chips { margin-top: 16px; }
.panel-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.store-badge { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 10px; background: var(--ink); color: var(--on-ink); font-size: 13px; font-weight: 600; }
.store-badge small { display: block; font-size: 9px; font-weight: 500; color: var(--on-ink-muted); letter-spacing: .04em; line-height: 1; }
.store-badge svg { width: 18px; height: 18px; fill: currentColor; }
.store-badge svg.ico-stroke { fill: none; stroke: currentColor; }

/* ---------- Phone ---------- */
.hero-right { display: flex; justify-content: center; }
.phone-wrap { position: relative; }
.phone {
  position: relative; width: var(--phone-w); aspect-ratio: 393 / 852;
  border-radius: 56px; padding: 11px;
  background: #1c1c1e;
  box-shadow: 0 0 0 1.5px var(--phone-ring), 0 0 0 3px #0b0b0c, 0 30px 60px -20px rgba(0, 0, 0, 0.45), 0 12px 24px -12px rgba(0, 0, 0, 0.25);
}
.phone::before { content: ""; position: absolute; left: -4px; top: 118px; width: 3px; height: 30px; border-radius: 2px; background: #2c2c2e; box-shadow: 0 48px 0 #2c2c2e, 0 112px 0 #2c2c2e; }
.phone::after { content: ""; position: absolute; right: -4px; top: 186px; width: 3px; height: 92px; border-radius: 2px; background: #2c2c2e; }
.phone-island { position: absolute; top: 21px; left: 50%; transform: translateX(-50%); width: 108px; height: 30px; border-radius: 20px; background: #000; z-index: 6; }
.screen { position: relative; width: 100%; height: 100%; border-radius: 46px; overflow: hidden; background: var(--ph-screen); isolation: isolate; }

/* Home screen (iOS-like; wallpaper and text follow the theme) */
.home {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  background: var(--ph-wall);
  transition: transform .4s var(--ease), opacity .4s var(--ease);
}
.home.is-away { transform: scale(1.08); opacity: 0; pointer-events: none; }
.statusbar { display: flex; justify-content: space-between; align-items: center; padding: 18px 28px 0; font-size: 14px; font-weight: 600; color: var(--ph-text); }
.statusbar svg { width: 54px; height: 12px; }
.home-greeting { padding: 30px 24px 0; font-size: 11px; font-weight: 600; color: var(--ph-dim); letter-spacing: .08em; text-transform: uppercase; }
.icon-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 0; padding: 14px 10px; }
.home-fun { padding-top: 10px; }
.icon-grid-fun { padding-top: 10px; }
.icon-grid-fun .icon-svg { border: 1.5px dashed rgba(22, 163, 74, 0.55); }
.app-icon { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; }
.app-icon img, .app-icon .icon-svg { width: 54px; height: 54px; border-radius: 13px; box-shadow: 0 4px 10px rgba(15, 23, 42, 0.14); transition: transform .16s var(--ease); background: #fff; }
.app-icon .icon-svg { display: grid; place-items: center; }
.app-icon .icon-svg svg { width: 32px; height: 32px; }
.app-icon:hover img, .app-icon:hover .icon-svg { transform: translateY(-2px); }
.app-icon:active img, .app-icon.is-pressed img, .app-icon:active .icon-svg, .app-icon.is-pressed .icon-svg { transform: scale(.9); }
.app-icon > span:last-child { font-size: 10px; font-weight: 500; color: var(--ph-text); text-align: center; line-height: 1.15; max-width: 62px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dock { margin: auto 14px 16px; padding: 12px; border-radius: 30px; background: var(--ph-dock); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); display: flex; justify-content: space-around; border: 1px solid var(--ph-dock-border); }
.dock a { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; box-shadow: 0 4px 10px rgba(15, 23, 42, 0.14); transition: transform .16s var(--ease); }
.dock a:hover { transform: translateY(-3px); }
.dock svg { width: 26px; height: 26px; fill: #fff; }

/* App Store–style product page inside the phone */
.appview { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--ph-surface); animation: app-open .35s var(--ease); }
@keyframes app-open { from { transform: scale(.9); opacity: 0; } }
.app-topbar { display: flex; align-items: center; gap: 8px; padding: 54px 14px 8px; font-size: 13px; font-weight: 600; background: var(--ph-surface); border-bottom: 1px solid var(--ph-line); z-index: 2; }
.app-back { display: inline-flex; align-items: center; gap: 2px; color: var(--accent); font-weight: 500; font-size: 14px; }
.app-back svg { width: 18px; height: 18px; stroke: currentColor; }
.app-topname { flex: 1; text-align: center; color: var(--ph-text); }
.app-topspacer { width: 56px; }
.app-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; padding-bottom: 28px; }
.app-scroll::-webkit-scrollbar { display: none; }
.store-head { display: flex; gap: 14px; padding: 18px 18px 12px; }
.store-head img { width: 92px; height: 92px; border-radius: 22px; border: 1px solid var(--ph-line); }
.store-head h3 { font-size: 19px; line-height: 1.2; color: var(--ph-text); }
.store-head p { font-size: 13px; color: var(--ph-muted); margin-top: 3px; }
.store-get { margin-top: 10px; display: inline-flex; align-items: center; height: 30px; padding: 0 18px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.store-stats { display: flex; gap: 0; padding: 4px 18px 12px; border-bottom: 1px solid var(--ph-line); margin: 0 0 6px; }
.store-stats li { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 8px 6px; border-right: 1px solid var(--ph-line); }
.store-stats li:last-child { border-right: 0; }
.store-stats b { font-size: 15px; color: var(--ph-text); line-height: 1.2; }
.store-stats span { font-size: 10px; color: var(--ph-dim); text-transform: uppercase; letter-spacing: .04em; line-height: 1.25; margin-top: 3px; }
.store-links { justify-content: center; }
.store-shots { display: flex; gap: 10px; overflow-x: auto; padding: 8px 18px 10px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.store-shots::-webkit-scrollbar { display: none; }
.store-shots img { flex: 0 0 auto; width: 150px; aspect-ratio: 9 / 19.5; object-fit: cover; border-radius: 14px; border: 1px solid var(--ph-line); scroll-snap-align: start; background: var(--ph-card); }
.store-feature { padding: 8px 18px 6px; }
.store-feature img { width: 100%; border-radius: 14px; border: 1px solid var(--ph-line); }
.store-section { padding: 10px 18px 0; }
.store-section h4 { margin: 10px 0 6px; font-size: 14px; color: var(--ph-text); }
.store-section p { font-size: 13px; color: var(--ph-muted); line-height: 1.5; }
.store-section ul { display: grid; gap: 6px; }
.store-section li { font-size: 12.5px; color: var(--ph-muted); padding-left: 14px; position: relative; line-height: 1.45; }
.store-section li::before { content: ""; position: absolute; left: 0; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.store-links { display: flex; gap: 8px; padding: 14px 18px 0; flex-wrap: wrap; }
.store-links a { font-size: 12.5px; color: var(--accent); font-weight: 500; }
.home-indicator { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); width: 120px; height: 5px; border-radius: 3px; background: var(--ph-text); opacity: .85; z-index: 3; }

/* Snake, inside the phone */
.game { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 16px 0; }
.game-hud { width: 100%; display: flex; justify-content: space-between; font-size: 12px; color: var(--ph-muted); font-weight: 500; }
.game-hud b { color: var(--ph-text); }
.game canvas { width: 100%; max-width: 268px; aspect-ratio: 1; border-radius: 12px; background: var(--ph-card); border: 1px solid var(--ph-line); touch-action: none; }
.game-msg { min-height: 36px; text-align: center; font-size: 12.5px; color: var(--ph-muted); }
.game-msg b { color: var(--ph-text); }
.game-msg a { color: var(--accent); font-weight: 600; }
.dpad { display: grid; grid-template-columns: repeat(3, 44px); grid-template-rows: repeat(2, 44px); gap: 6px; }
.dpad button { border-radius: 10px; background: var(--ph-card); border: 1px solid var(--ph-line); font-size: 16px; color: var(--ph-text); }
.dpad button:active { background: var(--ph-line); }
.dpad .up { grid-column: 2; } .dpad .left { grid-column: 1; grid-row: 2; } .dpad .down { grid-column: 2; grid-row: 2; } .dpad .right { grid-column: 3; grid-row: 2; }
.game .btn { height: 34px; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-right { order: -1; }
  .hero-left { min-height: 0; }
  :root { --phone-w: 290px; }
}

/* ---------- Work cards ---------- */
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.work-card { display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.work-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.work-head { display: flex; gap: 12px; align-items: center; }
.work-head img { width: 50px; height: 50px; border-radius: 12px; border: 1px solid var(--border); }
.work-head h3 { font-size: 17px; }
.work-head p { font-size: 12.5px; color: var(--dim); }
.work-role { font-size: 13px; color: var(--muted); font-weight: 500; }
.work-summary { font-size: 14px; color: var(--muted); }
.work-foot { display: flex; align-items: center; gap: 14px; margin-top: auto; padding-top: 10px; }
.work-links { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.work-open { margin-left: auto; flex-shrink: 0; }
@media (max-width: 400px) { .work-foot { flex-direction: column; align-items: stretch; } .work-open { margin-left: 0; } }
.minilink { font-size: 13px; color: var(--muted); font-weight: 500; }
.minilink:hover { color: var(--text); }

/* ---------- Repos ---------- */
.repo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.repo { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); transition: transform .2s var(--ease), box-shadow .2s; }
.repo:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.repo h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.repo h3 svg { width: 16px; height: 16px; fill: var(--dim); }
.repo p { font-size: 13px; color: var(--muted); flex: 1; }
.repo-meta { display: flex; gap: 12px; font-size: 12px; color: var(--dim); font-family: var(--mono); }
.lang-dot { display: inline-flex; align-items: center; gap: 6px; }
.lang-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lang, #9ca3af); }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 26px; display: grid; gap: 26px; max-width: 760px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px; background: var(--border-strong); }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -24px; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 3px var(--bg); }
.tl-head { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.tl-head h3 { font-size: 17px; }
.tl-head span { font-size: 13px; color: var(--dim); }
.tl-role { font-size: 14px; color: var(--muted); font-weight: 500; }
.tl-points { margin-top: 8px; display: grid; gap: 6px; }
.tl-points li { font-size: 14px; color: var(--muted); padding-left: 14px; position: relative; }
.tl-points li::before { content: "–"; position: absolute; left: 0; color: var(--dim); }
.edu { margin-top: 28px; padding-left: 26px; color: var(--muted); font-size: 14px; }

/* ---------- How I work (product / growth / AI) ---------- */
.approach-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.approach { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; }
.approach h3 { font-size: 17px; display: flex; align-items: center; gap: 10px; }
.approach .num { font-family: var(--mono); font-size: 12px; color: var(--dim); font-weight: 500; }
.approach > p { font-size: 14px; color: var(--muted); margin-top: 8px; }
.approach ul { margin-top: 14px; display: grid; gap: 7px; }
.approach li { font-size: 13.5px; color: var(--muted); padding-left: 14px; position: relative; line-height: 1.5; }
.approach li::before { content: ""; position: absolute; left: 0; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.learning { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 14px; color: var(--muted); }
.learning .eyebrow { margin-right: 4px; }
@media (max-width: 860px) { .approach-grid { grid-template-columns: 1fr; } }

/* ---------- Skills ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.skill-group { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.skill-group h3 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin-bottom: 12px; font-weight: 600; }

/* ---------- Contact & footer ---------- */
.contact-card { padding: clamp(32px, 6vw, 56px); border-radius: 20px; background: var(--bg-2); border: 1px solid var(--border); text-align: center; }
.contact-card h2 { font-size: clamp(26px, 3.4vw, 34px); margin-top: 10px; }
.contact-card .cta-row { justify-content: center; }
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 24px 0; font-size: 13px; color: var(--dim); border-top: 1px solid var(--border); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 16px); opacity: 0; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: var(--on-ink); font-size: 13px; transition: .25s var(--ease); z-index: 500; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
