/* ============================================================
   ASHISH KUMAR — Professor Website
   Theme: Aurora Glow  |  Light · Modern · 2025-26
   ============================================================ */

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth; font-size: 16px;
  /* Firefox custom scrollbar */
  scrollbar-width: thin;
  scrollbar-color: #a78bfa #fafaf9;

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

/* ---- AURORA GLOW PALETTE ---- */
:root {
  /* Backgrounds */
  --bg:          #fafaf9;        /* warm pearl white */
  --bg2:         #f5f3ff;        /* soft violet tint */
  --bg3:         #ede9fe;        /* light lavender */
  --bg-glass:    rgba(255,255,255,0.75);

  /* Brand colours */
  --violet:      #7c3aed;
  --violet-mid:  #6d28d9;
  --violet-light:#a78bfa;
  --violet-dim:  rgba(124,58,237,0.08);
  --violet-glow: rgba(124,58,237,0.18);

  --sky:         #0ea5e9;        /* decorative only: gradients, dots, rules */
  --sky-ink:     #096f9d;        /* same hue, AA on white / bg / bg2 / bg3 / tints */
  --sky-light:   #38bdf8;
  --sky-dim:     rgba(14,165,233,0.08);

  --amber:       #d97706;        /* decorative only: gradients, dots, rules */
  --amber-ink:   #9d5604;        /* same hue, AA on white / bg / bg2 / bg3 / tints */
  --amber-light: #f59e0b;
  --amber-dim:   rgba(217,119,6,0.08);

  /* Text */
  --text:        #1c1917;        /* near black, warm */
  --text2:       #3d3836;        /* medium warm grey — WCAG AA */
  --text3:       #6e6763;        /* muted warm grey — WCAG AA */

  /* Aliases (for compatibility across pages) */
  --card:        #ffffff;        /* card background — white */
  --teal:        #0ea5e9;
  --green-ink:   #157f3a;        /* status: active / open */
  --pink-ink:    #b0316f;
  --red-ink:     #b91c1c;        /* status: closed */        /* alias for --sky */

  /* Borders */
  --border:      rgba(124,58,237,0.12);
  --border2:     rgba(14,165,233,0.15);
  --border-soft: rgba(0,0,0,0.06);

  /* Shadows */
  --shadow-sm:   0 1px 8px rgba(0,0,0,0.05), 0 2px 20px rgba(124,58,237,0.06);
  --shadow:      0 4px 24px rgba(0,0,0,0.07), 0 8px 40px rgba(124,58,237,0.08);
  --shadow-lg:   0 8px 40px rgba(0,0,0,0.1), 0 20px 60px rgba(124,58,237,0.12);

  /* Gradient */
  --grad-main:   linear-gradient(135deg, #7c3aed, #0ea5e9);
  --grad-warm:   linear-gradient(135deg, #7c3aed, #ec4899);
  --grad-hero:   linear-gradient(160deg, #fafaf9 0%, #f5f3ff 40%, #e0f2fe 100%);
  --grad-card:   linear-gradient(135deg, rgba(124,58,237,0.04), rgba(14,165,233,0.03));

  /* UI */
  --radius:      14px;
  --radius-sm:   8px;
  --nav-h:       72px;
  /* People photos. Rounded squares, not circles: the sources are square so
     nothing is cropped either way, and squares show the whole frame. One
     variable so the shape can be changed in a single place. */
  --avatar-radius: 14px;
  --transition:  all 0.28s cubic-bezier(0.4, 0, 0.2, 1);

  /* Typography */
  --font-serif:  'Playfair Display', Georgia, serif;
  --font-sans:   'Space Grotesk', 'Inter', -apple-system, sans-serif;
  --font-body:   'Inter', -apple-system, sans-serif;
}

/* ---- BASE ---- */
body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--violet-light); border-radius: 3px; }

/* ---- AURORA MESH BACKGROUND ---- */
.aurora-bg {
  background-image:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(124,58,237,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 60% at 80% 80%, rgba(14,165,233,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(236,72,153,0.03) 0%, transparent 60%);
}

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 700; line-height: 1.2; color: var(--text); }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: clamp(1.05rem, 2vw, 1.35rem); }
h4 { font-size: 1rem; }
p  { color: var(--text2); font-size: 0.96rem; }
a  { color: var(--violet); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--violet-mid); }
strong { color: var(--text); font-weight: 600; }

/* ---- GRADIENT TEXT UTILITY ---- */
.grad-text {
  color: #7c3aed; /* fallback for browsers that don't support background-clip:text */
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- SECTION LABELS ---- */
.section-label {
  font-family: var(--font-sans);
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: #7c3aed; /* fallback */
  background: var(--grad-main);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block; margin-bottom: 0.5rem;
}
.section-title { margin-bottom: 0.6rem; color: var(--text); }
.section-subtitle { color: var(--text2); font-size: 1rem; margin-bottom: 2.5rem; max-width: 620px; }
.section-divider {
  width: 56px; height: 3px;
  background: var(--grad-main);
  border-radius: 2px;
  margin-bottom: 1.5rem;
}

/* ---- LAYOUT ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section    { padding: 6rem 0; }
.section-alt { background: var(--bg2); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 1rem; } .gap-2 { gap: 2rem; }
.mb-1 { margin-bottom: 1rem; } .mb-2 { margin-bottom: 2rem; } .mb-3 { margin-bottom: 3rem; }
.mt-1 { margin-top: 1rem; }  .mt-2 { margin-top: 2rem; }
.text-center { text-align: center; }

/* ---- NAVIGATION ----
   The fixed #navbar and its .nav-inner / .nav-logo / .nav-links / .nav-toggle
   rules were retired when the sticky .site-head shell replaced them. They are
   gone rather than dormant: while they sat here the iOS safe-area inset was
   being applied to an element no page renders. The live header lives in
   shell.css, safe-area handling included. --nav-h survives because the
   on-this-page rail and section scroll-margins still measure against it. */

/* ---- HERO ---- */
.hero {
  min-height: 100vh;
  min-height: 100svh;   /* iOS Safari: 100vh includes the area behind the URL bar */
  display: flex; align-items: center;
  padding-top: var(--nav-h);
  background: var(--grad-hero);
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 75% 40%, rgba(14,165,233,0.1) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 15% 75%, rgba(124,58,237,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 50% 10%, rgba(236,72,153,0.05) 0%, transparent 60%);
}
.hero-grid { display: grid; grid-template-columns: 1fr 460px; gap: 3rem; align-items: flex-start; padding-top: 2rem; }

/* Hero badges */
.hero-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.badge {
  font-family: var(--font-sans); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.28rem 0.75rem; border-radius: 50px; border: 1px solid;
}
.badge-violet { border-color: rgba(124,58,237,0.3); color: var(--violet); background: var(--violet-dim); }
.badge-sky    { border-color: rgba(14,165,233,0.3);  color: var(--sky-ink);      background: var(--sky-dim); }
.badge-teal   { border-color: rgba(14,165,233,0.3);   color: var(--sky-ink);      background: var(--sky-dim); }
.badge-amber  { border-color: rgba(217,119,6,0.3);   color: var(--amber-ink);  background: var(--amber-dim); }
.badge-gold   { border-color: rgba(180,120,0,0.3);   color: var(--amber-ink);       background: rgba(217,119,6,0.08); font-weight: 600; }
.badge-muted  { border-color: var(--border-soft);    color: var(--text3);  background: rgba(0,0,0,0.02); }

.hero-name   { color: var(--text); margin-bottom: 0.4rem; }
.hero-title  { font-family: var(--font-sans); font-size: 1rem; color: var(--text2); margin-bottom: 0.25rem; font-weight: 500; }
.hero-inst   { font-family: var(--font-sans); font-size: 0.88rem; color: var(--text3); margin-bottom: 1.8rem; }
.hero-desc   { font-size: 1rem; color: var(--text2); line-height: 1.8; margin-bottom: 2rem; max-width: 540px; }
.hero-cta    { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 2rem; align-items: center; }

/* Social Links */
.hero-social { display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; }
.hero-social a {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.78rem; font-family: var(--font-sans); font-weight: 500;
  color: var(--text2); padding: 0.38rem 0.8rem;
  border: 1px solid var(--border-soft); border-radius: 7px;
  background: var(--card); transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.hero-social a:hover { color: var(--violet); border-color: var(--border); box-shadow: 0 2px 12px rgba(124,58,237,0.12); }

/* Profile Photo */
.profile-wrap { position: relative; }
.profile-photo {
  width: 100%; height: auto;
  border-radius: 24px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-lg);
  overflow: hidden; position: relative;
}
.profile-photo img { width: 100%; height: auto; display: block; object-fit: cover; }
.profile-photo .placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem;
  background: linear-gradient(135deg, var(--bg3), #e0f2fe);
}
.profile-deco {
  position: absolute; top: -16px; right: -16px;
  width: 72px; height: 72px;
  border: 2px solid rgba(124,58,237,0.2);
  border-radius: 16px;
}
.profile-deco2 {
  position: absolute; bottom: -12px; left: -12px;
  width: 52px; height: 52px;
  border: 2px solid rgba(14,165,233,0.2);
  border-radius: 12px;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-sans); font-weight: 600; font-size: 0.87rem;
  padding: 0.72rem 1.5rem; border-radius: 9px;
  cursor: pointer; transition: var(--transition);
  text-decoration: none; border: none;
  touch-action: manipulation; /* removes 300ms tap delay on mobile */
}
/* Touch-action for all interactive elements */
a, button, .filter-btn, .gal-btn, .mainmenu a, .nav-burger, .theme-toggle {
  touch-action: manipulation;
}
.btn-violet {
  background: var(--grad-main); color: #fff;
  box-shadow: 0 4px 16px rgba(124,58,237,0.32);
}
.btn-violet:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(124,58,237,0.42); color: #fff; }
.btn-gold { background: var(--grad-main); color: #fff; box-shadow: 0 4px 16px rgba(124,58,237,0.32); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(124,58,237,0.42); color: #fff; }
.btn-outline {
  background: var(--card); border: 1.5px solid var(--border);
  color: var(--violet); box-shadow: var(--shadow-sm);
}
.btn-outline:hover { background: var(--violet-dim); border-color: rgba(124,58,237,0.3); box-shadow: 0 4px 16px rgba(124,58,237,0.1); }

/* ---- METRICS STRIP ---- */
.metrics-strip {
  background: var(--card);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: 0 2px 20px rgba(0,0,0,0.04);
  padding: 2.5rem 0;
}
.metrics-grid {
  display: grid;
  /* auto-fit rather than a fixed 8 columns: the publications page carries 9
     tiles, which left a single orphan on a second row. This adapts to the
     tile count on every page, and to any tile added later. */
  grid-template-columns: repeat(auto-fit, minmax(min(118px, 100%), 1fr));
  gap: 0;
}
.metric-item { text-align: center; padding: 1rem 0.5rem; position: relative; }
.metric-item:not(:last-child)::after {
  content: ''; position: absolute; right: 0; top: 20%; bottom: 20%;
  width: 1px; background: var(--border-soft);
}
.metric-num {
  font-family: var(--font-sans); font-size: clamp(1.3rem, 2.5vw, 1.9rem);
  font-weight: 700; display: block; line-height: 1.1;
  background: var(--grad-main);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.metric-label {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text3);
  display: block; margin-top: 0.3rem;
}

/* ---- CARDS ---- */
.card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.8rem;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad-main); opacity: 0; transition: var(--transition);
  border-radius: var(--radius) var(--radius) 0 0;
}
.card:hover { border-color: rgba(124,58,237,0.15); transform: translateY(-3px); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }

.card-icon {
  width: 46px; height: 46px;
  background: var(--violet-dim); border: 1px solid var(--border);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: var(--violet); margin-bottom: 1rem;
}
.card-icon.sky  { background: var(--sky-dim);   border-color: var(--border2);              color: var(--sky-ink);   }
.card-icon.teal { background: var(--sky-dim);   border-color: var(--border2);              color: var(--sky-ink);   }
.card-icon.amber{ background: var(--amber-dim); border-color: rgba(217,119,6,0.2);         color: var(--amber-ink); }

/* ---- TAGS / CHIPS ---- */
.tag {
  font-size: 0.75rem; font-family: var(--font-sans); font-weight: 500;
  padding: 0.2rem 0.6rem; border-radius: 5px;
  border: 1px solid rgba(14,165,233,0.25); color: var(--sky-ink);
  background: rgba(14,165,233,0.06);
}
.tag.violet-tag { border-color: rgba(124,58,237,0.25); color: var(--violet); background: var(--violet-dim); }
.tag.amber-tag  { border-color: rgba(217,119,6,0.25);  color: var(--amber-ink);  background: var(--amber-dim); }
.tag.gold-tag   { border-color: rgba(180,120,0,0.3);   color: var(--amber-ink);       background: rgba(217,119,6,0.08); font-weight: 600; }
.tag.green-tag  { border-color: rgba(22,163,74,0.25);  color: var(--green-ink); background: rgba(22,163,74,0.06); }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.8rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.75rem; font-family: var(--font-sans); font-weight: 500;
  padding: 0.28rem 0.7rem; border: 1px solid var(--border-soft);
  border-radius: 50px; color: var(--text2); background: var(--card);
  box-shadow: var(--shadow-sm);
}

/* ---- RESEARCH BLOCK ---- */
.research-card { border-left: 3px solid transparent; transition: var(--transition); }
.research-card:hover { border-left-color: var(--violet); }.research-card h2, .research-card h3, .research-card h4{ color: var(--text); }

/* ---- PUBLICATIONS ---- */
.pub-item {
  border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: 1.3rem 1.6rem; background: var(--card);
  transition: var(--transition); margin-bottom: 0.9rem;
  box-shadow: var(--shadow-sm);
}
.pub-item:hover { border-color: rgba(124,58,237,0.18); box-shadow: var(--shadow); }
.pub-item.starred { border-left: 3px solid var(--violet); }
.pub-item.teal    { border-left: 3px solid var(--sky); }
.pub-title-link   { font-family: var(--font-serif); font-size: 0.97rem; color: var(--text); line-height: 1.45; font-weight: 600; }
.pub-meta         { font-size: 0.81rem; color: var(--text3); margin-top: 0.25rem; }
.pub-meta .journal-name { color: var(--sky-ink); font-style: italic; }
.pub-impact-note  { font-size: 0.8rem; color: var(--text2); margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid rgba(0,0,0,0.04); font-style: italic; line-height: 1.55; }
.pub-tags-inline  { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.45rem; }
.pub-tag-sm { font-size: 0.75rem; font-family: var(--font-sans); padding: 0.1rem 0.45rem; border: 1px solid rgba(14,165,233,0.2); border-radius: 4px; color: var(--sky-ink); background: rgba(14,165,233,0.05); }
.award-tag  { font-size: 0.75rem; font-family: var(--font-sans); font-weight: 700; padding: 0.15rem 0.5rem; background: var(--amber-dim); border: 1px solid rgba(217,119,6,0.2); border-radius: 4px; color: var(--amber-ink); }

/* ---- NEWS TIMELINE ---- */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(to bottom, var(--violet), var(--sky), rgba(124,58,237,0.1));
  border-radius: 1px;
}
.timeline-item { position: relative; margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(0,0,0,0.04); }
.timeline-item:last-child { border-bottom: none; }
.timeline-dot {
  position: absolute; left: -2.35rem; top: 0.3rem;
  width: 12px; height: 12px; background: var(--violet);
  border: 2px solid var(--bg); border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}
.timeline-date  { font-size: 0.75rem; font-family: var(--font-sans); font-weight: 700; color: var(--violet); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.3rem; }
.timeline-title { font-size: 0.98rem; font-family: var(--font-serif); color: var(--text); margin-bottom: 0.35rem; }
.timeline-desc  { font-size: 0.87rem; color: var(--text2); }

/* ---- NEWS FULL TIMELINE (news.html) ---- */
.news-full-timeline { position: relative; padding-left: 2.5rem; }
.news-full-timeline::before { content:''; position:absolute; left:0; top:0; bottom:0; width:2px; background: linear-gradient(to bottom, var(--violet), var(--sky), rgba(124,58,237,0.15)); }
.news-entry { position: relative; margin-bottom: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(0,0,0,0.04); }
.news-entry:last-child { border-bottom: none; }
.news-dot { position: absolute; left: -2.9rem; top: 0.4rem; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--bg); }
.news-dot.gold  { background: var(--amber); box-shadow: 0 0 8px rgba(217,119,6,0.4); }
.news-dot.teal  { background: var(--sky);   box-shadow: 0 0 8px rgba(14,165,233,0.4); }
.news-dot.green { background: #22c55e;       box-shadow: 0 0 8px rgba(34,197,94,0.4); }
.news-cat { font-size: 0.75rem; font-family: var(--font-sans); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; padding: 0.2rem 0.7rem; border-radius: 4px; display: inline-flex; margin-bottom: 0.5rem; }
.cat-award       { background: var(--amber-dim); color: var(--amber-ink); border: 1px solid rgba(217,119,6,0.2); }
.cat-publication { background: var(--sky-dim); color: var(--sky-ink); border: 1px solid rgba(14,165,233,0.2); }
.cat-talk        { background: var(--violet-dim); color: var(--violet); border: 1px solid var(--border); }
.cat-project     { background: rgba(22,163,74,0.07); color: var(--green-ink); border: 1px solid rgba(22,163,74,0.2); }
.cat-student     { background: rgba(251,146,60,0.08); color: #ea580c; border: 1px solid rgba(251,146,60,0.2); }
.cat-conference  { background: rgba(236,72,153,0.07); color: #db2777; border: 1px solid rgba(236,72,153,0.2); }.news-entry h2, .news-entry h3, .news-entry h4{ font-family: var(--font-serif); font-size: 1.12rem; color: var(--text); margin-bottom: 0.45rem; }
.news-entry p  { font-size: 0.89rem; color: var(--text2); line-height: 1.7; }
.news-date     { font-size: 0.75rem; font-family: var(--font-sans); font-weight: 700; color: var(--violet); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.35rem; }
.year-marker   { font-family: var(--font-sans); font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.18em; color: var(--violet); background: var(--violet-dim); border: 1px solid var(--border); border-radius: 6px; padding: 0.3rem 0.9rem; display: inline-block; margin: 1.5rem 0; position: relative; left: -2.5rem; }

/* ---- PEOPLE CARDS ---- */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 1.5rem; }
.member-card {
  background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: 2rem 1.5rem; text-align: center; transition: var(--transition); box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.member-card::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: var(--grad-main); transform: scaleX(0); transition: transform 0.3s ease; border-radius: 0; }
.member-card:hover { border-color: rgba(124,58,237,0.15); transform: translateY(-4px); box-shadow: var(--shadow); }
.member-card:hover::after { transform: scaleX(1); }
.avatar { width: 86px; height: 86px; border-radius: var(--avatar-radius); margin: 0 auto 1rem; border: 2px solid var(--border); background: var(--bg3); display: flex; align-items: center; justify-content: center; font-family: var(--font-sans); font-size: 1.3rem; font-weight: 700; color: var(--violet); overflow: hidden; }
.member-name  { font-family: var(--font-serif); color: var(--text); font-size: 1rem; margin-bottom: 0.2rem; }
.member-role  { font-size: 0.75rem; font-family: var(--font-sans); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; background: var(--grad-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 0.4rem; }
.member-topic { font-size: 0.81rem; color: var(--text2); }
.member-year  { font-size: 0.75rem; color: var(--text3); margin-top: 0.3rem; }

/* ---- COLLABORATOR ---- */
.collab-card { display: flex; gap: 1rem; align-items: flex-start; }
.collab-flag { font-size: 1.7rem; flex-shrink: 0; }.collab-info h3, .collab-info h4, .collab-info h5{ color: var(--text); margin-bottom: 0.2rem; }
.collab-info .inst { font-size: 0.81rem; color: var(--sky-ink); margin-bottom: 0.3rem; }
.collab-info .topic { font-size: 0.81rem; color: var(--text2); }
.status-active-badge { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.75rem; font-family: var(--font-sans); font-weight: 600; color: var(--green-ink); margin-top: 0.5rem; }
.status-active-badge::before { content: ''; width: 5px; height: 5px; background: #22c55e; border-radius: 50%; box-shadow: 0 0 4px #22c55e; }
.collab-section { padding: 2rem 0; border-bottom: 1px solid rgba(0,0,0,0.04); }
.collab-section:last-child { border-bottom: none; }
.collab-header { display: flex; gap: 1.5rem; align-items: flex-start; }
.collab-flag-lg { font-size: 2.4rem; }.collab-header-info h2, .collab-header-info h3, .collab-header-info h4{ color: var(--text); margin-bottom: 0.2rem; }
.collab-header-info .inst { font-size: 0.84rem; color: var(--sky-ink); margin-bottom: 0.5rem; }
.collab-header-info p { font-size: 0.87rem; color: var(--text2); line-height: 1.65; }
.joint-pubs { margin-top: 0.7rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pub-chip { font-size: 0.75rem; font-family: var(--font-sans); color: var(--text2); background: var(--bg2); border: 1px solid var(--border-soft); border-radius: 4px; padding: 0.2rem 0.55rem; }

/* ---- LAB SYSTEM CARDS ---- */
.system-card { background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 2rem; transition: var(--transition); position: relative; overflow: hidden; box-shadow: var(--shadow-sm); }
.system-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--grad-main); }
.system-card.sky-bar::before { background: linear-gradient(90deg, var(--sky), var(--violet)); }
.system-card:hover { border-color: rgba(124,58,237,0.15); transform: translateY(-3px); box-shadow: var(--shadow); }
.system-num { font-family: var(--font-sans); font-size: 3.2rem; font-weight: 800; background: var(--grad-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; opacity: 0.12; position: absolute; bottom: 1rem; right: 1.5rem; line-height: 1; }
.spec-row { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; border-bottom: 1px solid rgba(0,0,0,0.04); font-size: 0.84rem; }
.spec-row:last-child { border-bottom: none; }
.spec-label { color: var(--text3); font-family: var(--font-sans); }
.spec-val { color: var(--text); font-weight: 500; }
.spec-val.violet { color: var(--violet); }
.spec-val.sky    { color: var(--sky-ink); }
.world-first { display: inline-flex; align-items: center; gap: 0.4rem; background: var(--sky-dim); border: 1px solid rgba(14,165,233,0.2); border-radius: 5px; padding: 0.3rem 0.75rem; font-size: 0.75rem; font-family: var(--font-sans); font-weight: 700; color: var(--sky-ink); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.7rem; }
.world-first.violet { background: var(--violet-dim); border-color: var(--border); color: var(--violet); }

/* ---- PROJECTS ---- */
.project-row { display: grid; grid-template-columns: auto 1fr auto; gap: 1.5rem; align-items: center; padding: 1.2rem; background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--radius); margin-bottom: 0.9rem; transition: var(--transition); box-shadow: var(--shadow-sm); }
.project-row:hover { border-color: rgba(124,58,237,0.15); box-shadow: var(--shadow); }
.project-row .agency-badge { font-family: var(--font-sans); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; background: var(--grad-main); border-radius: 6px; padding: 0.35rem 0.65rem; white-space: nowrap; box-shadow: 0 2px 8px rgba(124,58,237,0.3); }
.project-row .agency-badge.sky  { background: linear-gradient(135deg, var(--sky), #0284c7); box-shadow: 0 2px 8px rgba(14,165,233,0.3); }
.project-row .agency-badge.teal { background: linear-gradient(135deg, var(--sky), #0284c7); box-shadow: 0 2px 8px rgba(14,165,233,0.3); }
.project-row .agency-badge.muted { background: #f4f4f4; color: var(--text3); box-shadow: none; }.project-row h3, .project-row h4, .project-row h5{ font-family: var(--font-sans); font-size: 0.9rem; color: var(--text); margin-bottom: 0.2rem; font-weight: 600; }
.project-row p  { font-size: 0.79rem; color: var(--text2); }
.project-row .amount { font-family: var(--font-sans); font-size: 1.05rem; font-weight: 700; background: var(--grad-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; text-align: right; white-space: nowrap; }
.project-row .amount.muted { background: none; -webkit-text-fill-color: var(--text3); color: var(--text3); }

/* ---- GALLERY ---- */
.gallery-masonry { columns: 3; column-gap: 1rem; }
@media (max-width:768px) { .gallery-masonry { columns: 2; } }
@media (max-width:480px) { .gallery-masonry { columns: 1; } }
.gal-item { break-inside: avoid; margin-bottom: 1rem; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border-soft); cursor: pointer; position: relative; box-shadow: var(--shadow-sm); transition: var(--transition); }
.gal-item:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.gal-placeholder { background: linear-gradient(135deg, var(--bg2), var(--bg3)); position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem; }
.gal-placeholder .icon { font-size: 1.7rem; opacity: 0.4; }
.gal-placeholder .caption { font-size: 0.76rem; font-family: var(--font-sans); color: var(--text2); text-align: center; padding: 0.5rem 1rem; }
.gal-caption { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(124,58,237,0.85) 0%, transparent 100%); padding: 0.8rem 1rem; font-size: 0.78rem; font-family: var(--font-sans); color: #fff; transform: translateY(100%); transition: transform 0.3s ease; }
.gal-item:hover .gal-caption { transform: translateY(0); }
/* Disable hover animation for specific items (e.g. Donna Strickland photo) */
.gal-item.no-hover-anim:hover { transform: none; box-shadow: var(--shadow-sm); }
.gal-item.no-hover-anim:hover img { transform: none; }
.gal-item.no-hover-anim .gal-caption { transform: translateY(0); background: linear-gradient(to top, rgba(10,5,30,0.75) 0%, transparent 100%); }
.gal-item.no-hover-anim:hover .gal-caption { transform: translateY(0); }
.gal-tag-badge { position: absolute; top: 0.6rem; right: 0.6rem; font-size: 0.75rem; font-family: var(--font-sans); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.18rem 0.5rem; border-radius: 4px; background: rgba(255,255,255,0.9); border: 1px solid var(--border-soft); color: var(--violet); }
.gallery-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2.5rem; }
.gal-btn { font-family: var(--font-sans); font-size: 0.78rem; font-weight: 500; padding: 0.4rem 1rem; border: 1px solid var(--border-soft); border-radius: 50px; color: var(--text2); background: var(--card); cursor: pointer; transition: var(--transition); box-shadow: var(--shadow-sm); }
.gal-btn:hover, .gal-btn.active { border-color: var(--border); color: var(--violet); background: var(--violet-dim); }

/* ---- PAGE HERO ---- */
.page-hero {
  padding: calc(var(--nav-h) + 4rem) 0 4rem;
  background: var(--grad-hero);
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 60% at 80% 50%, rgba(14,165,233,0.09) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 10% 60%, rgba(124,58,237,0.07) 0%, transparent 60%);
}
.page-hero::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--violet), var(--sky), transparent);
  opacity: 0.3;
}
.page-hero-content { max-width: 680px; position: relative; z-index: 1; }
.page-hero h1 { color: var(--text); margin-bottom: 0.8rem; }
.page-hero p  { font-size: 1.05rem; color: var(--text2); }

/* ---- HIGHLIGHT BOXES ---- */
.highlight-box { background: var(--violet-dim); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 1.5rem; }
.highlight-box.sky { background: var(--sky-dim); border-color: var(--border2); }
.highlight-box.amber { background: var(--amber-dim); border-color: rgba(217,119,6,0.18); }

/* ---- AWARD ITEMS ---- */
.award-item { display: flex; gap: 1.5rem; align-items: flex-start; padding: 1.1rem 0; border-bottom: 1px solid rgba(0,0,0,0.04); }
.award-item:last-child { border-bottom: none; }
.award-year { font-family: var(--font-sans); font-size: 0.83rem; font-weight: 700; background: var(--grad-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; min-width: 56px; }
.award-name { color: var(--text); font-weight: 600; font-size: 0.92rem; margin-bottom: 0.18rem; }
.award-body { font-size: 0.8rem; color: var(--text2); }

/* ---- CONTACT ---- */
.contact-card { background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow-sm); }
.contact-row { display: flex; align-items: flex-start; gap: 1.2rem; padding: 1.1rem 0; border-bottom: 1px solid rgba(0,0,0,0.04); }
.contact-row:last-child { border-bottom: none; }
.ci { width: 42px; height: 42px; border-radius: 9px; background: var(--violet-dim); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 0.95rem; color: var(--violet); flex-shrink: 0; }
.ci.sky { background: var(--sky-dim); border-color: var(--border2); color: var(--sky-ink); }.contact-info-text h3, .contact-info-text h4, .contact-info-text h5{ font-family: var(--font-sans); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text3); margin-bottom: 0.25rem; }
.contact-info-text a, .contact-info-text p { font-size: 0.9rem; color: var(--text2); }
.contact-info-text a:hover { color: var(--violet); }

/* Profile links */
.profile-link { display: flex; align-items: center; gap: 0.8rem; padding: 1rem; background: var(--card); border: 1px solid var(--border-soft); border-radius: 10px; transition: var(--transition); box-shadow: var(--shadow-sm); }
.profile-link:hover { border-color: var(--border); box-shadow: 0 4px 16px rgba(124,58,237,0.1); transform: translateX(3px); }
.profile-link .pl-icon { width: 38px; height: 38px; border-radius: 8px; background: var(--violet-dim); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 1rem; color: var(--violet); flex-shrink: 0; }
.profile-link .pl-info { flex: 1; }.profile-link .pl-info h3, .profile-link .pl-info h4, .profile-link .pl-info h5{ font-family: var(--font-sans); font-size: 0.82rem; font-weight: 600; color: var(--text); margin-bottom: 0.12rem; }
.profile-link .pl-info p { font-size: 0.75rem; color: var(--text3); }
.profile-link .pl-arrow { color: var(--text3); font-size: 0.82rem; }

/* Teaching */
.teaching-row { padding: 0.8rem 0; border-bottom: 1px solid rgba(0,0,0,0.04); font-size: 0.87rem; display: flex; justify-content: space-between; align-items: center; }
.teaching-row:last-child { border-bottom: none; }
.teaching-course { color: var(--text); }
.teaching-level { font-size: 0.75rem; font-family: var(--font-sans); font-weight: 700; text-transform: uppercase; padding: 0.15rem 0.5rem; border-radius: 4px; }
.level-pg { background: var(--violet-dim); color: var(--violet); border: 1px solid var(--border); }
.level-ug { background: var(--sky-dim); color: var(--sky-ink); border: 1px solid var(--border2); }
.membership-chip { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.79rem; font-family: var(--font-sans); color: var(--text2); padding: 0.38rem 0.85rem; background: var(--card); border: 1px solid var(--border-soft); border-radius: 8px; box-shadow: var(--shadow-sm); }

/* ---- FUNDING ITEMS ---- */
.funding-item { display: flex; align-items: center; gap: 1rem; padding: 1.1rem; background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: var(--transition); }
.funding-item:hover { border-color: rgba(124,58,237,0.15); box-shadow: var(--shadow); }
.funding-logo { font-size: 0.75rem; font-family: var(--font-sans); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; background: var(--grad-main); border-radius: 6px; padding: 0.3rem 0.55rem; min-width: 54px; text-align: center; box-shadow: 0 2px 8px rgba(124,58,237,0.3); }.funding-details h3, .funding-details h4, .funding-details h5{ font-family: var(--font-sans); font-size: 0.87rem; color: var(--text); font-weight: 600; margin-bottom: 0.18rem; }
.funding-details p  { font-size: 0.77rem; color: var(--text2); }
.funding-amount { margin-left: auto; font-family: var(--font-sans); font-size: 1rem; font-weight: 700; background: var(--grad-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; white-space: nowrap; }

/* ---- PATENT CARD ---- */
.patent-card { background: var(--card); border: 1px solid var(--border-soft); border-left: 3px solid #0284c7; border-radius: var(--radius); padding: 1.2rem 1.5rem; margin-bottom: 0.8rem; box-shadow: var(--shadow-sm); }
.patent-num   { font-family: var(--font-sans); font-size: 0.75rem; font-weight: 700; color: var(--sky-ink); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.35rem; }

/* ---- CAPABILITIES ---- */
.capability-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr)); gap: 0.7rem; }
.cap-chip { background: var(--bg2); border: 1px solid var(--border-soft); border-radius: 8px; padding: 0.7rem 0.9rem; font-size: 0.8rem; color: var(--text2); font-family: var(--font-sans); display: flex; align-items: center; gap: 0.55rem; transition: var(--transition); }
.cap-chip:hover { background: var(--card); border-color: var(--border); }
.cap-chip i { color: var(--violet); font-size: 0.85rem; }

/* ---- ALUMNI CARD ---- */
.alumni-card { display: flex; gap: 1rem; align-items: flex-start; padding: 1.2rem; background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--radius); margin-bottom: 0.8rem; box-shadow: var(--shadow-sm); transition: var(--transition); }
.alumni-card:hover { border-color: rgba(124,58,237,0.15); box-shadow: var(--shadow); }
/* Square photo in a square box: width alone fits it. Deliberately NOT
   height:100% + object-fit — inside .avatar/.alumni-initial (both flex
   containers) a percentage height makes the image size against a box whose
   height depends on the image, and Safari and Chrome resolve that differently.
   The radius is set here too, not inherited: older WebKit does not always clip
   a child against its parent's border-radius, so the image carries its own. */
.avatar picture, .alumni-initial picture {
  display: block; width: 100%; height: auto;
}
.avatar img, .alumni-initial img {
  display: block; width: 100%; height: auto;
  border-radius: var(--avatar-radius);
}
.alumni-initial { width: 42px; height: 42px; border-radius: var(--avatar-radius); background: var(--violet-dim); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-family: var(--font-sans); font-weight: 700; color: var(--violet); font-size: 0.88rem; flex-shrink: 0; }.alumni-info h3, .alumni-info h4, .alumni-info h5{ font-family: var(--font-serif); color: var(--text); font-size: 0.94rem; margin-bottom: 0.2rem; }
.alumni-info .thesis { font-size: 0.8rem; color: var(--text2); margin-bottom: 0.3rem; font-style: italic; }
.alumni-info .award-tag { font-size: 0.75rem; color: var(--amber-ink); background: var(--amber-dim); border: 1px solid rgba(217,119,6,0.2); border-radius: 4px; padding: 0.15rem 0.5rem; font-family: var(--font-sans); font-weight: 700; }

/* Year group in publications */
.year-group { margin-bottom: 2.5rem; }
.year-heading { font-family: var(--font-sans); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; background: var(--grad-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.year-heading::after { content: ''; flex: 1; height: 1px; background: var(--border-soft); }
.filter-bar, .pub-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.filter-btn { font-family: var(--font-sans); font-size: 0.77rem; font-weight: 500; padding: 0.38rem 1rem; border: 1px solid var(--border-soft); border-radius: 50px; color: var(--text2); background: var(--card); cursor: pointer; transition: var(--transition); box-shadow: var(--shadow-sm); }
.filter-btn:hover, .filter-btn.active { border-color: var(--border); color: var(--violet); background: var(--violet-dim); }

/* ---- QUOTE SECTION ---- */
.quote-section {
  padding: 5rem 0; text-align: center;
  background: linear-gradient(135deg, var(--bg2), #e0f2fe);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  position: relative;
}
.quote-text { font-family: var(--font-serif); font-size: clamp(1.1rem, 2vw, 1.55rem); font-style: italic; color: var(--text); max-width: 740px; margin: 0 auto 1rem; line-height: 1.65; position: relative; }
.quote-text::before { content: '\201C'; font-size: 4rem; background: var(--grad-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 0; vertical-align: -1.4rem; margin-right: 0.2rem; }
.quote-attr { color: var(--text3); font-size: 0.87rem; font-family: var(--font-sans); }

/* ---- DIVIDER ---- */
.divider { height: 1px; background: var(--border-soft); margin: 2rem 0; }

/* ---- UPLOAD GUIDE (gallery) ---- */
.upload-guide { background: var(--sky-dim); border: 1px solid var(--border2); border-radius: var(--radius); padding: 1.4rem; margin-bottom: 2.5rem; }.upload-guide h3, .upload-guide h4, .upload-guide h5{ color: var(--sky-ink); font-family: var(--font-sans); margin-bottom: 0.5rem; }
.upload-guide p { font-size: 0.87rem; color: var(--text2); }
code { background: var(--bg3); color: var(--violet); padding: 0.15rem 0.45rem; border-radius: 4px; font-size: 0.85em; }

/* ---- FOOTER ---- */
footer {
  background: var(--card);
  border-top: 1px solid var(--border-soft);
  padding: 3.5rem 0 1.5rem;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.03);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2.5rem; }
.footer-logo { font-family: var(--font-serif); font-size: 1.25rem; color: var(--text); margin-bottom: 0.8rem; }
.footer-logo span { background: var(--grad-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.footer-desc { font-size: 0.84rem; color: var(--text3); line-height: 1.65; }.footer-col h4, .footer-col h5{ font-family: var(--font-sans); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text3); margin-bottom: 0.9rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.45rem; }
.footer-col ul li a { font-size: 0.84rem; color: var(--text2); transition: var(--transition); }
.footer-col ul li a:hover { color: var(--violet); }
.footer-bottom { border-top: 1px solid var(--border-soft); padding-top: 1.4rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.footer-bottom p { font-size: 0.78rem; color: var(--text3); }

/* ---- NEWS CHIP ROW ---- */
.news-chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.news-chip { font-size: 0.75rem; font-family: var(--font-sans); color: var(--text2); padding: 0.28rem 0.75rem; border: 1px solid var(--border-soft); border-radius: 50px; background: var(--card); box-shadow: var(--shadow-sm); }
.news-chip .dot { width: 6px; height: 6px; background: #22c55e; border-radius: 50%; display: inline-block; margin-right: 0.4rem; box-shadow: 0 0 4px #22c55e; }

/* ---- PUB MINI (homepage) ---- */
.pub-mini { padding: 1rem 0; border-bottom: 1px solid rgba(0,0,0,0.04); }
.pub-mini:last-child { border-bottom: none; }
.pub-mini .journal { font-size: 0.79rem; color: var(--sky-ink); font-style: italic; }
.pub-mini .year-badge { font-size: 0.75rem; font-family: var(--font-sans); font-weight: 700; color: white; background: var(--grad-main); border-radius: 4px; padding: 0.12rem 0.48rem; margin-left: 0.35rem; }
.pub-mini-title { font-family: var(--font-serif); font-size: 0.93rem; color: var(--text); line-height: 1.4; margin-bottom: 0.25rem; font-weight: 600; }

/* ---- ANIMATIONS ---- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.fade-in  { animation: fadeInUp 0.6s ease both; }
.delay-1  { animation-delay: 0.1s; } .delay-2 { animation-delay: 0.2s; }
.delay-3  { animation-delay: 0.3s; } .delay-4 { animation-delay: 0.4s; }
[data-anim] { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-anim].visible { opacity: 1; transform: translateY(0); }

/* ---- RESPONSIVE ---- */
/* ------------------------------------------------------------------
   NAVBAR BREAKPOINTS
   The 11-item bar does not fit beside the brand below ~1240px. Until this
   was added the desktop nav stayed on until 768px, so every tablet in
   landscape and every small laptop window rendered a two-row navbar with
   the brand broken over three lines.
   ------------------------------------------------------------------ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .metrics-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-grid { gap: 2rem; }
  .profile-photo { width: 100%; height: auto; }
}
@media (max-width: 768px) {
  :root { --nav-h: 64px; --text2: #2d2926; --text3: #57534e; }
  .hero-grid { grid-template-columns: 1fr; }
  .profile-wrap { display: block; max-width: 240px; margin: 0 auto 2rem; }
  .profile-deco, .profile-deco2 { display: none; } /* hide decorative borders on mobile */
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 4rem 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .project-row { grid-template-columns: 1fr; gap: 0.6rem; }
}
@media (max-width: 480px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 2rem; }
  .hero-cta { flex-direction: column; }
}

/* ---- PRINT STYLES ---- */
@media print {
  .site-head, .onthispage, .announce, .skip-link,
  .hero, .metrics-strip, footer, canvas,
  .hero-cta, .news-chip-row, .gallery-filter { display: none !important; }
  body { color: #000; background: var(--card); font-size: 11pt; }
  .section, .page-hero { padding: 1rem 0; }
  .card, .pub-item, .system-card { box-shadow: none; border: 1px solid #ccc; }
  a { color: #000; text-decoration: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; color: #555; }
  .container { max-width: 100%; padding: 0 1rem; }
  h1, h2, h3 { color: #000; page-break-after: avoid; }
  .grad-text, .section-label, .award-year, .metric-num,
  .year-heading, .member-role { -webkit-text-fill-color: #333; color: #333; background: none; }
}

/* ============================================================
   ACCESSIBILITY ADDITIONS
   ============================================================ */

/* Skip link — first tab stop, visible only when focused */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 9999;
  padding: 0.7rem 1.2rem;
  background: var(--violet, #7c3aed);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 0 0 6px 0;
  text-decoration: none;
  /* Held just above the viewport. Moving it with transform rather than a large
     negative `left` keeps the generic `a { transition }` from animating it in
     across 9999px when it receives focus. */
  transform: translateY(-120%);
  transition: transform 0.15s ease;
}
.skip-link:focus {
  transform: translateY(0);
  outline: 3px solid var(--amber, #c9a84c);
  outline-offset: -3px;
}
@media (prefers-reduced-motion: reduce) {
  .skip-link { transition: none; }
}

/* Visible keyboard focus. The sheet previously defined none, so keyboard users
   had no indication of position anywhere on the site. */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.filter-btn:focus-visible,
.gal-item:focus-visible {
  outline: 3px solid var(--sky, #0ea5e9);
  outline-offset: 3px;
  border-radius: 3px;
}
/* Sections targeted by the skip link should not draw a focus ring */
section:focus, section:focus-visible,
div[id]:focus, div[id]:focus-visible,
span[id]:focus, span[id]:focus-visible { outline: none; }

/* Respect the OS "reduce motion" setting. Nothing in the sheet honoured it:
   scroll reveals, counters, hover lifts and the marquee all ran regardless. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-anim],
  .fade-in { opacity: 1 !important; transform: none !important; }
  .gal-item:hover,
  .card:hover,
  .link-card:hover { transform: none !important; }
}

/* Footer additions — the inline styles these replace differed page to page */
.footer-social { display: flex; gap: 0.8rem; margin-top: 1rem; }
.footer-social a { color: var(--text3); font-size: 1.1rem; }
.footer-social a:hover { color: var(--violet); }
.footer-addr { color: var(--text3); font-size: 0.82rem; }


/* ============================================================
   ACCESSIBILITY & LAYOUT FIXES — 17 Sep 2026
   Palette hues unchanged; only depth and size corrected.
   ============================================================ */

/* in-page anchors land below the sticky navigation, not behind it */
:target, [id] { scroll-margin-top: calc(var(--nav-h) + 1.5rem); }

/* DOIs, long URLs and unbroken identifiers stop pushing the layout wider */
.pub-item, .pub-meta, .pub-title, .ref, .card p, .prose p,
.contact-info-text, .member-info, .spec-val, .timeline-content {
  overflow-wrap: anywhere;
}

/* narrow-phone overflow: no grid track may be wider than the screen */
@media (max-width: 420px) {
  .grid, .cards, .card-grid, .system-grid, .member-grid,
  .project-list, .contact-grid { grid-template-columns: 1fr !important; }
  h2, h3 { overflow-wrap: anywhere; }
}/* the lab page overflowed at 360px on the system headings */
.system-card h3, .system-card h3, .system-card h4, .system-card h5{ overflow-wrap: anywhere; hyphens: auto; }

/* <small> inherits a fraction of its parent and was landing at 10.4px */
small { font-size: max(0.75rem, 0.86em); }

/* a flex/grid child may not refuse to shrink below its content width */
.card, .system-card, .member-card, .collab-card, .project-row,
.pub-item, .research-card, .gal-item { min-width: 0; }


/* ============================================================
   DARK MODE — 17 Sep 2026
   Token swap only. Every hue keeps its identity; lightness and
   chroma are re-tuned for a dark ground, and every pair below
   was checked against WCAG AA before being written here.
   Honours an explicit choice first, then the operating system.
   ============================================================ */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:          #14131a;
    --bg2:         #1a1823;
    --bg3:         #221f2e;
    --bg-glass:    rgba(20,19,26,0.82);

    --violet:      #b49bff;
    --violet-mid:  #c9b6ff;
    --violet-light:#8f74e8;
    --violet-dim:  rgba(180,155,255,0.13);
    --violet-glow: rgba(180,155,255,0.22);

    --sky:         #4cc2f0;
    --sky-ink:     #6fd0f5;
    --sky-light:   #82d8f7;
    --sky-dim:     rgba(76,194,240,0.13);

    --amber:       #eba845;
    --amber-ink:   #f0b75f;
    --amber-light: #f5c97e;
    --amber-dim:   rgba(235,168,69,0.13);

    --text:        #ece9f2;
    --text2:       #b9b4c4;
    --text3:       #968fa5;

    --card:        #1c1a25;
    --teal:        #4cc2f0;
    --green-ink:   #62d392;
    --pink-ink:    #f58ab8;
    --red-ink:     #f58a8a;

    --border:      rgba(180,155,255,0.20);
    --border2:     rgba(76,194,240,0.22);
    --border-soft: rgba(255,255,255,0.10);

    --shadow-sm:   0 1px 8px rgba(0,0,0,0.42);
    --shadow:      0 4px 24px rgba(0,0,0,0.5);
    --shadow-lg:   0 8px 40px rgba(0,0,0,0.58);

    --grad-hero:   linear-gradient(160deg, #14131a 0%, #1a1823 45%, #122029 100%);
    --grad-card:   linear-gradient(135deg, rgba(180,155,255,0.07), rgba(76,194,240,0.05));

    color-scheme: dark;
  }

  /* things that were written as literals and cannot ride a token */
  :root:not([data-theme="light"]) img:not([src$=".svg"]) { opacity: 0.94; }
  :root:not([data-theme="light"]) .agency-badge { color: #14131a; }
  :root:not([data-theme="light"]) .project-row .agency-badge.muted {
    background: #2a2735; color: var(--text2);
  }
  :root:not([data-theme="light"]) .gal-tag-badge { background: rgba(28,26,37,0.92); }
  :root:not([data-theme="light"]) .highlight-box,
  :root:not([data-theme="light"]) .apply-box { background: var(--bg2); }
  :root:not([data-theme="light"]) code { background: var(--bg3); }
  :root:not([data-theme="light"]) ::-webkit-scrollbar-thumb { background: #4a4459; }
  :root:not([data-theme="light"]) { scrollbar-color: #4a4459 #14131a; }
}

/* the same palette when the visitor has chosen dark explicitly */
:root[data-theme="dark"] {
  --bg:#14131a; --bg2:#1a1823; --bg3:#221f2e; --bg-glass:rgba(20,19,26,0.82);
  --violet:#b49bff; --violet-mid:#c9b6ff; --violet-light:#8f74e8;
  --violet-dim:rgba(180,155,255,0.13); --violet-glow:rgba(180,155,255,0.22);
  --sky:#4cc2f0; --sky-ink:#6fd0f5; --sky-light:#82d8f7; --sky-dim:rgba(76,194,240,0.13);
  --amber:#eba845; --amber-ink:#f0b75f; --amber-light:#f5c97e; --amber-dim:rgba(235,168,69,0.13);
  --text:#ece9f2; --text2:#b9b4c4; --text3:#968fa5;
  --card:#1c1a25; --teal:#4cc2f0;
  --border:rgba(180,155,255,0.20); --border2:rgba(76,194,240,0.22);
  --border-soft:rgba(255,255,255,0.10);
  --shadow-sm:0 1px 8px rgba(0,0,0,0.42);
  --shadow:0 4px 24px rgba(0,0,0,0.5);
  --shadow-lg:0 8px 40px rgba(0,0,0,0.58);
  --grad-hero:linear-gradient(160deg,#14131a 0%,#1a1823 45%,#122029 100%);
  --grad-card:linear-gradient(135deg,rgba(180,155,255,0.07),rgba(76,194,240,0.05));
  color-scheme: dark;
}
:root[data-theme="dark"] img:not([src$=".svg"]) { opacity:0.94; }
:root[data-theme="dark"] .agency-badge { color:#14131a; }
:root[data-theme="dark"] .project-row .agency-badge.muted { background:#2a2735; color:var(--text2); }
:root[data-theme="dark"] .gal-tag-badge { background:rgba(28,26,37,0.92); }
:root[data-theme="dark"] .highlight-box, :root[data-theme="dark"] .apply-box { background:var(--bg2); }
:root[data-theme="dark"] code { background:var(--bg3); }

/* Windows / Android high-contrast mode */
@media (forced-colors: active) {
  .btn, .card, .system-card, .pub-item { border: 1px solid CanvasText; }
  .amount, .stat-num { -webkit-text-fill-color: CanvasText; }
}

/* the skip link sits on --violet, which lightens in dark mode */
.skip-link { color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .skip-link { color: #14131a; } }
:root[data-theme="dark"] .skip-link { color: #14131a; }
