/* ================================================================
   DANSA Lab — site.css  (v2 · Academic Research Design)
   Sections:
     1.  Tokens (dark default)
     2.  Light theme tokens
     3.  Light theme component overrides
     4.  Reset & Base
     5.  Layout
     6.  Skip link
     7.  Header & brand
     8.  Navigation
     9.  Hamburger
    10.  Theme toggle
    11.  Buttons
    12.  Hero section
    13.  Affiliations strip
    14.  Research focus cards
    15.  News section
    16.  Contact section
    17.  Team page
    18.  Bio / Profile page
    19.  Publications page
    20.  Footer
    21.  Back-to-top button
    22.  Utilities & accessibility
    23.  Responsive breakpoints
   ================================================================ */


/* ── 1. Tokens ───────────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg:           #07101f;
  --bg-elev:      #0c1729;
  --card:         #101e35;

  /* Brand */
  --brand:        #06b6d4;
  --brand-dark:   #0891b2;
  --brand-glow:   rgba(6, 182, 212, 0.16);
  --brand-50:     rgba(6, 182, 212, 0.08);

  /* Text */
  --text:         #e2eaf8;
  --muted:        #7a90b0;

  /* Structure */
  --line:         rgba(255, 255, 255, 0.06);
  --border:       rgba(255, 255, 255, 0.09);
  --shadow-sm:    0 1px 6px rgba(0, 0, 0, 0.30);
  --shadow:       0 4px 24px rgba(0, 0, 0, 0.42);
  --shadow-lg:    0 12px 48px rgba(0, 0, 0, 0.55);
  --radius:       10px;
  --radius-lg:    16px;
  --header-h:     68px;
  --ease:         0.22s ease;

  /* Header / nav */
  --header-bg:       rgba(7, 16, 31, 0.96);
  --nav-text:        #c8d8f0;
  --bar-bg:          #c8d8f0;
  --mobile-nav-bg:   rgba(7, 16, 31, 0.99);
  --surface:         rgba(255, 255, 255, 0.03);
  --surface-border:  rgba(255, 255, 255, 0.07);
  --input-bg:        #111e36;
  --input-border:    #1e3050;
  --input-text:      #e2eaf8;
  --footer-text:     #4a6080;
}




/* ── 2. Light theme tokens ───────────────────────────────────── */
html[data-theme="light"] {
  --bg:            #f7fafd;
  --bg-elev:       #edf2f8;
  --card:          #ffffff;
  --brand:         #0891b2;
  --brand-dark:    #0e7490;
  --brand-glow:    rgba(8, 145, 178, 0.15);
  --brand-50:      rgba(8, 145, 178, 0.08);
  --text:          #0f172a;
  --muted:         #475569;
  --line:          rgba(0, 0, 0, 0.07);
  --border:        rgba(0, 0, 0, 0.10);
  --shadow-sm:     0 1px 6px rgba(0, 0, 0, 0.06);
  --shadow:        0 4px 24px rgba(0, 0, 0, 0.09);
  --shadow-lg:     0 12px 48px rgba(0, 0, 0, 0.13);
  --header-bg:     rgba(255, 255, 255, 0.97);
  --nav-text:      #1e293b;
  --bar-bg:        #1e293b;
  --mobile-nav-bg: rgba(247, 250, 253, 0.99);
  --surface:       rgba(0, 0, 0, 0.025);
  --surface-border: rgba(0, 0, 0, 0.08);
  --input-bg:      #f8fafc;
  --input-border:  #cbd5e1;
  --input-text:    #0f172a;
  --footer-text:   #64748b;
}


/* ── 3. Light theme component overrides ─────────────────────── */
html[data-theme="light"] .brand-text       { text-shadow: none; }
html[data-theme="light"] .brand-text:hover { text-shadow: none; color: var(--brand); }

html[data-theme="light"] .featured-section {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.06);
}
html[data-theme="light"] .hero-overlay::after {
  background: linear-gradient(to bottom, transparent, var(--bg) 95%);
}

html[data-theme="light"] .news-item            { background: var(--card); border-color: var(--border); color: var(--text); }
html[data-theme="light"] .news-item:hover      { border-color: var(--brand); }

html[data-theme="light"] #contact > .container > p { color: var(--muted); }
html[data-theme="light"] .contact-form label        { color: var(--text); }
html[data-theme="light"] .contact-form input,
html[data-theme="light"] .contact-form textarea     { background: var(--input-bg); border-color: var(--input-border); color: var(--input-text); }

html[data-theme="light"] .member-card        { border-color: rgba(0,0,0,0.09); box-shadow: var(--shadow-sm); }
html[data-theme="light"] .member-card:hover  { box-shadow: var(--shadow); border-color: var(--brand); }
html[data-theme="light"] .member-name        { color: var(--text); }
html[data-theme="light"] .member-photo       { background-color: #dde5ef; }
html[data-theme="light"] .member-social a    { border-color: rgba(8,145,178,0.3); color: var(--brand); background: rgba(8,145,178,0.05); }
html[data-theme="light"] .member-social a:hover { background: rgba(8,145,178,0.12); color: var(--brand-dark); border-color: var(--brand); }

html[data-theme="light"] .section.bio-hero   { color: var(--text); }
html[data-theme="light"] .bio-photo          { background: #dde5ef; }
html[data-theme="light"] .bio-title          { color: var(--text); }
html[data-theme="light"] .bio-meta           { border-color: var(--line); background: rgba(0,0,0,0.02); }
html[data-theme="light"] .bio-meta li        { border-bottom-color: var(--line); }
html[data-theme="light"] .bio-text p         { color: var(--text); }

html[data-theme="light"] .pub-tab            { border-color: rgba(0,0,0,0.15); color: #475569; }
html[data-theme="light"] .pub-item           { border-color: var(--surface-border); background: var(--surface); }
html[data-theme="light"] .pub-item:hover     { background: var(--brand-50); border-color: rgba(8,145,178,0.25); }
html[data-theme="light"] .pub-pg             { border-color: rgba(0,0,0,0.13); color: #475569; }
html[data-theme="light"] .pub-loading,
html[data-theme="light"] .pub-empty          { border-color: rgba(0,0,0,0.10); }
html[data-theme="light"] .pub-controls select,
html[data-theme="light"] .pub-controls input[type="search"] { background: var(--input-bg); border-color: rgba(0,0,0,0.13); color: var(--text); }
html[data-theme="light"] .pub-spinner        { border-color: rgba(0,0,0,0.10); border-top-color: var(--brand); }
html[data-theme="light"] .pub-filter-bar     { background: var(--card); border-color: var(--border); }
html[data-theme="light"] .pub-filter-select  { background-color: var(--input-bg); border-color: var(--input-border); color: var(--input-text); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23475569' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); }
html[data-theme="light"] .pub-search-wrap input[type="search"] { background: var(--input-bg); border-color: var(--input-border); color: var(--input-text); }

html[data-theme="light"] .pill               { border-color: rgba(0,0,0,0.13); }
html[data-theme="light"] .social-links a     { border-color: rgba(0,0,0,0.10); }

html[data-theme="light"] .research-card      { border-color: rgba(0,0,0,0.09); }
html[data-theme="light"] .research-card:hover { border-color: var(--brand); box-shadow: var(--shadow); }

html[data-theme="light"] .controls select    { background: var(--input-bg); border-color: var(--input-border); color: var(--input-text); }


/* ── 4. Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

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

input, textarea, select, button { font: inherit; }

h1, h2, h3, h4, h5 {
  margin: 0 0 0.5rem;
  line-height: 1.2;
  font-weight: 700;
  color: var(--text);
}
h1 { font-size: clamp(1.8rem,  5vw,   2.8rem); }
h2 { font-size: clamp(1.4rem,  3.5vw, 2rem);   }
h3 { font-size: clamp(1rem,    2.5vw, 1.3rem);  }

p { margin: 0 0 0.9rem; }
small, .muted { color: var(--muted); font-size: 0.875rem; }


/* ── 5. Layout ───────────────────────────────────────────────── */
.container {
  width: min(1100px, 92vw);
  margin-inline: auto;
}

.section { padding: 5rem 1.5rem; }


/* ── 6. Skip link ────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px; top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: fixed;
  left: 16px; top: 16px;
  width: auto; height: auto;
  padding: 6px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--brand);
  border-radius: 6px;
  z-index: 9999;
  color: var(--text);
}


/* ── 7. Header & brand ───────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; width: 100%;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  z-index: 1000;
  height: var(--header-h);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  max-width: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none !important;
  flex-shrink: 0;
}

.brand-logo {
  height: 48px;
  width: auto;
  image-rendering: -webkit-optimize-contrast;
}

.brand-text {
  color: var(--nav-text);
  font-weight: 700;
  font-size: 0.93rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  line-height: 1.3;
  transition: color var(--ease);
}
.brand-text:hover { color: var(--brand); }
.brand-text::before,
.brand-text::after { content: none !important; }


/* ── 8. Navigation ───────────────────────────────────────────── */
.site-nav { display: flex; align-items: center; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-menu a {
  color: var(--nav-text);
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: color var(--ease), border-color var(--ease);
}
.nav-menu a:hover    { color: var(--brand); border-bottom-color: var(--brand); text-decoration: none; }
.nav-menu a.is-active { color: var(--brand); border-bottom-color: var(--brand); text-decoration: none; }

/* override is-active utility below for nav specifically */
.nav-menu a.is-active { color: var(--brand) !important; }


/* ── 9. Hamburger ────────────────────────────────────────────── */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 2001;
  flex-shrink: 0;
  margin-left: auto;
}
.menu-toggle .bar {
  height: 2.5px;
  width: 100%;
  background: var(--bar-bg);
  border-radius: 2px;
  transition: all 0.28s ease;
}
.menu-toggle.active .bar:nth-child(1) { transform: rotate(45deg)  translateY(7px); }
.menu-toggle.active .bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-toggle.active .bar:nth-child(3) { transform: rotate(-45deg) translateY(-7px); }


/* ── 10. Theme toggle ────────────────────────────────────────── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--nav-text);
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 0.75rem;
  transition: background var(--ease), border-color var(--ease), color var(--ease), transform 0.3s;
}
.theme-toggle:hover {
  background: var(--brand-50);
  border-color: var(--brand);
  color: var(--brand);
  transform: rotate(18deg) scale(1.06);
}
html[data-theme="light"] .theme-toggle       { border-color: rgba(0,0,0,0.15); }
html[data-theme="light"] .theme-toggle:hover { background: var(--brand-50); }


/* ── 11. Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius);
  text-decoration: none;
  background: var(--brand-dark);
  color: #fff;
  border: 1.5px solid transparent;
  cursor: pointer;
  line-height: 1.4;
  transition: background var(--ease), box-shadow var(--ease), transform var(--ease);
  white-space: nowrap;
}
.btn:hover {
  background: var(--brand);
  box-shadow: 0 4px 16px var(--brand-glow);
  transform: translateY(-1px);
  text-decoration: none;
  color: #fff;
}
.btn:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  border-color: var(--brand);
  color: var(--brand);
}
.btn-outline:hover {
  background: var(--brand-50);
  box-shadow: none;
  color: var(--brand);
}


/* ── 12. Hero section ────────────────────────────────────────── */
.section-hero {
  position: relative;
  width: 100%;
  min-height: clamp(480px, 62vh, 760px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-top: var(--header-h);
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 25%;
  z-index: 0;
  image-rendering: auto;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(7, 16, 31, 0.80) 0%,
    rgba(7, 16, 31, 0.58) 55%,
    rgba(7, 16, 31, 0.84) 100%
  );
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
}
.hero-overlay::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 110px;
  background: linear-gradient(to bottom, transparent, var(--bg) 95%);
  z-index: 2;
}

.hero-text {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 1100px;
  padding: 0 2rem;
}

.drop-cap span {
    color: #007bff;
    font-weight: bold;
 }

.hero-eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.28);
  border-radius: 999px;
  padding: 4px 14px;
  margin-bottom: 1.25rem;
}

.hero-text h1 {
  font-size: clamp(1.9rem, 4.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  color: #ffffff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
  margin-bottom: 1rem;
}

.hero-text p {
  font-size: clamp(0.95rem, 1.5vw, 1.12rem);
  color: rgba(226, 234, 248, 0.82);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}


/* ── 13. Affiliations strip ──────────────────────────────────── */
.featured-section {
  background: #111e33;
  padding: 1.75rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

.featured-label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(200, 216, 240, 0.38);
  margin-bottom: 1.25rem;
}

.featured-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  gap: clamp(1.5rem, 4vw, 5rem);
  padding: 0 clamp(1.5rem, 5vw, 5rem);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.featured-logos::-webkit-scrollbar { display: none; }

.featured-logo {
  flex: 0 0 auto;
  height: clamp(36px, 4.5vw, 66px);
  width: auto;
  object-fit: contain;
  opacity: 0.68;
  transition: opacity var(--ease), transform var(--ease);
  image-rendering: -webkit-optimize-contrast;
}
.featured-logo:hover { opacity: 1; transform: scale(1.06); }

.featured-link { display: inline-block; line-height: 0; text-decoration: none; }


/* ── 14. Research focus cards ────────────────────────────────── */
.research-section { background: var(--bg-elev); }

.section-header {
  text-align: center;
  margin-bottom: 2.75rem;
}

.eyebrow {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0;
}
.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--brand);
  border-radius: 2px;
  margin: 0.65rem auto 0;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.research-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}
.research-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand);
  box-shadow: var(--shadow);
}

.research-icon {
  width: 46px;
  height: 46px;
  background: var(--brand-50);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--brand);
  margin-bottom: 1rem;
}

.research-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.45rem;
}

.research-card p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}


/* ── 15. News section ────────────────────────────────────────── */
#news { background: var(--bg); }

#news h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 800;
  color: var(--text);
  text-align: center;
  margin-bottom: 0.4rem;
}
#news h2::after {
  content: '';
  display: block;
  width: 40px; height: 3px;
  background: var(--brand);
  border-radius: 2px;
  margin: 0.6rem auto 2rem;
}

.news-list {
  list-style: none;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.news-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.35rem;
  color: var(--text);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.news-item:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
}

.news-item time {
  color: var(--brand);
  font-weight: 600;
  font-size: 0.8rem;
  margin-right: 0.4rem;
}

.news-placeholder-item {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  padding: 2rem 1rem;
  border-style: dashed;
  background: transparent;
}

.news-footer {
  text-align: center;
  margin-top: 1.75rem;
}

/* News item with left thumbnail */
.news-item-inner {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}
.news-thumb {
  width: 72px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: opacity var(--ease);
}
.news-thumb:hover { opacity: 0.85; }
.news-item-body { flex: 1; min-width: 0; }
.news-item-title { font-weight: 700; margin-bottom: 0.25rem; cursor: pointer; }
.news-item-title:hover { color: var(--brand); }

/* News photo modal */
.news-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.78);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.news-modal-overlay.open { display: flex; }
.news-modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 1.75rem;
}
.news-modal-close {
  position: absolute;
  top: 0.9rem; right: 0.9rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 32px; height: 32px;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: border-color var(--ease), color var(--ease);
}
.news-modal-close:hover { border-color: var(--brand); color: var(--brand); }
.news-modal-photo {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
}
.news-modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6rem;
}
.news-modal-body { color: var(--text); line-height: 1.7; }
.news-modal-meta { font-size: 0.8rem; color: var(--muted); margin-top: 0.75rem; }


/* ── 16. Contact section ─────────────────────────────────────── */
#contact { background: var(--bg-elev); }
#team { background: var(--bg-elev); }

#contact h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 800;
  color: var(--text);
  text-align: center;
  margin-bottom: 0.4rem;
}
#contact h2::after {
  content: '';
  display: block;
  width: 40px; height: 3px;
  background: var(--brand);
  border-radius: 2px;
  margin: 0.6rem auto 0;
}

#contact > .container > p {
  text-align: center;
  color: var(--muted);
  margin-top: 1rem;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.contact-form {
  max-width: 580px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form label {
  font-weight: 600;
  font-size: 0.84rem;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  letter-spacing: 0.01em;
}

.contact-form input,
.contact-form textarea {
  padding: 0.7rem 0.9rem;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius);
  color: var(--input-text);
  font-size: 0.9rem;
  width: 100%;
  resize: vertical;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.contact-form .submit-btn { align-self: flex-start; }

.form-status {
  font-size: 0.88rem;
  font-weight: 600;
  margin-top: 0.25rem;
  min-height: 1.2em;
}


/* ── 17. Team page ───────────────────────────────────────────── */
.people-page { padding-top: var(--header-h); }
#people       { position: relative; }

#people h2.people-title {
  text-align: center;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.4rem;
  padding-top: 2.5rem;
}
#people h2.people-title::after {
  content: "";
  display: block;
  width: 40px; height: 3px;
  margin: 0.65rem auto 2rem;
  background: var(--brand);
  border-radius: 2px;
}

#people h3.category-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  margin: 2.5rem 0 0.8rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

/* Member grid */
.member-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

/* Member card — clean elevation, no neon */
.member-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.25rem 1.5rem;
  text-align: center;
  flex: 1 1 280px;
  max-width: 320px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
  position: relative;
  overflow: hidden;
}
.member-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--brand);
}

/* Photo circle */
.member-photo {
  width: 148px;
  height: 148px;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-elev);
  border: 2.5px solid var(--border);
  transition: border-color var(--ease);
}
.member-card:hover .member-photo { border-color: var(--brand); }

/* Member body */
.member-body { position: relative; z-index: 5; }

.member-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 3px;
}
.member-role {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--brand);
}

/* Social icons */
.member-social {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.85rem;
  flex-wrap: wrap;
}
.member-social a {
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  font-size: 0.95rem;
  transition: all var(--ease);
  position: relative;
  z-index: 10;
  text-decoration: none;
}
.member-social a:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-50);
  text-decoration: none;
  transform: scale(1.08);
}

/* Stretched link */
.stretched-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  text-decoration: none !important;
  border: none !important;
  color: inherit !important;
}

/* Homepage team strip — horizontal scroll, same recipe as .featured-logos */
.home-team-container {
  max-width: 1420px;
  margin-inline: auto;
}

.home-team-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.home-team-scroll {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.home-team-scroll::-webkit-scrollbar { display: none; }

.home-team-row {
  display: flex;
  list-style: none;
  padding: 0.25rem 0.25rem 1rem;
  margin: 0;
  gap: 1.25rem;
}
.home-team-row .member-card { flex: 0 0 200px; max-width: 200px; }

/* Prev/next arrows — mirrors .theme-toggle's circular icon-button look */
.home-team-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background var(--ease), border-color var(--ease), color var(--ease), transform var(--ease), opacity var(--ease);
}
.home-team-arrow:hover:not(:disabled) {
  background: var(--brand-50);
  border-color: var(--brand);
  color: var(--brand);
  transform: scale(1.06);
}
.home-team-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

@media (max-width: 640px) {
  .home-team-arrow { width: 36px; height: 36px; font-size: 0.85rem; }
}

/* Sub-category heading (e.g. Ph.D. Student / Ph.D. Candidate) */
.subcategory-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 1.4rem 0 0.5rem;
  opacity: 0.75;
}

/* Size hierarchy by category */
.professors .member-card { flex: 1 1 340px; max-width: 360px; }
.professors .member-photo { width: 172px; height: 172px; }
.phd        .member-card { flex: 1 1 280px; max-width: 320px; }
.msc        .member-card { flex: 1 1 280px; max-width: 320px; }
.undergrad  .member-card { flex: 1 1 280px; max-width: 320px; }
.external   .member-card { flex: 1 1 280px; max-width: 320px; }


/* ── 18. Bio / Profile page ──────────────────────────────────── */
.section.bio-hero {
  padding-top: calc(var(--header-h) + 64px) !important;
  padding-bottom: 0rem;
  background: var(--bg);
  color: var(--text);
}

.container.bio-wrap {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 3.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  align-items: flex-start;
}

.bio-photo {
  width: 270px;
  height: 270px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--brand);
  box-shadow: var(--shadow);
  background: var(--card);
  margin: 0 auto;
  flex-shrink: 0;
  transition: box-shadow var(--ease);
}
.bio-photo:hover { box-shadow: var(--shadow-lg); }

.bio-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  image-rendering: auto;
}

.bio-title {
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.bio-role {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 1.4rem;
}

.bio-meta {
  list-style: none;
  margin: 0 0 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.bio-meta li {
  padding: 10px 15px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--muted);
}
.bio-meta li:last-child { border-bottom: none; }
.bio-meta strong { color: var(--brand); margin-right: 5px; font-weight: 600; }
.bio-meta a { color: var(--brand); }
.bio-meta a:hover { text-decoration: underline; }

.bio-text p {
  margin-bottom: 1.3rem;
  line-height: 1.75;
  color: var(--text);
  opacity: 0.9;
}
.bio-text a { color: var(--brand); }
.bio-text a:hover { text-decoration: underline; }

.bio-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}


/* ── 19. Publications ────────────────────────────────────────── */
.pub-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem;
}

.pub-tabs {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.pub-tab {
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.84rem;
  cursor: pointer;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}
.pub-tab:hover  { border-color: var(--brand); color: var(--brand); }
.pub-tab.active { background: var(--brand); border-color: var(--brand); color: #0a1020; font-weight: 700; }

.pub-controls select,
.pub-controls input[type="search"] {
  background: var(--bg-elev);
  color: var(--text);
  border: 1.5px solid var(--border);
  padding: 6px 10px;
  border-radius: var(--radius);
  font-size: 0.84rem;
  transition: border-color var(--ease);
}
.pub-controls select:focus,
.pub-controls input[type="search"]:focus { border-color: var(--brand); outline: none; }
.pub-controls input[type="search"] { min-width: 210px; }

.pub-stats {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  min-height: 1.2em;
}

.pub-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.pub-item {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 0.9rem;
  color: var(--muted);
  transition: border-color var(--ease), background var(--ease);
}
.pub-item:hover { border-color: rgba(6,182,212,0.3); background: var(--brand-50); }

.pub-meta-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 5px;
}

.pub-title {
  display: block;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 4px;
}

.pub-authors-row {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
}

.pub-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.pub-badge--dblp    { background: rgba(6,182,212,0.15);  color: #22d3ee; }
.pub-badge--s2      { background: rgba(74,222,128,0.15); color: #4ade80; }
.pub-badge--lab     { background: rgba(139,92,246,0.15); color: #a78bfa; }
.pub-badge--journal { background: rgba(6,182,212,0.13);  color: #22d3ee; }
.pub-badge--conf    { background: rgba(99,102,241,0.13); color: #818cf8; }
.pub-badge--book    { background: rgba(245,158,11,0.13); color: #fbbf24; }
.pub-badge--thesis  { background: rgba(236,72,153,0.13); color: #f472b6; }
.pub-badge--other   { background: rgba(107,114,128,0.12);color: #9ca3af; }

.pub-year  { font-size: 0.8rem; font-weight: 600; color: var(--text); }
.pub-venue { font-size: 0.8rem; color: var(--muted); font-style: italic; flex: 1 1 auto; }
.pub-link  { font-size: 0.78rem; color: var(--brand); text-decoration: none; white-space: nowrap; margin-left: auto; }
.pub-link:hover { text-decoration: underline; }

/* Homepage publication stats — colors match .pub-badge--* exactly */
.pub-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.25rem;
}
.pub-stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.pub-stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.pub-stat-icon {
  width: 52px; height: 52px; margin: 0 auto 0.9rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 1.2rem;
}
.pub-stat-num   { font-size: 2.1rem; font-weight: 800; line-height: 1.1; }
.pub-stat-label { font-size: 0.82rem; font-weight: 600; color: var(--muted); margin-top: 0.35rem; }

.pub-stat-card--journal .pub-stat-icon { background: rgba(6,182,212,0.13);  color: #22d3ee; }
.pub-stat-card--journal .pub-stat-num  { color: #22d3ee; }
.pub-stat-card--journal:hover          { border-color: #22d3ee; }

.pub-stat-card--conf .pub-stat-icon { background: rgba(99,102,241,0.13); color: #818cf8; }
.pub-stat-card--conf .pub-stat-num  { color: #818cf8; }
.pub-stat-card--conf:hover          { border-color: #818cf8; }

.pub-stat-card--book .pub-stat-icon { background: rgba(245,158,11,0.13); color: #fbbf24; }
.pub-stat-card--book .pub-stat-num  { color: #fbbf24; }
.pub-stat-card--book:hover          { border-color: #fbbf24; }

.pub-stat-card--thesis .pub-stat-icon { background: rgba(236,72,153,0.13); color: #f472b6; }
.pub-stat-card--thesis .pub-stat-num  { color: #f472b6; }
.pub-stat-card--thesis:hover          { border-color: #f472b6; }

.pub-stat-card--other .pub-stat-icon { background: rgba(107,114,128,0.12); color: #9ca3af; }
.pub-stat-card--other .pub-stat-num  { color: #9ca3af; }
.pub-stat-card--other:hover          { border-color: #9ca3af; }

.pub-stats-footer { text-align: center; margin-top: 1.75rem; }

/* Pagination */
.pub-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding-bottom: 1rem;
}
.pub-pg {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}
.pub-pg:hover     { border-color: var(--brand); color: var(--brand); }
.pub-pg.active    { background: var(--brand); border-color: var(--brand); color: #0a1020; font-weight: 700; }
.pub-pg-ellipsis  { min-width: 26px; text-align: center; color: var(--muted); font-size: 0.82rem; line-height: 34px; }

.pub-loading, .pub-empty {
  padding: 30px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

@keyframes pub-spin { to { transform: rotate(360deg); } }
.pub-spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: pub-spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}


/* ── Publication filter bar ─────────────────────────────────── */
.pub-filter-bar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
}
.pub-filter-row {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  align-items: center;
}
.pub-search-wrap {
  position: relative;
  flex: 1 1 240px;
}
.pub-search-wrap i {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.8rem;
  pointer-events: none;
}
.pub-search-wrap input[type="search"] {
  width: 100%;
  padding: 0.58rem 0.9rem 0.58rem 2.1rem;
  background: var(--bg-elev);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--input-text, var(--text));
  font-size: 0.87rem;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.pub-search-wrap input[type="search"]:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 3px var(--brand-glow);
}
.pub-search-wrap input[type="search"]::-webkit-search-cancel-button { opacity: 0.5; cursor: pointer; }
.pub-filter-select {
  padding: 0.58rem 2.1rem 0.58rem 0.85rem;
  background: var(--bg-elev);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--input-text, var(--text));
  font-size: 0.85rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237a90b0' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-color: var(--bg-elev);
  transition: border-color var(--ease);
  min-width: 130px;
  max-width: 200px;
}
.pub-filter-select:focus { border-color: var(--brand); outline: none; }
.pub-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.56rem 0.9rem;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color var(--ease), color var(--ease);
  white-space: nowrap;
}
.pub-reset-btn:hover { border-color: var(--brand); color: var(--brand); }

/* ── Publication stats bar ───────────────────────────────────── */
.pub-stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  min-height: 1.6rem;
}
.pub-stats-bar p { font-size: 0.82rem; color: var(--muted); }
.pub-stats-badges { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.pub-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* ── Publication item title ──────────────────────────────────── */
.pub-title-link {
  display: block;
  color: var(--text);
  font-size: 0.93rem;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 4px;
  transition: color var(--ease);
  text-decoration: none;
}
.pub-title-link:hover { color: var(--brand); }
.pub-title-plain {
  display: block;
  color: var(--text);
  font-size: 0.93rem;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 4px;
}
.pub-detail-row {
  font-size: 0.77rem;
  color: var(--muted);
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.pub-detail-sep { opacity: 0.4; }

@media (max-width: 680px) {
  .pub-filter-select { flex: 1 1 110px; min-width: 0; max-width: none; }
  .pub-filter-row    { gap: 0.5rem; }
}
@media (max-width: 480px) {
  .pub-filter-bar  { padding: 0.85rem 1rem; }
  .pub-stats-bar   { flex-direction: column; align-items: flex-start; }
}

/* ── 20. Footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  color: var(--footer-text);
  margin-top: 0.35rem;
  font-size: 0.85rem;
}
.footer-meta a { color: var(--brand); }
.footer-meta a:hover { text-decoration: underline; }

.social-links {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.social-links a {
  color: var(--muted);
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
  transition: color var(--ease), border-color var(--ease);
}
.social-links a:hover { color: var(--brand); border-color: var(--brand); text-decoration: none; }


/* ── 21. Back-to-top button ──────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 900;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--header-bg);
  color: var(--nav-text);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity var(--ease), transform var(--ease), border-color var(--ease), background var(--ease), color var(--ease);
}
.back-to-top.visible  { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover    { border-color: var(--brand); background: var(--brand); color: #fff; transform: translateY(-2px); }
html[data-theme="light"] .back-to-top { border-color: rgba(0,0,0,0.12); box-shadow: var(--shadow-sm); }


/* ── 22. Utilities & accessibility ───────────────────────────── */
.lead   { font-size: 1.05rem; color: var(--muted); }
.muted  { color: var(--muted); }
.is-active { color: var(--brand) !important; }
.typed  { border-right: 2px solid currentColor; padding-right: 2px; }

.pill {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
}

#page-info { padding: 0.75rem 1.5rem; }

.not-found {
  text-align: center;
  padding: calc(var(--header-h) + 4rem) 2rem 4rem;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* News filter page */
.controls {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.controls select {
  padding: 7px 10px;
  border-radius: var(--radius);
  background: var(--input-bg);
  color: var(--input-text);
  border: 1.5px solid var(--input-border);
  font-size: 0.88rem;
  transition: border-color var(--ease);
}
.controls select:focus { border-color: var(--brand); outline: none; }

.pager {
  display: flex;
  gap: 8px;
  margin-top: 1.25rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}


/* ── 23. Responsive breakpoints ──────────────────────────────── */

/* Mobile nav ≤ 900px */
@media (max-width: 900px) {
  .menu-toggle { display: flex; }

  .brand-text {
    white-space: normal;
    font-size: 0.76rem;
    max-width: 155px;
    line-height: 1.28;
  }
  .brand-logo { height: 40px; }
  .brand      { gap: 0.5rem; }

  .nav-menu {
    position: fixed;
    top: 0; right: -100%;
    height: 100dvh; width: 68%;
    max-width: 280px;
    background: var(--mobile-nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
    transition: right 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1500;
    box-shadow: -4px 0 28px rgba(0, 0, 0, 0.45);
  }
  .nav-menu.active { right: 0; }
  .nav-menu li     { margin: 1.2rem 0; }
  .nav-menu a {
    font-size: 1.1rem;
    border-bottom: none !important;
  }
}

/* Tablet ≤ 1024px */
@media (max-width: 1024px) {
  .brand-logo { height: 44px; }
  .nav-menu   { gap: 1.5rem; }
}

/* Hero */
@media (max-width: 768px) {
  .section-hero { min-height: clamp(400px, 58vh, 600px); }
  .hero-text h1 { font-size: clamp(1.65rem, 6vw, 2.2rem); }
  .hero-text p  { font-size: 0.92rem; }
}
@media (max-width: 480px) {
  .section-hero { min-height: clamp(360px, 54vh, 520px); }
  .hero-text h1 { font-size: 1.5rem; }
  .hero-ctas    { gap: 0.75rem; }
  .btn          { padding: 0.6rem 1.2rem; font-size: 0.86rem; }
}

/* Affiliations */
@media (max-width: 768px) {
  .featured-logo  { height: clamp(26px, 6vw, 48px); }
  .featured-logos { gap: clamp(1rem, 4vw, 2.5rem); padding: 0 1.5rem; }
}
@media (max-width: 420px) {
  .featured-logos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-items: center;
    gap: 1.25rem 2rem;
  }
  .featured-logo { height: 42px; }
}

/* Research grid */
@media (max-width: 600px) {
  .research-grid { grid-template-columns: 1fr 1fr; gap: 0.85rem; }
  .research-card { padding: 1.25rem 1rem; }
}
@media (max-width: 380px) {
  .research-grid { grid-template-columns: 1fr; }
}

/* Section padding */
@media (max-width: 768px) {
  .section { padding: 3.5rem 1rem; }
}

/* Team cards */
@media (max-width: 1100px) {
  .professors .member-card { flex: 1 1 44%; }
}
@media (max-width: 800px) {
  .member-card { flex: 1 1 44%; }
}
@media (max-width: 560px) {
  .member-card { flex: 1 1 90%; max-width: none; }
  .member-photo { width: 120px; height: 120px; }
  .professors .member-photo { width: 144px; height: 144px; }
}

/* Bio / profile */
@media (max-width: 960px) {
  .container.bio-wrap {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 1.5rem;
  }
  .bio-photo   { width: 210px; height: 210px; margin: 0 auto 0.5rem; }
  .bio-title, .bio-role { text-align: center; }
  .bio-actions { justify-content: center; }
}
@media (max-width: 480px) {
  .bio-photo { width: 175px; height: 175px; }
  .bio-title { font-size: 1.5rem; }
}

/* Contact */
@media (max-width: 600px) {
  .contact-form .submit-btn { width: 100%; justify-content: center; }
}

/* Footer */
@media (max-width: 600px) {
  .footer-inner { flex-direction: column; text-align: center; }
  .social-links { justify-content: center; }
}

/* Back-to-top */
@media (max-width: 600px) {
  .back-to-top { bottom: 1.25rem; right: 1.25rem; width: 38px; height: 38px; }
}

/* Ultra-wide */
@media (min-width: 2000px) {
  .header-inner { padding: 0 6vw; }
  .section      { padding: 6rem 2rem; }
}

/* HiDPI */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .bio-photo img, .hero-image { image-rendering: auto; }
  .brand-logo, .featured-logo { image-rendering: -webkit-optimize-contrast; }
  .member-photo { background-size: cover; image-rendering: -webkit-optimize-contrast; }
}
