/* ─────────────────────────────────────────────
   styles.css — shared by every page
   ───────────────────────────────────────────── */

/* Design tokens: change these to re-theme the whole site */
:root {
  --bg:     #E8E8E8;   /* warm off-white page */
  --ink:    #000000;   /* main text */
  --ink-2:  #000000;   /* secondary text */
  --ink-3:  #000000;   /* faint text (years, labels) */
  --rule:   #000000;   /* thin divider lines */
  --f-sans: 'Inter', system-ui, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --nav-h:  56px;
  --w:      640px;     /* reading width */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Smooth crossfade between pages (Chrome/Edge/Safari) */
@view-transition { navigation: auto; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 1rem); }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; transition: text-decoration-color .2s; }
a:hover { text-decoration-color: var(--ink); }

/* ── Top bar ─────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(232, 232, 232, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
  z-index: 1000;
}
.nav-inner {
  max-width: 960px; height: 100%;
  margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-name { font-family: var(--f-mono); font-size: .78rem; letter-spacing: .04em; text-decoration: none; }
.nav-links { display: flex; gap: 1.6rem; list-style: none; }
.nav-links a {
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .08em;
  color: var(--ink-3); text-decoration: none; transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }

/* ── Page layout ─────────────────────────────── */
main.page {
  max-width: var(--w);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 4rem) 1.5rem 6rem;
}
section + section { margin-top: 4.5rem; }

.label {
  font-family: var(--f-mono); font-size: .68rem; letter-spacing: .14em;
  text-transform: lowercase; color: var(--ink-3);
  margin-bottom: 1.4rem;
  display: flex; justify-content: space-between; align-items: center;
}
.intro { font-size: 1.05rem; }
.intro p + p, .prose p + p { margin-top: 1rem; }
.prose { color: var(--ink-2); }

/* Small text button (used for "shuffle") */
.text-btn {
  font-family: var(--f-mono); font-size: .66rem; letter-spacing: .12em;
  color: var(--ink-3); background: none; border: 1px solid var(--rule);
  padding: .3rem .7rem; cursor: pointer; transition: color .2s, border-color .2s;
}
.text-btn:hover { color: var(--ink); border-color: var(--ink-2); }

/* ── Entry list: projects, blog posts ────────── */
.entries { list-style: none; }
.entry {
  display: grid;
  grid-template-columns: 5.5rem 1fr;   /* year column + content */
  gap: 1rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--rule);
}
.entry:last-child { border-bottom: 1px solid var(--rule); }
.entry .year { font-family: var(--f-mono); font-size: .72rem; color: var(--ink-3); padding-top: .2rem; }
.entry h3 { font-size: .95rem; font-weight: 500; }
.entry p { color: var(--ink-2); font-size: .88rem; margin-top: .3rem; }
.entry .where { font-family: var(--f-mono); font-size: .68rem; color: var(--ink-3); margin-top: .35rem; }
a.entry { text-decoration: none; transition: background .2s; }
a.entry:hover h3 { text-decoration: underline; text-underline-offset: 3px; }

/* ── Footer ──────────────────────────────────── */
footer {
  max-width: var(--w); margin: 0 auto; padding: 0 1.5rem 3rem;
  display: flex; gap: 1.4rem;
  font-family: var(--f-mono); font-size: .68rem; color: var(--ink-3);
}
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }
#clock { margin-right: auto; }

/* ── Fade-in on scroll ───────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
  .reveal.visible { opacity: 1; transform: none; }
}

/* ── Phones ──────────────────────────────────── */
@media (max-width: 560px) {
  .nav-links { gap: 1rem; }
  .nav-name { display: none; }          /* not enough room for name + 4 links */
  .nav-inner { justify-content: center; }
  .entry { grid-template-columns: 1fr; gap: .2rem; }
}
