/* ============================================================
   pages.css — shared site chrome for standalone sub-pages
   ------------------------------------------------------------
   Copied from the inline <style> in index.html so sub-pages
   (e.g. food-for-thoughts/) look identical to the homepage
   without each one carrying its own copy of the nav/footer CSS.

   index.html still uses its own inline styles. If you change a
   colour or the nav here, change it there too.
   ============================================================ */

/* ── TOKENS ── */
:root {
  --ink: #1a1a2e;
  --ink-light: #3a3a5c;
  --ink-muted: #7a7a9a;
  --paper: #f7f5f0;
  --paper-warm: #ede9e0;
  --paper-card: #ffffff;
  --accent: #2a5298;
  --accent-light: #4a72b8;
  --accent-warm: #c0392b;
  --gold: #b8860b;
  --border: #ddd9d0;
  --shadow: rgba(26,26,46,0.08);
  --shadow-md: rgba(26,26,46,0.14);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(247,245,240,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0 2.5rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}

.nav-brand {
  font-family: 'EB Garamond', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.nav-brand span { color: var(--accent); }

.nav-links { display: flex; gap: 1.5rem; list-style: none; }
.nav-links a {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transition: transform 0.25s ease;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { transform: scaleX(1); }
/* current page in the nav */
.nav-links a.here { color: var(--accent); }
.nav-links a.here::after { transform: scaleX(1); }

.nav-resume {
  font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.45rem 1.1rem;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  border-radius: 2px;
  text-decoration: none;
  transition: all 0.2s;
}
.nav-resume:hover { background: var(--accent); color: white; }

/* ── SECTIONS ── */
.section {
  padding: 5rem 2.5rem;
  max-width: 1050px; margin: 0 auto;
}
.section-alt { background: var(--paper-warm); }
.section-alt .section { background: transparent; }

.section-header {
  display: flex; align-items: baseline; gap: 1.2rem;
  margin-bottom: 3rem;
  border-bottom: 1.5px solid var(--border);
  padding-bottom: 1rem;
}
.section-number {
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem; color: var(--accent);
  letter-spacing: 0.1em;
}
.section-title-text {
  font-family: 'EB Garamond', serif;
  font-size: 2rem; font-weight: 500;
  color: var(--ink);
}

/* sub-pages sit under the 64px fixed nav */
.page-body { padding-top: 64px; }

/* standfirst under a section header */
.page-intro {
  font-size: 0.95rem; color: var(--ink-light);
  max-width: 68ch; margin: -2rem 0 2.5rem;
  line-height: 1.75;
}

/* "← back to …" link */
.backlink {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem; letter-spacing: 0.06em;
  color: var(--ink-muted); text-decoration: none;
  margin-bottom: 1.4rem;
  transition: color 0.2s;
}
.backlink:hover { color: var(--accent); }

/* ── THOUGHT CARDS (modelled on .research-card) ── */
.thought-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.thought-card {
  background: var(--paper-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.8rem;
  position: relative;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.thought-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px var(--shadow-md); }
.thought-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--accent);
}
.thought-card.reading::before { background: var(--gold); }
.thought-badge {
  display: inline-block; align-self: flex-start;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 2px; margin-bottom: 1rem;
}
.badge-course { background: #e8f0fe; color: var(--accent); }
.badge-reading { background: #fef9e7; color: var(--gold); }
.badge-notes { background: #f0f0f0; color: var(--ink-muted); }
.thought-card h3 {
  font-family: 'EB Garamond', serif;
  font-size: 1.15rem; font-weight: 600;
  color: var(--ink); margin-bottom: 0.6rem; line-height: 1.4;
}
.thought-card p { font-size: 0.88rem; color: var(--ink-muted); line-height: 1.6; margin-bottom: 1rem; }
.thought-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.1rem; }
.thought-tag {
  font-size: 0.73rem; padding: 0.15rem 0.5rem;
  background: var(--paper-warm); border: 1px solid var(--border);
  border-radius: 2px; color: var(--ink-muted);
}
.thought-actions {
  margin-top: auto; padding-top: 0.9rem;
  border-top: 1px solid var(--border);
  display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap;
}
.thought-link {
  font-size: 0.78rem; color: var(--accent); text-decoration: none;
  border: 1px solid var(--border); border-radius: 2px;
  padding: 0.22rem 0.6rem;
  transition: all 0.2s;
}
/* darkens on hover/press rather than filling solid and whiting out the label */
.thought-link:hover { background: #dce8fa; border-color: var(--accent); color: #14294d; }
.thought-link:active { background: #c6d9f4; transform: translateY(1px); }
.thought-meta {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem; color: var(--ink-muted); letter-spacing: 0.04em;
}

/* shown when there are no items yet */
.empty-note {
  font-size: 0.9rem; color: var(--ink-muted);
  background: var(--paper-card); border: 1px dashed var(--border);
  border-radius: 4px; padding: 1.6rem; text-align: center;
}

/* ── FOOTER ── */
footer {
  background: var(--ink);
  padding: 2.5rem;
  text-align: center;
}
footer p {
  font-size: 0.82rem; color: rgba(255,255,255,0.4);
  font-family: 'DM Mono', monospace; letter-spacing: 0.06em;
}
footer a { color: rgba(255,255,255,0.6); text-decoration: none; }
footer a:hover { color: white; }

/* ── MOBILE HAMBURGER ── */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none; padding: 4px;
}
.hamburger span { display: block; width: 22px; height: 1.5px; background: var(--ink); transition: all 0.3s; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .nav-links, .nav-resume { display: none; }
  .hamburger { display: flex; }
  .thought-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .section { padding: 3.5rem 1.2rem; }
  nav { padding: 0 1.2rem; }
  .page-intro { margin-top: -1.4rem; }
}

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
