:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: #0d0f0f;
  --ink: #ece7de;
  --muted: #a9a29a;
  --rust: #b65f31;
  --ember: #d39154;
  --signal: #83a8a0;
  --phosphor: #78b36e;
  --line: rgba(236, 231, 222, 0.16);
  --max: 980px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(131, 168, 160, 0.06), transparent 28rem),
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.025) 0,
      rgba(255, 255, 255, 0.025) 1px,
      transparent 1px,
      transparent 5px
    ),
    var(--bg);
  color: var(--ink);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(182, 95, 49, 0.11), transparent 22%, transparent 78%, rgba(120, 179, 110, 0.08)),
    radial-gradient(ellipse at 50% 115%, rgba(211, 145, 84, 0.16), transparent 44%);
  mix-blend-mode: screen;
  opacity: 0.62;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(var(--max), calc(100% - 2rem));
  min-height: 4.25rem;
  margin: 0 auto;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.brand img {
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid rgba(131, 168, 160, 0.42);
  object-fit: cover;
}

nav {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.92rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
}

nav a:hover {
  color: var(--ember);
}

main {
  position: relative;
}

.post,
.post-index {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2.25rem, 6vw, 5.5rem) 0 5rem;
}

.post-index {
  padding-bottom: clamp(1rem, 3vw, 2rem);
}

.post-list {
  display: grid;
  gap: 1rem;
  margin-top: clamp(1.5rem, 4vw, 2.75rem);
}

.post-card {
  display: grid;
  gap: 0.55rem;
  padding: clamp(1rem, 3vw, 1.45rem);
  color: var(--ink);
  text-decoration: none;
  background:
    linear-gradient(90deg, rgba(131, 168, 160, 0.1), rgba(13, 15, 15, 0.72)),
    var(--panel);
  border: 1px solid var(--line);
}

.post-card:hover {
  border-color: rgba(211, 145, 84, 0.55);
}

.post-card strong {
  color: #fff8ec;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.2;
}

.post-card span:last-child {
  color: var(--muted);
  line-height: 1.7;
}

.post-kicker {
  margin-bottom: 0.9rem;
  color: var(--signal);
  font-size: 0.95rem;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 12ch;
  margin-bottom: 1rem;
  color: #fff8ec;
  font-size: clamp(3.1rem, 8vw, 6.7rem);
  line-height: 0.94;
  font-weight: 760;
  text-wrap: balance;
}

.lede {
  max-width: 760px;
  margin-bottom: clamp(2rem, 5vw, 3.6rem);
  color: #d8d1c7;
  font-size: clamp(1.18rem, 2.1vw, 1.55rem);
  line-height: 1.72;
}

.signal-figure {
  position: relative;
  margin: 0 0 clamp(3rem, 7vw, 5rem);
  min-height: 18rem;
  border-block: 1px solid var(--line);
  overflow: hidden;
}

.signal-figure img {
  display: block;
  width: 100%;
  height: min(62vw, 34rem);
  min-height: 18rem;
  object-fit: cover;
  filter: contrast(1.05) saturate(0.92);
}

.signal-figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 5, 5, 0.4), transparent 32%, rgba(5, 5, 5, 0.65)),
    repeating-linear-gradient(
      0deg,
      rgba(131, 168, 160, 0.12) 0,
      rgba(131, 168, 160, 0.12) 1px,
      transparent 1px,
      transparent 13px
    );
  pointer-events: none;
}

section {
  display: grid;
  grid-template-columns: minmax(10rem, 0.62fr) minmax(0, 1.38fr);
  gap: clamp(1.25rem, 4vw, 3rem);
  padding: clamp(2rem, 5vw, 3.7rem) 0;
  border-top: 1px solid var(--line);
}

h2 {
  color: var(--ember);
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  line-height: 1.35;
}

section p,
.post-footer p {
  grid-column: 2;
  color: var(--ink);
  font-size: clamp(1.02rem, 1.6vw, 1.16rem);
  line-height: 1.9;
}

section p + p {
  margin-top: -0.3rem;
}

.rule-band {
  display: block;
  margin-top: 1.5rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  background:
    linear-gradient(90deg, rgba(182, 95, 49, 0.13), rgba(13, 15, 15, 0.7)),
    var(--panel);
  border: 1px solid var(--line);
}

.rule-band h2 {
  margin-bottom: 1rem;
}

ul {
  margin: 0;
  padding-left: 1.2rem;
  color: #d8d1c7;
  line-height: 1.85;
}

li + li {
  margin-top: 0.45rem;
}

.arch-table {
  grid-column: 2;
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: clamp(0.9rem, 1.5vw, 1.04rem);
}

.arch-table caption {
  margin-bottom: 0.7rem;
  color: var(--muted);
  text-align: left;
  line-height: 1.6;
}

.arch-table th,
.arch-table td {
  padding: 0.6rem 0.72rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.6;
}

.arch-table thead th {
  color: var(--signal);
  background: rgba(131, 168, 160, 0.08);
  font-weight: 600;
}

.arch-table td {
  color: #d8d1c7;
}

.arch-table th[scope="row"] {
  color: #fff8ec;
  font-weight: 600;
  white-space: nowrap;
}

.note-tag {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.05rem 0.5rem;
  border: 1px solid rgba(131, 168, 160, 0.42);
  border-radius: 999px;
  color: var(--signal);
  font-size: 0.72em;
  vertical-align: middle;
}

@media (max-width: 720px) {
  .arch-table {
    grid-column: auto;
    display: block;
    overflow-x: auto;
  }
}

.post-footer {
  margin-top: 2.25rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--line);
}

.post-footer p {
  max-width: 720px;
  margin-left: auto;
  color: #fff4e0;
  font-size: clamp(1.18rem, 2vw, 1.45rem);
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    min-height: 5.8rem;
  }

  h1 {
    max-width: 8.5ch;
  }

  section {
    display: block;
  }

  section p,
  .post-footer p {
    grid-column: auto;
  }

  h2 {
    margin-bottom: 1rem;
  }

  .signal-figure img {
    height: 82vw;
  }
}

@media (max-width: 430px) {
  .post,
  .post-index,
  .site-header {
    width: min(100% - 1.2rem, var(--max));
  }

  nav {
    width: 100%;
    justify-content: space-between;
  }
}
