/* Niels Taatgen — personal site, page styles.
   Scholarly and warm: white page, University of Groningen red, serif headings.
   Single stylesheet, no external dependencies. Load after chrome.css. */

:root {
  --accent: var(--rug-red, #dc002d);
  --accent-dark: var(--rug-red-dark, #a8001f);
  --accent-soft: var(--rug-red-soft, #fdecef);
  --text: #1d1b1a;
  --text-muted: #625b57;
  --bg: #ffffff;
  --bg-warm: #faf6f3;
  --border: #e6dfdb;
  --max: 1000px;
  --serif: "Iowan Old Style", "Charter", "Georgia", "Cambria", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 17px/1.65 var(--sans); color: var(--text); background: var(--bg); }

main { max-width: var(--max); margin: 0 auto; padding: 36px 20px 8px; }

h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; color: var(--text); font-weight: 600; }
h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); margin: 0 0 .3em; }
h2 { font-size: 1.55rem; margin: 2.2em 0 .6em; padding-bottom: .25em; border-bottom: 2px solid var(--accent); display: inline-block; }
h3 { font-size: 1.2rem; margin: 1.6em 0 .4em; }
h4 { font-size: 1rem; margin: 1.4em 0 .3em; font-family: var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
p { margin: 0 0 1em; }
a { color: var(--accent-dark); text-underline-offset: 2px; }
a:hover { color: var(--accent); }
hr { border: 0; border-top: 1px solid var(--border); margin: 2.4em 0; }
img { max-width: 100%; height: auto; }

.page-title { margin-top: 0; }
.page-subtitle { font-size: 1.15rem; color: var(--text-muted); max-width: 46em; margin-bottom: 1.6em; }

/* ---------- Home hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; align-items: start; margin-bottom: 8px; }
.hero .tagline { font: 600 1.05rem/1.4 var(--sans); color: var(--accent-dark); margin-bottom: 1.2em; }
.hero-photo { margin: 0; }
.hero-photo img { display: block; width: 100%; border-radius: 4px; border-bottom: 4px solid var(--accent); }
.hero-photo figcaption { font-size: .78rem; color: var(--text-muted); margin-top: 6px; }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero-photo { order: -1; max-width: 240px; }
}

.award { background: var(--accent-soft); border-left: 4px solid var(--accent); padding: 12px 16px; border-radius: 0 4px 4px 0; font-size: .98rem; margin: 1.4em 0; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin: 1em 0 1.5em; }
.card { background: var(--bg-warm); border: 1px solid var(--border); border-top: 3px solid var(--accent); border-radius: 4px; padding: 16px 18px; }
.card h3 { margin: 0 0 .4em; font-size: 1.1rem; }
.card h3 a { text-decoration: none; color: var(--text); }
.card h3 a:hover { color: var(--accent); }
.card p { margin: 0; font-size: .94rem; color: var(--text-muted); }
.card .more { display: inline-block; margin-top: .7em; font-size: .88rem; font-weight: 600; }

/* ---------- News ---------- */
.news { list-style: none; padding: 0; margin: 0; }
.news li { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.news .date { font: 600 .85rem/1.8 var(--sans); color: var(--accent-dark); }
.news .item { font-size: .98rem; }
@media (max-width: 560px) { .news li { grid-template-columns: 1fr; gap: 0; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px 28px; margin: 0; }
.contact-grid dt { font: 600 .74rem/1 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; }
.contact-grid dd { margin: 0; font-size: .98rem; }

/* ---------- References and lists ---------- */
.ref { font-size: .95rem; padding-left: 1.6em; text-indent: -1.6em; margin: 0 0 .6em; }
.contribs { padding: 0; list-style: none; margin: 0; }
.contribs li { padding: 10px 0 10px 18px; border-left: 3px solid var(--border); margin-bottom: 8px; }
.contribs li strong { color: var(--text); }

.topic-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: center; padding: 18px 20px; margin: 14px 0; border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 4px; background: var(--bg-warm); }
.topic-link h3 { margin: 0 0 .25em; }
.topic-link p { margin: 0; font-size: .96rem; color: var(--text-muted); }
@media (max-width: 600px) { .topic-link { grid-template-columns: 1fr; } }

.button { display: inline-block; font: 600 .92rem/1 var(--sans); background: var(--accent); color: #fff !important; text-decoration: none; padding: 11px 18px; border-radius: 4px; white-space: nowrap; }
.button:hover { background: var(--accent-dark); }
.button.ghost { background: #fff; color: var(--accent-dark) !important; border: 1px solid var(--accent); }
.button.ghost:hover { background: var(--accent-soft); }

/* ---------- Team ---------- */
.people { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.people li { padding: 12px 16px; background: var(--bg-warm); border: 1px solid var(--border); border-radius: 4px; }
.people .name { font-weight: 600; }
.people .role { color: var(--text-muted); font-size: .94rem; }
.plain-list { padding-left: 1.2em; margin: 0 0 1em; }
.plain-list li { margin-bottom: .3em; }

/* ---------- Figures ---------- */
figure.fig { margin: 1.4em 0; }
figure.fig img { display: block; border: 1px solid var(--border); border-radius: 4px; }
figure.fig figcaption { font-size: .86rem; color: var(--text-muted); margin-top: 6px; max-width: 60em; }
.logos { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; margin: 1.2em 0; }
.logos img { height: 48px; width: auto; }

/* ---------- Personal ---------- */
.gallery-teaser { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin: 1em 0; }
.gallery-teaser a { display: block; position: relative; overflow: hidden; aspect-ratio: 4/3; background: #111; border-radius: 3px; }
.gallery-teaser img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease, opacity .3s; opacity: .92; }
.gallery-teaser a:hover img { transform: scale(1.04); opacity: 1; }
.gallery-teaser span { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 12px 8px; color: #fff; font: 500 .9rem var(--sans); background: linear-gradient(to top, rgba(0,0,0,.65), transparent); }
.dead-link-note { color: var(--text-muted); }

/* ---------- Oratie ---------- */
.lecture { max-width: 40em; }
.lecture p { font-family: var(--serif); font-size: 1.08rem; line-height: 1.75; }
.lecture h2 { font-size: 1.3rem; border-bottom: 0; display: block; padding-bottom: 0; margin-top: 2em; color: var(--accent-dark); }
.lecture figure { margin: 1.6em 0; }
.lecture figure img { border: 1px solid var(--border); border-radius: 4px; }
.lecture figcaption { font: .85rem/1.5 var(--sans); color: var(--text-muted); margin-top: 6px; }
.lecture .banner { width: 100%; max-width: none; border-radius: 4px; margin-bottom: 1em; }
.lecture .byline { font: .92rem/1.5 var(--sans); color: var(--text-muted); }

@media (max-width: 640px) { body { font-size: 16px; } main { padding-top: 24px; } }

/* Code (install commands on the Software page) */
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
pre { background: var(--accent-soft); border-left: 3px solid var(--accent); padding: .6em 1em; overflow-x: auto; margin: 0 0 1em; }
pre code { font-size: .9rem; }
