/* =========================================================================
   2D & Strongly Correlated Materials Lab — design system
   Modern minimal · deep blue + neutrals
   ========================================================================= */

/* ---------- Tokens ---------- */
:root {
  --bg: #ffffff;
  --surface: #f8fafc;
  --surface-2: #f1f5f9;
  --border: #e5e7eb;
  --border-strong: #cbd5e1;

  --text: #0b1626;
  --text-muted: #475569;
  --text-faint: #94a3b8;

  --primary: #0b2545;         /* deep navy */
  --primary-hover: #13315c;
  --accent: #1e6091;          /* mid blue accent */
  --accent-soft: #eaf2f8;
  --accent-soft-2: #dbeafe;
  --highlight: #fbbf24;       /* used very sparingly */

  --max-w: 1180px;
  --max-w-prose: 760px;

  --radius: 6px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(11, 37, 69, 0.04);
  --shadow-md: 0 4px 14px rgba(11, 37, 69, 0.06);
  --shadow-lg: 0 12px 40px rgba(11, 37, 69, 0.08);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-serif: "Source Serif Pro", "Iowan Old Style", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --duration: 180ms;
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--duration) var(--ease); }
a:hover { color: var(--primary-hover); }
button { font: inherit; cursor: pointer; }
ul, ol { padding-left: 1.25rem; }

/* ---------- Layout primitives ---------- */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.prose { max-width: var(--max-w-prose); }
.section { padding: 5rem 0; }
.section--tight { padding: 3.5rem 0; }
.section--surface { background: var(--surface); }
.section--dark { background: var(--primary); color: #e2e8f0; }
.section--dark a { color: #93c5fd; }
.divider { border: 0; border-top: 1px solid var(--border); margin: 3rem 0; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-sans);
  color: var(--primary);
  letter-spacing: -0.02em;
  line-height: 1.18;
  margin: 0 0 0.6em;
  font-weight: 650;
}
h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 2.5vw, 2.1rem); }
h3 { font-size: 1.2rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; color: var(--text); }
p { margin: 0 0 1em; color: var(--text); }
.lead { font-size: 1.18rem; line-height: 1.55; color: var(--text-muted); }
.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
}
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
small { color: var(--text-muted); font-size: 0.875rem; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 70px;
}
.brand { display: flex; align-items: center; gap: 0.75rem; color: var(--primary); }
.brand:hover { color: var(--primary); }
.brand__logo { width: 38px; height: 38px; object-fit: contain; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__title { font-weight: 700; font-size: 0.98rem; letter-spacing: -0.01em; }
.brand__subtitle { font-size: 0.72rem; color: var(--text-muted); letter-spacing: 0.02em; }

.nav { display: flex; gap: 0.25rem; align-items: center; }
.nav a {
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
}
.nav a:hover { background: var(--surface); color: var(--primary); }
.nav a.active { color: var(--primary); background: var(--accent-soft); }
.nav__cta {
  margin-left: 0.75rem;
  padding: 0.5rem 1rem;
  background: var(--primary); color: #fff !important;
  border-radius: 999px; font-size: 0.88rem;
}
.nav__cta:hover { background: var(--primary-hover); color: #fff !important; }

.nav-toggle {
  display: none; background: transparent; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.4rem 0.6rem;
  color: var(--text);
}
@media (max-width: 880px) {
  .nav { display: none; position: absolute; top: 70px; left: 0; right: 0;
    background: #fff; flex-direction: column; padding: 1rem 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border); gap: 0.25rem; }
  .nav.open { display: flex; }
  .nav a { width: 100%; padding: 0.7rem 0.85rem; }
  .nav__cta { margin: 0.5rem 0 0; align-self: flex-start; }
  .nav-toggle { display: inline-flex; }
}

/* ---------- Hero ---------- */
.hero { padding: 6rem 0 5rem; position: relative; overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 4rem; align-items: center; }
.hero h1 span.accent { color: var(--accent); }
.hero__visual {
  position: relative;
  aspect-ratio: 4 / 3.5;
  border-radius: var(--radius-lg);
  background-image: url("../img/hero.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #0b2545;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.hero__cta { display: flex; gap: 0.85rem; flex-wrap: wrap; margin-top: 2rem; }
@media (max-width: 880px) {
  .hero { padding: 3rem 0 2rem; }
  .hero__inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero__visual { order: -1; aspect-ratio: 16 / 10; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform var(--duration) var(--ease), background var(--duration) var(--ease), color var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-hover); color: #fff; }
.btn--ghost { background: transparent; color: var(--primary); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--surface); color: var(--primary); border-color: var(--primary); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 1.25rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  transition: transform var(--duration) var(--ease), border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent);
  font-weight: 700; font-size: 0.95rem; margin-bottom: 1rem;
}

/* ---------- Page header ---------- */
.page-header { padding: 5rem 0 3rem; border-bottom: 1px solid var(--border); }
.page-header h1 { margin-bottom: 0.5rem; }
.page-header .lead { max-width: 720px; margin-bottom: 0; }

/* ---------- People ---------- */
.person {
  display: flex; gap: 1rem; align-items: flex-start;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.person:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.person__avatar {
  flex: 0 0 140px; width: 140px; height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 2.2rem; letter-spacing: 0.02em;
  overflow: hidden;
}
img.person__avatar,
.person__avatar img {
  object-fit: cover;
  width: 140px; height: 140px;
  display: block;
}
.person__photo {
  display: block;
  width: 140px; height: 140px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 140px;
  background: var(--surface);
  border: 1px solid var(--border);
}
@media (max-width: 640px) {
  .person__avatar,
  img.person__avatar,
  .person__avatar img,
  .person__photo {
    width: 96px; height: 96px; flex-basis: 96px;
  }
}
.person__name { font-weight: 600; color: var(--primary); margin: 0 0 0.15rem; font-size: 1.02rem; }
.person__role { color: var(--accent); font-size: 0.84rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 0.45rem; }
.person__bio { font-size: 0.92rem; color: var(--text-muted); margin: 0; }

.alumni-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.alumni-table th, .alumni-table td { padding: 0.75rem 0.85rem; text-align: left; vertical-align: top; }
.alumni-table thead th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); border-bottom: 1px solid var(--border-strong); font-weight: 600; }
.alumni-table tbody tr { border-bottom: 1px solid var(--border); }
.alumni-table tbody tr:hover { background: var(--surface); }
.alumni-table td:first-child { font-weight: 600; color: var(--primary); }

/* ---------- Logo strip (affiliations / supporters) ---------- */
.logo-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2.5rem 3rem;
  padding: 1.25rem 0;
}
.logo-strip__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.logo-strip__item img {
  display: block;
  max-height: 64px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.78;
  transition: filter 0.2s ease, opacity 0.2s ease;
}
.logo-strip__item:hover img,
.logo-strip__item:focus img {
  filter: none;
  opacity: 1;
}
.logo-strip--lg .logo-strip__item img { max-height: 80px; max-width: 220px; }
@media (max-width: 640px) {
  .logo-strip { gap: 1.5rem 2rem; }
  .logo-strip__item img { max-height: 48px; max-width: 130px; }
}

/* ---------- Publications ---------- */
.pub-controls {
  display: flex; gap: 0.75rem; flex-wrap: wrap;
  padding: 1rem; margin: 1.5rem 0 2rem;
  background: var(--surface); border-radius: var(--radius-lg);
}
.pub-search {
  flex: 1; min-width: 220px;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong); background: #fff;
  font: inherit; color: var(--text);
}
.pub-search:focus { outline: 2px solid var(--accent-soft-2); border-color: var(--accent); }
.pub-filter {
  display: inline-flex; gap: 0.25rem;
  background: #fff; border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 3px;
}
.pub-filter button {
  padding: 0.4rem 0.85rem;
  background: transparent; border: 0; border-radius: 4px;
  color: var(--text-muted); font-weight: 500; font-size: 0.88rem;
}
.pub-filter button.is-active { background: var(--primary); color: #fff; }

.year-block { margin-bottom: 2.5rem; }
.year-block h2 {
  display: flex; align-items: baseline; gap: 0.75rem;
  font-size: 1.3rem; padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}
.year-block h2 .count { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; letter-spacing: 0; }

.pub {
  padding: 1rem 1.2rem; border-left: 3px solid transparent;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 0.6rem;
  transition: background var(--duration) var(--ease), border-left-color var(--duration) var(--ease);
}
.pub:hover { background: var(--surface); border-left-color: var(--accent); }
.pub__title { color: var(--primary); font-weight: 600; margin: 0 0 0.25rem; line-height: 1.4; }
.pub__authors { color: var(--text); font-size: 0.93rem; margin: 0 0 0.2rem; }
.pub__authors strong { color: var(--accent); font-weight: 600; }
.pub__venue { color: var(--text-muted); font-size: 0.88rem; font-style: italic; margin: 0; }
.pub__tags { display: inline-flex; gap: 0.4rem; margin-left: 0.5rem; vertical-align: middle; }
.tag {
  display: inline-block;
  font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 2px 7px; border-radius: 4px;
  background: var(--accent-soft); color: var(--accent);
}
.tag--thesis { background: #fef3c7; color: #92400e; }
.tag--proceedings { background: #f3e8ff; color: #6b21a8; }
.tag--book { background: #dcfce7; color: #166534; }
.tag--preprint { background: #e0e7ff; color: #3730a3; }

/* ---------- News ---------- */
.news-list { display: flex; flex-direction: column; gap: 0; }
.news-item {
  display: grid; grid-template-columns: 140px 1fr; gap: 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.news-item:last-child { border-bottom: 0; }
.news-item__date {
  color: var(--text-muted); font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.04em;
}
.news-item__body h3 { font-size: 1.05rem; margin: 0 0 0.25rem; color: var(--primary); }
.news-item__body p { margin: 0; color: var(--text-muted); }
@media (max-width: 640px) {
  .news-item { grid-template-columns: 1fr; gap: 0.25rem; }
}

/* ---------- Tables / definitions ---------- */
.def-list {
  display: grid; grid-template-columns: 200px 1fr; gap: 0.6rem 1.25rem;
}
.def-list dt { font-weight: 600; color: var(--primary); }
.def-list dd { margin: 0; color: var(--text-muted); }
@media (max-width: 640px) { .def-list { grid-template-columns: 1fr; } .def-list dd { margin-bottom: 0.5rem; } }

/* ---------- Funding / award table ---------- */
.fund-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.fund-table th, .fund-table td { padding: 0.7rem 0.8rem; text-align: left; vertical-align: top; }
.fund-table thead th { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); border-bottom: 1px solid var(--border-strong); font-weight: 600; }
.fund-table tbody tr { border-bottom: 1px solid var(--border); }
.fund-table tbody tr:hover { background: var(--surface); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--primary);
  color: #cbd5e1;
  padding: 4rem 0 2rem;
  margin-top: 5rem;
}
.site-footer a { color: #93c5fd; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 3rem; }
.footer-grid h4 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 1rem; font-weight: 600; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 0.5rem; font-size: 0.93rem; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem; color: #94a3b8;
}
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Misc ---------- */
.tag-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.kv { display: flex; align-items: baseline; gap: 0.5rem; }
.kv .key { color: var(--text-muted); font-size: 0.85rem; min-width: 90px; }
.callout {
  background: var(--accent-soft); border-left: 3px solid var(--accent);
  padding: 1.25rem 1.5rem; border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}
.callout p:last-child { margin-bottom: 0; }
.icon-row { display: inline-flex; gap: 0.5rem; align-items: center; }
.section-header { display: flex; align-items: end; justify-content: space-between; margin-bottom: 2rem; gap: 1rem; flex-wrap: wrap; }
.section-header h2 { margin: 0; }

/* ---------- Capabilities list ---------- */
.cap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 880px) { .cap-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cap-grid { grid-template-columns: 1fr; } }
.cap {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
}
.cap h4 { color: var(--primary); margin-bottom: 0.4rem; }
.cap p { margin: 0; color: var(--text-muted); font-size: 0.92rem; }
.cap__icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 0.85rem;
}

/* ---------- Stats strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { text-align: left; padding: 1.25rem; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; }
.stat__num { font-size: 2rem; font-weight: 700; color: var(--primary); line-height: 1; letter-spacing: -0.02em; }
.stat__label { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.4rem; text-transform: uppercase; letter-spacing: 0.08em; }

/* ---------- Page links / pills ---------- */
.pill-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.85rem; border-radius: 999px;
  background: var(--surface); color: var(--primary);
  font-size: 0.85rem; font-weight: 500; border: 1px solid var(--border);
}
.pill-link:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-soft-2); }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-4 { margin-bottom: 2rem; }
.flex { display: flex; } .gap-2 { gap: 0.5rem; } .gap-4 { gap: 1rem; } .wrap { flex-wrap: wrap; }
.hidden { display: none; }

/* Print */
@media print {
  .site-header, .site-footer, .pub-controls { display: none; }
  body { color: #000; }
  a { color: #000; text-decoration: underline; }
}
