* { box-sizing: border-box; }

:root {
  /* Set sans-serif & mono fonts */
  --sans-font: -apple-system, BlinkMacSystemFont, "Avenir Next", Avenir,
    "Nimbus Sans L", Roboto, "Noto Sans", "Segoe UI", Arial, Helvetica,
    "Helvetica Neue", sans-serif;
  --serif-font: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  --mono-font: Consolas, Menlo, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
  --standard-border-radius: 5px;
  --border-width: 1px;

  /* Default (light) theme */
  --bg: #fff;
  --accent-bg: #f5f7ff;
  --text: #212121;
  --text-light: #585858;
  --border: #898EA4;
  --accent: #0d47a1;
  --accent-hover: #1266e2;
  --accent-text: var(--bg);
  --code: #d81b60;
  --preformatted: #444;
  --marked: #ffdd33;
  --disabled: #efefef;
}

/* Dark theme */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: light;
    --bg: #000 !important;
    --accent-bg: #f5f7ff;
    --text: #fff !important;
    --text-light: #ffa84b !important;
    --accent: #ffa84b !important;
    --accent-hover: #fcb569 !important;
    --accent-text: var(--bg);
    --code: #d81b60;
    --preformatted: #444;
    --marked: #ffdd33;
    --disabled: #efefef;
  }
  /* Add a bit of transparency so light media isn't so glaring in dark mode */
  img,
  video {
    opacity: 0.8;
  }
}

body {
  margin: 0;
  background: var(--bg);
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  line-height: 1.65;
}

@media (max-width: 480px) {
  body {
    font-size: 95%;
  }
}

.page {
  max-width: 840px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.hero {
  padding: 32px 0 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}

.eyebrow, .date {
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  margin: 0 0 20px;
}

h2 {
  line-height: 1.2;
  margin: 0;
}

a {
  color: var(--text-light) !important;
  font-family: "Roboto Flex", sans-serif;
  font-weight: 500;
  font-style: normal;
  font-variation-settings:
    "slnt" 0,
    "wdth" 111,
    "GRAD" -24,
    "XOPQ" 126,
    "XTRA" 525,
    "YOPQ" 79,
    "YTAS" 750,
    "YTDE" -203,
    "YTFI" 738,
    "YTLC" 514,
    "YTUC" 712;
  text-decoration: none;
  border-bottom: 0.08em solid currentColor;
  padding-bottom: 0.08em;
}

a:hover {
  color: var(--accent-hover) !important;
  border-bottom: 0;
}

a::after {
  content: "➫";
  padding-left: 5px;
  font-size: 1.5rem;
}

.top-nav {
  margin-bottom: 32px;
}

.article-list {
  display: grid;
  gap: 16px;
}

.content > * + * {
  margin-top: 1.1em;
}

pre {
  overflow-x: auto;
  background: #27272a;
  color: #fafafa;
  padding: 18px;
  border-radius: 14px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

:not(pre) > code {
  background: var(--accent-bg);
  padding: 0.15em 0.35em;
  border-radius: 6px;
}

blockquote {
  margin-left: 0;
  padding-left: 18px;
  border-left: 4px solid var(--border);
  color: var(--muted);
}

.roboto-flex {
  color: var(--accent);
  font-family: "Roboto Flex", sans-serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
  font-variation-settings:
    "slnt" 0,
    "wdth" 111,
    "GRAD" -24,
    "XOPQ" 126,
    "XTRA" 525,
    "YOPQ" 79,
    "YTAS" 750,
    "YTDE" -203,
    "YTFI" 738,
    "YTLC" 514,
    "YTUC" 712;
}

ul {
  padding-left: 1.65rem;
}