/* ==========================================================================
   MacLeOD — academic, understated theme
   One accent color, generous whitespace, elegant serif headings.
   ========================================================================== */

:root {
  --ink:        #1a1d24;   /* near-black text          */
  --ink-soft:   #4a5160;   /* secondary text           */
  --muted:      #6b7280;   /* captions, meta           */
  --line:       #e6e8ec;   /* hairlines / borders      */
  --bg:         #ffffff;   /* page background          */
  --bg-soft:    #f7f8fa;   /* alternating sections     */
  --accent:     #1f5673;   /* deep teal-blue accent    */
  --accent-ink: #163f54;   /* darker accent for text   */
  --accent-soft:#eaf1f5;   /* accent tint              */

  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --wrap: 1080px;
  --radius: 10px;
}

/* --- Reset-ish --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.plain { list-style: none; margin: 0; padding: 0; }

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

/* --- Header ------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 600; }
.brand:hover { text-decoration: none; }
.brand-name {
  font-family: var(--serif); font-size: 1.25rem; color: var(--ink);
  letter-spacing: .01em;
}
.brand-mark {
  width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--accent), var(--accent-ink));
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.site-nav { display: flex; gap: 1.5rem; }
.site-nav a {
  color: var(--ink-soft); font-size: .95rem; font-weight: 500;
  padding: .25rem 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--accent); text-decoration: none; }
.site-nav a.is-active { color: var(--ink); border-bottom-color: var(--accent); }

.nav-toggle, .nav-burger { display: none; }

/* --- Hero (home) ------------------------------------------------------- */
.hero { padding: 5.5rem 0 3.5rem; position: relative; overflow: hidden; }
.hero .eyebrow { color: var(--accent); }
.hero h1 { max-width: 15ch; margin-bottom: .4em; }
.hero .lead { font-size: 1.25rem; color: var(--ink-soft); max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }

/* two-column hero: text left, project illustration right */
.hero-grid { display: flex; align-items: center; gap: 3rem; }
.hero-text { flex: 1 1 54%; min-width: 0; }
.hero-illustration {
  flex: 1 1 42%; width: 100%; max-width: 480px; height: auto;
  margin: 0 0 0 auto;
}
@media (max-width: 860px) {
  .hero-grid { flex-direction: column; align-items: stretch; gap: 1.5rem; }
  .hero-illustration { max-width: 100%; margin: .5rem 0 0; }
}

.eyebrow {
  font-family: var(--sans); font-weight: 600; font-size: .78rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
  margin: 0 0 1rem;
}

/* --- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-block; font-weight: 600; font-size: .95rem;
  padding: .7rem 1.3rem; border-radius: var(--radius);
  border: 1px solid var(--accent); background: var(--accent); color: #fff;
  transition: background .15s ease, transform .05s ease;
}
.btn:hover { background: var(--accent-ink); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: transparent; color: var(--accent); }
.btn.secondary:hover { background: var(--accent-soft); }

/* --- Sections ---------------------------------------------------------- */
.section { padding: 3.5rem 0; }
.section.alt { background: var(--bg-soft); border-block: 1px solid var(--line); }
.section-head { max-width: 62ch; margin-bottom: 2rem; }
.section-head .eyebrow { margin-bottom: .6rem; }

/* --- Axes grid --------------------------------------------------------- */
.axes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.axis-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem; transition: border-color .15s ease, box-shadow .15s ease;
}
.axis-card:hover { border-color: var(--accent); box-shadow: 0 6px 24px rgba(31,86,115,.08); }
.axis-num {
  font-family: var(--serif); font-size: 1.1rem; color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 50%; background: var(--accent-soft);
  margin-bottom: .8rem; font-weight: 600;
}
.axis-card h3 { font-size: 1.05rem; margin-bottom: .35em; }
.axis-card p { color: var(--ink-soft); font-size: .95rem; margin: 0; }

/* --- Keyword chips ----------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  font-size: .85rem; font-weight: 500; color: var(--accent-ink);
  background: var(--accent-soft); border-radius: 999px; padding: .35rem .85rem;
}

/* --- People ------------------------------------------------------------ */
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.team-group { margin-top: 2.75rem; }
.team-group h3 { margin-bottom: 1rem; }
.person {
  display: flex; align-items: center; gap: .9rem;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem;
}
.person-info { min-width: 0; }
.avatar {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%;
  object-fit: cover; background: var(--accent-soft);
}
.avatar--mono {
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-ink); font-family: var(--serif); font-weight: 600; font-size: 1rem;
}
.person .name { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; }
.person .role { color: var(--accent); font-size: .9rem; font-weight: 500; }
.person .aff { color: var(--muted); font-size: .9rem; }

/* --- Stats ------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; }
.stat { text-align: center; padding: 1rem; }
.stat .num { font-family: var(--serif); font-size: 2.2rem; color: var(--accent); line-height: 1; }
.stat .label { color: var(--ink-soft); font-size: .9rem; margin-top: .4rem; }

/* --- Page head (inner pages) ------------------------------------------ */
.page-head { padding: 3.5rem 0 1rem; border-bottom: 1px solid var(--line); }
.page-head .lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 64ch; }
.page-body { padding: 2.5rem 0 1rem; }

/* --- Prose ------------------------------------------------------------- */
.prose { max-width: 70ch; }
.prose h2 { margin-top: 2rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .4rem; }
.prose blockquote {
  margin: 1.5rem 0; padding: .4rem 0 .4rem 1.2rem;
  border-left: 3px solid var(--accent); color: var(--ink-soft); font-style: italic;
}
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em;
  background: var(--bg-soft); padding: .1rem .35rem; border-radius: 5px;
}

/* --- Software cards ---------------------------------------------------- */
.sw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.2rem; margin: 1.5rem 0; }
.sw-card {
  display: flex; gap: 1.2rem; align-items: flex-start;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.sw-card:hover { border-color: var(--accent); box-shadow: 0 6px 24px rgba(31,86,115,.08); }
.sw-logo {
  flex: 0 0 72px; width: 72px; height: 72px; display: flex; align-items: center;
  justify-content: center; background: var(--bg-soft); border-radius: var(--radius);
  padding: .6rem;
}
.sw-logo img { max-width: 100%; max-height: 100%; }
.sw-body h3 { margin: 0 0 .3em; font-size: 1.1rem; }
.sw-body p { color: var(--ink-soft); font-size: .95rem; margin: 0 0 .5em; }
.sw-links { font-size: .9rem; font-weight: 500; }

/* --- Publications (HAL) ------------------------------------------------ */
.pub-year {
  font-size: 1.1rem; color: var(--accent); margin: 2rem 0 .8rem;
  padding-bottom: .3rem; border-bottom: 1px solid var(--line);
}
.pub-list { list-style: none; margin: 0; padding: 0; }
.pub { padding: .9rem 0; border-bottom: 1px solid var(--line); }
.pub:last-child { border-bottom: none; }
.pub-title { font-family: var(--serif); font-size: 1.08rem; font-weight: 600; line-height: 1.35; }
.pub-authors { color: var(--ink-soft); font-size: .92rem; margin-top: .2rem; }
.pub-meta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .35rem; }
.pub-type {
  font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent-ink); background: var(--accent-soft);
  border-radius: 999px; padding: .15rem .6rem;
}
.pub-venue { color: var(--muted); font-size: .9rem; font-style: italic; }
.pub-links { margin-top: .35rem; font-size: .88rem; }

/* --- News -------------------------------------------------------------- */
.news-list { list-style: none; margin: 1.5rem 0; padding: 0; }
.news-list li {
  border-left: 3px solid var(--accent); padding: .1rem 0 .1rem 1.2rem; margin-bottom: 1.3rem;
}
.news-list p { margin: .25rem 0 0; }

/* --- Callout ----------------------------------------------------------- */
.callout {
  background: var(--accent-soft); border-radius: var(--radius);
  padding: 1.4rem 1.6rem; margin: 1.5rem 0;
}
.callout p:last-child { margin-bottom: 0; }

/* --- Funders band ------------------------------------------------------ */
.funders {
  background: var(--bg); border-top: 1px solid var(--line); margin-top: 4rem;
}
.funders-inner {
  display: flex; align-items: center; flex-wrap: wrap; gap: 1.6rem 2.4rem;
  padding: 1.8rem 24px;
}
.funders-label {
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.funder-logo { display: inline-flex; align-items: center; }
.funder-logo:hover { opacity: .8; text-decoration: none; }
.funder-logo img { height: 56px; width: auto; }

/* --- Footer ------------------------------------------------------------ */
.site-footer { background: #11161c; color: #c4ccd6; margin-top: 0; }
.site-footer a { color: #9ec7dc; }
.footer-inner {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem; padding: 3rem 24px 1.5rem;
}
.site-footer .muted { color: #8793a1; }
.footer-title { font-family: var(--serif); color: #fff; font-size: 1.05rem; margin: 0 0 .6rem; }
.footer-col ul li { margin-bottom: .3rem; }
.funding { border-top: 1px solid #222b34; padding-top: 1.2rem; padding-bottom: 2rem; }
.funding .muted { color: #6b7686; }

/* --- Responsive -------------------------------------------------------- */
@media (max-width: 760px) {
  .nav-burger {
    display: inline-flex; flex-direction: column; justify-content: center;
    gap: 5px; width: 40px; height: 40px; cursor: pointer;
  }
  .nav-burger span { display: block; height: 2px; width: 22px; background: var(--ink); border-radius: 2px; }
  .site-nav {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: #fff;
    border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .site-nav a { padding: .9rem 24px; border-bottom: 1px solid var(--line); width: 100%; }
  .site-nav a.is-active { border-bottom-color: var(--line); color: var(--accent); }
  .nav-toggle:checked ~ .site-nav { max-height: 420px; }
  .hero { padding: 3.5rem 0 2.5rem; }
}
