:root {
  --bg: #f1f4f6; --ink: #101a2b; --soft: #52606f; --line: #d3dbe1;
  --noise: #8e9aa6; --drop: #e8401c; --pass: #1663e6;
  --gutter: clamp(20px, 3.2vw, 56px);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0e1624; --ink: #eef2f6; --soft: #9aa8b8; --line: #27344a;
  --noise: #61708a; --drop: #ff6a45; --pass: #6ea8ff;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1624; --ink: #eef2f6; --soft: #9aa8b8; --line: #27344a;
    --noise: #61708a; --drop: #ff6a45; --pass: #6ea8ff;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  font: 400 17px/1.55 "Courier Prime", Courier, "Courier New", monospace;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--pass); }
:focus-visible { outline: 2px solid var(--pass); outline-offset: 4px; border-radius: 2px; }

.top, .bottom {
  position: relative; z-index: 2;
  display: flex; flex-wrap: wrap; justify-content: space-between;
  gap: 12px 32px; padding: 26px var(--gutter);
}
.top nav, .links { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.top a, .top button, .links a { padding: 4px 0; }
.top [aria-current] { color: var(--pass); }
pre, code { font-family: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.top button:hover { color: var(--pass); }

/* ---- Home ---- */
.home { overflow-x: hidden; }
.traffic { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero { position: relative; z-index: 1; flex: 1; display: flex; align-items: center; padding: 5vh var(--gutter) 5vh 21vw; }
.name {
  margin: 0; font-size: 11.6vw; line-height: .95; letter-spacing: -.02em;
  font-weight: 400; white-space: nowrap;
  font-kerning: none;
}
.name span { display: block; }
/* Under attack the letters brace. Monospace, so bold takes the same width. */
.flooding .name { font-weight: 700; }
.bottom { align-items: flex-end; padding-bottom: 32px; }
.bottom p { margin: 0; max-width: 34ch; }
.bottom .links { color: var(--soft); }
.sim { display: flex; align-items: center; gap: 20px; color: var(--soft); font-variant-numeric: tabular-nums; }
.sim button {
  padding: 9px 16px; border: 1px solid var(--ink); color: var(--ink); border-radius: 99px;
  user-select: none; -webkit-user-select: none; touch-action: none;
  transition: background-color .15s, border-color .15s, color .15s;
}
.sim button:hover, .flooding .sim button { border-color: var(--drop); color: var(--drop); }
.sim b { font-weight: 400; }
.sim .d { color: var(--drop); } .sim .p { color: var(--pass); }
.sim .counts span { display: block; font-size: 15px; line-height: 1.4; min-width: 9ch; }

/* ---- Blog ---- */
.page { flex: 1; width: 100%; padding: 9vh var(--gutter) 12vh 21vw; }
.page h1 {
  margin: 0; font-size: clamp(3rem, 9.9vw, 9rem); line-height: 1;
  font-weight: 400; letter-spacing: -.035em;
}
.lede { margin: 20px 0 9vh; color: var(--soft); font-size: 1.2rem; }
.posts { list-style: none; margin: 0; padding: 0; max-width: 860px; border-top: 1px solid var(--line); }
.posts a { display: grid; grid-template-columns: 1fr auto; gap: 6px 32px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.posts h2 { margin: 0; font-size: 1.45rem; line-height: 1.25; font-weight: 400; letter-spacing: -.01em; }
.posts p { grid-column: 1; margin: 0; color: var(--soft); }
.posts time, .article time { color: var(--soft); }
.empty { max-width: 860px; margin: 0; padding: 28px 0; border-top: 1px solid var(--line); font-size: 1.2rem; }
/* Empty message removes itself once a post is listed. */
.posts:not(:has(li)), .posts:has(li) + .empty { display: none; }

.article h1 { font-size: clamp(2.2rem, 5vw, 4.2rem); line-height: 1.06; max-width: 18ch; margin-bottom: 16px; text-wrap: balance; }
.article .body { max-width: 64ch; margin-top: 7vh; font-size: 1.1rem; line-height: 1.7; }
.article .body h2 { margin: 2.4em 0 .6em; font-size: 1.4rem; font-weight: 700; }
.article .body a { color: var(--pass); text-decoration: underline; text-underline-offset: 3px; }
.article .body pre { overflow-x: auto; padding: 18px 20px; border: 1px solid var(--line); border-radius: 6px; font-size: .88rem; line-height: 1.55; }
.article .body img { max-width: 100%; height: auto; }

@media (max-width: 760px) {
  .hero { padding-left: 15vw; }
  .name { font-size: 12vw; line-height: 1.15; }
  .page { padding-left: var(--gutter); padding-top: 6vh; }
  .bottom { flex-direction: column; align-items: flex-start; gap: 24px; }
  .posts a { grid-template-columns: 1fr; }
}
