:root {
  --bg:       #fafafa;
  --surface:  #ffffff;
  --border:   #eaeaea;
  --text:     #111111;
  --muted:    #666666;
  --faint:    #aaaaaa;
  --blue:     #26B8FB;
  --dark:     #0B3D4F;
  --darker:   #0A2533;
  --radius:   4px;
}
[data-theme="dark"] {
  --bg:       #0A2533;
  --surface:  #0f3244;
  --border:   #1c4454;
  --text:     #e8f4f8;
  --muted:    #8ab8c8;
  --faint:    #4a7a8a;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem; line-height: 1.8;
  color: var(--text); background: var(--bg);
  transition: background .25s, color .25s;
}
a { color: var(--text); text-decoration: none; }
.container { max-width: 900px; margin: auto; padding: 0 24px; }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.modal-overlay[hidden] { display: none; }

.modal-box {
  background: var(--surface); color: var(--text); padding: 32px;
  border-radius: 8px; max-width: 480px; width: 90%; position: relative;
}
.modal-box label { display: block; margin-top: 12px; font-size: 0.85rem; }
.modal-box input, .modal-box textarea {
  width: 100%; padding: 8px; margin-top: 4px; border: 1px solid var(--border);
  border-radius: 4px; background: var(--bg); color: var(--text);
}
.modal-box button[type="submit"] { margin-top: 16px; }
/* NAV */
nav { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.nav-inner { max-width: 900px; margin: auto; padding: 0 24px; height: 58px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-weight: 700; font-size: 1rem; color: var(--text); display: flex; align-items: center; gap: 8px; }
.brand img { width: 28px; height: 28px; }
.brand-bracket { color: var(--blue); }
.links { display: flex; align-items: center; gap: 2px; }
.links a { padding: 5px 10px; font-size: 0.82rem; color: var(--muted); border-radius: var(--radius); transition: color .15s, background .15s; }
.links a:hover { color: var(--text); background: var(--border); }
.nav-right { display: flex; align-items: center; gap: 8px; }
.theme-btn { background: none; border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 9px; cursor: pointer; font-size: 0.8rem; color: var(--muted); font-family: inherit; transition: border-color .15s, color .15s; }
.theme-btn:hover { border-color: var(--blue); color: var(--blue); }

/* PAGE HEADER */
.page-header { padding: 48px 0 28px; border-bottom: 1px solid var(--border); margin-bottom: 44px; }
.page-eyebrow { font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--blue); margin-bottom: 8px; display: block; }
.page-header h1 { font-size: 2.4rem; font-weight: 700; line-height: 1.2; }

/* RICH MARKDOWN */
.rich h2 { font-size: 1.35rem; font-weight: 600; margin: 44px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.rich h3 { font-size: 1.05rem; font-weight: 600; margin: 26px 0 8px; }
.rich h4 { font-size: 0.95rem; font-weight: 600; margin: 18px 0 6px; color: var(--muted); }
.rich p  { margin-bottom: 16px; color: var(--muted); }
.rich ul, .rich ol { padding-left: 1.4em; margin-bottom: 16px; color: var(--muted); }
.rich li { margin-bottom: 3px; }
.rich a  { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.rich blockquote { border-left: 3px solid var(--blue); padding: 8px 0 8px 18px; color: var(--muted); font-style: italic; margin: 20px 0; border-radius: 0 var(--radius) var(--radius) 0; }
.rich strong { font-weight: 600; color: var(--text); }

/* CARDS */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 18px; margin-bottom: 48px; }
.card { background: var(--surface); border: 1px solid var(--border); padding: 22px; border-radius: var(--radius); transition: transform .2s, box-shadow .2s, border-color .2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,.08); border-color: var(--blue); }
.card h3 { margin: 0 0 8px; font-size: 1rem; font-weight: 600; }
.card p  { color: var(--muted); font-size: 0.88rem; margin: 0; line-height: 1.65; }

/* SECTION LABEL */
.section-label { font-size: 0.67rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--blue); padding-bottom: 10px; border-bottom: 1px solid var(--border); margin-bottom: 22px; }

/* CTA BAR */
.cta-bar { background: var(--darker); border: 1px solid var(--dark); padding: 36px 40px; border-radius: var(--radius); display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin: 48px 0; }
.cta-bar h3 { font-size: 1.2rem; font-weight: 600; color: #e8f4f8; margin-bottom: 4px; }
.cta-bar p  { color: #8ab8c8; font-size: 0.88rem; margin: 0; }
.cta-btn { display: inline-block; padding: 11px 26px; background: var(--blue); color: var(--darker); font-family: inherit; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; border-radius: var(--radius); white-space: nowrap; transition: background .2s, transform .15s; text-decoration: none; }
.cta-btn:hover { background: #4dc9fd; transform: translateY(-1px); }
.text-link { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; font-size: 0.9rem; }
.text-link:hover { opacity: .75; }

/* PUBLICATIONS */
.pub-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.filter-btn { padding: 4px 14px; border: 1px solid var(--border); border-radius: 20px; font-size: 0.75rem; background: var(--surface); color: var(--muted); cursor: pointer; font-family: inherit; transition: all .15s; }
.filter-btn:hover, .filter-btn.active { background: var(--blue); border-color: var(--blue); color: var(--darker); font-weight: 600; }
.pub-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 10px; transition: border-color .2s; }
.pub-item:hover { border-color: var(--blue); }
.pub-title { font-size: 0.95rem; font-weight: 600; color: var(--text); line-height: 1.45; margin-bottom: 6px; }
.pub-title a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.pub-title a:hover { color: var(--blue); }
.pub-meta { font-size: 0.77rem; color: var(--faint); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pub-year { background: color-mix(in srgb, var(--blue) 15%, transparent); color: var(--blue); padding: 1px 8px; border-radius: 20px; font-size: 0.7rem; font-weight: 700; }
.pub-journal { font-style: italic; }
.pub-status { padding: 20px 0; color: var(--faint); display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.pub-spinner { width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* FOOTER */
footer { border-top: 1px solid var(--border); padding: 28px 0 40px; margin-top: 80px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-copy { font-size: 0.74rem; color: var(--faint); line-height: 1.6; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { font-size: 0.74rem; color: var(--faint); transition: color .15s; }
.footer-links a:hover { color: var(--blue); }

@media (max-width: 700px) {
  .links a { padding: 4px 6px; font-size: 0.76rem; }
  .page-header h1 { font-size: 1.8rem; }
  .cta-bar { flex-direction: column; align-items: flex-start; padding: 26px 22px; }
}
@media (max-width: 480px) { .links { display: none; } }

/* ── HAMBURGER ───────────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: 8px;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 480px) {
  .hamburger { display: flex; }
  .links {
    display: none;
    position: absolute;
    top: 58px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px 0;
    z-index: 99;
  }
  .links.open { display: flex; }
  .links a {
    padding: 12px 24px;
    margin: 0;
    border-radius: 0;
    font-size: 0.95rem;
  }
  .theme-btn { font-size: 0.72rem; padding: 3px 8px; }
}

/* ── TEAM MEMBERS ────────────────────────────────────────── */
.team-member {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin: 28px 0;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.team-member:last-of-type { border-bottom: none; }
.team-photo-wrap { flex-shrink: 0; width: 90px; }
.team-photo {
  width: 90px; height: 90px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: block;
}
.team-text { flex: 1; min-width: 0; }
.team-text h3 { margin-top: 4px; }

@media (max-width: 480px) {
  .team-member { flex-direction: column; }
  .team-photo-wrap { width: 70px; }
  .team-photo { width: 70px; height: 70px; }
}
