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

@font-face {
  font-family: "SN Pro";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/sn-pro-ext-subset.woff2") format("woff2");
  unicode-range: U+0106-0107, U+010C-010D, U+0110-0111, U+0160-0161, U+017D-017E;
}

:root {
  /* Match the live ibro.me graphite and cyan palette. */
  color-scheme: dark;
  --bg: oklch(21% 0.006 286);
  --surface: oklch(27.4% 0.005 286);
  --text: oklch(96.7% 0.001 286);
  --body-text: oklch(80% 0.013 286);
  --muted: oklch(71.2% 0.013 286);
  --line: oklch(37% 0.012 286);
  --accent: oklch(86.5% 0.115 207);
  --accent-strong: oklch(79.7% 0.134 212);
  --code-bg: oklch(27.4% 0.005 286);
  --max-width: 760px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 18px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body-text);
  font-family: "SN Pro", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

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

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

::selection {
  background: var(--accent);
  color: var(--bg);
}

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

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

.site-header__inner,
.site-footer,
.main {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}

.brand::after {
  content: ".";
  color: var(--accent);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-size: 0.9rem;
}

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

.nav a:hover,
.nav a:focus-visible {
  color: var(--accent);
}

.main {
  padding: 2.5rem 0 4rem;
}

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

.article-header {
  margin-bottom: 2rem;
}

.eyebrow,
.post-meta {
  color: var(--muted);
  font-size: 0.86rem;
}

h1,
h2,
h3,
h4 {
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1.55rem;
  margin-top: 2.2rem;
}

h3 {
  font-size: 1.2rem;
  margin-top: 1.8rem;
}

.content {
  overflow-wrap: anywhere;
}

.content p,
.content ul,
.content ol,
.content pre,
.content blockquote,
.content table {
  margin: 1rem 0;
}

.content pre {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 1rem;
}

.content code {
  border-radius: 4px;
  background: var(--code-bg);
  color: var(--text);
  font-family: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  padding: 0.08rem 0.25rem;
  font-size: 0.9em;
}

.content pre code {
  background: transparent;
  padding: 0;
}

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

.content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.content th,
.content td {
  border: 1px solid var(--line);
  padding: 0.45rem 0.55rem;
  text-align: left;
}

.post-list {
  display: grid;
  gap: 1.5rem;
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
}

.post-list__item {
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
}

.post-list__item h2 {
  font-size: 1.25rem;
  margin: 0 0 0.25rem;
}

.post-list__item h2 a {
  color: var(--text);
  text-decoration: none;
}

.post-list__item h2 a:hover,
.post-list__item h2 a:focus-visible {
  color: var(--accent);
}

.post-list__item p {
  margin: 0.6rem 0 0;
}

.terms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.terms a {
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  padding: 0.15rem 0.45rem;
  text-decoration: none;
  background: var(--surface);
}

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

.featured {
  margin: 1.5rem 0 2rem;
}

.pagination {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.pagination__pages {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
}

.pagination__edge,
.pagination__page,
.pagination__current,
.pagination__ellipsis {
  border: 1px solid var(--line);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0.2rem 0.55rem;
  text-decoration: none;
}

.pagination__current {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.pagination__ellipsis,
.pagination__edge.is-disabled {
  color: var(--muted);
}

.skip-link {
  position: absolute;
  top: -4rem;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--surface);
  z-index: 10;
}

.skip-link:focus {
  top: 0.5rem;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin-top: 2rem;
}

.pager li {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.2rem 0.6rem;
}

.pager li.active {
  background: var(--accent);
  border-color: var(--accent);
}

.pager li.active a {
  color: var(--bg);
}

.pager li.disabled {
  color: var(--muted);
}

@media print {
  :root {
    color-scheme: light;
    --bg: #ffffff;
    --surface: #f4f4f5;
    --text: #18181b;
    --body-text: #27272a;
    --muted: #52525b;
    --line: #a1a1aa;
    --accent: #155e75;
    --accent-strong: #164e63;
    --code-bg: #f4f4f5;
  }

  .nav,
  .skip-link,
  .pager {
    display: none;
  }
}

@media (max-width: 640px) {
  html {
    font-size: 16px;
  }

  .site-header__inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
