@font-face {
  font-family: "Google Sans Code";
  src: url("../fonts/GoogleSansCode-Variable.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Google Sans Code";
  src: url("../fonts/GoogleSansCode-Italic-Variable.woff2") format("woff2");
  font-weight: 300 800;
  font-style: italic;
  font-display: swap;
}

/* Theme tokens lifted from blog.nuneslopes.org */
:root,
:root[data-theme="light"] {
  --background: #fffaf6;
  --foreground: #060503;
  --accent: #aa0215;
  --accent-foreground: #ffcf75;
  --muted-foreground: #54515b;
  --border: #ffdc98;
}

:root[data-theme="dark"] {
  --background: #1a1a1a;
  --foreground: #f5efe4;
  --accent: #ff3737;
  --accent-foreground: #1a1a1a;
  --muted-foreground: #a59a8c;
  --border: #6f5648;
}

* { box-sizing: border-box; }

::selection {
  background: color-mix(in srgb, var(--accent) 75%, transparent);
  color: var(--accent-foreground);
}

body {
  margin: 0 auto;
  max-width: 48rem;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 0 1rem;
  background: var(--background);
  color: var(--foreground);
  font-family: "Google Sans Code", "Courier New", monospace;
  font-size: 1rem;
  line-height: 1.5;
}

/* Body is narrower than the viewport; paint the page background everywhere */
html { background: var(--background); }

a {
  color: var(--accent);
  text-decoration: none;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
}

.site-title {
  color: var(--foreground);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-nav a {
  color: var(--foreground);
  font-weight: 500;
}

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

#theme-btn {
  display: inline-flex;
  padding: 0.25rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--foreground);
}

#theme-btn:hover { color: var(--accent); }

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

.links { padding: 2rem 0 1.5rem; }

.links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.links li { margin: 1.5rem 0; }

.links li > a {
  font-size: 1.125rem;
  font-weight: 500;
  text-underline-offset: 4px;
}

.links li > a:hover {
  text-decoration: underline dashed;
}
