/* Shared styles for the CV and arcade pages. */

:root {
  --ink: #15171c;
  --muted: #5b5f68;
  --paper: #f7f5f0;
  --card: #ffffff;
  --rule: #e2ded4;
  --accent: #1f4fd8;
  --accent-ink: #ffffff;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-feature-settings: 'cv11', 'ss01';
}
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; }

.skip {
  position: absolute; left: 12px; top: -48px;
  background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 6px; z-index: 10;
}
.skip:focus { top: 12px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.eyebrow {
  font: 600 12px/1.2 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 8px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper); font: 600 14px/1 'Inter', sans-serif;
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { color: var(--accent-ink); }

/* ---------- Picker ---------- */

  display: flex; flex-direction: column; gap: 12px;
  background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 24px;
  text-decoration: none; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

/* ---------- Arcade ---------- */

.arcade { background: #0e1016; color: #e9e5da; --muted: #a3a7b3; --rule: #282c38; --card: #161922; --accent: #8fb0ff; --ink: #e9e5da; color-scheme: dark; }
.arcade a:hover { color: var(--accent); }
.arcade header { padding-top: 64px; padding-bottom: 32px; }
.arcade .back { display: inline-block; margin-bottom: 32px; text-decoration: none; color: var(--muted); }
.arcade .back:hover { color: var(--accent); }
.arcade h1 { font: 400 clamp(22px, 4vw, 34px)/1.4 'Press Start 2P', monospace; letter-spacing: 0; margin: 12px 0 20px; }
.arcade .lead { max-width: 680px; color: var(--muted); font-size: 17px; }
.arcade .lead + .lead { margin-top: 12px; }
.arcade .games { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding-bottom: 32px; }
@media (max-width: 560px) { .arcade .games { grid-template-columns: 1fr; } }
/* Ten games: five across when there's room. */
@media (min-width: 1280px) { .arcade main.wrap { max-width: 1320px; } .arcade .games { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.arcade .game {
  display: flex; flex-direction: column; gap: 10px; height: 100%;
  background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 20px;
  text-decoration: none; transition: border-color 0.2s ease, transform 0.2s ease;
}
.arcade .game:hover { border-color: var(--accent); transform: translateY(-2px); color: inherit; }
.arcade .game .shot { display: block; width: calc(100% + 40px); height: auto; margin: -20px -20px 6px; border-radius: 11px 11px 0 0; border-bottom: 1px solid var(--rule); image-rendering: pixelated; }
.arcade .game h2 { font: 400 13px/1.5 'Press Start 2P', monospace; letter-spacing: 0; color: #fff; }
.arcade .game p { color: var(--muted); font-size: 15px; }
.arcade .game .controls { font: 500 12px/1.5 'JetBrains Mono', monospace; color: #cfc9bb; margin-top: auto; }
.arcade .game .play { font: 400 11px/1 'Press Start 2P', monospace; color: var(--accent); }
.arcade .notice { color: var(--muted); font-size: 14px; padding-bottom: 64px; max-width: 680px; }

/* ---------- CV ---------- */

.cv { background: #e9e6df; }
.cv .toolbar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; padding: 20px; }
.cv .toolbar a.back { margin-right: auto; color: var(--muted); text-decoration: none; }
.cv .lang { display: inline-flex; gap: 2px; margin-right: 6px; font: 600 12px/1 'JetBrains Mono', monospace; }
.cv .lang a { padding: 8px 9px; border-radius: 999px; color: var(--muted); text-decoration: none; }
.cv .lang a:hover { color: var(--ink); }
.cv .lang a[aria-current] { background: var(--ink); color: #fff; }
.cv .sheet {
  width: 100%; max-width: 210mm; margin: 0 auto 40px; background: #fff; color: #16181d;
  padding: 18mm 17mm; box-shadow: 0 6px 30px rgba(0, 0, 0, 0.12);
  font-size: 10pt; line-height: 1.45;
}
.cv .head { border-bottom: 2px solid #16181d; padding-bottom: 12px; }
.cv .head h1 { font: 600 24pt/1.1 'Inter', sans-serif; letter-spacing: -0.02em; }
.cv .head .headline { margin-top: 4px; color: #3b3f47; font-size: 10.5pt; }
.cv .contact { list-style: none; display: flex; flex-wrap: wrap; gap: 2px 0; margin-top: 8px; font-size: 9pt; color: #3b3f47; }
.cv .contact li:not(:last-child)::after { content: '·'; margin: 0 8px; color: #9a9ea6; }
.cv .contact a { text-decoration: none; }
.cv section { margin-top: 14px; }
.cv h2 {
  font: 700 8.5pt/1 'JetBrains Mono', monospace; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 8px; padding-bottom: 4px; border-bottom: 1px solid #e4e1da;
}
.cv .summary p + p { margin-top: 6px; }
.cv .item { break-inside: avoid; }
.cv .item + .item { margin-top: 10px; }
.cv .row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.cv .row h3 { font-size: 10.5pt; font-weight: 600; }
.cv .row .when { white-space: nowrap; font: 500 8.5pt/1 'JetBrains Mono', monospace; color: #5b5f68; }
.cv .sub { color: #4a4e57; font-size: 9.5pt; }
.cv .item ul { margin: 4px 0 0 16px; }
.cv .item li + li { margin-top: 2px; }
/* Roles at one company as rising steps, oldest on the left. */
.cv .steps { list-style: none; margin: 8px 0 6px !important; padding: 0; display: flex; gap: 4px; align-items: flex-start; }
.cv .steps li { flex: 1; margin-top: calc((var(--n) - 1 - var(--i)) * 5px) !important; padding-top: 5px; border-top: 3px solid var(--accent); font-size: 8.5pt; line-height: 1.25; }
.cv .steps li.is-part { border-top-style: dotted; }
.cv .steps b { display: block; font-weight: 600; }
.cv .steps span { display: block; margin-top: 2px; font: 500 7.5pt/1.3 'JetBrains Mono', monospace; color: #5b5f68; }
.cv .skills { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; list-style: none; }
.cv .skills b { font-weight: 600; }
.cv .tags { color: #5b5f68; font-size: 9pt; margin-top: 4px; }

@media (max-width: 640px) {
  .cv .sheet { padding: 24px 18px; box-shadow: none; }
  .cv .skills { grid-template-columns: 1fr; }
  .cv .row { flex-direction: column; gap: 2px; }
  .cv .steps { flex-direction: column-reverse; gap: 6px; }
  .cv .steps li { margin-top: 0 !important; padding: 0 0 0 8px; border-top: 0; border-left: 3px solid var(--accent); }
  .cv .steps li.is-part { border-left-style: dotted; }
}

@page { size: A4; margin: 13mm 15mm; }
.cv .legal { padding: 0 16px 28px; text-align: center; font: 500 8.5pt/1.4 'JetBrains Mono', monospace; color: #5b5f68; }
@media print {
  .cv { background: #fff; }
  .cv .toolbar, .cv .legal, .skip { display: none !important; }
  .cv .sheet { box-shadow: none; margin: 0; max-width: none; padding: 0; }
  .cv a { text-decoration: none; }
}

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

@media screen and (max-width: 640px) {
  .cv .contact a, .cv .row h3 a { display: inline-block; padding: 4px 0; }
}

/* ---------- 404 ---------- */

.notfound main { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding-top: 48px; padding-bottom: 48px; }
.notfound h1 { font: 400 clamp(32px, 7vw, 64px)/1.3 'Press Start 2P', monospace; margin: 16px 0 20px; color: #fff; }
.notfound .lead { color: var(--muted); font-size: 18px; max-width: 560px; }
.notfound .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.notfound .btn { background: var(--accent); border-color: var(--accent); color: #0f1115; }
.notfound .btn:hover { background: #fff; border-color: #fff; color: #0f1115; }
.notfound .btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.notfound .btn.ghost:hover { border-color: var(--accent); color: var(--accent); background: transparent; }
