*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f9f9f7;
  --text: #181818;
  --muted: #999;
  --accent: #555;
  --border: #e4e4e0;
}

[data-theme="dark"] {
  --bg: #111110;
  --text: #e4e4e0;
  --muted: #666;
  --accent: #888;
  --border: #2a2a28;
}

html { transition: background 0.2s, color 0.2s; }

html { font-size: 18px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'EB Garamond', Georgia, serif;
  line-height: 1.75;
  max-width: 620px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ── Nav ── */
nav {
  padding: 48px 0 64px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
}

.site-name {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--text);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

nav ul a {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

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

.nav-right {
  display: flex;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
}

.site-controls {
  position: fixed;
  top: 28px;
  right: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 100;
}

.ctrl-btn {
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
  line-height: 0;
}

.ctrl-btn:hover { color: var(--text); }
.ctrl-btn svg { display: block; }

/* ── Page ── */
main {
  padding: 52px 0 120px;
  border-top: 1px solid var(--border);
}

.page-title {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 36px;
}

.section-title {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 40px;
  margin-bottom: 16px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

/* ── Links ── */
a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border);
  transition: text-decoration-color 0.15s, color 0.15s;
}

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

/* ── About ── */
.about-body p { margin-bottom: 1em; }
.about-body p:last-child { margin-bottom: 0; }

.about-body ul {
  margin: 0.4em 0 0.8em 1.4em;
}

.about-body li { margin-bottom: 0.3em; }

.email {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.82rem;
  color: var(--text);
  text-decoration: none;
}

.email:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.social-links {
  margin-top: 0.5em;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.78rem;
  color: var(--muted);
}

.social-links a {
  color: var(--muted);
  text-decoration: none;
}

.social-links a:hover { color: var(--text); }

.social-links .divider { margin: 0 6px; }

/* ── Entry lists ── */
.entries { display: flex; flex-direction: column; }

.entry {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 16px;
  row-gap: 2px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.entry:first-child { border-top: 1px solid var(--border); }

.entry-title {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.4;
}

.entry-title a { text-decoration: none; }
.entry-title a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--accent);
}

.entry-meta {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  text-align: right;
}

.entry-desc {
  grid-column: 1 / -1;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--muted);
  line-height: 1.5;
}
