@font-face {
  font-family: 'Chomsky';
  src: url('Chomsky.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Darcula-derived palette. Dark (default) is the JetBrains Darcula
   scheme, light is a plain counterpart sharing the same accent colors. */
:root {
  color-scheme: dark;
  --bg: #2b2b2b;
  --fg: #bfc5cc;
  --muted: #808080;
  --border: #515151;
  --accent: #cc7832;
  --link: #6897bb;
  --code-inline-bg: #3c3f41;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fafafa;
  --fg: #2b2b2b;
  --muted: #6e6e6e;
  --border: #d6d6d6;
  --accent: #cc7832;
  --link: #287bde;
  --code-inline-bg: #ececec;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  margin: 0;
  display: grid;
  grid-template-columns:
    1fr min(70ch, 100% - 2rem) 1fr;
  background-color: var(--bg);
  color: var(--fg);
}

body>* {
  grid-column: 2;
}

.site-header > * {
  grid-column: 1 / -1;
}

.hero-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.hero-banner {
  text-align: center;
  padding: clamp(1.5rem, 5vw, 3rem) 1rem 0.5rem;
}

.hero-banner h1 {
  font-family: 'Chomsky';
  margin: 0;
  font-size: clamp(2.5rem, 10vw, 5rem);
  line-height: 1;
  font-weight: normal;
}

.hero-tagline {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(0.75rem, 3vw, 1.75rem);
  padding: 0.5rem 1rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
}

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

.theme-toggle {
  background: none;
  border: none;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

.theme-toggle:hover,
.theme-toggle:focus {
  color: var(--accent);
}

.full-bleed {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: inherit;
}

.full-bleed>* {
  grid-column: 2;
}

.site-footer {
  margin-top: 3rem;
  padding: 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: inherit;
}

.content {
  max-width: 65ch;
  margin-inline: auto;
}

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

article h2 a {
  color: var(--fg);
  text-decoration: none;
}

article h2 a:hover,
article h2 a:focus {
  color: var(--accent);
}

time {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Code blocks stay Darcula in both modes (see highlight-darcula.min.css). */
pre {
  background-color: #2b2b2b;
  color: #a9b7c6;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.25rem 1rem;
  overflow-x: auto;
}

pre code.hljs {
  background: transparent;
}

code {
  background-color: var(--code-inline-bg);
  border-radius: 4px;
  padding: 0.1em 0.3em;
}

pre code {
  background: none;
  padding: 0;
}

/* Canvas widgets draw dark-on-transparent; keep them readable in dark mode. */
canvas {
  background-color: #ffffff;
}

