/* ==========================================================
   GECA Virtual Laboratory Hub — shared stylesheet
   Government College of Engineering, Chhatrapati Sambhajinagar
   ========================================================== */

:root {
  --navy: #0b2a5b;
  --navy-2: #12387a;
  --saffron: #f59e0b;
  --saffron-2: #fbbf24;
  --teal: #0ea5a4;

  --bg: #f4f7fc;
  --bg-2: #e8eef9;
  --surface: #ffffff;
  --surface-2: #f8fafd;
  --text: #0f1b33;
  --muted: #55627a;
  --border: #dbe3f0;
  --shadow: 0 10px 30px -12px rgba(11, 42, 91, .25);
  --shadow-lg: 0 24px 50px -18px rgba(11, 42, 91, .40);
  --accent: var(--navy-2);
  --accent-ink: #ffffff;
  --hero-from: #0b2a5b;
  --hero-to: #1d4ed8;

  --radius: 18px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

html[data-theme="dark"] {
  --bg: #070f1f;
  --bg-2: #0c1830;
  --surface: #0f1d38;
  --surface-2: #132443;
  --text: #e7edf8;
  --muted: #9aa8c2;
  --border: #22365e;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 24px 50px -18px rgba(0, 0, 0, .75);
  --accent: var(--saffron);
  --accent-ink: #1a1203;
  --hero-from: #050b18;
  --hero-to: #12387a;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  transition: background .5s var(--ease), color .5s var(--ease);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font); line-height: 1.2; margin: 0; }
.container { width: min(1200px, 92%); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- scroll progress ---------- */
.progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 100;
  background: linear-gradient(90deg, var(--saffron), var(--teal));
  transform-origin: 0 50%; transform: scaleX(0);
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s var(--ease), background .5s var(--ease);
}
.site-header.scrolled { box-shadow: var(--shadow); }
.header-inner { display: flex; align-items: center; gap: 1rem; padding: .7rem 0; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; min-width: 0; }
.brand-logo {
  width: 48px; height: 48px; border-radius: 12px; flex: none;
  background: #fff; display: grid; place-items: center; overflow: hidden;
  box-shadow: 0 0 0 2px var(--saffron);
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-logo .fallback { font-family: var(--font); font-weight: 800; color: var(--navy); }
.brand-text { min-width: 0; }
.brand-text strong { display: block; font-family: var(--font); font-size: 1rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text span { display: block; font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { margin-left: auto; display: flex; align-items: center; gap: .35rem; }
.nav a {
  text-decoration: none; font-size: .9rem; font-weight: 500; color: var(--muted);
  padding: .45rem .8rem; border-radius: 999px; transition: color .2s, background .2s;
}
.nav a:hover, .nav a.active { color: var(--text); background: var(--bg-2); }

/* theme toggle */
.theme-toggle {
  position: relative; width: 64px; height: 34px; flex: none; border: 1px solid var(--border);
  border-radius: 999px; background: var(--bg-2); cursor: pointer; padding: 0;
  transition: background .5s var(--ease);
}
.theme-toggle .knob {
  position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--saffron-2), var(--saffron));
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  transition: transform .5s var(--ease), background .5s var(--ease);
}
html[data-theme="dark"] .theme-toggle .knob {
  transform: translateX(30px) rotate(360deg);
  background: linear-gradient(135deg, #64748b, #1e293b);
}
.theme-toggle svg { width: 15px; height: 15px; }
.theme-toggle .moon { display: none; }
html[data-theme="dark"] .theme-toggle .sun { display: none; }
html[data-theme="dark"] .theme-toggle .moon { display: block; }
.theme-toggle:focus-visible, .btn:focus-visible, .dept-head:focus-visible, .chip:focus-visible { outline: 3px solid var(--saffron); outline-offset: 3px; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(4.5rem, 9vw, 7.5rem);
  transition: background .5s var(--ease);
}
.hero::after { /* subtle grid */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
}
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: float 14s ease-in-out infinite; }
.blob.b1 { width: 380px; height: 380px; background: var(--saffron); top: -120px; right: -80px; opacity: .35; }
.blob.b2 { width: 300px; height: 300px; background: var(--teal); bottom: -140px; left: 8%; animation-delay: -5s; opacity: .35; }
.blob.b3 { width: 220px; height: 220px; background: #6366f1; top: 30%; left: 45%; animation-delay: -9s; opacity: .3; }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -25px) scale(1.08); }
  66% { transform: translate(-20px, 20px) scale(.95); }
}
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.25fr 1fr; gap: 2.5rem; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; padding: .4rem .9rem; border-radius: 999px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 800; margin: 1rem 0 .8rem; letter-spacing: -.02em; }
.hero h1 .grad {
  background: linear-gradient(90deg, var(--saffron-2), #fde68a, var(--saffron-2));
  background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 5s linear infinite;
}
@keyframes shine { to { background-position: 200% center; } }
.hero p.lead { font-size: clamp(1rem, 1.6vw, 1.15rem); color: rgba(255,255,255,.85); max-width: 60ch; margin: 0 0 1.6rem; }
.typed { border-right: 2px solid var(--saffron-2); padding-right: 3px; animation: caret 1s step-end infinite; }
@keyframes caret { 50% { border-color: transparent; } }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.stats { display: flex; flex-wrap: wrap; gap: 1rem 2.2rem; margin-top: 2.2rem; }
.stat strong { display: block; font-family: var(--font); font-size: 2rem; font-weight: 800; color: var(--saffron-2); }
.stat span { font-size: .85rem; color: rgba(255,255,255,.75); }

/* oscilloscope visual */
.scope {
  position: relative; border-radius: 22px; padding: 1.2rem;
  background: rgba(3, 10, 25, .55); border: 1px solid rgba(255,255,255,.15);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6);
  animation: rise 1s var(--ease) both .3s;
}
.scope-top { display: flex; gap: .4rem; margin-bottom: .8rem; }
.scope-top i { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; }
.scope-top i:nth-child(2) { background: #f59e0b; }
.scope-top i:nth-child(3) { background: #22c55e; }
.scope-top span { margin-left: auto; font: 600 .72rem/1 var(--font); letter-spacing: .1em; color: rgba(255,255,255,.6); }
.scope svg { width: 100%; height: auto; display: block; }
.scope .trace { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 3.2s var(--ease) forwards, wave 6s linear infinite 3.2s; }
.scope .t1 { stroke: var(--saffron-2); }
.scope .t2 { stroke: #22d3ee; animation-delay: .5s, 3.7s; }
.scope .t3 { stroke: #a78bfa; animation-delay: 1s, 4.2s; opacity: .8; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes wave { 0% { transform: translateX(0); } 100% { transform: translateX(-120px); } }
.scope-legend { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-top: .7rem; font-size: .75rem; color: rgba(255,255,255,.7); }
.scope-legend b { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: .35rem; vertical-align: middle; }
@keyframes rise { from { opacity: 0; transform: translateY(30px) scale(.97); } to { opacity: 1; transform: none; } }

.hero-wave { position: absolute; bottom: -1px; left: 0; width: 100%; height: 70px; z-index: 3; }
.hero-wave path { fill: var(--bg); transition: fill .5s var(--ease); }

/* ---------- buttons ---------- */
.btn {
  --b: var(--accent); --i: var(--accent-ink);
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: 600 .92rem/1 var(--font); text-decoration: none; cursor: pointer;
  padding: .85rem 1.25rem; border-radius: 12px; border: 1px solid transparent;
  background: var(--b); color: var(--i);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .3s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -10px color-mix(in srgb, var(--b) 70%, transparent); }
.btn svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn.primary { --b: var(--saffron); --i: #1a1203; }
.btn.ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.3); }
.btn.ghost:hover { background: rgba(255,255,255,.18); }
.btn.outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn.outline:hover { border-color: var(--accent); color: var(--accent); }
.btn.sm { padding: .6rem .9rem; font-size: .82rem; border-radius: 10px; }
.btn .ripple { position: absolute; border-radius: 50%; background: rgba(255,255,255,.45); transform: scale(0); animation: ripple .6s linear; pointer-events: none; }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }

/* ---------- section ---------- */
section.block { padding: clamp(3rem, 6vw, 5rem) 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.section-head .kicker { font: 700 .78rem/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--saffron); }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-top: .5rem; }
.section-head p { color: var(--muted); margin: .4rem 0 0; max-width: 60ch; }

/* toolbar */
.toolbar { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-bottom: 1.5rem; }
.search {
  flex: 1 1 260px; display: flex; align-items: center; gap: .6rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0 .9rem;
  transition: border-color .2s, box-shadow .2s, background .5s var(--ease);
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.search svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.search input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; padding: .8rem 0; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip {
  font: 500 .84rem/1 var(--font-body); padding: .55rem .9rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  transition: all .25s var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--accent); }
.chip.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tool-btns { display: flex; gap: .45rem; }

/* ---------- department accordion ---------- */
.depts { display: grid; gap: 1.1rem; }
.dept {
  --c: var(--navy-2);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; position: relative;
  transition: background .5s var(--ease), border-color .3s, transform .3s var(--ease);
}
.dept::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c); }
.dept.hidden { display: none; }
.dept-head {
  width: 100%; display: flex; align-items: center; gap: 1rem; text-align: left; cursor: pointer;
  background: none; border: 0; color: inherit; font: inherit; padding: 1.2rem 1.4rem 1.2rem 1.6rem;
}
.dept-icon {
  width: 54px; height: 54px; border-radius: 14px; flex: none; display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c);
  transition: transform .5s var(--ease);
}
.dept-head:hover .dept-icon { transform: rotate(-8deg) scale(1.06); }
.dept-icon svg { width: 28px; height: 28px; }
.dept-title { flex: 1; min-width: 0; }
.dept-title small { display: block; font: 700 .72rem/1 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .35rem; }
.dept-title h3 { font-size: clamp(1.05rem, 2vw, 1.3rem); }
.dept-count { font: 600 .8rem/1 var(--font); padding: .45rem .75rem; border-radius: 999px; background: var(--bg-2); color: var(--muted); white-space: nowrap; }
.chev { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); flex: none; transition: transform .45s var(--ease), background .3s; }
.chev svg { width: 18px; height: 18px; }
.dept.open .chev { transform: rotate(180deg); background: var(--c); color: #fff; }
.dept-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s var(--ease); }
.dept.open .dept-body { grid-template-rows: 1fr; }
.dept-body > .inner { overflow: hidden; }
.labs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; padding: .2rem 1.4rem 1.5rem 1.6rem; }

/* department colors */
.dept[data-dept="electrical"] { --c: #f59e0b; }
.dept[data-dept="entc"] { --c: #2563eb; }
.dept[data-dept="mechanical"] { --c: #dc2626; }
.dept[data-dept="cse"] { --c: #7c3aed; }
.dept[data-dept="it"] { --c: #0ea5a4; }
.dept[data-dept="civil"] { --c: #16a34a; }

/* ---------- lab cards ---------- */
.lab {
  --c2: var(--c, var(--navy-2));
  position: relative; display: flex; flex-direction: column; gap: .7rem;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; padding: 1.2rem;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s, background .5s var(--ease);
  transform-style: preserve-3d; will-change: transform;
  opacity: 0; transform: translateY(18px);
}
.dept.open .lab { animation: cardIn .6s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 80ms + 120ms); }
@keyframes cardIn { to { opacity: 1; transform: none; } }
.dept.open .lab.done { animation: none; opacity: 1; transform: none; }
.lab:hover { box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--c2) 55%, var(--border)); }
.lab::after { /* glow following cursor */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--c2) 16%, transparent), transparent 60%);
  transition: opacity .3s;
}
.lab:hover::after { opacity: 1; }
.lab-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.module { font: 700 .72rem/1 var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--c2); }
.tag { font: 600 .7rem/1 var(--font-body); padding: .35rem .6rem; border-radius: 999px; background: color-mix(in srgb, var(--c2) 14%, transparent); color: var(--c2); }
.tag.new { background: rgba(34,197,94,.15); color: #16a34a; }
.tag.soon { background: var(--bg-2); color: var(--muted); }
.lab h4 { font-size: 1.08rem; }
.lab p { margin: 0; font-size: .9rem; color: var(--muted); }
.lab .meta { font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: .4rem; }
.lab .meta svg { width: 14px; height: 14px; }
.lab .actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: .5rem; padding-top: .3rem; }
.lab .btn { --b: var(--c2); --i: #fff; }
.lab .btn.outline { color: var(--text); }
.lab .btn.outline:hover { color: var(--c2); border-color: var(--c2); }
.lab.soon { border-style: dashed; }
.lab.soon .bar { height: 6px; border-radius: 6px; background: var(--bg-2); overflow: hidden; margin-top: auto; }
.lab.soon .bar i { display: block; height: 100%; width: 40%; border-radius: inherit; background: linear-gradient(90deg, transparent, var(--c2), transparent); animation: load 1.8s ease-in-out infinite; }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.exp-list { list-style: none; margin: .2rem 0 0; padding: 0; display: grid; gap: .4rem; }
.exp-list a {
  display: flex; align-items: center; gap: .6rem; text-decoration: none; font-size: .88rem;
  padding: .55rem .7rem; border-radius: 10px; background: var(--surface); border: 1px solid var(--border);
  transition: transform .25s var(--ease), border-color .25s, color .25s;
}
.exp-list a:hover { transform: translateX(4px); border-color: var(--c2); color: var(--c2); }
.exp-list a span.n { font: 700 .72rem/1 var(--font); width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; background: color-mix(in srgb, var(--c2) 15%, transparent); color: var(--c2); flex: none; }
.exp-list a svg { width: 14px; height: 14px; margin-left: auto; opacity: .6; }
.empty { display: none; text-align: center; color: var(--muted); padding: 2rem; }
.empty.show { display: block; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- sub page cards (control / FY) ---------- */
.portal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.2rem; }
.portal {
  position: relative; overflow: hidden; border-radius: var(--radius); padding: 1.6rem; color: #fff; text-decoration: none;
  background: linear-gradient(135deg, var(--navy), var(--navy-2)); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: .6rem; min-height: 200px;
  transition: transform .4s var(--ease);
}
.portal.alt { background: linear-gradient(135deg, #b45309, var(--saffron)); }
.portal:hover { transform: translateY(-6px); }
.portal::before { content: ""; position: absolute; width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,.08); right: -70px; top: -90px; transition: transform .6s var(--ease); }
.portal:hover::before { transform: scale(1.4); }
.portal .p-icon { width: 50px; height: 50px; border-radius: 14px; background: rgba(255,255,255,.15); display: grid; place-items: center; }
.portal .p-icon svg { width: 26px; height: 26px; }
.portal h3 { font-size: 1.3rem; }
.portal p { margin: 0; color: rgba(255,255,255,.82); font-size: .92rem; }
.portal .go { margin-top: auto; display: inline-flex; align-items: center; gap: .4rem; font: 600 .9rem/1 var(--font); }
.portal .go svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.portal:hover .go svg { transform: translateX(5px); }

.exp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.1rem; }
.exp-grid .lab { opacity: 1; transform: none; }
.exp-grid .lab.reveal { opacity: 0; transform: translateY(28px); }
.exp-grid .lab.reveal.in { opacity: 1; transform: none; }
.formula {
  font: 500 .88rem/1.4 "Cambria Math", "Times New Roman", serif; font-style: italic;
  padding: .55rem .75rem; border-radius: 10px; background: var(--surface); border: 1px dashed var(--border); color: var(--text);
}
.num-badge {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  font: 800 .95rem/1 var(--font); color: #fff; background: linear-gradient(135deg, var(--c2), color-mix(in srgb, var(--c2) 60%, #000));
}

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: .85rem; color: rgba(255,255,255,.75); margin-bottom: 1rem; }
.crumbs a { text-decoration: none; color: rgba(255,255,255,.85); }
.crumbs a:hover { color: var(--saffron-2); }
.sub-hero .hero-grid { grid-template-columns: 1fr; }
.note {
  display: flex; gap: .8rem; align-items: flex-start; padding: 1rem 1.2rem; border-radius: 14px; margin-top: 1.5rem;
  background: color-mix(in srgb, var(--saffron) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--saffron) 35%, var(--border));
  font-size: .9rem; color: var(--text);
}
.note svg { width: 20px; height: 20px; flex: none; color: var(--saffron); margin-top: 2px; }

/* ---------- contributors / footer ---------- */
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.person { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); transition: transform .3s var(--ease), background .5s var(--ease); }
.person:hover { transform: translateY(-4px); }
.avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font: 700 1rem/1 var(--font); color: #fff; background: linear-gradient(135deg, var(--navy-2), var(--teal)); flex: none; }
.person strong { display: block; font-family: var(--font); font-size: .95rem; }
.person span { font-size: .8rem; color: var(--muted); }

.site-footer { background: #061226; color: rgba(255,255,255,.75); padding: 2.6rem 0 1.4rem; margin-top: 2rem; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: .8rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.site-footer a { text-decoration: none; color: rgba(255,255,255,.75); transition: color .2s; }
.site-footer a:hover { color: var(--saffron-2); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 2rem; padding-top: 1.2rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; font-size: .8rem; }

.to-top {
  position: fixed; right: 1.2rem; bottom: 1.2rem; width: 46px; height: 46px; border-radius: 50%; z-index: 60;
  border: 0; cursor: pointer; background: var(--saffron); color: #1a1203; box-shadow: var(--shadow-lg);
  display: grid; place-items: center; opacity: 0; transform: translateY(20px) scale(.8); pointer-events: none;
  transition: opacity .3s, transform .3s var(--ease);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top svg { width: 20px; height: 20px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .scope { max-width: 520px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .nav a:not(.keep) { display: none; }
  .brand-text span { display: none; }
  .dept-count { display: none; }
  .dept-head { padding: 1rem 1rem 1rem 1.3rem; }
  .labs { padding: .2rem 1rem 1.2rem 1.3rem; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal, .lab { opacity: 1 !important; transform: none !important; }
  .scope .trace { stroke-dashoffset: 0; }
}
