@font-face {
  font-family: 'Geist Mono';
  src: url('fonts/GeistMono-Regular.woff2') format('woff2');
  font-display: swap;
}

:root {
  --ink: #121212;
  --muted: #737373;
  --soft: #4f4f4f;
  --line: #ededed;
  --tile: #f6f6f6;
  --face: #dedede;
  --bg: #fff;
  --font: 'Geist Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 27px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; }
p { margin: 0; }

.wrap {
  width: 100%;
  max-width: 532px; /* 500 + 16px gutters */
  margin: 0 auto;
  padding: 64px 16px 96px;
}

/* Logo + eyes */
.logo {
  position: relative;
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 53px;
  background: var(--face);
  overflow: hidden;
  view-transition-name: logo;
}
.eye {
  position: absolute;
  width: 3px;
  height: 7.5px;
  border-radius: 2px;
  background: var(--ink);
  transform: translate(var(--x, 2px), var(--y, 4.5px)) rotate(-20deg) scaleY(var(--blink, 1));
  transition: transform 0.12s ease-out;
}
.eye:nth-child(1) { left: 10.5px; top: 12px; }
.eye:nth-child(2) { left: 19px; top: 10px; }
.logo.charging .eye { background: #000; box-shadow: 0 0 0 0.5px #000; }

.label {
  margin: 0;
  font-weight: normal;
  font-size: 14px;
  line-height: 21px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

/* Home */
.home { margin-top: 40px; }
.intro p + p { margin-top: 27px; }
.notes { margin-top: 80px; display: flex; flex-direction: column; gap: 24px; }
.note {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.thumb { flex: none; width: 48px; height: 48px; background: var(--tile); overflow: hidden; }
.thumb img, .hero { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.meta { display: flex; flex-direction: column; gap: 4px; line-height: 1.38; min-width: 0; }
.date { font-size: 14px; color: var(--muted); }
.name { transition: color 0.2s; }
.note:hover .name { color: var(--muted); }
.links {
  margin-top: 80px;
  display: flex;
  gap: 21px;
  font-size: 16px;
  line-height: 1.38;
  color: var(--muted);
}
.links a { transition: color 0.2s; }
.links a:hover { color: var(--ink); }

/* Article */
.article { max-width: 480px; margin-top: 64px; }
.article h1 { margin: 0; font-weight: normal; font-size: 32px; line-height: 1.2; color: #000; }
.summary { margin-top: 16px; color: var(--soft); }
.summary a { text-decoration: underline; }
.hero { width: 100%; height: auto; aspect-ratio: 1; margin-top: 32px; background: var(--face); }
.body { margin-top: 24px; }
.body > * + * { margin-top: 27px; }
.body h2, .body h3, .body h4 { font-weight: normal; font-size: 22px; line-height: 1.3; margin-bottom: 0; }
.body a { text-decoration: underline; text-underline-offset: 3px; }
.body img { max-width: 100%; height: auto; image-rendering: pixelated; }
.body blockquote { margin-left: 0; padding-left: 16px; border-left: 2px solid var(--line); color: var(--soft); }
.body ul, .body ol { padding-left: 20px; }
.body code { font-size: 0.9em; background: var(--tile); padding: 0 4px; }
.next { margin-top: 64px; display: flex; flex-direction: column; gap: 20px; }
.next .label { letter-spacing: 0; }

/* Page transitions (cross-document View Transitions) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 0.22s ease-in both vt-out; }
::view-transition-new(root) { animation: 0.38s cubic-bezier(0.2, 0.7, 0.2, 1) 0.06s both vt-in; }
::view-transition-group(*) { animation-duration: 0.45s; animation-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1); }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

/* Fallback for browsers without cross-document View Transitions */
.no-vt body { animation: 0.38s cubic-bezier(0.2, 0.7, 0.2, 1) both vt-in; }
.no-vt body.leaving { opacity: 0; transform: translateY(-6px); transition: 0.2s ease-in; }

/* ASCII lasers */
.lasers { position: fixed; inset: 0; pointer-events: none; z-index: 10; overflow: hidden; }
.lasers span {
  position: absolute;
  font: 14px/1 var(--font);
  color: var(--ink);
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: zap var(--life, 0.7s) steps(4, end) var(--d, 0s) both;
}
.lasers span.dim { color: var(--muted); }
.lasers span.spark { animation-name: spark; }
@keyframes zap { 0% { opacity: 0; } 8% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }
@keyframes spark {
  0% { opacity: 0; transform: translate(-50%, -50%); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))); }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .no-vt body { animation: none; }
  .eye { transition: none; }
}
