@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/inter-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/inter-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("Arimo");
  size-adjust: 107.64%;
  ascent-override: 90.49%;
  descent-override: 22.56%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-eyebrow.woff2") format("woff2");
  unicode-range: U+20, U+24, U+61, U+68, U+69, U+6D, U+6F, U+77;
}

:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f8fafc;
  --text: #0f172a;
  --muted: #6b7280;
  --accent: #0f766e;
  --accent-hover: #115e59;
  --on-accent: #ffffff;
  --link: #1d4ed8;
  --border: #e2e8f0;
  --button-border: #6b7280;
  --header: rgba(255, 255, 255, 0.92);
  --focus: #0f766e;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0b1120;
    --surface: #111827;
    --text: #f8fafc;
    --muted: #9ca3af;
    --accent: #2dd4bf;
    --accent-hover: #5eead4;
    --on-accent: #0b1120;
    --link: #93c5fd;
    --border: rgba(226, 232, 240, 0.16);
    --button-border: #64748b;
    --header: rgba(11, 17, 32, 0.92);
    --focus: #2dd4bf;
  }
}

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

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Inter Fallback", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

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

#main:focus {
  outline: none;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: 8px;
  transform: translateY(-150%);
  z-index: 40;
  background: var(--accent);
  color: var(--on-accent);
  padding: 0.55rem 0.8rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  transform: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(1080px, calc(100% - 48px));
  margin-inline: auto;
}

a {
  color: var(--link);
  text-underline-offset: 0.18em;
}

a:visited {
  color: var(--link);
}

h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0;
  color: var(--text);
}

h1 {
  font-size: clamp(2.75rem, 7vw, 4.75rem);
  letter-spacing: -0.045em;
  line-height: 1.02;
}

h2 {
  font-size: clamp(1.5rem, 2vw, 1.75rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(140%) blur(16px);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
}

.wordmark,
.wordmark:visited {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-right: -8px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.icon-close,
.when-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-menu,
.nav-toggle[aria-expanded="true"] .when-closed {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

.nav-toggle[aria-expanded="true"] .when-open {
  display: inline;
}

.nav-panel {
  display: none;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.nav-panel.is-open {
  display: block;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0.25rem 0 0.75rem;
}

.nav-list a,
.nav-list a:visited {
  display: flex;
  align-items: center;
  min-height: 48px;
  color: var(--muted);
  text-decoration: none;
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

@media (min-width: 860px) {
  .nav-toggle {
    display: none;
  }

  .nav-panel,
  .nav-panel.is-open {
    display: flex;
    align-items: center;
    position: absolute;
    top: 0;
    bottom: 0;
    right: max(24px, calc((100% - 1080px) / 2));
    border: 0;
    background: transparent;
  }

  .nav-list {
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .nav-list a {
    padding: 0 0.7rem;
  }
}

.hero {
  padding: 3.75rem 0 2.5rem;
}

.eyebrow {
  margin: 0 0 0.85rem;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--accent);
}

.role {
  max-width: 38rem;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  line-height: 1.5;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.button,
.button:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.1rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.button-primary,
.button-primary:visited {
  background: var(--accent);
  color: var(--on-accent);
}

.button-primary:hover {
  background: var(--accent-hover);
}

.button-secondary,
.button-secondary:visited {
  background: transparent;
  color: var(--text);
  border-color: var(--button-border);
}

.button-secondary:hover {
  background: var(--surface);
}

.section {
  padding: 2.75rem 0;
  border-top: 1px solid var(--border);
}

.prose {
  max-width: 42rem;
}

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

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pills li {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.875rem;
  line-height: 1.4;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.card p {
  margin: 0;
}

.card h3 a,
.card h3 a:visited {
  color: var(--text);
  text-decoration: none;
}

.card h3 a:hover {
  color: var(--link);
}

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-top: auto;
}

.card-links a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-weight: 600;
}

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 42rem;
}

.post-list a,
.post-list a:visited {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  justify-content: space-between;
  align-items: baseline;
  min-height: 48px;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
}

.post-list a:hover {
  color: var(--link);
}

.post-list time {
  color: var(--muted);
  font-size: 0.875rem;
}

.more {
  margin: 1rem 0 0;
}

.empty {
  max-width: 40rem;
  margin: 0;
  padding: 1.1rem 1.15rem;
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--muted);
}

.contact-list,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-list a,
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
}

.footer-links a,
.footer-links a:visited {
  color: var(--muted);
}

.page,
.post {
  padding: 3.25rem 0 1rem;
}

.page h1,
.post h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
}

.kicker {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
}

.kicker a,
.kicker a:visited {
  color: var(--accent);
  font-weight: 600;
}

.meta {
  margin: 0.75rem 0 0;
  color: var(--muted);
}

.post {
  max-width: 42rem;
}

.post-body {
  margin-top: 1.75rem;
  overflow-wrap: break-word;
}

.post-body > :first-child {
  margin-top: 0;
}

.post-body h2,
.post-body h3 {
  margin: 2rem 0 0.6rem;
}

.post-body ul,
.post-body ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.post-body li + li {
  margin-top: 0.3rem;
}

.post-body blockquote {
  margin: 0 0 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

.post-body hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.post-body pre,
.post-body code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.post-body :not(pre) > code {
  padding: 0.1em 0.35em;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  font-size: 0.9em;
}

.post-body pre {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  font-size: 0.875rem;
  line-height: 1.6;
  tab-size: 2;
}

.post-body .highlight pre {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.25rem;
}

.post-body th,
.post-body td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.65rem;
  text-align: left;
}

.post-pager {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.post-pager a,
.post-pager a:visited {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-height: 48px;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
}

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

.site-footer {
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  padding: 0.5rem 0 2rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.footer-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  align-items: center;
}

.footer-bar p {
  margin: 0;
}

section[id] {
  scroll-margin-top: 5rem;
}

@media (min-width: 760px) {
  .hero {
    padding: 6rem 0 3.5rem;
  }

  .section {
    padding: 3.5rem 0;
  }

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

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

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--bg);
    backdrop-filter: none;
  }
}

@media (forced-colors: active) {
  .button-primary {
    border: 1px solid ButtonText;
  }

  :focus-visible {
    outline: 2px solid Highlight;
  }
}
