/* =============================================
   TOKENS
   ============================================= */
:root {
  --bg: #ffffff;
  --bg-secondary: #f8f8f6;
  --fg: #1a1a1a;
  --fg-secondary: #555550;
  --fg-muted: #888882;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --border: #e8e8e4;
  --card-bg: #ffffff;
  --card-border: #e8e8e4;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
}

[data-theme="dark"] {
  --bg: #111110;
  --bg-secondary: #1a1a18;
  --fg: #eeeeea;
  --fg-secondary: #a8a8a2;
  --fg-muted: #666660;
  --accent: #60a5fa;
  --accent-hover: #93c5fd;
  --border: #2a2a28;
  --card-bg: #1a1a18;
  --card-border: #2a2a28;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--fg);
  line-height: 1.7;
  transition: background-color 0.2s ease, color 0.2s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

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

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

/* =============================================
   LAYOUT
   ============================================= */
.container {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  position: sticky;
  top: 0;
  background-color: var(--bg);
  z-index: 100;
  backdrop-filter: blur(8px);
  background-color: color-mix(in srgb, var(--bg) 90%, transparent);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.logo-looking {
  color: var(--fg);
}

.logo-for {
  color: var(--accent);
}

.logo:hover {
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav a {
  color: var(--fg-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}

.nav a:hover,
.nav a.active {
  color: var(--fg);
  text-decoration: none;
}

/* =============================================
   THEME TOGGLE
   ============================================= */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  color: var(--fg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  line-height: 0;
}

.theme-toggle:hover {
  color: var(--fg);
  border-color: var(--fg-secondary);
  background: var(--bg-secondary);
}

[data-theme="light"] .icon-moon { display: block; }
[data-theme="light"] .icon-sun  { display: none; }
[data-theme="dark"]  .icon-sun  { display: block; }
[data-theme="dark"]  .icon-moon { display: none; }

/* =============================================
   HERO
   ============================================= */
.hero {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border);
}

.hero-tagline {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-size: 1.25rem;
  color: var(--fg-secondary);
  max-width: 560px;
  line-height: 1.6;
}

/* =============================================
   POST INDEX
   ============================================= */
.post-index {
  padding: 48px 0 56px;
}

.year-group {
  margin-bottom: 48px;
}

.year-group:last-child {
  margin-bottom: 0;
}

.year-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.post-list {
  list-style: none;
}

.post-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 0 28px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.post-row:last-child {
  border-bottom: none;
}

.post-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 3px;
  line-height: 1;
  color: var(--fg-muted);
  text-align: center;
}

.date-day {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--fg-secondary);
  line-height: 1;
  letter-spacing: -0.02em;
}

.date-month {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 3px;
  color: var(--fg-muted);
}

.post-row-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.post-row-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
  line-height: 1.35;
  letter-spacing: -0.01em;
  transition: color 0.15s;
}

.post-row-title:hover {
  color: var(--accent);
  text-decoration: none;
}

.post-row-excerpt {
  font-size: 0.9rem;
  color: var(--fg-muted);
  line-height: 1.6;
  margin: 0;
}

.dot {
  opacity: 0.4;
}

/* =============================================
   SINGLE POST
   ============================================= */
.post {
  padding: 56px 0 48px;
}

.post-header {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.post-date-stamp {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.post-header h1 {
  font-family: 'Lora', Georgia, serif;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 16px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--fg-muted);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.post-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--fg);
}

.post-body .lead {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--fg-secondary);
  margin-bottom: 28px;
  line-height: 1.7;
}

.post-body p {
  margin-bottom: 24px;
}

.post-body h2 {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 600;
  margin: 40px 0 16px;
  letter-spacing: -0.01em;
}

.post-body em {
  font-style: italic;
}

.post-body strong {
  font-weight: 600;
}

.post-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

.post-nav {
  padding: 24px 0 56px;
  border-top: 1px solid var(--border);
}

.post-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg-secondary);
  text-decoration: none;
}

.post-nav a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* =============================================
   ABOUT PAGE
   ============================================= */
.about-page {
  padding: 56px 0;
}

.about-page h1 {
  font-family: 'Lora', Georgia, serif;
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.about-page .lead {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--fg-secondary);
  margin-bottom: 28px;
  line-height: 1.7;
}

.about-page p {
  margin-bottom: 20px;
  color: var(--fg-secondary);
  line-height: 1.8;
}

.about-page em {
  font-style: italic;
  color: var(--fg);
}

.about-page hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 36px 0;
}

.footer-note {
  font-size: 0.9rem;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: auto;
}

.site-footer p {
  font-size: 0.85rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

.site-footer strong {
  color: var(--fg-secondary);
}

.footer-sub {
  margin-top: 4px;
  font-size: 0.78rem;
  opacity: 0.6;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 600px) {
  html { font-size: 16px; }

  .hero { padding: 36px 0 28px; }
  .hero-tagline { font-size: 1.1rem; }

  .post-header h1 { font-size: 1.6rem; }

  .post-row { grid-template-columns: 44px 1fr; gap: 0 16px; }
  .date-day { font-size: 1.2rem; }
  .post-row-title { font-size: 1.05rem; }
}
