/* ── reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent:   #3d7fa0;   /* steel blue from the filled opetope cells */
  --accent-dk: #2b6080;  /* darker shade for hover */
  --text:     #1a252d;   /* near-black with a cool blue cast */
  --muted:    #5a7282;   /* blue-grey for secondary text */
  --light:    #eef4f7;   /* very pale blue tint */
  --border:   #c8d8e2;   /* blue-tinted border */
  --bg:       #ffffff;
  --max-w:    860px;
  --font:     "IBM Plex Sans", system-ui, sans-serif;
}

html { font-size: 16px; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── banner ───────────────────────────────────────────────── */
.banner {
  width: 100%;
  background: #aed0dc;  /* matches the image's powder-blue background */
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.banner img {
  max-height: 300px;
  max-width: 100%;
  width: auto;
  height: auto;
  display: block;
}

/* ── site header / nav ────────────────────────────────────── */
.site-header {
  background: #f0f6f9;   /* pale tint of the banner's powder blue */
  border-bottom: 1px solid var(--border);
}

.site-header .inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.site-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  white-space: nowrap;
}

.site-title a { color: inherit; }
.site-title a:hover { text-decoration: none; color: var(--accent); }

nav { display: flex; gap: 0; }

nav a {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 0.9rem;
  height: 52px;
  display: flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

nav a:hover {
  color: var(--accent-dk);
  border-bottom-color: var(--accent-dk);
  text-decoration: none;
}

nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

/* ── page content ─────────────────────────────────────────── */
main {
  flex: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.75rem 1.5rem 4rem;
}

/* ── home: profile block ──────────────────────────────────── */
.profile {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 2.75rem;
}

.profile img {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
}

.profile-info h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.profile-info .title {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.profile-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
}

.profile-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  font-size: 0.85rem;
  flex-shrink: 0;
  padding-top: 0.2rem;
}

/* ── section headings ─────────────────────────────────────── */
h2.section-heading {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
  margin-bottom: 1.25rem;
  margin-top: 2.5rem;
}

h2.section-heading:first-child { margin-top: 0; }

/* ── body text ────────────────────────────────────────────── */
.prose p { font-size: 0.95rem; margin-bottom: 0.9rem; }
.prose p:last-child { margin-bottom: 0; }

/* ── publication list ─────────────────────────────────────── */
.pub-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pub-list li { font-size: 0.9rem; }

.pub-list .pub-title {
  font-weight: 700;
  display: block;
  margin-bottom: 0.1rem;
}

.pub-list .pub-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.pub-list .pub-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.pub-list .pub-links { display: flex; gap: 0.75rem; font-size: 0.82rem; flex-shrink: 0; }

/* ── generic item list (code, videos) ────────────────────── */
.item-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.9rem;
}

.item-list li { display: flex; gap: 0.5rem; align-items: baseline; }
.item-list .item-label { font-weight: 700; white-space: nowrap; }
.item-list .item-desc { color: var(--muted); font-size: 0.875rem; }

.item-list--stacked li { display: block; }
.item-list--stacked .item-label { display: block; }
.item-list--stacked .item-desc { display: block; margin-top: 0.2rem; font-size: 0.875rem; }
.item-list--prose .item-desc { color: var(--text); font-size: 0.9rem; }
.item-list--prose .item-desc p { margin: 0; }
.item-list--prose .item-desc p + p { margin-top: 0.75rem; }

/* ── course list ──────────────────────────────────────────── */
.course-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.course-list li { font-size: 0.9rem; }

.course-list .course-title { font-weight: 700; }
.course-list .course-meta { color: var(--muted); font-size: 0.85rem; }
.course-list .course-links { font-size: 0.85rem; display: flex; gap: 0.75rem; margin-top: 0.15rem; }

/* ── footer ───────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 0.5rem 1.5rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  line-height: 1;
}

/* ── responsive ───────────────────────────────────────────── */
@media (max-width: 620px) {
  /* banner scales naturally — no override needed */

  .site-header .inner { height: auto; flex-direction: column; align-items: flex-start; padding: 0.5rem 0.75rem; gap: 0.1rem; }

  nav a { font-size: 0.7rem; padding: 0 0.35rem; height: 2rem; }

  .profile { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .profile-info { flex-direction: column; align-items: center; }
  .profile-links { align-items: center; }
}
