/* Mirrors bes-dev.com: same type, palette, header, footer and themes */
:root {
  --bg: #f8f8f6;
  --ink: #1a1a1a;
  --text: #374151;
  --muted: #6b7280;
  --faint: #9ca3af;
  --line: #e5e7eb;
  --accent: #0d9488;
  --underline: rgba(26, 26, 26, 0.25);
}

[data-theme="dark"] {
  --bg: #141414;
  --ink: #f0f0f0;
  --text: #b0b0b0;
  --muted: #888;
  --faint: #666;
  --line: #2a2a2a;
  --accent: #2dd4bf;
  --underline: rgba(255, 255, 255, 0.25);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

nav, main, footer { max-width: 740px; margin: 0 auto; }

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

.nav-name {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: var(--ink);
  text-decoration: none;
}

.nav-links { display: flex; align-items: center; gap: 1.5rem; }

.nav-links a {
  font-size: 0.88rem;
  color: var(--muted);
  letter-spacing: 0.01em;
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); border-bottom-color: var(--accent); }

#theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  color: var(--muted);
  display: flex;
  transition: color 0.2s;
}

#theme-toggle:hover { color: var(--ink); }
#theme-toggle .icon-sun, [data-theme="dark"] #theme-toggle .icon-moon { display: none; }
[data-theme="dark"] #theme-toggle .icon-sun { display: block; }

main { padding: 4rem 1.5rem 4.5rem; animation: fadeIn 0.4s ease-out; }

h1 {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 700;
  font-size: 2.6rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.75rem;
}

p { margin-bottom: 1.2rem; color: var(--text); font-size: 1.05rem; }

.lead { font-size: 1.3rem; line-height: 1.6; color: var(--ink); margin-bottom: 2rem; }
.lead em { font-family: 'Newsreader', Georgia, serif; font-size: 1.12em; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--underline);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s, text-decoration-color 0.2s;
}

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

.posts { list-style: none; margin-bottom: 2rem; }
.posts li { display: flex; gap: 1rem; align-items: baseline; padding: 0.5rem 0; }
.posts a { color: var(--ink); text-decoration: none; }
.posts a:hover { color: var(--accent); }
.posts time, .note { color: var(--faint); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.posts time { flex-shrink: 0; min-width: 5.5rem; }

footer { padding: 1.5rem; border-top: 1px solid var(--line); text-align: center; }
.social { display: flex; justify-content: center; gap: 0.5rem; }
.social a { display: flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; color: var(--faint); }
.social a:hover { color: var(--accent); }
.legal { margin: 0.5rem 0 0; font-size: 0.75rem; color: var(--faint); }

@media (max-width: 480px) {
  nav { padding: 1.5rem 1rem; flex-wrap: wrap; gap: 0.5rem 1rem; }
  .nav-name { font-size: 1.3rem; }
  main { padding: 2.5rem 1rem 3rem; }
  h1 { font-size: 2rem; }
  .lead { font-size: 1.15rem; }
  .posts li { flex-direction: column; gap: 0.15rem; }
}
