@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/space-grotesk-latin-700-normal.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 700;
}

@font-face {
  font-family: Inter;
  src: url("/assets/fonts/inter-latin-400-normal.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: Inter;
  src: url("/assets/fonts/inter-latin-600-normal.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 600;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 500;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono-latin-700-normal.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 700;
}

:root {
  --background: #f7f7f5;
  --ink: #111111;
  --orange: #ff6a00;
  --surface: #ffffff;
  --beige: #e9d8c3;
  --brown: #8b5e3c;
  --muted: #6e6c67;
  --border: #dcd9d3;
  --container: 1160px;
  --radius-small: 8px;
  --radius-medium: 16px;
  --radius-large: 24px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  color: var(--ink);
  font-family: Inter, sans-serif;
  scroll-behavior: smooth;
}

body {
  background: var(--background);
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

button,
a {
  font: inherit;
}

a:focus-visible,
button:focus-visible,
iframe:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

button {
  cursor: pointer;
}

.container {
  margin-inline: auto;
  max-width: var(--container);
  padding-inline: 24px;
  width: 100%;
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.skip-link {
  background: var(--orange);
  color: var(--ink);
  left: 16px;
  padding: 12px 16px;
  position: absolute;
  top: 8px;
  transform: translateY(-200%);
  z-index: 10;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-height: 80px;
}

.brand {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
}

.brand__label::after {
  color: var(--orange);
  content: "";
}

.nav-list,
.tag-list,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a,
.footer-links a {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  text-decoration: none;
}

.nav-list a:hover,
.footer-links a:hover,
.text-link:hover,
.external-link:hover {
  text-decoration: underline;
}

.hero {
  align-items: center;
  display: grid;
  gap: 64px;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  padding-bottom: 96px;
  padding-top: 96px;
}

.hero__copy {
  min-width: 0;
}

.eyebrow,
.card-kicker,
.article-meta,
.footer-signature {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--muted);
  margin: 0 0 16px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.badge {
  background: var(--beige);
  border: 1px solid var(--ink);
  border-radius: 999px;
  display: inline-flex;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  min-height: 32px;
  padding: 7px 12px;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", sans-serif;
  overflow-wrap: anywhere;
}

h1,
h2 {
  letter-spacing: -0.04em;
  line-height: 0.98;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2.25rem, 7vw, 5.5rem);
  margin: 0;
  max-width: 850px;
}

h2 {
  font-size: clamp(2rem, 4vw, 4rem);
  margin: 0;
  max-width: 850px;
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.08;
  margin: 0;
}

p {
  line-height: 1.65;
}

.hero__lead,
.section-intro {
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.65;
  max-width: 720px;
}

.hero__lead {
  margin: 28px 0 0;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button,
.embed-shell button {
  align-items: center;
  border: 1px solid var(--ink);
  border-radius: var(--radius-small);
  display: inline-flex;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  text-align: center;
  text-decoration: none;
}

.button--primary {
  background: var(--orange);
  color: var(--ink);
}

.button--secondary {
  background: transparent;
}

.portrait-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  margin: 0;
  max-width: 400px;
  padding: 16px;
  position: relative;
  width: 100%;
}

.portrait-card img {
  border-radius: var(--radius-medium);
  height: auto;
  width: 100%;
}

.portrait-card figcaption {
  align-items: center;
  display: flex;
  font-size: 0.9rem;
  font-weight: 600;
  justify-content: space-between;
  padding: 16px 4px 2px;
}

.portrait-stamp {
  color: var(--orange);
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
}

.proof-strip {
  background: var(--ink);
  color: var(--background);
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.proof-item {
  border-right: 1px dashed rgb(247 247 245 / 35%);
  padding: 28px 24px;
}

.proof-item:first-of-type {
  padding-left: 0;
}

.proof-item:last-of-type {
  border-right: 0;
  padding-right: 0;
}

.proof-item h3 {
  color: var(--orange);
  font-size: 1.15rem;
}

.proof-item p {
  color: var(--background);
  margin: 8px 0 0;
  opacity: 0.75;
}

.section {
  padding-bottom: 104px;
  padding-top: 104px;
}

.section-intro {
  margin: 24px 0 0;
}

.profile-grid,
.newsletter-panel {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 48px;
}

.profile-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  min-width: 0;
  padding: 32px;
}

.profile-card--light {
  background: var(--surface);
}

.profile-card--dark {
  background: var(--ink);
  color: var(--background);
}

.profile-card p:not(.card-kicker) {
  color: var(--muted);
  margin: 20px 0 0;
}

.profile-card--dark p:not(.card-kicker) {
  color: var(--background);
  opacity: 0.78;
}

.card-kicker {
  color: var(--muted);
  margin: 0 0 16px;
}

.profile-card--dark .card-kicker {
  color: var(--orange);
}

.tag-list {
  margin-top: 28px;
}

.tag-list li {
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 7px 12px;
}

.article-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 48px;
}

.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 24px;
}

.article-card h3 {
  margin-top: 8px;
}

.article-card > p:not(.card-kicker) {
  color: var(--muted);
  margin: 20px 0;
}

.article-card time {
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  margin-top: auto;
  padding-top: 16px;
}

.article-card .text-link {
  margin-top: 16px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 24px;
  min-width: 0;
}

.article-meta p {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.stale-warning {
  border-left: 3px solid var(--brown);
  color: var(--brown);
  padding-left: 12px;
}

.text-link,
.external-link {
  font-weight: 600;
}

.newsletter-section {
  padding-bottom: 104px;
}

.newsletter-panel {
  background: var(--ink);
  border-radius: var(--radius-large);
  color: var(--background);
  margin-top: 0;
  padding: 48px;
}

.newsletter-copy p:not(.eyebrow) {
  color: var(--background);
  max-width: 520px;
  opacity: 0.78;
}

.newsletter-copy .eyebrow {
  color: var(--orange);
}

.embed-shell {
  background: var(--surface);
  border-radius: var(--radius-medium);
  color: var(--ink);
  min-width: 0;
  padding: 28px;
}

.embed-shell p {
  margin: 12px 0;
  overflow-wrap: anywhere;
}

.embed-shell .card-kicker {
  color: var(--muted);
  margin-top: 0;
}

.embed-shell button {
  background: var(--orange);
  color: var(--ink);
  margin-top: 16px;
  width: 100%;
}

.embed-shell button:disabled {
  cursor: wait;
  opacity: 0.65;
}

#mobile-embed-message {
  display: none;
}

#iframe-panel {
  background: var(--background);
  border-radius: var(--radius-small);
  margin-top: 20px;
  min-height: 320px;
  overflow: hidden;
  padding: 16px;
}

#iframe-panel[hidden] {
  display: none;
}

#iframe-status {
  font-size: 0.9rem;
  margin: 0 0 12px;
}

#substack-frame {
  background: var(--surface);
  border: 0;
  display: block;
  min-height: 320px;
  width: 100%;
}

.external-link {
  display: inline-flex;
  margin-top: 20px;
  min-height: 44px;
  padding-block: 10px;
}

.external-link.is-highlighted {
  background: var(--beige);
  border-radius: var(--radius-small);
  outline: 2px solid var(--brown);
  outline-offset: 2px;
  padding-inline: 10px;
}

.site-footer {
  background: var(--ink);
  color: var(--background);
  padding-bottom: 32px;
  padding-top: 80px;
}

.footer-grid {
  align-items: end;
  display: grid;
  gap: 48px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.site-footer h2 {
  max-width: 720px;
}

.site-footer .eyebrow {
  color: var(--orange);
}

.footer-links {
  gap: 8px 24px;
}

.footer-signature {
  border-top: 1px dashed rgb(247 247 245 / 35%);
  color: var(--orange);
  margin-top: 72px;
  padding-top: 24px;
}

@media (max-width: 1024px) {
  .hero {
    gap: 40px;
  }

  .profile-grid,
  .newsletter-panel {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .site-header__inner {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 16px;
    padding-top: 16px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-bottom: 72px;
    padding-top: 72px;
  }

  .portrait-card {
    margin-inline: auto;
  }

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

  .proof-item,
  .proof-item:first-of-type,
  .proof-item:last-of-type {
    border-bottom: 1px dashed rgb(247 247 245 / 35%);
    border-right: 1px dashed rgb(247 247 245 / 35%);
    padding: 24px 16px;
  }

  .proof-item:nth-child(2n) {
    border-right: 0;
  }

  .proof-item:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

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

  .newsletter-panel {
    padding: 32px 24px;
  }

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

@media (max-width: 480px) {
  .container {
    padding-inline: 16px;
  }

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

  .proof-item,
  .proof-item:first-of-type,
  .proof-item:last-of-type {
    border-bottom: 1px dashed rgb(247 247 245 / 35%);
    border-right: 0;
    padding: 24px 0;
  }

  .proof-item:last-of-type {
    border-bottom: 0;
  }

  .nav-list {
    gap: 4px 12px;
  }

  .nav-list a {
    min-height: 44px;
  }

  h1 {
    font-size: clamp(2rem, 13vw, 3.25rem);
  }

  .section {
    padding-bottom: 72px;
    padding-top: 72px;
  }

  .profile-card,
  .article-card,
  .embed-shell {
    padding: 20px;
  }

  .newsletter-panel {
    padding: 28px 16px;
  }

  #load-substack,
  #iframe-panel,
  #embed-facade {
    display: none;
  }

  #mobile-embed-message {
    display: block;
    font-size: 0.9rem;
  }
}

@media (max-width: 360px) {
  .site-header__inner {
    gap: 12px;
  }

  .nav-list {
    gap: 0 8px;
  }

  .button,
  .cta-row {
    width: 100%;
  }

  .button {
    overflow-wrap: anywhere;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
  }
}
