@font-face {
  font-family: "EB Garamond";
  src: url("fonts/eb-garamond-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("fonts/eb-garamond-latin-wght-italic.woff2") format("woff2");
  font-weight: 400 800;
  font-style: italic;
  font-display: swap;
}

:root { --text: #222; --muted: #6b6862; --rule: #dedcd6; --bg: #f7f6f2; color-scheme: light; }
:root[data-theme="dark"] { --text: #e6e6e6; --muted: #9a9a9a; --rule: #333; --bg: #111; color-scheme: dark; }

* { box-sizing: border-box; }

body {
  margin: 0 auto;
  max-width: 40rem;
  padding: 3rem 1.25rem 5rem;
  font: 400 1.15rem/1.6 "EB Garamond", Garamond, "Times New Roman", serif;
  font-kerning: normal;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 2rem;
  row-gap: 0.5rem;
  padding-bottom: 1.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}
nav a { text-decoration: none; }
nav a:hover, nav a[aria-current] { text-decoration: underline; text-underline-offset: 5px; }

.theme-toggle {
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 0;
  color: var(--text);
  background: none;
  border: 0;
  width: 0.9rem;
  padding: 0.25rem 0;
  margin: -0.25rem 0;
  text-align: center;
  overflow: visible;
  white-space: nowrap;
  cursor: pointer;
}
.theme-toggle:hover { color: var(--muted); }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--muted); }

h1 { font-size: 1.75rem; font-weight: 500; line-height: 1.25; margin: 0 0 0.25rem; }
h2 { font-size: 1.35rem; font-weight: 500; margin: 2.5rem 0 0.5rem; }
h3, h4 { font-size: 1.15rem; font-weight: 600; margin: 2rem 0 0.5rem; }

p, ul, ol, blockquote, figure, table, pre { margin: 0 0 1.1rem; }
ul, ol { padding-left: 1.25rem; }
li { margin-bottom: 0.3rem; }

blockquote { margin-left: 0; padding-left: 1.25rem; border-left: 2px solid var(--rule); color: var(--muted); }
img { max-width: 100%; height: auto; display: block; margin: 1.5rem auto; }
figure { margin: 1.5rem 0; }
figcaption { font-size: 0.9rem; color: var(--muted); text-align: center; }
iframe { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
code, pre { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.8em; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--rule); vertical-align: top; }

.date { color: var(--muted); font-size: 0.95rem; font-style: italic; margin-bottom: 2rem; }

.post-list { list-style: none; padding: 0; }
.post-list li { display: flex; gap: 1.5rem; margin-bottom: 0.6rem; }
.post-list time { flex: 0 0 6.5rem; color: var(--muted); font-size: 0.95rem; padding-top: 0.1rem; font-variant-numeric: lining-nums tabular-nums; }

footer { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); font-size: 0.95rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 1.5rem; }

@media (max-width: 30rem) {
  body { padding: 2rem 1rem 4rem; }
  nav { column-gap: 1rem; font-size: 1rem; letter-spacing: 0.01em; }
  nav a[aria-current] { text-underline-offset: 4px; }
  .post-list li { flex-direction: column; gap: 0; margin-bottom: 1rem; }
}
