/* Local Mona Sans variable fonts (no Google Fonts). */
@font-face {
  font-family: "Mona Sans";
  src: url("/fonts/mona-sans/MonaSansVF.woff2") format("woff2");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Mona Sans";
  src: url("/fonts/mona-sans/MonaSansVF.woff2") format("woff2");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Mona Sans Mono";
  src: url("/fonts/mona-sans/MonaSansMonoVF.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand / accent */
  --primary: hsl(187, 85%, 46%);
  --link-hover: hsl(187, 85%, 35%);

  /* Surfaces (light theme defaults) */
  --bg: hsl(0, 0%, 100%);
  --text: hsl(220, 18%, 12%);
  --muted: hsla(220, 18%, 12%, 0.72);
  --surface: hsla(0, 0%, 100%, 0.72);
  --surface-2: hsla(0, 0%, 100%, 0.55);
  --border: hsla(220, 18%, 12%, 0.14);

  /* Highlights */
  --mark-bg: hsl(187, 80%, 26%);
  --mark-text: hsl(0, 0%, 100%);

  /* Typography */
  --font-sans: "Mona Sans", system-ui, -apple-system, Segoe UI, sans-serif;
  --font-mono: "Mona Sans Mono", ui-monospace, SFMono-Regular, SFMono, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  --opsz-body: 12;
  --opsz-mid: 20;
  --opsz-heading: 20;

  /* Optional aliases (handy for component theming). */
  --fg: var(--text);
  --rule: var(--border);
  --link: var(--primary);
  --linkHover: var(--link-hover);

}

:root[data-theme="dark"] {
  --primary: hsl(187, 85%, 60%);
  --link-hover: hsl(207, 100%, 94%);

  --bg: hsl(220, 8%, 11%);
  --text: hsl(0, 0%, 100%);
  --muted: hsla(0, 0%, 100%, 0.78);
  --surface: hsla(0, 0%, 100%, 0.08);
  --surface-2: hsla(0, 0%, 100%, 0.12);
  --border: hsla(0, 0%, 100%, 0.14);

  --mark-bg: hsl(187, 80%, 22%);
  --mark-text: hsl(0, 0%, 100%);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  padding: 0;
  margin: 0;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-stretch: 100%;
  font-optical-sizing: none;
  font-variation-settings: "opsz" var(--opsz-body);
  background: var(--bg);
  color: var(--text);
}

a {
  color: var(--primary);
  transition: color 150ms ease;
}

a:hover,
a:focus {
  color: var(--link-hover);
}

h1,
h2,
h3 {
  font-family: var(--font-sans);
  font-stretch: 100%;
  font-optical-sizing: none;
  margin: 0;
}

h1 {
  font-size: 2rem;
  letter-spacing: 0.01em;
  font-weight: 700;
  font-variation-settings: "opsz" var(--opsz-heading);
}

h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.35rem;
  font-weight: 400;
  font-variation-settings: "opsz" var(--opsz-mid);
}

h3 {
  font-weight: 400;
  font-variation-settings: "opsz" var(--opsz-mid);
}

p {
  margin: 0 0 0.6rem;
  line-height: 1.5;
  color: var(--muted);
}

mark {
  background: var(--mark-bg);
  color: var(--mark-text);
  font-style: italic;
  font-weight: 700;
  padding-inline: 0.25em;
  border-radius: 3px;
}

hr {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 1rem 0;
}
