/* Slow Packet — site styles
   Warm paper, ink, one teal accent, and a serif that gets out of the way. */

:root {
  color-scheme: light;
  --bg: #f4f1e9;
  --bg-elev: #fbf9f3;
  --bg-sunk: #ece8dd;
  --ink: #171b18;
  --ink-soft: #2b322c;
  --muted: #5e675f;
  --line: #d9d4c7;
  --line-strong: #b8b1a1;
  --accent: #0b6b5b;
  --accent-ink: #084f43;
  --accent-soft: #dcebe5;
  --warm: #a34824;
  --warm-soft: #f3e2d7;
  --code-bg: #e9e4d8;
  --shadow: 0 1px 0 rgba(23, 27, 24, 0.04), 0 18px 40px -32px rgba(23, 27, 24, 0.35);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", ui-monospace, "Cascadia Code", "Roboto Mono", Menlo, Consolas, monospace;
  --wrap: 72rem;
  --radius: 0.45rem;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1210;
  --bg-elev: #141a17;
  --bg-sunk: #0a0d0c;
  --ink: #e9e6dc;
  --ink-soft: #d2d6cc;
  --muted: #98a198;
  --line: #283029;
  --line-strong: #3c463d;
  --accent: #6fd3bd;
  --accent-ink: #9fe6d6;
  --accent-soft: #14342c;
  --warm: #e08a5f;
  --warm-soft: #35231b;
  --code-bg: #0a0e0c;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.25), 0 24px 60px -36px rgba(0, 0, 0, 0.8);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(
    70rem 40rem at 100% -10%,
    color-mix(in srgb, var(--accent) 9%, transparent),
    transparent 70%
  );
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 100;
  padding: 0.65rem 1rem;
  border-radius: 0.3rem;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--sans);
  font-size: 0.85rem;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  width: min(calc(100% - clamp(2rem, 6vw, 5rem)), var(--wrap));
  margin-inline: auto;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.15);
}

.masthead {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-right: auto;
  color: var(--ink);
  text-decoration: none;
}

.brand__mark {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 0.55rem;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand__name {
  font-family: var(--serif);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.brand__sub {
  margin-top: 0.35rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav a {
  position: relative;
  padding: 0.35rem 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.nav a:hover,
.nav a.is-active {
  color: var(--ink);
}

.nav a.is-active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -0.1rem;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.theme-toggle {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg-elev);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: rotate(-8deg);
}

.icon--moon {
  display: none;
}

html[data-theme="dark"] .icon--sun {
  display: none;
}

html[data-theme="dark"] .icon--moon {
  display: block;
}

/* ---------- Shared type ---------- */

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  text-wrap: balance;
}

h1 em,
h2 em {
  color: var(--accent);
  font-style: italic;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.eyebrow a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.eyebrow__dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.eyebrow__sep {
  color: var(--line-strong);
}

.lede {
  max-width: 42rem;
  margin: 0 0 2rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  line-height: 1.65;
  text-wrap: pretty;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.72rem 1.1rem;
  border: 1px solid var(--ink);
  border-radius: 0.35rem;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

.button:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
  transform: translateY(-1px);
}

.text-link {
  padding-bottom: 0.15rem;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Home hero ---------- */

.hero {
  padding: clamp(3.5rem, 9vw, 7.5rem) 0 clamp(3rem, 6vw, 5rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(17rem, 0.6fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
}

.hero-copy h1 {
  margin: 1rem 0 1.5rem;
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
}

.hero-copy .lede {
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.4rem;
}

.signal-card {
  position: relative;
  overflow: hidden;
  padding: 1.4rem 1.4rem 1.2rem;
  border-radius: 0.6rem;
  background: #171b18;
  color: #f4f1e9;
  box-shadow: var(--shadow);
}

.signal-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    18rem 12rem at 100% 0%,
    rgba(111, 211, 189, 0.22),
    transparent 70%
  );
  pointer-events: none;
}

.signal-card__top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: inherit;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
}

.signal-card__live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.pulse {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #6fd3bd;
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(111, 211, 189, 0.55);
  }
  70% {
    box-shadow: 0 0 0 7px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

.signal {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  margin: 1.2rem 0 0.9rem;
  overflow: visible;
}

.signal__grid {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  opacity: 0.12;
}

.signal__wave {
  fill: none;
  stroke: #6fd3bd;
  stroke-width: 2;
  stroke-linecap: round;
}

.signal__dot {
  fill: #e08a5f;
}

.signal-list {
  position: relative;
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--sans);
  font-size: 0.82rem;
  line-height: 1.45;
}

.signal-list li {
  display: grid;
  grid-template-columns: 4.6rem 1fr;
  gap: 0.5rem;
  opacity: 0.92;
}

.signal-list span {
  padding-top: 0.18rem;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.55;
}

.signal-card__foot {
  position: relative;
  margin: 1.1rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(244, 241, 233, 0.18);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  opacity: 0.5;
}

/* ---------- Sections and lists ---------- */

.section {
  padding: clamp(2.8rem, 6vw, 4.8rem) 0;
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.8rem;
}

.section-head__title {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.section-index {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  letter-spacing: -0.02em;
}

.section-link {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.section-link span {
  display: inline-block;
  transition: transform 0.2s;
}

.section-link:hover {
  color: var(--accent);
}

.section-link:hover span {
  transform: translateX(3px);
}

.post-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.post-row {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr) 1.5rem;
  gap: 1.5rem;
  align-items: start;
  padding: 1.35rem 0.5rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: background 0.2s, padding 0.2s;
}

.post-row:hover {
  padding-right: 1rem;
  padding-left: 1rem;
  background: var(--bg-elev);
}

.post-row__date {
  padding-top: 0.35rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.post-row__body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.post-row__title {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.post-row__summary {
  max-width: 48rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.88rem;
  line-height: 1.55;
}

.post-row__meta {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
}

.post-row__arrow {
  color: var(--muted);
  font-size: 1rem;
  transition: color 0.2s, transform 0.2s;
}

.post-row:hover .post-row__arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* ---------- Projects ---------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 12rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.project-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.project-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status {
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status--active,
.status--stable {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.status--beta,
.status--experimental {
  border-color: color-mix(in srgb, var(--warm) 40%, var(--line));
  background: var(--warm-soft);
  color: var(--warm);
}

.project-card__year {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
}

.project-card__title {
  font-family: var(--serif);
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.project-card__summary {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.84rem;
  line-height: 1.55;
}

.project-card__stack {
  margin-top: auto;
  padding-right: 1.5rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  opacity: 0.8;
}

.project-card__arrow {
  position: absolute;
  right: 1.1rem;
  bottom: 1.05rem;
  color: var(--muted);
  transition: color 0.2s, transform 0.2s;
}

.project-card:hover .project-card__arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

.project-grid--page {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.project-grid--page .project-card {
  min-height: 14rem;
}

/* ---------- Notes ---------- */

.notes-preview__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.note-preview {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s;
}

.note-preview:hover {
  border-color: var(--accent);
}

.note-preview time {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
}

.note-preview__title {
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.25;
}

.note-preview__summary {
  padding-right: 1.5rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.82rem;
  line-height: 1.5;
}

.note-preview__arrow {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  color: var(--muted);
}

.notes {
  padding-bottom: clamp(3rem, 7vw, 6rem);
}

.note {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 2rem;
  padding: 2.2rem 0;
  border-top: 1px solid var(--line);
}

.note:first-child {
  padding-top: 0;
  border-top: 0;
}

.note__meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.65rem;
}

.note__anchor {
  width: fit-content;
  color: var(--line-strong);
  text-decoration: none;
}

.note__anchor:hover {
  color: var(--accent);
}

.note__body h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  letter-spacing: -0.02em;
}

.note__summary {
  margin: 0 0 1rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.9rem;
}

.prose--note {
  font-size: 1rem;
}

.prose--note p {
  margin: 0 0 0.8rem;
}

/* ---------- Page heads and archive ---------- */

.page-head {
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2rem, 4vw, 3rem);
}

.page-head h1 {
  margin: 0.8rem 0 1.2rem;
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.page-head .lede {
  max-width: 44rem;
}

.archive {
  padding-bottom: clamp(3rem, 7vw, 6rem);
}

.year-group {
  margin-bottom: 2.5rem;
}

.year {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
}

.archive-note,
.page-footnote {
  max-width: 46rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.9rem;
  line-height: 1.6;
}

.page-footnote {
  padding-bottom: 4rem;
}

/* ---------- Articles ---------- */

.article {
  --wrap: 46rem;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 6rem);
}

.article-head {
  margin-bottom: 2.5rem;
}

.article-head h1 {
  margin: 0.8rem 0 1.2rem;
  font-size: clamp(2.3rem, 5.5vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.article-head .lede {
  max-width: 40rem;
  font-size: 1.12rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  margin-top: 1.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prose {
  font-size: 1.06rem;
  line-height: 1.72;
}

.prose p {
  margin: 0 0 1.1em;
  text-wrap: pretty;
}

.prose > p:first-of-type {
  font-size: 1.13rem;
}

.prose h2 {
  margin: 2.2em 0 0.6em;
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.prose h3 {
  margin: 1.8em 0 0.4em;
  font-size: 1.2rem;
}

.prose ul,
.prose ol {
  display: grid;
  gap: 0.35em;
  margin: 0 0 1.1em;
  padding-left: 1.3em;
}

.prose li::marker {
  color: var(--accent);
}

.prose a {
  color: var(--accent-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.prose a:hover {
  color: var(--warm);
}

.prose blockquote {
  margin: 1.6em 0;
  padding: 0.2em 0 0.2em 1.2em;
  border-left: 2px solid var(--accent);
  color: var(--muted);
  font-style: italic;
}

.prose hr {
  margin: 2.4em 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.prose code {
  padding: 0.12em 0.35em;
  border-radius: 0.2em;
  background: var(--code-bg);
  font-family: var(--mono);
  font-size: 0.86em;
}

.prose pre {
  margin: 1.4em 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--code-bg);
  font-size: 0.82rem;
  line-height: 1.55;
}

.prose pre code {
  padding: 0;
  background: none;
  font-size: inherit;
}

.prose table {
  display: block;
  width: 100%;
  margin: 1.6em 0;
  overflow-x: auto;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 0.86rem;
}

.prose th,
.prose td {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prose img {
  height: auto;
  border-radius: 0.3rem;
}

.article-foot {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  padding: 0.22rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.6rem;
}

.post-nav__item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  color: var(--ink);
  text-decoration: none;
}

.post-nav__item:hover {
  border-color: var(--accent);
}

.post-nav__item--next {
  text-align: right;
}

.post-nav__label {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.post-nav__title {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.3;
}

.back-link {
  margin: 1.5rem 0 0;
  font-family: var(--sans);
  font-size: 0.82rem;
}

.back-link a {
  color: var(--muted);
  text-decoration: none;
}

.back-link a:hover {
  color: var(--accent);
}

.page-updated {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.4rem;
}

.chip {
  padding: 0.22rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-sunk);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-link {
  margin: 0 0 1.5rem;
}

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

.notfound {
  --wrap: 58rem;
  padding: clamp(4rem, 10vw, 8rem) 0;
}

.notfound h1 {
  margin: 0.8rem 0 1.4rem;
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
}

.route {
  max-width: 34rem;
  margin-top: 3rem;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--code-bg);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.7;
}

.route__prompt {
  color: var(--accent);
}

.route__end {
  color: var(--warm);
}

/* ---------- Footer ---------- */

.site-footer {
  padding: clamp(2.5rem, 5vw, 4rem) 0 1.5rem;
  border-top: 1px solid var(--line);
  background: var(--bg-elev);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}

.footer-wordmark {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.6rem;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.footer-brand p {
  max-width: 22rem;
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-note {
  font-family: var(--mono) !important;
  font-size: 0.6rem !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.7;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-col h2 {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-col a {
  width: fit-content;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.82rem;
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .signal-card {
    max-width: 28rem;
  }

  .note {
    grid-template-columns: 7rem minmax(0, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 760px) {
  .masthead {
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    padding: 0.8rem 0;
  }

  .brand {
    margin-right: auto;
  }

  .nav {
    order: 3;
    width: 100%;
    gap: 1rem;
    padding-bottom: 0.15rem;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav a {
    white-space: nowrap;
  }

  .post-row {
    grid-template-columns: 1fr auto;
    gap: 0.5rem 1rem;
    padding: 1.2rem 0;
  }

  .post-row__date {
    grid-column: 1 / -1;
    padding-top: 0;
  }

  .post-row__arrow {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
  }

  .post-row:hover {
    padding-right: 0.5rem;
    padding-left: 0.5rem;
  }

  .project-grid--page {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .post-nav {
    grid-template-columns: 1fr;
  }

  .post-nav__item--next {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .project-grid,
  .notes-preview__grid {
    grid-template-columns: 1fr;
  }

  .note {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .note__meta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.4rem;
  }

  .article-meta {
    gap: 0.45rem 1rem;
  }
}

@media (max-width: 420px) {
  .wrap {
    width: calc(100% - 2rem);
  }

  .brand__sub {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .hero-actions,
  .post-nav,
  .back-link,
  .theme-toggle,
  .skip-link {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  .prose a {
    color: #000;
  }

  .article,
  .wrap {
    width: 100%;
    max-width: none;
  }
}
