/* sergiozanotto.com
   One pixel world shared with the games: the home page is a street you can walk,
   the rest is calm, readable pages in the same palette. */

:root {
  --paper: #f5f8f2;      /* page ground, faint pitch-green white */
  --surface: #ffffff;
  --ink: #1c2430;        /* night navy, also the pixel outline */
  --muted: #566170;
  --rule: #d5ddd2;
  --line: #1c2430;
  --link: #256b66;
  --link-hover: #174a46;
  --yellow: #f2c230;     /* U-Bahn yellow */
  --grass: #3f8a4a;
  --brick: #b5543c;
  --teal: #2f7f7a;
  --sky: #cfe6ef;
  --hl-ling: rgba(242, 194, 48, .45);
  --hl-pol: rgba(120, 175, 215, .38);
  --hl-cs: rgba(80, 170, 110, .30);
  --on-yellow: #1c2430;
  --display: "Jersey 15", "Arial Narrow", sans-serif;
  --pixel: "Pixelify Sans", "Courier New", monospace;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --label-w: 9.5rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #151b24; --surface: #202a37; --ink: #eef1f4; --muted: #a9b3c0; --rule: #2c3746;
    --line: #0b1016; --link: #86cfc7; --link-hover: #b7e6e0; --sky: #1d2a44;
    --hl-ling: rgba(242, 194, 48, .30); --hl-pol: rgba(120, 175, 215, .30); --hl-cs: rgba(80, 170, 110, .30);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #151b24; --surface: #202a37; --ink: #eef1f4; --muted: #a9b3c0; --rule: #2c3746;
  --line: #0b1016; --link: #86cfc7; --link-hover: #b7e6e0; --sky: #1d2a44;
  --hl-ling: rgba(242, 194, 48, .30); --hl-pol: rgba(120, 175, 215, .30); --hl-cs: rgba(80, 170, 110, .30);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-synthesis: none; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
}
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 3px; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { text-wrap: balance; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: .5rem 1rem; }
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- header ---------- */
.site-head {
  max-width: 64rem; margin: 0 auto; padding: 1.1rem 1rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 2rem;
}
.site-name { font-family: var(--display); font-weight: 400; font-size: 1.75rem; color: var(--ink); text-decoration: none; letter-spacing: .01em; }
.site-name span { color: var(--brick); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.site-nav a {
  display: inline-block; font-family: var(--display); font-weight: 400; font-size: 1.3rem;
  color: var(--ink); text-decoration: none; padding: .2rem .7rem; border-radius: 6px; border: 2px solid transparent;
}
.site-nav a:hover { border-color: var(--line); }
.site-nav a[aria-current="page"] { background: var(--yellow); color: var(--on-yellow); border-color: var(--line); box-shadow: 0 2px 0 var(--line); }

main { max-width: 64rem; margin: 0 auto; padding: 0 1rem 4rem; }

/* ---------- the street (home hero) ---------- */
.world { position: relative; background: var(--sky); border-block: 3px solid var(--line); }
.world-scroll { overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.world-stage { position: relative; margin: 0 auto; }
.world canvas { display: block; image-rendering: pixelated; image-rendering: crisp-edges; }
.hotspot {
  position: absolute; display: block; border: 0; padding: 0; margin: 0; background: transparent; cursor: pointer;
  border-radius: 4px;
}
.hotspot:hover, .hotspot:focus-visible { background: rgba(242, 194, 48, .22); outline: 3px solid var(--yellow); outline-offset: 0; }
.world-hint {
  position: absolute; left: 50%; top: .6rem; transform: translateX(-50%);
  font-family: var(--display); font-size: 1.2rem; color: #1c2430;
  background: rgba(255, 255, 255, .78); border: 2px solid #1c2430; border-radius: 6px; padding: .1rem .6rem; white-space: nowrap;
  pointer-events: none;
}
.say {
  position: absolute; left: 50%; top: 1.1rem; transform: translateX(-50%);
  width: min(40rem, calc(100% - 1.5rem));
  background: var(--surface); color: var(--ink);
  border: 3px solid var(--line); border-radius: 10px; box-shadow: 0 4px 0 var(--line);
  padding: 1.1rem 1.1rem .9rem;
}
.say[hidden] { display: none; }
.say-name {
  position: absolute; top: 0; left: .9rem; transform: translateY(-60%);
  background: var(--yellow); color: var(--on-yellow); border: 3px solid var(--line); border-radius: 6px;
  font-family: var(--display); font-weight: 400; font-size: 1.3rem; padding: 0 .55rem;
}
.say p { margin: 0 0 .7rem; font-size: 1.05rem; line-height: 1.45; }
.say-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }

.btn {
  display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
  font-family: var(--display); font-weight: 400; font-size: 1.3rem; line-height: 1.1;
  color: var(--ink); background: var(--surface); text-decoration: none;
  border: 3px solid var(--line); border-radius: 8px; box-shadow: 0 3px 0 var(--line);
  padding: .45rem .9rem;
}
.btn:hover { color: var(--ink); transform: translateY(1px); box-shadow: 0 2px 0 var(--line); }
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--line); }
.btn.primary { background: var(--yellow); color: var(--on-yellow); }

/* ---------- intro ---------- */
.intro { padding: 2.6rem 0 1rem; }
.intro h1 {
  font-family: var(--display); font-weight: 400; font-size: clamp(3rem, 9vw, 5.6rem);
  line-height: .9; letter-spacing: .005em; margin: 0 0 .9rem;
}
.role { font-size: 1.15rem; color: var(--muted); margin: 0 0 1.8rem; max-width: 40rem; }
.role strong { color: var(--ink); }
.statement { font-size: clamp(1.15rem, 2.2vw, 1.35rem); line-height: 1.65; max-width: 38em; margin: 0; }
.statement mark {
  color: inherit; background-color: transparent; padding: .02em .14em; margin: 0 -.06em; border-radius: .15em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  background-repeat: no-repeat; background-size: 100% 100%;
  transition: background-size .6s steps(8, end);
}
.statement mark.ling { background-image: linear-gradient(var(--hl-ling), var(--hl-ling)); }
.statement mark.pol { background-image: linear-gradient(var(--hl-pol), var(--hl-pol)); }
.statement mark.cs { background-image: linear-gradient(var(--hl-cs), var(--hl-cs)); }
.js .statement:not(.drawn) mark { background-size: 0% 100%; }
.legend { list-style: none; margin: 1.1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem 1.3rem; font-size: .92rem; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: .45rem; }
.legend li::before { content: ""; width: 1rem; height: .7rem; border-radius: 2px; background: var(--swatch); border: 1px solid var(--rule); }
.legend .ling { --swatch: var(--hl-ling); } .legend .pol { --swatch: var(--hl-pol); } .legend .cs { --swatch: var(--hl-cs); }
.contact { margin: 1.6rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; }

/* ---------- section headings on the home page ---------- */
.sec { padding: 3rem 0 0; }
.sec > h2 { font-family: var(--display); font-weight: 400; font-size: clamp(2.2rem, 5vw, 3rem); line-height: 1.1; margin: 0 0 .4rem; }
.sec > .sub { color: var(--muted); margin: 0 0 1.4rem; max-width: 40em; }

/* ---------- player card ---------- */
.player {
  display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 1.6rem 2rem;
  background: var(--surface); border: 3px solid var(--line); border-radius: 14px; box-shadow: 0 5px 0 var(--line);
  padding: 1.4rem;
}
.player-id { display: grid; gap: .6rem; align-content: start; justify-items: center; text-align: center; }
.player-id canvas { width: 9rem; height: 9rem; image-rendering: pixelated; background: #6aa84f; border: 3px solid var(--line); border-radius: 10px; }
.player-id b { font-family: var(--display); font-weight: 400; font-size: 1.8rem; line-height: 1.15; }
.player-id dl { margin: 0; display: grid; grid-template-columns: auto auto; gap: .1rem .7rem; font-size: .95rem; text-align: left; }
.player-id dt { color: var(--muted); }
.player-id dd { margin: 0; font-weight: 700; }
.player h3 { font-family: var(--display); font-weight: 400; font-size: 1.45rem; margin: 0 0 .5rem; }
.stats { display: grid; gap: 1.3rem; min-width: 0; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.bars li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 6.5rem; gap: .7rem; align-items: center; font-size: .98rem; }
.bar { height: .95rem; border: 2px solid var(--line); border-radius: 3px; background: var(--paper); overflow: hidden; }
.bar span { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--grass) 0 10px, #4f9d5a 10px 12px); }
.bar.lvl-up span { background: repeating-linear-gradient(90deg, var(--yellow) 0 10px, #e0b020 10px 12px); }
.bars .lv { color: var(--muted); font-size: .9rem; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.chips li { border: 2px solid var(--line); border-radius: 6px; padding: 0 .5rem; font-size: .95rem; background: var(--paper); }
.chips li.pro { border-style: dashed; }
.badges { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .8rem 1rem; }
.badges li { display: grid; justify-items: center; gap: .25rem; width: 5.4rem; text-align: center; font-size: .82rem; line-height: 1.25; color: var(--muted); }
.badges i {
  width: 2.6rem; height: 2.6rem; display: grid; place-items: center; font-style: normal;
  font-family: var(--display); font-weight: 400; font-size: 1.2rem; color: #1c2430;
  background: var(--c, var(--yellow)); border: 3px solid var(--line); border-radius: 50%;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18), inset 0 3px 0 rgba(255, 255, 255, .35);
}

/* ---------- tech tree ---------- */
.tree { display: grid; gap: 1.2rem; }
.tree-row { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.hex {
  --hex-c: var(--surface);
  width: 11rem; aspect-ratio: 1.1; display: grid; place-content: center; text-align: center; padding: .6rem 1.6rem;
  clip-path: polygon(25% 2%, 75% 2%, 99% 50%, 75% 98%, 25% 98%, 1% 50%);
  background: var(--line);
  position: relative;
}
.hex::before {
  content: ""; position: absolute; inset: 3px; z-index: 0; background: var(--hex-c);
  clip-path: polygon(25% 2%, 75% 2%, 99% 50%, 75% 98%, 25% 98%, 1% 50%);
}
.hex > * { position: relative; z-index: 1; }
.hex b { font-family: var(--display); font-weight: 400; font-size: 1.6rem; line-height: 1; display: block; }
.hex span { font-size: .82rem; line-height: 1.2; display: block; margin-top: .25rem; }
.hex.done { --hex-c: #cfe8d3; color: #1c2430; }
.hex.now { --hex-c: var(--yellow); color: #1c2430; }
.hex.side { --hex-c: #d7e7f0; color: #1c2430; width: 9rem; }
.link-arrow { width: 1.6rem; height: 3px; background: var(--line); flex: none; }
.tree-label { font-family: var(--display); font-size: 1.3rem; color: var(--muted); width: 100%; margin: 0 0 .1rem; }

/* ---------- off the clock ---------- */
.passions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.passion {
  position: relative; min-height: 15rem; border: 3px solid var(--line); border-radius: 12px; box-shadow: 0 4px 0 var(--line);
  overflow: hidden; display: flex; align-items: flex-end; padding: .9rem; color: #1c2430;
}
.passion .panel { background: rgba(255, 255, 255, .93); border: 2px solid #1c2430; border-radius: 8px; padding: .6rem .8rem; }
.passion h3 { font-family: var(--display); font-weight: 400; font-size: 1.6rem; margin: 0 0 .2rem; }
.passion p { margin: 0; font-size: .98rem; line-height: 1.45; }
.passion.pitch {
  background:
    radial-gradient(circle at 50% 38%, transparent 2.6rem, #f3f3ea 2.6rem 2.8rem, transparent 2.8rem),
    linear-gradient(90deg, transparent calc(50% - 1px), #f3f3ea calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    repeating-linear-gradient(90deg, #4c9a50 0 2.5rem, #44904a 2.5rem 5rem);
}
.passion.vinyl {
  background:
    radial-gradient(circle at 70% 36%, #f2c230 0 1.1rem, #1c2430 1.1rem 1.25rem, transparent 1.25rem),
    repeating-radial-gradient(circle at 70% 36%, #161a20 0 3px, #262c35 3px 5px),
    #161a20;
}
.passion.vinyl::after {
  content: ""; position: absolute; left: 70%; top: 36%; width: 16rem; height: 16rem; transform: translate(-50%, -50%);
  border-radius: 50%; box-shadow: 0 0 0 999px #b5543c; pointer-events: none; z-index: 0;
}
.passion.vinyl .panel { position: relative; z-index: 1; }
.passion.hexmap { background: #3f7a8a; }
.passion.agora { background: #e8dfc9; }

/* intro photo */
.intro-grid { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 1.6rem; align-items: end; margin-bottom: 1.6rem; }
.intro-grid .role { margin: 0; }
.portrait {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border: 3px solid var(--line); border-radius: 10px;
  box-shadow: 0 4px 0 var(--line);
}

/* drawn backgrounds inside the passion tiles */
.passion .tile-bg, .passion .hemi { position: absolute; z-index: 0; pointer-events: none; }
.passion .tile-bg { inset: 0; width: 100%; height: 100%; }
.passion .hemi { left: 50%; top: 1.2rem; width: 92%; transform: translateX(-50%); }
.passion .panel { position: relative; z-index: 1; }

/* ---------- arcade ---------- */
.cabinets { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.4rem; }
.cabinet {
  background: #2b2f36; color: #f5f8f2; border: 3px solid var(--line); border-radius: 14px 14px 6px 6px;
  box-shadow: 0 5px 0 var(--line); padding: .8rem .8rem 1rem; display: grid; gap: .7rem; align-content: start;
}
.cabinet .marquee {
  font-family: var(--display); font-weight: 400; font-size: 1.8rem; text-align: center; color: #1c2430;
  background: var(--yellow); border: 3px solid #0b1016; border-radius: 8px; padding: .15rem .4rem;
}
.cabinet .screen { border: 3px solid #0b1016; border-radius: 8px; overflow: hidden; background: #151b24; aspect-ratio: 4 / 3; }
.cabinet .screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.cabinet p { margin: 0; font-size: .95rem; line-height: 1.45; color: #dfe5ec; }
.cabinet .meta { font-size: .85rem; color: #a9b3c0; }
.cabinet .btn { justify-self: start; }
.cabinet.soon .screen { display: grid; place-items: center; font-family: var(--display); color: #f2c230; font-size: 1.5rem; text-align: center; padding: 1rem; }
.tag-age { display: inline-block; font-family: var(--display); font-size: 1.05rem; line-height: 1.2; border: 2px solid currentColor; border-radius: 4px; padding: 0 .35rem; margin-left: .4rem; vertical-align: .15em; }

/* ---------- inner pages: CV-style blocks ---------- */
.page-title { font-family: var(--display); font-weight: 400; font-size: clamp(2.8rem, 7vw, 4.2rem); line-height: 1.02; margin: 2.6rem 0 .6rem; }
.page-lede { max-width: 40em; color: var(--muted); margin: 0 0 2rem; }
.block { display: grid; grid-template-columns: var(--label-w) minmax(0, 1fr); gap: 0 2rem; padding: 1.5rem 0; }
.block > h2 { font-family: var(--display); font-weight: 400; font-size: 1.5rem; line-height: 1.35; margin: .15rem 0 0; }
.block > .body { border-left: 3px solid var(--rule); padding-left: 1.6rem; min-width: 0; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: 0 1rem; padding: .22rem 0; }
.rows .when { font-family: var(--display); font-size: 1.25rem; line-height: 1.3; color: var(--muted); font-variant-numeric: tabular-nums; }
.entries { list-style: none; margin: 0; padding: 0; }
.entries > li { padding: 0 0 1.5rem; max-width: 42em; }
.entries > li:last-child { padding-bottom: 0; }
.entry-title { font-weight: 700; margin: 0; line-height: 1.4; }
.entry-meta { margin: .15rem 0 0; color: var(--muted); font-size: 1rem; line-height: 1.5; }
.me { color: var(--ink); font-weight: 700; }
.links { list-style: none; margin: .45rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.links a {
  display: inline-block; font-family: var(--display); font-weight: 400; font-size: 1.2rem; line-height: 1.3; text-decoration: none;
  color: var(--ink); border: 2px solid var(--line); border-radius: 6px; padding: 0 .55rem; background: var(--surface);
}
.links a:hover { background: var(--yellow); color: #1c2430; }
.links a.code::before { content: "</> "; font-weight: 700; }

/* talks as tour dates */
.tour { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.tour li { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr); gap: .2rem 1rem; max-width: 46em; }
.tour .yr { font-family: var(--display); font-weight: 400; font-size: 1.5rem; color: var(--brick); }
.tour .city { font-family: var(--display); font-weight: 400; font-size: 1.75rem; line-height: 1.1; display: block; }
.tour .what { display: block; color: var(--muted); font-size: .98rem; line-height: 1.45; margin-top: .15rem; }
.tour .what em { color: var(--ink); }

.plain { margin: 0; padding: 0; list-style: none; }
.plain li { padding: 0 0 .8rem; max-width: 42em; }

/* ---------- footer ---------- */
.site-foot {
  width: min(62rem, 100% - 2rem); margin: 0 auto; padding: 1.5rem 0 3rem; border-top: 3px solid var(--rule);
  font-size: .95rem; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem;
}
.site-foot a { color: var(--muted); }

/* ---------- small screens ---------- */
.world-hint .swipe { display: none; }
@media (max-width: 1100px) { .world-hint .swipe { display: inline; } }
@media (max-width: 720px) {
  body { font-size: 1.0625rem; }
  .site-nav a { font-size: 1.2rem; padding: .1rem .5rem; }
  .player { grid-template-columns: 1fr; padding: 1.1rem; }
  .intro-grid { grid-template-columns: 6rem minmax(0, 1fr); gap: 1rem; align-items: start; }
  .bars li { grid-template-columns: 5.4rem minmax(0, 1fr); }
  .bars .lv { grid-column: 2; margin-top: -.3rem; }
  .block { grid-template-columns: 1fr; padding: 1.2rem 0; }
  .block > h2 { margin: 0 0 .6rem; }
  .block > .body { border-left: 0; padding-left: 0; }
  .rows li { grid-template-columns: 4.6rem minmax(0, 1fr); }
  .passions { grid-template-columns: 1fr; }
  .hex { width: 9.6rem; }
  .hex.side { width: 8rem; }
  .link-arrow { width: .8rem; }
  .say { top: .9rem; padding: 1rem .9rem .8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .statement mark { transition: none; }
  .js .statement:not(.drawn) mark { background-size: 100% 100%; }
  .btn:hover, .btn:active { transform: none; }
}
