/* ==========================================================================
   Ron de Bruijn — personal academic site
   Plain CSS, no framework. Easy to tweak.
   ========================================================================== */

:root {
  --max-width: 1080px;
  --bg: #fdfcfa;
  --bg-alt: #f3efe9;
  --text: #1f2024;
  --text-muted: #5a5d66;
  --border: #e3ddd2;
  --accent: #c4262e;          /* TU/e red, used sparingly */
  --accent-dark: #8e1b21;
  --link: #0f4c75;
  --link-hover: #1b6ca8;
  --radius: 8px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.06);
  --serif: "Charter", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s, color .15s;
}
a:hover { color: var(--link-hover); border-bottom-color: currentColor; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; }
h1 { font-size: clamp(2.2rem, 4.5vw, 3.2rem); margin: .2em 0 .35em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 .8em; position: relative; padding-bottom: .4em; }
h2::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 48px; height: 3px;
  background: var(--accent);
  border-radius: 2px;
}
h3 { font-size: 1.2rem; margin: 0 0 .4em; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 252, 250, 0.92);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  border: none;
}
.brand:hover { color: var(--accent); }

.nav {
  display: flex;
  gap: 1.4rem;
  list-style: none;
  margin: 0; padding: 0;
}
.nav a {
  color: var(--text-muted);
  font-size: .95rem;
  border: none;
  position: relative;
}
.nav a:hover { color: var(--text); }
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform .18s ease;
  transform-origin: left;
}
.nav a:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* ---------- Sections ---------- */
.section {
  padding: 5rem 0;
}
.section-alt { background: var(--bg-alt); }
.section-lede {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 65ch;
  margin: 0 0 2rem;
}
.subhead {
  margin-top: 2.5rem;
  font-size: 1.1rem;
}

/* ---------- Hero ---------- */
.hero { padding: 5rem 0 4rem; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}
.lede {
  font-size: 1.15rem;
  color: var(--text);
}
.cta-row {
  display: flex;
  gap: .8rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.btn {
  display: inline-block;
  padding: .7rem 1.4rem;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-weight: 500;
  font-size: .95rem;
  border: 1px solid var(--accent);
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; border-bottom-color: var(--accent-dark); }
.btn:active { transform: translateY(1px); }
.btn-ghost {
  background: transparent;
  color: var(--accent);
}
.btn-ghost:hover { background: var(--accent); color: #fff; }

.hero-photo img,
.photo-placeholder {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
  background: var(--bg-alt);
}
.photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
  font-size: .9rem;
  padding: 1rem;
  border: 2px dashed var(--border);
}
.photo-placeholder code {
  background: #fff;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: .85rem;
}

/* ---------- Cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
  margin-top: 1rem;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s;
}
.section-alt .card { background: #fff; }
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.card h3 { color: var(--text); }
.card p { margin: 0; color: var(--text-muted); }
.card .meta {
  font-size: .85rem;
  color: var(--accent);
  margin-bottom: .5rem;
  font-weight: 500;
}

/* ---------- Publications ---------- */
.pubs {
  list-style: none;
  counter-reset: pub;
  padding: 0;
  margin: 0;
}
.pubs li {
  counter-increment: pub;
  padding: 1.2rem 0 1.2rem 2.5rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.pubs li:last-child { border-bottom: none; }
.pubs li::before {
  content: counter(pub) ".";
  position: absolute;
  left: 0;
  top: 1.2rem;
  font-family: var(--serif);
  font-weight: 600;
  color: var(--accent);
  font-size: 1.05rem;
}
.pub-authors,
.pub-title,
.pub-venue,
.pub-links { display: block; }
.pub-title {
  font-weight: 600;
  margin: .15rem 0;
}
.pub-venue { color: var(--text-muted); }
.pub-links { margin-top: .35rem; font-size: .9rem; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}
.links {
  list-style: none;
  padding: 0;
  margin: .5rem 0 0;
}
.links li { padding: .25rem 0; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  font-size: .9rem;
  color: var(--text-muted);
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-photo { order: -1; }
  .hero-photo img,
  .photo-placeholder { max-width: 200px; }
  .eyebrow { display: inline-block; }
  .cta-row { justify-content: center; }
  .contact-grid { grid-template-columns: 1fr; }

  .nav-toggle { display: flex; }
  .nav {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: .5rem 1.5rem 1rem;
  }
  .nav.open { display: flex; }
  .nav li { padding: .6rem 0; border-bottom: 1px solid var(--border); }
  .nav li:last-child { border-bottom: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .cta-row, .nav-toggle { display: none; }
  .section { padding: 1.5rem 0; page-break-inside: avoid; }
  body { font-size: 11pt; color: #000; background: #fff; }
}
