:root {
  --bg: #f4f1eb;
  --text: #2c2c2c;
  --text-muted: #6b6b6b;
  --link: #4a6da7;
  --link-hover: #2c4a7a;
  --border: #d4d0c8;
  --accent: #c4785b;
  --card-bg: rgba(44, 44, 44, 0.04);
  --card-border: rgba(44, 44, 44, 0.08);
  --profit: #1a9a6b;
  --loss: #c94a4a;
}

[data-theme="dark"] {
  --bg: #1a1a1a;
  --text: #e0e0e0;
  --text-muted: #8a8a8a;
  --link: #7fa8d4;
  --link-hover: #a8c5e8;
  --border: #333;
  --accent: #d4956e;
  --card-bg: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.06);
  --profit: #2dd4a0;
  --loss: #f07070;
}
.nav-links {
  display: flex;
  gap: 2rem; /* bump this up until it feels right */
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

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

h1 {
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: inherit;
  transition: color 0.2s ease;
}

.theme-toggle:hover {
  color: var(--text);
}

.github-link {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.github-link:hover {
  color: var(--text);
}

.github-link svg {
  width: 20px;
  height: 20px;
  display: block;
}

.bio {
  font-size: 1.05rem;
}

.bio p {
  margin-bottom: 1.25rem;
}

.bio p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.contact {
  color: var(--text-muted);
  font-size: 0.9rem;
}

#caustics {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.35;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

[data-theme="dark"] #caustics {
  opacity: 0.18;
}


.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.stats-grid.triple {
  grid-template-columns: repeat(3, 1fr);
}

.stat-box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.stat-box:hover {
  border-color: var(--text-muted);
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.stat-wide .stat-value {
  font-size: 1.5rem;
}

.stat-value.profit {
  color: var(--profit);
}

.stat-value.loss {
  color: var(--loss);
}

/* ── Responsive ── */

@media (max-width: 480px) {
  .stats-grid.triple {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-value {
    font-size: 1.1rem;
  }

  .stat-wide .stat-value {
    font-size: 1.25rem;
  }
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

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

.breadcrumb .separator {
  margin: 0 0.4rem;
}

.currently-reading {
  margin-top: 0.5rem;
}

.reading-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.book {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
}

.book img {
  width: 60px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.book-title {
  display: block;
  font-weight: 600;
  font-size: 1rem;
}

.book-author {
  display: block;
  color: var(--text-muted);
  font-size: 0.88rem;
}