/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  /* Variables */
  :root {
    --bg: #f9f6f1;
    --text: #1a1a1a;
    --subtle: #888;
    --accent: #8b3a3a;
    --max-width: 620px;
    --font-size: 19px;
    --line-height: 1.8;
  }
  
  /* Dark mode */
  @media (prefers-color-scheme: dark) {
    :root {
      --bg: #1e1e1e;
      --text: #e8e4de;
      --subtle: #666;
      --accent: #c47a7a;
    }
  }
  
  body.dark {
    --bg: #1e1e1e;
    --text: #e8e4de;
    --subtle: #666;
    --accent: #c47a7a;
  }
  
  body.light {
    --bg: #f9f6f1;
    --text: #0a0a0a;
    --subtle: #888;
    --accent: #8b3a3a;
  }
  
  /* Base */
  html {
    font-size: var(--font-size);
    background: var(--bg);
    color: var(--text);
  }
  
  body {
    font-family: 'EB Garamond', Georgia, serif;
    line-height: var(--line-height);
    background: var(--bg);
    color: var(--text);
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  /* Container */
  .container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 1.5rem;
  }
  
  /* Navigation */
  nav {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4rem;
  }
  
  .nav-title {
    color: var(--text);
    text-decoration: none;
    font-size: 1.2rem;
    letter-spacing: 0.03em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
 /* .nav-title:hover {
    color: var(--subtle);
  } */
  
  .nav-links {
    display: flex;
    gap: 2rem;
  }
  
  .nav-links a {
    color: var(--subtle);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: normal;
    letter-spacing: 0.03em;
  }
  
  .nav-links a:hover {
    color: var(--text);
  }
  
  /* Typography */
  h1 {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    line-height: 1.3;
  }
  
  h2 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
  }
  
  p {
    margin-bottom: 1.5rem;
  }
  
  /* Links in content */
  main a {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--subtle);
    text-underline-offset: 3px;
  }
  
  main a:hover {
    text-decoration-color: var(--text);
  }
  
  /* Writing list */
  .writing-list {
    list-style: none;
    margin-top: 2rem;
  }
  
  .writing-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--subtle);
    opacity: 0.85;
  }
  
  .writing-list li:first-child {
    border-top: 1px solid var(--subtle);
  }
  
  .writing-list a {
    color: var(--text);
    text-decoration: none;
  }
  
  .writing-list a:hover {
    color: var(--accent);
  }
  
  .writing-list .date {
    font-size: 0.8rem;
    color: var(--subtle);
    white-space: nowrap;
    margin-left: 2rem;
  }
  
  /* Individual writing page */
  .writing-header {
    margin-bottom: 3rem;
  }
  
  .writing-header .date {
    font-size: 0.8rem;
    color: var(--subtle);
    margin-top: 0.4rem;
  }
  
  /* Footer spacing */
  main {
    min-height: 60vh;
  }

/* Theme toggle */
.theme-toggle {
  background: none;
  border: none;
  color: var(--subtle);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0;
  font-family: inherit;
  letter-spacing: 0.03em;
}

/* In light mode, toggle shows dark circle */
body.light .theme-toggle,
:root:not(body.dark) .theme-toggle {
  color: #0a0a0a;
}

/* In dark mode, toggle shows light circle */
body.dark .theme-toggle {
  color: #e8e4de;
}

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