:root {
  color-scheme: light;
  --ink: #0b0d0f;
  --muted: #5e646b;
  --soft: #f5f7f8;
  --line: #d8dde1;
  --cyan: #0089a6;
  --amber: #c97818;
  --paper: #ffffff;
  --max: 1160px;
  --mono: "SFMono-Regular", "Cascadia Mono", "Liberation Mono", Menlo, monospace;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(11, 13, 15, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(11, 13, 15, 0.03) 1px, transparent 1px),
    var(--paper);
  background-size: 74px 74px;
  color: var(--ink);
  font-family: var(--sans);
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration-color: rgba(0, 137, 166, 0.35);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

a:hover {
  color: var(--cyan);
}

[hidden] {
  display: none !important;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--ink);
  backdrop-filter: blur(18px);
}

.nav {
  width: min(var(--max), calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: flex-end;
  font-size: 15px;
}

.nav-links a {
  text-decoration: none;
}

.shell {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  min-height: min(760px, calc(88vh - 72px));
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(320px, 0.97fr);
  align-items: center;
  gap: clamp(34px, 7vw, 88px);
  padding: 40px 0 34px;
}

.hero-title {
  max-width: 660px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(70px, 12vw, 144px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: 0;
}

.rule-accent {
  width: 86px;
  height: 3px;
  margin: 30px 0 24px;
  background: var(--cyan);
}

.hero-copy {
  max-width: 620px;
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.55;
}

.hero-intro {
  max-width: 620px;
  margin-top: 26px;
  padding-left: 18px;
  border-left: 3px solid var(--cyan);
}

.hero-intro p {
  margin: 0;
  color: #25292d;
  font-family: var(--serif);
  font-size: clamp(22px, 2.45vw, 27px);
  line-height: 1.22;
}

.hero-intro .intro-kicker {
  margin-bottom: 8px;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--cyan);
  text-decoration: none;
}

.text-link::after {
  content: "->";
}

.hero-media {
  position: relative;
}

.photo-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--soft);
}

.hero-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.terminal-note {
  position: absolute;
  right: 18px;
  bottom: 18px;
  max-width: 220px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 4px;
  background: rgba(11, 13, 15, 0.78);
  color: white;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
}

.section {
  padding: 42px 0 52px;
}

.section + .section {
  border-top: 1px solid var(--ink);
}

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

.section-title {
  margin: 0;
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
}

.section-title::after {
  content: "";
  display: block;
  width: 38px;
  height: 3px;
  margin-top: 9px;
  background: var(--cyan);
}

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

.post-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 92px;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.post-date {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.45;
  text-transform: uppercase;
}

.post-row h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 500;
  line-height: 1.12;
}

.post-row p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.read-time {
  align-self: center;
  justify-self: end;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 66px);
  align-items: start;
}

.about-grid .photo-frame img {
  aspect-ratio: 5 / 4;
  object-fit: cover;
}

.about-copy {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.42;
}

.about-copy p {
  margin: 0 0 22px;
}

.bio-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}

.media-mosaic {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  position: sticky;
  top: 104px;
}

.media-mosaic img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--soft);
}

.media-mosaic .mosaic-primary {
  grid-column: 1 / -1;
  aspect-ratio: 5 / 4;
  object-position: center 28%;
}

.bio-copy {
  max-width: 720px;
}

.bio-copy h2 {
  margin: 0 0 28px;
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.03;
  letter-spacing: 0;
}

.bio-copy p {
  margin: 0 0 22px;
  color: #25292d;
  font-size: 18px;
  line-height: 1.7;
}

.feature-split {
  display: grid;
  grid-template-columns: minmax(180px, 0.38fr) minmax(0, 1fr);
  gap: clamp(28px, 7vw, 88px);
  align-items: start;
}

.feature-copy {
  max-width: 760px;
}

.feature-copy p {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.35;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 32px);
  align-items: end;
}

.book-cover {
  display: block;
  text-decoration: none;
}

.book-cover img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 14px 18px rgba(11, 13, 15, 0.16));
}

.book-cover span {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  text-align: center;
  text-transform: uppercase;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.link-grid a {
  min-height: 112px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.link-grid strong {
  display: block;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
}

.link-grid span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
}

.archive-tools {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: 40px;
  align-items: start;
}

.search-box {
  display: flex;
  border: 1px solid var(--ink);
  background: white;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 15px 16px;
  font: 15px var(--mono);
  outline: none;
}

.archive-count {
  margin-top: 16px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
}

.archive-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
}

.archive-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.archive-item time {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.45;
  text-transform: uppercase;
}

.archive-item strong {
  display: block;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
}

.archive-item span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.page-hero {
  padding: 70px 0 34px;
  border-bottom: 1px solid var(--ink);
}

.page-hero h1 {
  max-width: 920px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.98;
  letter-spacing: 0;
}

.page-hero p,
.post-meta {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.65;
}

.content-wrap {
  display: grid;
  grid-template-columns: minmax(0, 780px) 240px;
  gap: 64px;
  padding: 52px 0 74px;
  align-items: start;
}

.post-content {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.68;
}

.post-content p,
.post-content ul,
.post-content ol,
.post-content blockquote,
.post-content figure {
  margin: 0 0 28px;
}

.post-content h2,
.post-content h3 {
  margin: 48px 0 16px;
  font-family: var(--sans);
  line-height: 1.15;
}

.post-content h2 {
  font-size: 32px;
}

.post-content h3 {
  font-size: 25px;
}

.post-content img {
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 4px;
}

.post-content figure {
  padding: 0;
}

.post-content figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  text-align: center;
}

.post-content pre,
.post-content code {
  font-family: var(--mono);
}

.post-content pre {
  overflow-x: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #0b0d0f;
  color: #f5f7f8;
  font-size: 14px;
  line-height: 1.5;
}

.side-note {
  position: sticky;
  top: 104px;
  padding-left: 18px;
  border-left: 3px solid var(--cyan);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
}

.site-footer {
  background: #0b0d0f;
  color: white;
}

.footer-inner {
  width: min(var(--max), calc(100% - 40px));
  min-height: 108px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  font-family: var(--mono);
  font-size: 13px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: white;
  text-decoration: none;
}

.empty-state {
  display: none;
  padding: 22px 0;
  color: var(--muted);
  font-family: var(--mono);
}

@media (max-width: 860px) {
  .nav {
    width: min(var(--max), calc(100% - 28px));
    min-height: 64px;
  }

  .nav-links {
    gap: 16px;
    font-size: 14px;
  }

  .shell,
  .footer-inner {
    width: min(var(--max), calc(100% - 28px));
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 38px;
    padding-bottom: 34px;
  }

  .hero-title {
    font-size: clamp(58px, 20vw, 94px);
  }

  .hero-media {
    max-width: 560px;
  }

  .hero-media img {
    aspect-ratio: 16 / 11;
  }

  .post-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .read-time {
    justify-self: start;
  }

  .about-grid,
  .bio-grid,
  .feature-split,
  .archive-tools,
  .content-wrap {
    grid-template-columns: 1fr;
  }

  .media-mosaic {
    position: static;
  }

  .archive-list {
    grid-template-columns: 1fr;
  }

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

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

  .side-note {
    position: static;
  }
}

@media (max-width: 560px) {
  .brand {
    font-size: 15px;
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 14px 0 12px;
  }

  .site-header {
    position: static;
  }

  .nav-links {
    gap: 12px;
    width: 100%;
    padding-bottom: 2px;
    flex-wrap: wrap;
    justify-content: flex-start;
    white-space: normal;
  }

  .hero-copy {
    font-size: 16px;
  }

  .hero-actions {
    margin-top: 24px;
  }

  .hero-media img {
    height: 180px;
    object-position: center 42%;
  }

  .terminal-note {
    padding: 10px 14px;
    font-size: 11px;
    line-height: 1.45;
  }

  .terminal-note {
    position: static;
    max-width: none;
    border-color: var(--ink);
    border-top: 0;
    border-radius: 0 0 4px 4px;
  }

  .page-hero h1 {
    font-size: 44px;
  }

  .post-content {
    font-size: 19px;
  }

  .bio-copy h2 {
    font-size: 34px;
  }

  .bio-copy p {
    font-size: 17px;
  }

  .book-cover img {
    max-height: 240px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
  }
}
