@font-face {
  font-family: 'ET Book';
  src: url('https://cdn.jsdelivr.net/gh/edwardtufte/et-book@gh-pages/et-book/et-book-roman-line-figures/et-book-roman-line-figures.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'ET Book';
  src: url('https://cdn.jsdelivr.net/gh/edwardtufte/et-book@gh-pages/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.woff') format('woff');
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #111110;
  --bg2: #181816;
  --bg3: #1f1f1d;
  --line: #2b2b28;
  --line2: #3a3a36;
  --text: #dbd6ce;
  --text2: #96918b;
  --text3: #575450;
  --accent: #c09058;
  --accent-dim: #7a5a35;
  --link: #7aaac6;
  --sel: rgba(192, 144, 88, .15);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f2ed;
  --bg2: #eceae4;
  --bg3: #ffffff;
  --line: #dbd7cf;
  --line2: #c5c1b8;
  --text: #1a1917;
  --text2: #6b6760;
  --text3: #aeaaa4;
  --accent: #8b5530;
  --accent-dim: #b8805a;
  --link: #285c7a;
  --sel: rgba(139, 85, 48, .1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
::selection { background: var(--sel); }

html {
  font-size: 20px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

html,
body {
  font-family: 'ET Book', Georgia, serif;
  font-weight: normal;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  min-height: 100vh;
  overflow-x: clip;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap--wide {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background .25s, border-color .25s;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  gap: .5rem;
  min-width: 0;
}

.site-name {
  font-family: 'ET Book', Georgia, serif;
  font-weight: normal;
  font-size: 1.05rem;
  letter-spacing: -.01em;
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.site-name span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  flex-shrink: 0;
  gap: 0;
}

.nav-links a {
  font-family: 'Courier Prime', monospace;
  font-size: .72rem;
  color: var(--text2);
  padding: .25rem .5rem;
  white-space: nowrap;
  transition: color .15s;
  border-radius: 3px;
  letter-spacing: .01em;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.theme-btn {
  background: none;
  border: 1px solid var(--line2);
  border-radius: 4px;
  height: 30px;
  padding: 0 .6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .35rem;
  font-family: 'Courier Prime', monospace;
  font-size: .68rem;
  color: var(--text2);
  flex-shrink: 0;
  white-space: nowrap;
  transition: border-color .15s, color .15s;
}

.theme-btn:hover {
  border-color: var(--accent-dim);
  color: var(--text);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.8rem 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "copy copy"
    "links toggle";
  gap: .5rem 1.5rem;
  align-items: center;
}

.footer-copy {
  grid-area: copy;
  font-family: 'Courier Prime', monospace;
  font-size: .68rem;
  color: var(--text3);
}

.footer-links {
  grid-area: links;
  display: flex;
  gap: 1.25rem;
  flex-wrap: nowrap;
}

.footer-links a {
  font-family: 'Courier Prime', monospace;
  font-size: .68rem;
  color: var(--text3);
  transition: color .15s;
  white-space: nowrap;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-inner .theme-btn {
  grid-area: toggle;
  align-self: center;
}

.site-footer .theme-btn {
  border: none;
  height: auto;
  padding: 0;
  color: var(--accent);
  background: none;
  display: flex;
  align-items: center;
}

.site-footer .theme-btn:hover {
  border-color: transparent;
  color: var(--accent);
}

#theme-icon { display: flex; align-items: center; color: var(--accent); }

@media (max-width: 420px) {
  .site-name { font-size: .9rem; }
  .nav-links a {
    padding: .25rem .35rem;
    font-size: .68rem;
  }
}
