/* Luke Simmons — portfolio. Operator design language (warm paper + green/gold,
   Inter, flat, soft radii), with a dark-mode pass. Hand-written, no build deps. */

:root {
  --bg: #f4f1ea;
  --surface: #fffdf8;
  --ink: #1a1613;
  --muted: #6c5f4c;
  --tertiary: #8a7a66;
  --primary: #2f6f48;
  --primary-hover: #285f3e;
  --accent: #c2a23a;
  --border: #e3dccd;
  --hover: #f1ebde;
  --good: #3a9d5d;
  --warn: #d99b27;
  --stop: #b9b1a0;
  --bad: #9a3b2e;
  --panel-bg: #1c1916;
  --panel-fg: #d6cfc0;
  --radius: 8px;
  --radius-sm: 6px;
  --radius-xs: 3px;
  --maxw: 760px;
  --maxw-wide: 1040px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1916;
    --surface: #26221d;
    --ink: #e8e2d6;
    --muted: #b3a890;
    --tertiary: #9a8f78;
    --border: #3a342c;
    --hover: #322c25;
    --primary: #6fae84;
    --primary-hover: #80c096;
    --accent: #d4b552;
    --bad: #d08a7d;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); text-decoration: underline; text-underline-offset: 2px; }

h1, h2, h3, h4 { line-height: 1.2; font-weight: 600; color: var(--ink); }

/* ── Header / nav ───────────────────────────────────────────────── */
.site-head {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.head-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap;
}
.brand { font-weight: 600; font-size: 17px; letter-spacing: 0.2px; color: var(--ink); }
.brand:hover { color: var(--ink); text-decoration: none; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; }
.nav a {
  color: var(--muted); font-size: 14px; padding: 5px 11px;
  border-radius: var(--radius-sm); white-space: nowrap;
}
.nav a:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
.nav a.on { color: var(--ink); font-weight: 500; box-shadow: inset 0 -2px 0 var(--primary); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }

/* ── Footer ─────────────────────────────────────────────────────── */
.site-foot {
  margin-top: 64px; border-top: 1px solid var(--border);
  background: var(--surface); padding: 22px 0;
}
.foot-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--tertiary); }

/* ── Hero (home) ────────────────────────────────────────────────── */
.hero { padding: 72px 22px 40px; max-width: var(--maxw); }
.hero-title { font-size: 2.4rem; margin: 0 0 18px; letter-spacing: -0.01em; }
.hero-intro { font-size: 1.12rem; color: var(--muted); }
.hero-intro p { margin: 0; }
.hero-cta { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }

.btn {
  display: inline-block; font-size: 14px; font-weight: 500;
  padding: 9px 18px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--ink);
}
.btn:hover { background: var(--hover); text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }

/* ── Bands / section heads (home) ───────────────────────────────── */
.band { padding: 30px 22px; }
.band:first-of-type { padding-top: 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.section-head h2 { font-size: 1.25rem; margin: 0; }
.more { font-size: 13px; color: var(--tertiary); }

/* ── Page heads (about, projects, blog, etc.) ───────────────────── */
.page-head { padding: 40px 0 22px; }
.page-head h1 { font-size: 2rem; margin: 0 0 8px; }
.subtitle { color: var(--muted); font-size: 1.02rem; margin: 0; max-width: 60ch; }

/* ── Cards (projects) ───────────────────────────────────────────── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
  display: flex; flex-direction: column; gap: 9px;
}
.card-head { display: flex; align-items: center; gap: 9px; }
.card-head h3 { font-size: 1.05rem; margin: 0; }
.card-summary { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.55; flex: 1; }
.card-links { display: flex; gap: 16px; flex-wrap: wrap; }
.card-link { font-size: 13px; font-weight: 500; }

.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--stop); }
.dot-shipping { background: var(--good); box-shadow: 0 0 0 3px rgba(58,157,93,.15); }
.dot-active { background: var(--warn); box-shadow: 0 0 0 3px rgba(217,155,39,.15); }
.dot-paused { background: var(--stop); }
.dot-retired { background: var(--bad); }

.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; font-size: 12.5px; color: var(--tertiary); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

.pills { display: flex; flex-wrap: wrap; gap: 5px; }
.pill {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em;
  background: var(--hover); color: var(--tertiary);
  padding: 2px 8px; border-radius: 999px;
}

/* ── Post lists (home recent, blog index) ───────────────────────── */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { border-bottom: 1px solid var(--border); }
.post-list li:last-child { border-bottom: none; }
.post-row, .post-list a {
  display: flex; gap: 14px; align-items: baseline; padding: 11px 0; color: var(--ink);
}
.post-list a:hover { text-decoration: none; }
.post-list a:hover .post-title { color: var(--primary); }
.post-date { color: var(--tertiary); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 96px; }
.post-title { font-weight: 500; }
.post-list-full .post-summary { margin: 0 0 12px 110px; color: var(--muted); font-size: 0.92rem; }
@media (max-width: 560px) {
  .post-row, .post-list a { flex-direction: column; gap: 2px; }
  .post-list-full .post-summary { margin-left: 0; }
}

/* ── Prose (about, david-simmons, blog posts) ───────────────────── */
.prose { max-width: var(--maxw); }
.prose h1 { font-size: 2rem; margin: 0 0 6px; }
.prose h2 { font-size: 1.4rem; margin: 2em 0 0.5em; }
.prose h3 { font-size: 1.12rem; margin: 1.6em 0 0.4em; }
.prose p { margin: 0 0 1.1em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 0.3em 0; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.prose blockquote {
  margin: 1.4em 0; padding: 2px 18px; border-left: 3px solid var(--accent);
  color: var(--muted);
}
.prose code {
  font-family: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  font-size: 0.9em; background: var(--hover); padding: 1px 5px; border-radius: var(--radius-xs);
}
.prose pre {
  background: var(--panel-bg); color: var(--panel-fg);
  padding: 14px 16px; border-radius: var(--radius); overflow-x: auto;
  font-family: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace; font-size: 13px; line-height: 1.5;
}
.prose pre code { background: none; padding: 0; font-size: inherit; color: inherit; }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 2em 0; }
.prose .subtitle { font-style: italic; }

/* italic author's-note line at the top of posts reads as a quiet aside */
.post > p:first-of-type em { color: var(--tertiary); }

.post-meta { display: flex; align-items: baseline; gap: 14px; font-size: 13px; color: var(--tertiary); margin-bottom: 6px; }
.post-foot { display: flex; justify-content: space-between; margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 14px; }


/* ════════════════════════════════════════════════════════════════════
   FLARE — motion, accents, hover, polish
   ════════════════════════════════════════════════════════════════════ */

/* Scroll-reveal (driven by site.js; safe default = visible) */
.reveal { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
  .reveal.is-in { opacity: 1; transform: none; }
}

/* Small uppercase kicker / eyebrow */
.eyebrow {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--accent); font-weight: 500; margin: 0 0 12px;
}
@media (prefers-color-scheme: dark) { .eyebrow { color: var(--accent); } }

/* Hero: accent rule under the title + a touch more presence */
.hero-title { position: relative; padding-bottom: 18px; }
.hero-title::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 64px; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--primary) 60%, var(--accent) 60%);
}

/* Section heads get a small accent tick */
.section-head h2, .page-head h1, .prose h2 { position: relative; }
.band .section-head h2 { padding-left: 14px; }
.band .section-head h2::before {
  content: ""; position: absolute; left: 0; top: 0.15em; bottom: 0.15em;
  width: 3px; border-radius: 2px; background: var(--primary);
}

/* Cards: a gentle hover lift + accent edge (the one bit of motion on a flat design) */
.card { transition: transform .16s ease, border-color .16s ease, background .16s ease; }
.card:hover { transform: translateY(-3px); border-color: var(--primary); }
a.card.ds-navcard:hover { text-decoration: none; }
a.card.ds-navcard:hover h3 { color: var(--primary); }
.card-head h3 { transition: color .16s ease; }

/* Footer flare */
.foot-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
.foot-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.foot-nav a { color: var(--muted); font-size: 13px; }
.foot-meta { display: flex; gap: 14px; flex-wrap: wrap; }


/* ════════════════════════════════════════════════════════════════════
   DAVID SIMMONS ARCHIVE — sub-site components
   ════════════════════════════════════════════════════════════════════ */

.ds { padding-bottom: 20px; }

/* category / event-type accent colours (earthy, from the heritage palette) */
.tag-publication { background: #4a6741; color: #fff; }
.tag-curation    { background: #7a5c3a; color: #fff; }
.tag-life        { background: #3a5c7a; color: #fff; }
.tag-career      { background: #7a3a5c; color: #fff; }
.tag-education   { background: #5c6b7a; color: #fff; }
.tag-award       { background: #7a6a3a; color: #fff; }
.tag-scholarship { background: #5c3a7a; color: #fff; }

/* Masthead + subnav */
.ds-masthead { padding: 48px 0 18px; border-bottom: 1px solid var(--border); }
.ds-masthead h1 { font-size: 2.4rem; margin: 0; letter-spacing: -0.01em; }
.ds-maori { font-style: italic; color: var(--accent); font-size: 1.1rem; margin: 6px 0 2px; }
.ds-sub { color: var(--muted); font-size: 0.95rem; margin: 0; }
.ds-subnav { display: flex; gap: 4px; flex-wrap: wrap; padding: 12px 0 24px; border-bottom: 1px solid var(--border); margin-bottom: 30px; }
.ds-subnav a { font-size: 14px; color: var(--muted); padding: 6px 12px; border-radius: var(--radius-sm); }
.ds-subnav a:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
.ds-subnav a.on { color: #fff; background: var(--primary); }

.ds-muted { color: var(--tertiary); }
.ds-nowrap { white-space: nowrap; }
.ds-section { margin: 38px 0; }
.ds-section h2 { font-size: 1.3rem; margin: 0 0 16px; }

/* Overview: bio + portrait + facts */
.ds-bio { display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: start; }
.ds-portrait { margin: 0; }
.ds-portrait img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); display: block; }
.ds-portrait figcaption, .ds-figure figcaption, .ds-work-cover figcaption, .ds-cover-cap {
  font-size: 12px; color: var(--tertiary); margin-top: 7px; font-style: italic;
}
.ds-lead { font-size: 1.1rem; color: var(--ink); margin: 0 0 18px; }
.ds-facts { margin: 0; display: grid; gap: 0; }
.ds-facts > div { display: flex; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.ds-facts > div:last-child { border-bottom: none; }
.ds-facts dt { color: var(--tertiary); font-size: 13px; min-width: 110px; flex: none; margin: 0; }
.ds-facts dd { margin: 0; font-size: 14px; }

/* Video embed (responsive 16:9) */
.ds-video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--panel-bg); }
.ds-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Awards list */
.ds-awards { list-style: none; margin: 0; padding: 0; }
.ds-awards li { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.ds-awards li:last-child { border-bottom: none; }
.ds-award-year { font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 600; min-width: 48px; flex: none; }

/* Cover row (overview selected works) */
.ds-cover-row { display: flex; gap: 22px; flex-wrap: wrap; }
.ds-cover { width: 150px; color: var(--ink); }
.ds-cover:hover { text-decoration: none; }
.ds-cover img { width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--border); display: block; transition: transform .18s ease; }
.ds-cover:hover img { transform: translateY(-3px); }
.ds-cover-cap { display: block; font-size: 12.5px; margin-top: 8px; font-style: normal; }

/* About: figures + tables */
.ds-about .ds-figure { margin: 1.6em 0; max-width: 420px; }
.ds-about .ds-figure img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); display: block; }
.ds-table { width: 100%; border-collapse: collapse; margin: 0.4em 0 1.8em; font-size: 0.94rem; }
.ds-table td { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.ds-table tr:last-child td { border-bottom: none; }
.ds-year-cell { font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 600; white-space: nowrap; width: 56px; }

/* Filter buttons (works + timeline) */
.ds-controls { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
#works-search { max-width: 360px; padding: 9px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; }
#works-search:focus { outline: none; border-color: var(--primary); }
.filter-row { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-btn { font-size: 12.5px; text-transform: capitalize; border: 1px solid var(--border); background: var(--surface); color: var(--ink); padding: 5px 13px; border-radius: 999px; cursor: pointer; }
.filter-btn:hover { background: var(--hover); }
.filter-btn.on { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Works list */
.ds-work-list { display: flex; flex-direction: column; gap: 14px; }
.ds-work { display: grid; grid-template-columns: 120px 1fr; gap: 20px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.ds-work[hidden] { display: none; }
.ds-work-cover { margin: 0; }
.ds-work-cover img { width: 100%; border-radius: var(--radius-xs); border: 1px solid var(--border); display: block; }
.ds-work-nocover { display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 4; border-radius: var(--radius-xs); color: #fff; font-variant-numeric: tabular-nums; font-size: 1.2rem; opacity: 0.85; }
.ds-work-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.ds-work-year { font-variant-numeric: tabular-nums; color: var(--tertiary); font-weight: 600; }
.ds-tag { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 8px; border-radius: 999px; }
.ds-work h3 { font-size: 1.1rem; margin: 0; }
.ds-work-sub { font-style: italic; color: var(--muted); margin: 2px 0 6px; }
.ds-work-pub { font-size: 13px; color: var(--tertiary); margin: 0 0 8px; }
.ds-work-desc { font-size: 0.94rem; color: var(--muted); margin: 0; line-height: 1.55; }

/* Timeline */
.ds-timeline-wrap { margin-top: 6px; }
.ds-timeline { list-style: none; margin: 24px 0 0; padding: 0 0 0 26px; position: relative; }
.ds-timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; display: grid; grid-template-columns: 60px 1fr auto; gap: 12px; align-items: baseline; padding: 9px 0; }
.tl-item[hidden] { display: none; }
.tl-dot { position: absolute; left: -26px; top: 14px; width: 11px; height: 11px; border-radius: 50%; background: var(--stop); border: 2px solid var(--bg); }
.type-publication .tl-dot { background: #4a6741; }
.type-curation .tl-dot { background: #7a5c3a; }
.type-life .tl-dot { background: #3a5c7a; }
.type-career .tl-dot { background: #7a3a5c; }
.type-education .tl-dot { background: #5c6b7a; }
.type-award .tl-dot { background: #7a6a3a; }
.type-scholarship .tl-dot { background: #5c3a7a; }
.tl-year { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--accent); }
.tl-event { color: var(--ink); }
.tl-event em { font-style: italic; }
.tl-type { font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; padding: 1px 7px; border-radius: 999px; align-self: center; }
@media (max-width: 560px) {
  .tl-item { grid-template-columns: 48px 1fr; }
  .tl-type { display: none; }
}

/* References */
.ds-note { background: var(--hover); border-left: 3px solid var(--accent); padding: 10px 14px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--muted); font-size: 0.92rem; }
.ref-group { margin-top: 26px; }
.ref-group h2 { font-size: 1.1rem; margin: 0 0 10px; }
.ref-list { list-style: none; margin: 0; padding: 0; }
.ref-list li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.ref-list li:last-child { border-bottom: none; }
.ref-list .ds-muted { margin: 4px 0 0; font-size: 0.88rem; }

/* DS responsive */
@media (max-width: 680px) {
  .ds-bio { grid-template-columns: 1fr; gap: 20px; }
  .ds-portrait { max-width: 260px; }
  .ds-work { grid-template-columns: 84px 1fr; gap: 14px; }
}
