:root {
  --blue: #12667a;      /* petrol: links, subheadings */
  --accent: #d2601a;    /* glow orange: heading rule, years */
  --slate: #1d2632;     /* night blue (hero background) */
  --text: #1d2632;
  --muted: #5e6b78;
  --rule: #dbe3e6;
  --bg: #ffffff;
  --bg-soft: #dce7eb;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

.wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 20px;
}

a { color: var(--blue); text-decoration: none; overflow-wrap: anywhere; }
a:hover, a:focus { text-decoration: underline; }


/* Sections */
main { padding: 0 0 40px; }
main > .wrap, main > section.wrap { padding-top: 4px; }
section { margin-top: 36px; }
h2 {
  color: var(--slate);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 14px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--accent);
}
h3 {
  color: var(--blue);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 24px 0 10px;
}
p { margin: 0 0 12px; }

/* Entry lists (position, software, contact) */
.entries { margin: 0; }
.entry {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 4px 20px;
  margin-bottom: 12px;
}
.entry dt { color: var(--muted); font-size: 0.95rem; padding-top: 1px; }
.entry dd { margin: 0; }
.authors-inline { color: var(--muted); }

/* Publications */
.pubs {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pubs li {
  margin-bottom: 14px;
  padding-left: 14px;
  border-left: 3px solid #bcd7dd;
}
.pubs .year {
  display: inline-block;
  color: var(--accent);
  font-weight: 600;
  margin-right: 6px;
}
.pubs .authors { color: var(--muted); }
.pubs .authors b { color: var(--text); }
.pubs .title { display: block; color: var(--text); font-weight: 500; }
.pubs .venue { font-style: italic; color: var(--muted); margin-right: 6px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
  padding: 20px 0 32px;
}


/* About with portrait */
.about { display: grid; grid-template-columns: 180px 1fr; gap: 28px; align-items: center; }
.about p { margin: 0; }
.portrait-figure { margin: 0; text-align: center; }
.portrait-figure figcaption { margin-top: 6px; color: var(--muted); font-size: 0.72rem; }
.portrait {
  width: 180px; height: 180px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
@media (max-width: 720px) {
  .about { grid-template-columns: 1fr; gap: 18px; justify-items: center; }
  .portrait { width: 150px; height: 150px; }
}

/* Top bar */
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}
.topbar-inner {
  max-width: 1100px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { color: var(--slate); font-weight: 600; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.nav { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; font-size: 0.95rem; }
.nav a { color: var(--slate); }
.nav a:hover { color: var(--blue); }

/* Hero */
.hero {
  position: relative;
  min-height: 72vh;
  display: flex; align-items: flex-end;
  background-color: #1f2a36;
  background-image:
    linear-gradient(to top, rgba(20,28,38,0.82) 0%, rgba(20,28,38,0.25) 55%, rgba(20,28,38,0.05) 100%),
    var(--hero-image, linear-gradient(120deg, #455466 0%, #3873b3 55%, #e0772a 120%));
  background-size: cover;
  background-position: center;
  color: #fff;
}
.hero-text { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px 56px; }
.hero .name {
  margin: 0; font-size: 3rem; font-weight: 600; line-height: 1.15; letter-spacing: -0.01em;
  text-shadow: 0 1px 12px rgba(0,0,0,0.35);
}
.hero .tagline { margin: 8px 0 18px; font-size: 1.15rem; color: rgba(255,255,255,0.9); }
.links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.links a {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.6); color: #fff; font-weight: 500; font-size: 0.95rem;
}
.links a:hover { background: rgba(255,255,255,0.15); text-decoration: none; }
.hero-caption {
  position: absolute; right: 16px; bottom: 10px; margin: 0;
  font-size: 0.78rem; color: rgba(255,255,255,0.7);
}

/* Scroll-driven animation */
.scrolly { position: relative; height: 300vh; margin: 40px 0 0; background: var(--bg-soft); }
.scrolly-sticky {
  position: sticky; top: 49px; height: calc(100vh - 49px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 16px 20px; gap: 10px;
}
.scrolly-figure { position: relative; width: 100%; max-width: 1100px; display: flex; justify-content: center; }
.scrolly-canvas {
  display: block; width: 100%; height: auto; max-height: calc(100vh - 220px);
  object-fit: contain;
}

.scrolly-legend { margin: 0; width: 100%; max-width: 560px; text-align: center; }
.scrolly-legend img { display: block; width: 100%; height: auto; }
.scrolly-legend figcaption { margin-top: 2px; color: var(--text); font-size: 0.85rem; }
.scrolly-caption { margin: 0; color: var(--muted); font-size: 0.9rem; text-align: center; }

@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav { display: none; }
  .hero { min-height: 58vh; }
  .hero .name { font-size: 2.1rem; }
  .hero-text { padding-bottom: 64px; }
  .hero-caption { left: 20px; right: 20px; bottom: 12px; }
  .entry { grid-template-columns: 1fr; gap: 0; }
  .entry dt { font-weight: 600; color: var(--slate); }
  .scrolly { height: 240vh; }
}
