/* ---------- Design tokens ---------- */
:root {
  --bg: #ffffff;
  --bg-alt: #fafafa;
  --text: #17171a;
  --text-secondary: #6b6b6f;
  --text-muted: #9a9a9d;
  --border: #e2e2e0;
  --border-strong: #c7c7c4;
  --silver: #b8b8ba;
  --accent: #17171a;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius: 3px;
  --max-width: 1040px;
}

[data-theme="dark"] {
  --bg: #0b0b0c;
  --bg-alt: #131314;
  --text: #f2f2f1;
  --text-secondary: #a3a3a3;
  --text-muted: #6b6b6b;
  --border: #2a2a2b;
  --border-strong: #3a3a3b;
  --silver: #8c8c8e;
  --accent: #f2f2f1;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Nav ---------- */
.site-nav {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 28px 0;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.coin {
  width: 132px;
  height: 132px;
}

.coin-ring {
  transform-origin: 50% 50%;
  animation: spin 30s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .coin-ring { animation: none; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.brand-year {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  display: none;
}

.places-lived {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  white-space: nowrap;
}

.places-lived svg { width: 12px; height: 12px; flex-shrink: 0; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  color: var(--text-secondary);
  padding-top: 50px;
}

.nav-links a {
  position: relative;
  padding: 4px 0;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
}

.nav-links a[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: var(--text);
}

.nav-divider {
  width: 1px;
  height: 16px;
  background: var(--border-strong);
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px;
}

.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .sun { opacity: 1; }
.theme-toggle .moon { opacity: 0.35; }
[data-theme="dark"] .theme-toggle .sun { opacity: 0.35; }
[data-theme="dark"] .theme-toggle .moon { opacity: 1; }

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 64px 0 40px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(48px, 7vw, 84px);
  margin: 0;
  letter-spacing: -0.01em;
}

.hero p.subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  margin: 14px 0 0;
}

.socials {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-top: 32px;
}

.socials a {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.socials a:hover { color: var(--text); }
.socials svg { width: 100%; height: 100%; }

/* ---------- Ship control ---------- */
.ship-section {
  padding: 40px 0 0;
}

.ship-track-wrap {
  position: relative;
  padding: 0 8px;
}

.ship-labels {
  position: relative;
  height: 16px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.ship-labels span {
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
}

.ship-labels span.active {
  color: var(--text);
  font-weight: 600;
}

.ship-track {
  position: relative;
  height: 1px;
  background: var(--border-strong);
  margin: 0 4px;
}

.ship-tick {
  position: absolute;
  top: -3px;
  width: 1px;
  height: 7px;
  background: var(--border-strong);
}

.ship-icon {
  position: absolute;
  top: -19px;
  transform: translateX(-50%);
  width: 58px;
  height: 26px;
  cursor: grab;
  color: var(--text);
  transition: left 0.25s ease;
}

.ship-icon:active { cursor: grabbing; }
.ship-icon svg { width: 100%; height: 100%; }

.ship-caption {
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 14px;
}

input[type="range"].ship-slider {
  width: 100%;
  margin-top: 8px;
  accent-color: var(--text);
}

/* ---------- Age panel ---------- */
.age-panel {
  border-top: 1px solid var(--border);
  margin-top: 48px;
  padding-top: 40px;
}

.age-eyebrow {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.age-title {
  font-family: var(--font-display);
  font-size: 40px;
  margin: 6px 0 8px;
}

.age-desc {
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 0 32px;
}

.age-loading {
  color: var(--text-muted);
  font-style: italic;
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 48px;
}

@media (max-width: 640px) {
  .project-grid { grid-template-columns: 1fr; }
}

.project-card {
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.project-num {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.project-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 8px;
}

.project-card p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0 0 12px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-size: 12px;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px 9px;
}

/* ---------- Vertical timeline ---------- */
.timeline-page-header {
  padding: 56px 0 40px;
}

.timeline-page-header .eyebrow {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.timeline-page-header h1 {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 500;
  margin: 8px 0;
}

.timeline-page-header p {
  color: var(--text-secondary);
  max-width: 520px;
}

.vtimeline {
  position: relative;
  padding-left: 28px;
  padding-bottom: 64px;
}

.vtimeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border-strong);
}

.vtimeline-item {
  position: relative;
  padding-bottom: 40px;
}

.vtimeline-item:last-child { padding-bottom: 0; }

.vtimeline-item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid var(--text);
  background: var(--bg);
}

.vtimeline-range {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.vtimeline-item h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  margin: 0 0 6px;
}

.vtimeline-item p {
  color: var(--text-secondary);
  font-size: 14px;
  max-width: 560px;
  margin: 0;
}

/* ---------- Generic page shell (stub pages) ---------- */
.page-shell {
  padding: 56px 0 96px;
  min-height: 40vh;
}

.page-shell .eyebrow {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.page-shell h1 {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 500;
  margin: 8px 0 16px;
}

.page-shell .coming {
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  padding-top: 24px;
  margin-top: 32px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
