:root {
  color-scheme: light dark;
  --bg: #f7f8f4;
  --surface: #ffffff;
  --surface-2: #eef2ec;
  --text: #18201d;
  --muted: #5c6863;
  --line: #d4dcd6;
  --accent: #176b4d;
  --accent-strong: #0f563c;
  --accent-soft: #dff1e8;
  --code-bg: #101714;
  --code-text: #d7f4e5;
  --shadow: 0 14px 40px rgb(24 32 29 / 10%);
  --radius: 8px;
  --header-height: 72px;
  --shell: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1110;
    --surface: #131a17;
    --surface-2: #18221e;
    --text: #edf4ef;
    --muted: #a6b3ad;
    --line: #2d3934;
    --accent: #63d39f;
    --accent-strong: #8be5b9;
    --accent-soft: #17392c;
    --code-bg: #080b0a;
    --code-text: #c8f4dd;
    --shadow: 0 16px 48px rgb(0 0 0 / 30%);
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f8f4;
  --surface: #ffffff;
  --surface-2: #eef2ec;
  --text: #18201d;
  --muted: #5c6863;
  --line: #d4dcd6;
  --accent: #176b4d;
  --accent-strong: #0f563c;
  --accent-soft: #dff1e8;
  --code-bg: #101714;
  --code-text: #d7f4e5;
  --shadow: 0 14px 40px rgb(24 32 29 / 10%);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1110;
  --surface: #131a17;
  --surface-2: #18221e;
  --text: #edf4ef;
  --muted: #a6b3ad;
  --line: #2d3934;
  --accent: #63d39f;
  --accent-strong: #8be5b9;
  --accent-soft: #17392c;
  --code-bg: #080b0a;
  --code-text: #c8f4dd;
  --shadow: 0 16px 48px rgb(0 0 0 / 30%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

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

svg {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
}

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

h1,
h2,
h3 {
  line-height: 1.12;
  letter-spacing: 0;
}

h1 {
  max-width: 900px;
  margin-bottom: 1.5rem;
  font-size: clamp(2.6rem, 6vw, 5.5rem);
  font-weight: 720;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}

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

.narrow {
  max-width: 850px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: 4px;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-160%);
}

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

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

.header-inner {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto auto;
  align-items: center;
  min-height: var(--header-height);
  gap: 22px;
}

.wordmark {
  width: max-content;
  color: var(--text);
  font-size: 1rem;
  font-weight: 750;
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 5px;
}

.site-nav a {
  padding: 8px 10px;
  border-radius: 5px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--surface-2);
  color: var(--text);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.nav-toggle {
  display: none;
}

.theme-icon {
  display: none;
}

:root:not([data-theme]) .theme-icon-sun,
:root[data-theme="light"] .theme-icon-moon,
:root[data-theme="dark"] .theme-icon-sun {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-icon-sun {
    display: none;
  }

  :root:not([data-theme]) .theme-icon-moon {
    display: block;
  }
}

.hero {
  min-height: calc(100svh - var(--header-height));
  display: grid;
  align-items: center;
  padding: 72px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, 0.95fr);
  align-items: center;
  gap: 70px;
}

.eyebrow {
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hero-lede,
.page-intro > .shell > p:last-child,
.article-deck {
  max-width: 780px;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.6;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 0.94rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  background: var(--accent);
  color: #ffffff;
}

.button-primary:hover {
  background: var(--accent-strong);
  color: #ffffff;
}

.button-secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.button-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.terminal {
  overflow: hidden;
  border: 1px solid #31423a;
  border-radius: var(--radius);
  background: #0a100d;
  box-shadow: var(--shadow);
  color: #d8ebe0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
}

.terminal-bar {
  position: relative;
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 92px;
  border-bottom: 1px solid #26342e;
  background: #141d19;
  color: #9eb1a7;
  font-size: 0.75rem;
}

.window-controls {
  position: absolute;
  left: 16px;
  display: flex;
  gap: 8px;
}

.window-control {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.close-control {
  background: #ff5f57;
}

.minimize-control {
  background: #febc2e;
}

.maximize-control {
  background: #28c840;
}

.terminal-body {
  min-height: 410px;
  padding: 28px;
}

.terminal-body p {
  margin-bottom: 12px;
}

.prompt {
  color: #64dda5;
}

.terminal-output {
  margin-left: 18px;
  color: #9eb1a7;
}

.terminal-list {
  margin-top: -2px;
  margin-bottom: 20px;
  padding-left: 22px;
}

.terminal-list li {
  margin-bottom: 4px;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 9px;
  border-radius: 50%;
  background: #42d392;
  box-shadow: 0 0 14px rgb(66 211 146 / 75%);
}

.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 1.15em;
  margin-left: 7px;
  background: #64dda5;
  vertical-align: -0.2em;
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

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

  .terminal-cursor {
    animation: none;
  }
}

.section {
  padding: 96px 0;
}

.section-contrast {
  border-block: 1px solid var(--line);
  background: var(--surface-2);
}

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

.section-heading h2 {
  max-width: 720px;
  margin-bottom: 0;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 750;
  text-decoration: none;
}

.text-link svg {
  width: 18px;
  transition: transform 160ms ease;
}

.text-link:hover svg {
  transform: translateX(3px);
}

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

.content-card {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.content-card h2 {
  margin-bottom: 15px;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
}

.content-card h2 a {
  text-decoration: none;
}

.content-card p {
  color: var(--muted);
}

.content-card .text-link {
  margin-top: auto;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
  text-transform: uppercase;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 24px;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-size: 0.72rem;
}

.split-copy {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 90px;
}

.prose-large {
  color: var(--muted);
  font-size: 1.16rem;
}

.prose-large p:last-child {
  margin-bottom: 0;
}

.latest-grid,
.contact-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 70px;
}

.latest-grid > div {
  max-width: 520px;
}

.latest-grid p:not(.eyebrow) {
  color: var(--muted);
}

.page-intro,
.article-hero {
  padding: 110px 0 80px;
  border-bottom: 1px solid var(--line);
}

.page-intro h1,
.article-hero h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
}

.listing-section {
  padding-top: 64px;
}

.article-head-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: end;
  gap: 70px;
}

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

.fact-list div {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.fact-list dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
}

.fact-list dd {
  margin: 0;
  font-size: 0.9rem;
}

.byline {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.article-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 760px);
  justify-content: center;
  gap: 80px;
  padding-top: 72px;
  padding-bottom: 100px;
}

.article-aside {
  color: var(--muted);
  font-size: 0.82rem;
}

.article-aside a {
  color: var(--accent);
  font-weight: 750;
}

.article-aside p {
  margin-top: 22px;
}

.article-body {
  min-width: 0;
}

.article-section {
  margin-bottom: 58px;
}

.article-section h2 {
  margin-bottom: 20px;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
}

.article-section p {
  color: var(--muted);
}

.article-section p:last-child {
  margin-bottom: 0;
}

.article-section ul {
  padding-left: 1.2rem;
  color: var(--muted);
}

.article-section li {
  margin-bottom: 10px;
}

pre {
  overflow-x: auto;
  margin: 26px 0 0;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--code-bg);
  color: var(--code-text);
  font-size: 0.82rem;
  line-height: 1.7;
  tab-size: 2;
}

.media-grid {
  display: grid;
  gap: 18px;
}

.media-grid figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.media-grid img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  object-fit: contain;
}

.media-grid figcaption {
  padding: 10px 13px;
  color: var(--muted);
  font-size: 0.78rem;
}

.embed-frame {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  margin: 22px 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.embed-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.sources ul {
  padding-left: 1.2rem;
}

.sources li {
  margin-bottom: 9px;
}

.next-item {
  padding: 76px 0;
  border-block: 1px solid var(--line);
  background: var(--surface-2);
}

.next-item h2 {
  max-width: 800px;
}

.next-item h2 a {
  text-decoration: none;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
  align-items: end;
  gap: 80px;
}

.contact-panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.contact-label {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
  text-transform: uppercase;
}

.contact-email {
  overflow-wrap: anywhere;
  font-size: clamp(1.2rem, 3vw, 1.75rem);
  font-weight: 750;
  text-decoration: none;
}

.copy-status {
  min-height: 1.5em;
  margin: 14px 0 0;
  color: var(--accent);
  font-size: 0.82rem;
}

.contact-details {
  grid-template-columns: 0.7fr 1.3fr 0.7fr;
  gap: 45px;
}

.contact-details p:last-child {
  color: var(--muted);
}

.site-footer {
  padding: 54px 0;
  background: var(--text);
  color: var(--bg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 50px;
}

.footer-grid p {
  margin: 8px 0 0;
  color: color-mix(in srgb, var(--bg) 72%, transparent);
  font-size: 0.84rem;
}

.footer-links {
  display: grid;
  align-content: start;
  gap: 6px;
}

.footer-links a {
  width: max-content;
  color: var(--bg);
  font-size: 0.86rem;
}

.footer-meta {
  text-align: right;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 65%, transparent);
  outline-offset: 3px;
}

@media (max-width: 920px) {
  .hero {
    min-height: auto;
  }

  .hero-grid,
  .article-head-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    gap: 50px;
  }

  .article-head-grid {
    align-items: start;
  }

  .fact-list {
    max-width: 520px;
  }

  .article-layout {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .article-aside {
    max-width: 650px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line);
  }

  .article-aside p {
    display: none;
  }

  .split-copy {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 760px) {
  :root {
    --header-height: 64px;
  }

  body {
    font-size: 16px;
  }

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

  .header-inner {
    grid-template-columns: 1fr auto auto;
    gap: 9px;
  }

  .nav-toggle {
    display: grid;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-height) 0 auto;
    display: none;
    padding: 12px 14px 18px;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: grid;
  }

  .site-nav a {
    padding: 12px;
  }

  .hero,
  .page-intro,
  .article-hero {
    padding: 64px 0;
  }

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

  .terminal-body {
    min-height: 390px;
    padding: 22px 18px;
  }

  .terminal-bar {
    padding-inline: 80px 12px;
    justify-content: end;
    font-size: 0.68rem;
  }

  .section {
    padding: 68px 0;
  }

  .section-heading {
    display: block;
  }

  .section-heading .text-link {
    margin-top: 18px;
  }

  .card-grid,
  .latest-grid,
  .contact-details {
    grid-template-columns: 1fr;
  }

  .content-card {
    min-height: 0;
  }

  .article-layout {
    padding-top: 48px;
    padding-bottom: 68px;
  }

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

  .footer-meta {
    text-align: left;
  }
}
