:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #1c1c1e;
  --muted: #6b6b70;
  --border: #e2e2e0;
  --accent: #3b6ef6;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14151a;
    --surface: #1d1e24;
    --text: #f0f0f2;
    --muted: #a0a0a8;
    --border: #2c2d34;
    --accent: #6f9bff;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 16px 48px;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

.site-header {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 0 20px;
}

.site-header h1 {
  font-size: 1.75rem;
  margin: 0 0 6px;
}

.subtitle {
  color: var(--muted);
  margin: 0;
}

.doc-links {
  margin: 10px 0 0;
  font-size: 0.95rem;
}

.doc-links a {
  color: var(--accent);
}

#timeline {
  max-width: 1000px;
  margin: 0 auto;
}

.entry {
  position: relative;
  padding: 20px 0 20px 24px;
  border-left: 2px solid var(--border);
  margin-bottom: 8px;
}

.entry::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 26px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}

.entry h2 {
  font-size: 1.15rem;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--accent);
  color: #fff;
  padding: 2px 8px;
  border-radius: 999px;
}

.note {
  color: var(--muted);
  margin: 0 0 16px;
  font-size: 0.95rem;
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.thumb-grid figure {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.thumb-grid figure:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.thumb-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 7 / 5;
  object-fit: cover;
  object-position: top;
  background: var(--border);
}

.thumb-grid figcaption {
  padding: 8px 10px;
  font-size: 0.85rem;
  color: var(--muted);
}

.site-footer {
  max-width: 1000px;
  margin: 40px auto 0;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  z-index: 100;
}

.lightbox[hidden] { display: none; }

.lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  color: #fff;
  font-size: 0.9rem;
  margin: 0;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 600px) {
  .site-header { padding: 28px 0 16px; }
  .thumb-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
}
