/* ── Google Fonts ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500&family=DM+Mono:wght@500&display=swap');

/* ── Design tokens ────────────────────────────────────────────── */
:root {
  --bg:           #f5f5f7;
  --text:         #36383f;
  --meta-color:   #a2a5ad;
  --font-sans:    'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'DM Mono', monospace;

  --page-left:    180px;
  --content-w:    760px;
  --entry-gap:    60px;
  --header-pad:   80px;
}

/* ── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ─────────────────────────────────────────────────────── */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  padding-left: var(--page-left);
  padding-right: 5%;
  padding-bottom: 6rem;
}

/* ── Header ───────────────────────────────────────────────────── */
header {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: var(--header-pad);
  padding-bottom: var(--header-pad);
  width: var(--content-w);
  max-width: 100%;
}

.header-logo {
  display: block;
  width: 58px;
  height: auto;
}

.header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

header h1 {
  font-size: 24px;
  font-weight: 400;
  font-family: var(--font-sans);
  color: var(--text);
  font-feature-settings: "ss01" 1;
  letter-spacing: normal;
  text-transform: none;
  line-height: normal;
}

.header-subtitle {
  font-size: 12px;
  font-family: var(--font-sans);
  color: var(--meta-color);
  line-height: normal;
}

/* ── Entries ──────────────────────────────────────────────────── */
main {
  display: flex;
  flex-direction: column;
  gap: var(--entry-gap);
}

.entry {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: var(--content-w);
  max-width: 100%;
  scroll-margin-top: 1.5rem;
}

.entry img {
  display: block;
  width: var(--content-w);
  max-width: 100%;
  height: auto;
}

/* ── Metadata ─────────────────────────────────────────────────── */
.meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meta-date {
  font-size: 12px;
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--text);
  font-feature-settings: "ss01" 1;
  line-height: normal;
}

.meta-specs {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--meta-color);
  line-height: normal;
}

/* ── Year navigation ──────────────────────────────────────────── */
.year-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: var(--content-w);
  max-width: 100%;
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid #e8e8e8;
}

.year-link {
  font-size: 12px;
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--meta-color);
  text-decoration: none;
  transition: color 0.15s;
  font-feature-settings: "ss01" 1;
}

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

.year-current {
  font-size: 11px;
  font-family: var(--font-sans);
  color: #ccc;
  font-feature-settings: "ss01" 1;
}

/* ── Timeline sidebar ─────────────────────────────────────────── */
#timeline {
  position: fixed;
  top: var(--header-pad);
  bottom: var(--header-pad);
  right: var(--page-left);
  width: 100px;
  text-align: right;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Top section: active year + months */
.tl-top {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.tl-year-active {
  display: block;
  font-size: 14px;
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--text);
  font-feature-settings: "ss01" 1;
  text-align: right;
  text-decoration: none;
}

.tl-months {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tl-month-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--meta-color);
  font-feature-settings: "ss01" 1;
  text-align: right;
  width: 100%;
  transition: color 0.15s;
}

.tl-month-btn:hover,
.tl-month.open .tl-month-btn {
  color: var(--text);
}

/* Animated days */
.tl-days {
  list-style: none;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.28s ease, opacity 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 0;
}

.tl-month.open .tl-days {
  max-height: 800px;
  opacity: 1;
  margin-top: 10px;
  transition: max-height 0.32s ease, opacity 0.22s ease 0.04s, margin-top 0.2s ease;
}

.tl-day {
  display: block;
  position: relative;
  font-size: 12px;
  font-family: var(--font-sans);
  color: var(--meta-color);
  text-decoration: none;
  text-align: right;
  padding-right: 10px;
  transition: color 0.1s;
}

.tl-day::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
  transition: opacity 0.15s;
}

.tl-day:hover,
.tl-day.active {
  color: var(--text);
}

.tl-day.active::after {
  opacity: 1;
}

/* Bottom section: other years */
.tl-other-years {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: right;
}

.tl-other-year {
  display: block;
  font-size: 14px;
  font-family: var(--font-sans);
  color: var(--meta-color);
  text-decoration: none;
  text-align: right;
  font-feature-settings: "ss01" 1;
  transition: color 0.15s;
}

.tl-other-year:hover { color: var(--text); }


/* ── Empty state ──────────────────────────────────────────────── */
.empty {
  font-size: 14px;
  font-family: var(--font-sans);
  color: var(--meta-color);
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 1100px) {
  #timeline { display: none; }
}

@media (max-width: 860px) {
  :root {
    --page-left: 1.25rem;
    --header-pad: 2.5rem;
  }
  body { padding-right: 1.25rem; }
}
