/* ==========================================================
   style.css — one stylesheet shared by every page.
   Change the colours and fonts here and the whole site updates.
   ========================================================== */

/* ---- 1. Design tokens (your "theme") ---------------------- */
:root {
  --bg: #f7f4ee;            /* ivory paper */
  --surface: #fffdf9;       /* cards, slightly brighter than the page */
  --text: #141a26;          /* headings: ink navy */
  --body: #3b404b;          /* paragraph text */
  --muted: #7b7d84;         /* labels, dates, captions */
  --rule: #e4ddd0;          /* thin divider lines */
  --accent: #1f4e79;        /* Oxford blue: links, highlights */
  --brass: #b08d57;         /* small decorative touches */
  --shadow: 0 1px 2px rgb(20 26 38 / 0.04), 0 8px 24px rgb(20 26 38 / 0.06);
  --max-width: 72rem;       /* page width on big screens */
  --radius: 10px;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Dark mode: kicks in automatically if the visitor's device is set to dark */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141c;
    --surface: #161d28;
    --text: #f1ede4;
    --body: #c9c7c0;
    --muted: #8b8f98;
    --rule: #262e3b;
    --accent: #9cc0ea;
    --brass: #d2ae74;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
  }
}

/* ---- 2. Base ---------------------------------------------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--bg); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1rem, 5vw, 4.5rem);
}

a {
  color: var(--accent);
  text-decoration-line: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s, text-decoration-color 0.15s;
}
a:hover { text-decoration-color: var(--accent); }

img { max-width: 100%; height: auto; display: block; }

p { margin: 0 0 1.25rem; }
strong { color: var(--text); font-weight: 500; }

/* The small, spaced-out capitals used for labels everywhere */
.label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- 3. Header / navigation (sticks to the top) ----------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}
.site-header .logo { color: var(--text); text-decoration: none; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover { color: var(--accent); }

/* ---- 4. Hero (top of homepage) ---------------------------- */
.hero { padding: clamp(3.5rem, 11vw, 7.5rem) 0 clamp(3rem, 8vw, 5rem); }
.hero .eyebrow { color: var(--accent); margin: 0 0 1.5rem; }
.hero .eyebrow::before {
  content: "";
  display: inline-block;
  width: 2rem;
  height: 1px;
  background: var(--brass);
  vertical-align: middle;
  margin-right: 0.75rem;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.75rem, 8vw, 5rem);
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 0 0 1.5rem;
}
.hero .lede {
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  line-height: 1.5;
  max-width: 38rem;
  margin: 0 0 2.75rem;
}
.interests {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.9rem;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text);
}
.interests + .interests { margin-top: 0.75rem; }
.interests .label { font-style: normal; margin-right: 0.5rem; min-width: 7.5rem; }
.interests .sep { color: var(--brass); font-style: normal; }

/* ---- 5. Numbered sections --------------------------------- */
/* Each section = a label column on the left, content on the right */
.section {
  display: grid;
  grid-template-columns: 1fr 2.6fr;
  gap: 1.5rem 3rem;
  padding: clamp(3rem, 8vw, 5.5rem) 0;
  border-top: 1px solid var(--rule);
}
.section > .label { color: var(--text); padding-top: 0.35rem; }
.section > .label .num { color: var(--brass); margin-right: 0.75rem; }
.section .content { max-width: 46rem; }
.section .content.wide { max-width: none; }

.updated { margin-top: 0.5rem; }

/* About section: label | text | photo */
.section.with-photo { grid-template-columns: 1fr 1.55fr 1.05fr; }
.section.with-photo .portrait { grid-column: 3; grid-row: 1; }
.section.with-photo .content { grid-column: 2; grid-row: 1; }
.portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 30%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---- 6. Cards (ventures) ---------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1.25rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--text);
  margin: 0.6rem 0 0.5rem;
}
.card p { font-size: 1rem; line-height: 1.6; margin: 0 0 1rem; }
.card .more { margin-top: auto; }

/* ---- 7. Timeline (record + education) --------------------- */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline > li {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.25rem 1.5rem;
}
.timeline .when { padding-top: 0.45rem; }
/* The vertical line with a brass dot for each entry */
.timeline .entry {
  position: relative;
  padding: 0 0 2.25rem 1.75rem;
  border-left: 1px solid var(--rule);
}
.timeline > li:last-child .entry { padding-bottom: 0.5rem; }
.timeline .entry::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 0.6rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--brass);
}
.timeline h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.3rem;
  line-height: 1.35;
  color: var(--text);
  margin: 0 0 0.4rem;
}
.timeline h3 .slash { color: var(--brass); font-weight: 400; margin: 0 0.3rem; }
.timeline h3 em { font-weight: 400; }
.timeline p { margin: 0 0 0.75rem; }

.subhead { margin: 0 0 1.75rem; color: var(--accent); }
.timeline + .subhead { margin-top: 2.5rem; }

/* "→ link" rows */
.more-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.more-links a { color: var(--accent); text-decoration: none; }
.more-links a::after { content: " →"; transition: margin 0.15s; }
.more-links a:hover::after { margin-left: 0.2rem; }

/* ---- 8. Simple lists (awards, writing) -------------------- */
.diamonds { list-style: none; padding: 0; margin: 0; }
.diamonds li {
  position: relative;
  padding: 0.8rem 0 0.8rem 1.6rem;
  border-bottom: 1px solid var(--rule);
}
.diamonds li::before {
  content: "◆";
  position: absolute;
  left: 0;
  top: 0.95rem;
  font-size: 0.6rem;
  color: var(--brass);
}

.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li {
  display: grid;
  grid-template-columns: 6rem 1fr auto;
  gap: 1rem;
  align-items: baseline;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
}
.post-list a { text-decoration: none; color: var(--text); }
.post-list a:hover { color: var(--accent); }
.empty { font-style: italic; color: var(--muted); }

/* Two-column facts (interests, languages) */
.facts { display: grid; grid-template-columns: 9rem 1fr; gap: 0.6rem 1.5rem; margin: 0; }
.facts dt { padding-top: 0.4rem; }
.facts dd { margin: 0; }

/* ---- 9. Contact (button-style links) ---------------------- */
.contact-links { list-style: none; padding: 0; margin: 1.75rem 0 0; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.contact-links a {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.6rem 1.35rem;
  transition: background 0.15s, color 0.15s;
}
.contact-links a:hover { background: var(--accent); color: var(--bg); }

/* ---- 10. Blog post page ----------------------------------- */
article { max-width: 40rem; margin: 0 auto; padding: 3rem 0; }
article h1 {
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.15;
  color: var(--text);
  margin: 0.75rem 0 2rem;
}
article h2 { font-weight: 500; color: var(--text); margin: 2.5rem 0 0.75rem; }
article blockquote { margin: 1.5rem 0; padding-left: 1.25rem; border-left: 2px solid var(--brass); font-style: italic; }

/* ---- 11. Footer ------------------------------------------- */
.site-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--rule);
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

/* ---- 12. Small screens (tablets & phones) ----------------- */
@media (max-width: 760px) {
  .section, .section.with-photo { grid-template-columns: 1fr; }
  .section.with-photo .portrait, .section.with-photo .content { grid-column: auto; grid-row: auto; }
  .portrait { max-width: 22rem; }
  .interests .label { flex-basis: 100%; }
  .timeline > li, .facts { grid-template-columns: 1fr; }
  /* On phones the date sits above the entry, so the line runs down the whole item */
  .timeline > li { position: relative; padding-left: 1.5rem; border-left: 1px solid var(--rule); }
  .timeline .when { padding-top: 0; }
  .timeline .entry { border-left: none; padding-left: 0; }
  .timeline .entry::before { left: calc(-1.5rem - 5px); top: -1.45rem; }
  .facts dt { padding-top: 0; }
  .facts dd { margin-bottom: 0.75rem; }
  .post-list li { grid-template-columns: 1fr; gap: 0.15rem; }
  .site-header nav { gap: 0.4rem 1.1rem; }
}

/* Respect visitors who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
