/* grandidier.org v2 — academic, readable, light/dark */

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1d232b;
  --muted: #5d6673;
  --line: #e6e2da;
  --accent: #b5541c;        /* solar orange */
  --accent-soft: #f6e7dc;
  --navy: #1f3550;
  --chip: #eef1f5;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.04);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161b;
    --surface: #1a2027;
    --text: #e7e9ec;
    --muted: #9aa4b1;
    --line: #2b333d;
    --accent: #f08a4b;
    --accent-soft: #3a2a20;
    --navy: #a9c2e0;
    --chip: #232b35;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { font: 600 20px/1 var(--serif); letter-spacing: .02em; color: var(--text); }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { padding: 6px 12px; border-radius: 999px; color: var(--muted); font-size: 15px; }
.nav a:hover { background: var(--chip); color: var(--text); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--navy); color: var(--bg); }

/* ---------- headings ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; color: var(--text); }
h1 { font-size: clamp(32px, 5vw, 46px); margin: 0 0 8px; }
h2 { font-size: 28px; margin: 56px 0 18px; }
h3 { font-size: 19px; margin: 0 0 6px; }
.page-title { margin: 48px 0 6px; }
.lede { color: var(--muted); font-size: 18px; margin: 0 0 28px; max-width: 760px; }
.eyebrow { font: 600 12px/1.5 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1fr 230px; gap: 40px; align-items: center; padding: 56px 0 24px; }
.hero .role { font-size: 19px; color: var(--navy); margin: 0 0 18px; font-weight: 500; }
.hero p { max-width: 640px; }
.hero img { width: 230px; height: auto; border-radius: 14px; box-shadow: var(--shadow); }  /* full photo, never cropped */
.profiles { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font-size: 14px; font-weight: 500;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 28px 0 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.stat b { display: block; font: 600 30px/1.1 var(--serif); color: var(--navy); }
.stat span { color: var(--muted); font-size: 14px; }

/* ---------- cards ---------- */
.grid { display: grid; gap: 18px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px; box-shadow: var(--shadow);
}
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .icon { font-size: 26px; margin-bottom: 8px; display: block; }

/* featured work */
.feature { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: start; }
.feature img { width: 96px; border-radius: 6px; border: 1px solid var(--line); }
.feature .ph {
  width: 96px; aspect-ratio: 3 / 4; border-radius: 6px; border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--navy), var(--accent)); color: #fff;
  display: flex; align-items: flex-end; padding: 8px; font: 600 12px/1.2 var(--serif);
}
.feature .venue { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ---------- filters ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 8px 0 24px; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  padding: 6px 14px; border-radius: 999px; font: 500 14px var(--sans); cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--bg); }
.chip .count { opacity: .6; margin-left: 4px; }
.search {
  flex: 1 1 220px; min-width: 0; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 15px var(--sans);
}

/* ---------- publications ---------- */
.year { font: 600 15px var(--sans); color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 6px; margin: 34px 0 6px; }
.pub { padding: 14px 0; border-bottom: 1px dashed var(--line); display: grid; grid-template-columns: 1fr auto; gap: 6px 18px; }
.pub .t { font: 600 17px/1.35 var(--serif); color: var(--text); }
.pub .t:hover { color: var(--accent); text-decoration: none; }
.pub .c { grid-column: 1; color: var(--muted); font-size: 14.5px; }
.pub .c b.me { color: var(--text); font-weight: 600; }
.pub .tags { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 6px; align-items: flex-start; flex-wrap: wrap; justify-content: flex-end; }
.tag {
  font: 600 11px/1 var(--sans); letter-spacing: .04em; text-transform: uppercase;
  padding: 5px 8px; border-radius: 6px; background: var(--chip); color: var(--muted); white-space: nowrap;
}
a.tag:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.tag.kind { background: transparent; border: 1px solid var(--line); }
.tag.issued { background: #e3f3e6; color: #276b35; }
.tag.pending { background: #fdf3d7; color: #8a6510; }
@media (prefers-color-scheme: dark) {
  .tag.issued { background: #1f3a26; color: #8fd19e; }
  .tag.pending { background: #3a3218; color: #e7c66c; }
}
.empty { color: var(--muted); padding: 20px 0; display: none; }

/* ---------- media ---------- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.media-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.media-card .thumb { aspect-ratio: 16 / 10; background: var(--chip); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.media-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-card .thumb.portrait img { object-fit: contain; padding: 10px; }
.media-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.media-card .meta { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.media-card h3 a { color: var(--text); }
.media-card p { margin: 0; color: var(--muted); font-size: 14.5px; }
.media-card .more { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 600; }

/* ---------- footer ---------- */
.site-footer { margin-top: 72px; border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 24px; padding-top: 32px; }
  .hero img { order: -1; width: 160px; height: auto; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  .pub { grid-template-columns: 1fr; }
  .pub .tags { grid-column: 1; grid-row: auto; justify-content: flex-start; }
}

.media-card .thumb.label { background: linear-gradient(150deg, var(--navy), var(--accent)); }
.media-card .thumb.label span { color: #fff; font: 600 22px/1.25 var(--serif); padding: 24px; text-align: center; }
