@font-face {
  font-family: "Inter Tight";
  src: url("/fonts/inter-tight.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --ink: #141414;
  --paper: #f3f1ec;
  --bg: var(--ink);
  --fg: var(--paper);
  --muted: color-mix(in srgb, var(--fg) 56%, var(--bg));
  --rule: color-mix(in srgb, var(--fg) 16%, var(--bg));
}

@media (prefers-color-scheme: light) {
  :root { --bg: var(--paper); --fg: var(--ink); }
}

* { box-sizing: border-box; }

html { background: var(--bg); color: var(--fg); }

body {
  margin: 0;
  font: 15px/1.45 "Inter Tight", ui-sans-serif, system-ui, sans-serif;
  font-feature-settings: "tnum";
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 520px;
  margin: 0 0 0 clamp(24px, 12vw, 180px);
  padding: clamp(48px, 16vh, 160px) 24px 64px 0;
}

h1, h2, p, ul { margin: 0; }

.logo {
  display: block;
  width: 127px;              /* logo.svg is 4130 × 912 units */
  height: 28px;
  background: currentColor;
  -webkit-mask: url("/logo.svg") no-repeat left center / contain;
  mask: url("/logo.svg") no-repeat left center / contain;
}

.home { display: inline-block; color: inherit; }

.tagline { margin-top: 14px; }
.tagline .kind { color: var(--muted); text-decoration: none; letter-spacing: 0.02em; }
.tagline .sep { color: color-mix(in srgb, var(--fg) 30%, var(--bg)); margin: 0 9px; }

section { margin-top: 40px; }

h2 {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
}

ul { list-style: none; padding: 0; }

.projects li {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 12px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
}

.name { font-weight: 600; }
.desc { color: var(--muted); }

.status {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 1px 8px;
}

.contact li { padding: 8px 0 0; }
.contact .desc { margin-left: 6px; }

a { color: inherit; text-decoration-color: var(--muted); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 2px; }

main > p { margin-top: 32px; }

/* the missing dot in the logo: the pinball starts and ends here */
header { position: relative; }
.gap {
  position: absolute;
  left: 11px; top: -5px;     /* centred on the gap: 19 × 2.8 px into the 28 px logo */
  width: 16px; height: 16px;
  padding: 0; border: 0; border-radius: 50%;
  background: none; color: inherit; cursor: pointer;
}
.gap::after {
  content: "";
  position: absolute; inset: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
  transition: opacity 0.3s;
}
.gap:hover::after, .gap:focus-visible::after { opacity: 0.45; animation: breathe 1.6s ease-in-out infinite; }
.gap[data-away] { pointer-events: none; }
.gap[data-away]::after { opacity: 0; animation: none; }
@keyframes breathe { 50% { opacity: 0.15; transform: scale(0.8); } }

/* "Play pinball": a small text link; the table only appears once it's clicked */
.play-link { margin-top: 28px; }
.link {
  padding: 0; border: 0; background: none;
  font: inherit; color: inherit; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--muted); text-underline-offset: 3px;
}
.link:hover { text-decoration-color: currentColor; }
.link:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 2px; }

.play { width: min(280px, 100%); margin-top: 28px; }
.play:not([hidden]) { animation: appear 0.5s ease-out; }
@keyframes appear { from { opacity: 0; transform: translateY(-6px); } }
.play canvas {
  display: block;
  width: 100%;
  aspect-ratio: 300 / 500;
  touch-action: none;
  cursor: pointer;
  outline: none;
}
.hud { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.hud b { color: var(--fg); font-weight: 500; }
.hud .hint { flex-basis: 100%; }
.hud .sound { margin-left: auto; font-size: 12px; color: var(--muted); }

.flight { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 10; }

@media (prefers-reduced-motion: reduce) {
  .gap:hover::after, .gap:focus-visible::after { animation: none; }
  .play:not([hidden]) { animation: none; }
}

@media (max-width: 460px) {
  .projects li { grid-template-columns: 1fr auto; row-gap: 2px; }
  .projects .desc { grid-column: 1 / -1; grid-row: 2; }
  .contact .desc { display: block; margin-left: 0; }
}
