/* ==========================================================================
   Dr. E. Maruthi Prasad, Ph.D. — Portfolio
   Design system & stylesheet
   --------------------------------------------------------------------------
   Contents
   01  Tokens — colour, type, space, motion
   02  Reset & base
   03  Typography primitives
   04  Layout primitives
   05  Components — buttons, tags, notices, panels, fields, chips
   06  Header & navigation
   07  Hero
   08  About
   09  Experience timeline
   10  Research explorer
   11  Featured publication
   12  Publications library
   13  Clinical laboratory capabilities
   14  Collaboration
   15  Contact
   16  Footer
   17  Utilities, motion, print
   ========================================================================== */

/* ==========================================================================
   01  TOKENS
   ========================================================================== */
:root {
  /* Brand - New Premium Scientific Theme */
  --emerald:     #063B35;
  --emerald-900: #052A24;
  --emerald-800: #063B35;
  --emerald-700: #0B5D50;
  --emerald-600: #0F7561;
  --forest:      #0B5D50;
  --forest-600:  #12856B;
  --white:       #FFFFFF;
  --ivory:       #FAF8F2;
  --ivory-2:     #F2F0E6;
  --ivory-3:     #EAE7D9;
  --sage:        #E5EEE8;
  --sage-200:    #F5F9F6;
  --sage-300:    #E5EEE8;
  --teal:        #0F7561;
  --teal-600:    #0B5D50;
  --teal-500:    #0F7561;
  --teal-300:    #A8D5C7;   /* light sage-green for links on emerald */
  --teal-100:    #F5F9F6;
  --gold:        #C7A66A;
  --gold-400:    #D4B57F;
  --gold-300:    #E1C592;
  --gold-100:    #FAF5EC;
  --gold-ink:    #7D6742;   /* text-safe gold for light surfaces */
  --charcoal:    #263238;
  --charcoal-700:#1F292D;
  --navy:        var(--emerald); /* Map to emerald for backward compatibility */
  --navy-900:    var(--emerald-900);
  --navy-800:    var(--emerald);
  --navy-700:    var(--forest);
  --navy-600:    var(--emerald-600);
  --platinum:    var(--ivory);
  --platinum-2:  var(--ivory-2);
  --platinum-3:  var(--ivory-3);

  /* Semantic — light theme */
  --bg:          var(--white);
  --bg-alt:      var(--ivory);
  --surface:     var(--white);
  --surface-2:   var(--ivory);
  --surface-3:   var(--sage);
  --text:        var(--charcoal);
  --text-strong: var(--emerald);
  --text-muted:  #4A575C;
  --text-faint:  #6F7C81;   /* >= 4.5:1 on ivory surfaces */
  --accent:      var(--forest);
  --accent-soft: var(--sage-200);
  --line:        #E7EDE9;
  --line-strong: #D5E2D9;
  --focus:       var(--forest);
  --on-dark:     #F5F9F6;
  --on-dark-mut: #C9D8CD;
  --on-dark-line: rgba(255,255,255,.16);

  /* Typography */
  --font-sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Newsreader", ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --step--2: clamp(0.72rem, 0.70rem + 0.08vw, 0.76rem);
  --step--1: clamp(0.82rem, 0.80rem + 0.10vw, 0.875rem);
  --step-0:  clamp(1rem, 0.97rem + 0.16vw, 1.0625rem);
  --step-1:  clamp(1.12rem, 1.07rem + 0.26vw, 1.3rem);
  --step-2:  clamp(1.32rem, 1.22rem + 0.5vw, 1.65rem);
  --step-3:  clamp(1.6rem, 1.38rem + 1.0vw, 2.2rem);
  --step-4:  clamp(1.95rem, 1.55rem + 1.9vw, 3.05rem);
  --step-5:  clamp(2.35rem, 1.65rem + 3.1vw, 4.15rem);

  /* Space */
  --sp-1: 0.25rem; --sp-2: 0.5rem;  --sp-3: 0.75rem; --sp-4: 1rem;
  --sp-5: 1.5rem;  --sp-6: 2rem;    --sp-7: 2.5rem;  --sp-8: 3rem;
  --sp-9: 4rem;    --sp-10: 5.5rem;
  --section-y: clamp(3.75rem, 2.25rem + 6.5vw, 7.5rem);
  --gutter: clamp(1.15rem, 0.7rem + 2.2vw, 2.5rem);
  --container: 1240px;
  --container-narrow: 940px;
  --header-h: 72px;

  /* Shape & depth */
  --r-xs: 2px; --r-sm: 4px; --r-md: 7px; --r-lg: 11px; --r-pill: 999px;
  --shadow-xs: 0 1px 2px rgba(16,34,56,.05);
  --shadow-sm: 0 1px 3px rgba(16,34,56,.06), 0 1px 2px rgba(16,34,56,.04);
  --shadow-md: 0 8px 24px -12px rgba(16,34,56,.16), 0 2px 6px -3px rgba(16,34,56,.08);
  --shadow-lg: 0 28px 60px -28px rgba(16,34,56,.26), 0 4px 14px -8px rgba(16,34,56,.10);

  /* Motion */
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --dur: .28s;
  --dur-slow: .6s;
}

html[data-theme="dark"] {
  --bg:          #041714;
  --bg-alt:      #05211C;
  --surface:     #062A23;
  --surface-2:   #05211C;
  --surface-3:   #0B3C32;
  --text:        #E5F0EC;
  --text-strong: #F7FBF9;
  --text-muted:  #B9D2CA;
  --text-faint:  #95B5AC;
  --accent:      #4CBDA8;
  --accent-soft: rgba(76,189,168,.14);
  --line:        #15473C;
  --line-strong: #1F5C4C;
  --focus:       #6CD5BD;
  --gold:        #C7A66A;
  --teal-600:    #4CBDA8;
  --emerald:     #041714;
  --emerald-800: #041714;
  --forest:      #4CBDA8;
  --platinum:    #05211C;
  --platinum-2:  #0B3C32;
  --teal-100:    rgba(76,189,168,.14);
  --gold-100:    rgba(199,166,106,.12);
  --gold-ink:    #C7A66A;
  --sage-200:    rgba(76,189,168,.08);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.5);
  --shadow-md: 0 10px 28px -14px rgba(0,0,0,.7);
  --shadow-lg: 0 30px 60px -30px rgba(0,0,0,.8);
}

/* ==========================================================================
   02  RESET & BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.68;
  letter-spacing: .002em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: .18em; }
a:hover { text-decoration-color: currentColor; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }

::selection { background: var(--teal); color: #fff; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: 0; left: 50%; transform: translate(-50%, -130%);
  z-index: 200; background: var(--emerald); color: #fff;
  padding: .7rem 1.2rem; border-radius: 0 0 var(--r-md) var(--r-md);
  font-size: var(--step--1); font-weight: 600; text-decoration: none;
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon--16 { width: 16px; height: 16px; }
.icon--18 { width: 18px; height: 18px; }
.icon--20 { width: 20px; height: 20px; }
.icon--24 { width: 24px; height: 24px; }
.icon--28 { width: 28px; height: 28px; }
.icon--40 { width: 40px; height: 40px; stroke-width: 1.1; }
.icon--56 { width: 56px; height: 56px; stroke-width: 1; }

/* ==========================================================================
   03  TYPOGRAPHY PRIMITIVES
   ========================================================================== */
h1, h2, h3, h4, h5 {
  font-family: var(--font-serif);
  color: var(--text-strong);
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); line-height: 1.28; }
h5 { font-size: var(--step-0); }

p { text-wrap: pretty; }
strong, b { font-weight: 700; color: var(--text-strong); }
/* Light-on-dark safety: strong/b must not inherit the navy ink colour when
   they sit on the navy sections (would render navy-on-navy). */
.hero strong, .hero b,
.section--navy strong, .section--navy b,
.site-footer strong, .site-footer b { color: var(--on-dark); }
em { font-style: italic; }

.muted { color: var(--text-faint); font-weight: 400; font-size: .92em; }

.eyebrow {
  display: flex; align-items: center; gap: .7rem;
  font-family: var(--font-sans);
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-4);
}
.eyebrow__num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.85rem; height: 1.85rem; padding: 0 .4rem;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  font-size: .72rem; letter-spacing: .04em; color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.eyebrow--light { color: var(--gold-300); }
.eyebrow--light .eyebrow__num { border-color: var(--on-dark-line); color: var(--on-dark-mut); }
.eyebrow__rule { width: clamp(22px, 4vw, 46px); height: 1px; background: currentColor; opacity: .5; }

.prose { max-width: 68ch; }
.prose p + p { margin-top: var(--sp-4); }
.prose__lead {
  font-family: var(--font-serif);
  font-size: var(--step-2);
  line-height: 1.42;
  color: var(--text-strong);
  letter-spacing: -.008em;
  margin-bottom: var(--sp-5);
}

.link-arrow {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: var(--step--1); font-weight: 600;
  color: var(--accent); text-decoration: none;
  border-bottom: 1px solid transparent; padding-bottom: 1px;
}
.link-arrow:hover { border-bottom-color: currentColor; }

/* ==========================================================================
   04  LAYOUT PRIMITIVES
   ========================================================================== */
.container {
  width: 100%; max-width: var(--container);
  margin-inline: auto; padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); position: relative; }
.section--tinted { background: var(--bg-alt); }
.section--navy {
  background: linear-gradient(180deg, var(--emerald) 0%, var(--emerald-900) 100%);
  color: var(--on-dark);
}
html[data-theme="dark"] .section--navy { background: linear-gradient(180deg, #041714 0%, #030D0B 100%); }
.section--navy h2, .section--navy h3, .section--navy h4 { color: #fff; }

.section__head { max-width: 46rem; margin-bottom: clamp(2.25rem, 1.5rem + 2.6vw, 3.75rem); }
.section__title { margin-bottom: var(--sp-5); }
.section__lede {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 44rem;
}
.section--navy .section__lede { color: var(--on-dark-mut); }
.section__head--light { color: var(--on-dark); }

/* ==========================================================================
   05  COMPONENTS
   ========================================================================== */
/* Buttons ---------------------------------------------------------------- */
.btn {
  --btn-bg: transparent; --btn-fg: var(--text-strong); --btn-bd: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .78rem 1.35rem;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: .005em;
  line-height: 1.2;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid var(--btn-bd);
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn--lg { padding: .95rem 1.6rem; font-size: var(--step-0); }
.btn--sm { padding: .55rem 1rem; }

.btn--primary { --btn-bg: var(--emerald); --btn-fg: #fff; --btn-bd: var(--emerald); }
.btn--primary:hover { --btn-bg: var(--forest); --btn-bd: var(--forest); }
html[data-theme="dark"] .btn--primary { --btn-bg: var(--forest); --btn-bd: var(--forest); --btn-fg: #fff; }
html[data-theme="dark"] .btn--primary:hover { --btn-bg: var(--accent); --btn-bd: var(--accent); }

.btn--gold { --btn-bg: var(--gold); --btn-fg: #17202b; --btn-bd: var(--gold); }
.btn--gold:hover { --btn-bg: var(--gold-400); --btn-bd: var(--gold-400); }

.btn--ghost-light { --btn-fg: #fff; --btn-bd: var(--on-dark-line); }
.btn--ghost-light:hover { --btn-bg: rgba(255,255,255,.08); --btn-bd: rgba(255,255,255,.4); }

.btn--sub { --btn-bg: transparent; --btn-fg: var(--text-strong); --btn-bd: var(--line-strong); }
.btn--sub:hover { --btn-bg: var(--surface-2); }

/* Tags ------------------------------------------------------------------- */
.tag {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .2rem .5rem;
  font-size: .68rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  border-radius: var(--r-xs);
  border: 1px solid currentColor;
  white-space: nowrap;
}
.tag--pending { color: var(--gold-ink); background: var(--gold-100); }
.tag--published { color: var(--accent); background: var(--accent-soft); }
.tag--mixed { color: var(--gold-ink); background: var(--gold-100); }
html[data-theme="dark"] .tag--pending,
html[data-theme="dark"] .tag--mixed { color: var(--gold); }
.tag--interest { color: var(--text-muted); background: var(--surface-3); }
.tag--theme {
  color: var(--text-muted); background: transparent; border-color: var(--line-strong);
  text-transform: none; letter-spacing: .02em; font-size: .7rem; font-weight: 600;
}
.tag--soft { color: var(--text-muted); background: var(--surface-2); border-color: var(--line); }

/* Notices ---------------------------------------------------------------- */
.notice {
  display: flex; gap: .9rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-size: var(--step--1);
  line-height: 1.6;
  color: var(--text-muted);
}
.notice > .icon { margin-top: .18rem; color: var(--text-faint); }
.notice__title {
  font-family: var(--font-sans);
  font-size: var(--step--2); font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--text-strong); margin-bottom: .4rem;
}
.notice p + p { margin-top: .6rem; }
.notice--review { border-left-color: var(--gold); background: var(--gold-100); }
.notice--review > .icon { color: var(--gold); }
.notice--info { border-left-color: var(--accent); background: var(--accent-soft); }
.notice--info > .icon { color: var(--accent); }
.notice__meta { font-size: .78rem; color: var(--text-faint); }
.flag {
  display: inline-block; padding: 0 .3rem; border-radius: var(--r-xs);
  background: var(--gold); color: #1b1b1b; font-size: .7rem;
  font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}

/* Panels ----------------------------------------------------------------- */
.panel {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  padding: clamp(1.25rem, 1rem + 1vw, 1.85rem);
  box-shadow: var(--shadow-sm);
}
.panel + .panel { margin-top: var(--sp-5); }
.panel--plain { box-shadow: none; }
.panel__title {
  font-family: var(--font-sans);
  font-size: var(--step--2); font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-faint);
  padding-bottom: .75rem; margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.panel__foot {
  margin-top: 1rem; padding-top: .85rem; border-top: 1px solid var(--line);
  font-size: .78rem; color: var(--text-faint);
}

/* Fields ----------------------------------------------------------------- */
.field { position: relative; display: flex; flex-direction: column; gap: .38rem; }
.field label {
  font-size: var(--step--1); font-weight: 600; color: var(--text-strong);
}
.req { color: var(--gold-ink); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: .72rem .85rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: var(--step-0);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field textarea { resize: vertical; min-height: 8rem; line-height: 1.6; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 18px) 51%, calc(100% - 13px) 51%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 2.4rem; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--text-faint); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] {
  border-color: #B4432F; box-shadow: 0 0 0 3px rgba(180,67,47,.12);
}
.field__error { font-size: var(--step--1); color: #B4432F; font-weight: 600; }
html[data-theme="dark"] .field__error { color: #F09A88; }
.field__hint { font-size: .76rem; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.field--search { position: relative; }
.field--search input { padding-left: 2.9rem; padding-right: 2.6rem; }
.field__icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--text-faint); pointer-events: none; }
.field__clear {
  position: absolute; right: .7rem; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 26px; height: 26px;
  border-radius: var(--r-pill); color: var(--text-faint);
}
.field__clear:hover { background: var(--surface-3); color: var(--text-strong); }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Chips ------------------------------------------------------------------ */
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .42rem .8rem;
  font-size: var(--step--1); font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.chip:hover { color: var(--text-strong); border-color: var(--text-faint); }
.chip[aria-pressed="true"] {
  color: #fff; background: var(--emerald); border-color: var(--emerald);
}
html[data-theme="dark"] .chip[aria-pressed="true"] { color: #fff; background: var(--forest); border-color: var(--forest); }
.chip__count { font-size: .7rem; opacity: .65; font-variant-numeric: tabular-nums; }

/* ==========================================================================
   06  HEADER & NAVIGATION
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .site-header { background: var(--bg); }
}
.site-header.is-stuck { box-shadow: var(--shadow-sm); }

.header__inner {
  display: flex; align-items: center; gap: var(--sp-5);
  min-height: var(--header-h);
  justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; flex: none; }
.brand__mark {
  display: grid; place-items: center;
  width: 38px; height: 38px; flex: none;
  background: var(--emerald); color: var(--gold-300);
  border-radius: var(--r-sm);
  font-family: var(--font-serif); font-size: 1rem; letter-spacing: .02em;
  border: 1px solid var(--forest);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__name { font-family: var(--font-serif); font-size: 1.02rem; color: var(--text-strong); }
.brand__meta { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); font-weight: 600; }

.nav { display: flex; align-items: center; gap: var(--sp-5); }
.nav__list { display: flex; align-items: center; gap: .15rem; list-style: none; padding: 0; }
.nav__link {
  display: block; padding: .5rem .7rem;
  font-size: var(--step--1); font-weight: 600; color: var(--text-muted);
  text-decoration: none; border-radius: var(--r-sm);
  position: relative;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav__link:hover { color: var(--text-strong); background: var(--surface-2); }
.nav__link.is-active { color: var(--text-strong); }
.nav__link.is-active::after {
  content: ""; position: absolute; left: .7rem; right: .7rem; bottom: .15rem;
  height: 2px; background: var(--gold); border-radius: 2px;
}
.nav__actions { display: flex; align-items: center; gap: .6rem; }

.theme-toggle {
  display: grid; place-items: center;
  width: 38px; height: 38px; flex: none;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  color: var(--text-muted);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.theme-toggle:hover { color: var(--text-strong); border-color: var(--text-faint); background: var(--surface-2); }
.theme-toggle__icon { display: grid; place-items: center; }
.theme-toggle__icon > svg + svg { display: none; }
html[data-theme="dark"] .theme-toggle__icon > svg:first-child { display: none; }
html[data-theme="dark"] .theme-toggle__icon > svg + svg { display: block; }

.header__compact { display: none; align-items: center; gap: .5rem; }
.menu-toggle {
  display: grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  color: var(--text-strong);
}
.menu-toggle__close { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle__open { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle__close { display: block; }

.progress-rail { height: 2px; background: transparent; }
.progress-rail__bar { display: block; height: 100%; width: 0; background: var(--gold); }

/* ==========================================================================
   07  HERO
   ========================================================================== */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--emerald) 0%, var(--emerald-900) 100%);
  color: var(--on-dark);
  padding-top: clamp(3rem, 1.5rem + 5vw, 5.5rem);
  overflow: hidden;
  isolation: isolate;
}
.hero__backdrop { position: absolute; inset: 0; z-index: -1; }
.hero__lattice {
  position: absolute; top: 50%; right: -12%; transform: translateY(-50%);
  width: min(1050px, 95vw); height: auto; opacity: .5;
}
.hero__lattice-lines { fill: none; stroke: rgba(199,166,106,.3); stroke-width: 1; }
.hero__lattice-nodes { fill: var(--gold-300); opacity: .6; }
.hero__grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(199,166,106,.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(199,166,106,.05) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 90% 70% at 30% 40%, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 30% 40%, #000 25%, transparent 78%);
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, .88fr);
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: center;
  padding-bottom: clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
}

.hero__content { max-width: 40rem; }

.hero__title { color: #fff; margin-bottom: var(--sp-4); letter-spacing: -.02em; }
.hero__title-suffix { font-style: italic; color: var(--gold-300); font-weight: 300; }

.hero__roles {
  display: flex; flex-wrap: wrap; align-items: center; gap: .55rem;
  font-size: var(--step-1);
  color: var(--on-dark);
  font-weight: 500;
  letter-spacing: -.005em;
  margin-bottom: var(--sp-6);
}
.hero__roles-sep { color: var(--gold); opacity: .7; font-weight: 300; }

.hero__statement {
  position: relative;
  padding-left: 1.4rem;
  border-left: 1px solid var(--on-dark-line);
  margin-bottom: var(--sp-7);
}
.hero__statement-mark {
  position: absolute; left: -14px; top: -6px;
  color: var(--gold);
  fill: currentColor; stroke: none;
  background: var(--emerald); padding: 2px 2px 2px 0;
}
.hero__statement blockquote {
  font-family: var(--font-serif);
  font-size: var(--step-2);
  font-style: italic;
  line-height: 1.48;
  color: #E9EFF4;
  letter-spacing: -.008em;
  max-width: 34ch;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: var(--sp-7); }

.hero__creds { border-top: 1px solid var(--on-dark-line); padding-top: var(--sp-5); }
.hero__creds-label {
  font-size: var(--step--2); font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold-300); margin-bottom: .7rem;
}
.hero__creds-list { list-style: none; padding: 0; display: grid; gap: .35rem; }
.hero__creds-list li { font-size: var(--step--1); color: var(--on-dark-mut); }
.hero__creds-list strong { color: #fff; font-weight: 700; min-width: 3.4rem; display: inline-block; }
.hero__creds-list a { color: var(--gold-300); text-decoration-color: rgba(199,166,106,.5); }

/* Hero contact — sits directly below Academic credentials */
.hero__contact {
  margin-top: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--on-dark-line);
}
.hero__contact-list {
  list-style: none; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem var(--sp-5);
}
.hero__contact-list li { display: flex; align-items: flex-start; gap: .7rem; }
.hero__contact-icon {
  display: grid; place-items: center; flex: none;
  width: 34px; height: 34px; border-radius: var(--r-sm);
  color: var(--gold-300);
  background: rgba(199,166,106,.1);
  border: 1px solid rgba(199,166,106,.32);
}
.hero__contact-body { display: flex; flex-direction: column; gap: .12rem; min-width: 0; }
.hero__contact-meta {
  font-size: .68rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--on-dark-mut);
}
.hero__contact-link {
  font-size: var(--step-0); font-weight: 600; color: #fff;
  text-decoration: none; word-break: break-word;
  border-bottom: 1px solid transparent; padding-bottom: 1px;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.hero__contact-link:hover { color: var(--gold-300); border-bottom-color: currentColor; }
.hero__whatsapp { margin-top: var(--sp-5); }

.btn--whatsapp { --btn-bg: var(--forest); --btn-fg: #fff; --btn-bd: var(--forest); }
.btn--whatsapp:hover { --btn-bg: var(--emerald); --btn-bd: var(--emerald); }

.hero__visual { position: relative; display: flex; justify-content: center; }

.portrait {
  position: relative;
  width: min(100%, 380px);
  border: 1px solid var(--gold-300);
  border-radius: var(--r-lg);
  background: linear-gradient(170deg, rgba(199,166,106,0.15), rgba(6,59,53,0.5));
  padding: .6rem;
  box-shadow: 0 30px 60px -20px rgba(6,59,53,0.7), 0 0 40px rgba(199,166,106,0.15);
  z-index: 1;
  overflow: hidden;
  backdrop-filter: saturate(115%);
}
.portrait img {
  width: 100%; height: auto; border-radius: var(--r-md);
  background: var(--emerald-800);
  object-fit: cover;
  aspect-ratio: 4/5;
  display: block;
}
.portrait__caption {
  display: flex; align-items: center; gap: .5rem;
  padding: .7rem .3rem .2rem;
  font-size: .72rem; color: var(--on-dark-mut);
  letter-spacing: .02em;
}

.hero__art {
  position: absolute; right: -6%; bottom: -8%; width: 58%;
  max-width: 250px;
  color: var(--gold-300);
  opacity: .85;
  z-index: 0;
  pointer-events: none;
}
.hero__art-ring circle { fill: none; stroke: currentColor; stroke-width: .7; opacity: .45; }
.hero__art-cell > path:first-child { fill: rgba(199,166,106,.08); stroke: none; }
.hero__art-cell circle { fill: none; stroke: var(--gold-300); stroke-width: .9; opacity: .8; }
.hero__art-cell path { fill: none; stroke: var(--teal-300); stroke-width: .8; opacity: .7; }
.hero__art-helix path { fill: none; stroke: var(--gold-300); stroke-width: .9; opacity: .6; }
.hero__art-dots circle { fill: currentColor; opacity: .5; }

.hero__strip {
  border-top: 1px solid var(--on-dark-line);
  background: rgba(0,0,0,.12);
}
.hero__strip-inner { padding-block: var(--sp-5); }
.hero__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-5);
}
.hero__fact dt {
  font-size: var(--step--2); font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--gold-300);
  margin-bottom: .3rem;
}
.hero__fact dd { font-size: var(--step--1); color: var(--on-dark); line-height: 1.5; }
.hero__fact .muted { color: var(--on-dark-mut); }

/* ==========================================================================
   08  ABOUT
   ========================================================================== */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(2rem, 1rem + 3.5vw, 4rem);
  align-items: start;
}
.about__bio > .notice { margin-top: var(--sp-7); }

.expertise { list-style: none; padding: 0; display: grid; gap: .55rem; }
.expertise li {
  position: relative; padding-left: 1.4rem;
  font-size: var(--step--1); line-height: 1.5; color: var(--text-muted);
}
.expertise li::before {
  content: ""; position: absolute; left: .1rem; top: .62em;
  width: 6px; height: 6px; border: 1px solid var(--accent); border-radius: 1px;
  transform: rotate(45deg);
}

.mini-timeline { list-style: none; padding: 0; display: grid; gap: 1.15rem; }
.mini-timeline li {
  position: relative; padding-left: 1.1rem;
  border-left: 1px solid var(--line);
}
.mini-timeline li::before {
  content: ""; position: absolute; left: -4px; top: .5em;
  width: 7px; height: 7px; background: var(--bg); border: 1.5px solid var(--accent);
  border-radius: 50%;
}
.mini-timeline__years {
  font-family: var(--font-mono);
  font-size: .72rem; letter-spacing: .04em; color: var(--accent);
  font-weight: 600; margin-bottom: .15rem;
}
.mini-timeline__role { font-size: var(--step--1); font-weight: 700; color: var(--text-strong); }
.mini-timeline__org { font-size: var(--step--1); color: var(--text-muted); }
.mini-timeline__note { font-size: .8rem; color: var(--text-faint); margin-top: .25rem; }

/* ==========================================================================
   09  EXPERIENCE TIMELINE
   ========================================================================== */
.timeline { list-style: none; padding: 0; position: relative; max-width: 60rem; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: .6rem; bottom: 1.5rem;
  width: 1px; background: var(--line-strong);
}
.timeline__item { position: relative; padding-left: 2.4rem; padding-bottom: var(--sp-7); }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__marker {
  position: absolute; left: 0; top: .55rem;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg-alt); border: 2px solid var(--accent);
}
.timeline__item:first-child .timeline__marker { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline__period {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  font-family: var(--font-mono);
  font-size: .76rem; font-weight: 600; letter-spacing: .03em;
  color: var(--accent); margin-bottom: .35rem;
}
.timeline__role { font-size: var(--step-2); margin-bottom: .2rem; }
.timeline__org {
  font-size: var(--step--1); font-weight: 600; color: var(--text-strong);
  margin-bottom: .6rem;
}
.timeline__text { font-size: var(--step-0); color: var(--text-muted); max-width: 56ch; }
.timeline__source {
  margin-top: .7rem; padding-top: .6rem;
  border-top: 1px dashed var(--line);
  font-size: .78rem; color: var(--text-faint); max-width: 58ch;
}
.timeline__foot {
  max-width: 52rem; margin-top: var(--sp-7); padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
  font-size: var(--step--1); color: var(--text-faint);
}

/* ==========================================================================
   10  RESEARCH EXPLORER
   ========================================================================== */
.explorer {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: clamp(1.5rem, 1rem + 2.5vw, 3.5rem);
  align-items: start;
}
.explorer__hint {
  font-size: var(--step--2); letter-spacing: .1em; text-transform: uppercase;
  font-weight: 700; color: var(--text-faint); margin-bottom: .9rem;
}
.explorer__list { display: grid; gap: .15rem; }

.domain-tab {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .85rem;
  width: 100%;
  padding: .8rem .9rem;
  text-align: left;
  border: 1px solid transparent;
  border-left: 2px solid transparent;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--text-muted);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.domain-tab:hover { background: var(--surface-2); color: var(--text-strong); }
.domain-tab__num {
  font-family: var(--font-mono); font-size: .72rem; font-weight: 600;
  color: var(--text-faint); font-variant-numeric: tabular-nums;
}
.domain-tab__title {
  font-family: var(--font-serif); font-size: 1.02rem; line-height: 1.25;
  letter-spacing: -.005em;
}
.domain-tab__dot {
  width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .35;
}
.domain-tab[aria-selected="true"] {
  background: var(--surface);
  border-color: var(--line);
  border-left-color: var(--gold);
  color: var(--text-strong);
  box-shadow: var(--shadow-sm);
}
.domain-tab[aria-selected="true"] .domain-tab__num { color: var(--accent); }
.domain-tab[aria-selected="true"] .domain-tab__dot { background: var(--accent); opacity: 1; }

.domain-panel {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.domain-panel[hidden] { display: none; }
.domain-panel__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  padding: clamp(1.35rem, 1rem + 1.5vw, 2.25rem);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.domain-panel__art {
  display: grid; place-items: center;
  width: 84px; height: 84px; flex: none;
  border-radius: var(--r-md);
  background: var(--navy);
  color: var(--gold-300);
  border: 1px solid var(--navy-700);
}
html[data-theme="dark"] .domain-panel__art { background: #0a1626; }
.domain-panel__kicker {
  font-family: var(--font-mono); font-size: .74rem; color: var(--accent);
  letter-spacing: .06em; margin-bottom: .4rem;
}
.domain-panel__title { font-size: var(--step-3); margin-bottom: .35rem; }
.domain-panel__tagline {
  font-family: var(--font-serif); font-style: italic; font-size: var(--step-1);
  color: var(--text-muted); max-width: 34ch;
}
.domain-panel__body { padding: clamp(1.35rem, 1rem + 1.5vw, 2.25rem); }
.domain-panel__desc { font-size: var(--step-1); line-height: 1.6; color: var(--text); max-width: 68ch; }
.domain-panel__section { margin-top: var(--sp-6); }
.domain-panel__label {
  font-size: var(--step--2); font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--text-faint);
  padding-bottom: .5rem; margin-bottom: .9rem;
  border-bottom: 1px solid var(--line);
}
.focus-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .5rem 1.5rem; }
.focus-list li {
  position: relative; padding-left: 1.25rem;
  font-size: var(--step--1); color: var(--text-muted); line-height: 1.5;
}
.focus-list li::before {
  content: ""; position: absolute; left: 0; top: .58em;
  width: 8px; height: 1px; background: var(--accent);
}
.domain-panel__note { margin-top: var(--sp-6); }
.domain-panel__pubs { list-style: none; padding: 0; display: grid; gap: .5rem; }
.domain-panel__pubs li {
  display: flex; align-items: baseline; gap: .6rem;
  font-size: var(--step--1);
}
.domain-panel__pubs .year {
  font-family: var(--font-mono); font-size: .74rem; color: var(--accent);
  font-weight: 600; flex: none;
}
.domain-panel__pubs a { color: var(--text-strong); text-decoration-color: var(--line-strong); }
.domain-panel__pubs a:hover { text-decoration-color: currentColor; }
.domain-panel__empty {
  font-size: var(--step--1); color: var(--text-faint); font-style: italic;
}
.domain-panel__nav {
  display: flex; gap: .5rem; justify-content: flex-end;
  padding: 0 clamp(1.35rem, 1rem + 1.5vw, 2.25rem) clamp(1.35rem, 1rem + 1.5vw, 2.25rem);
}
.domain-panel__nav button {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem .85rem; font-size: var(--step--1); font-weight: 600;
  color: var(--text-muted); border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.domain-panel__nav button:hover { color: var(--text-strong); border-color: var(--text-faint); }

/* ==========================================================================
   11  FEATURED PUBLICATION
   ========================================================================== */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: start;
}
.feature__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem;
  font-size: var(--step--1); color: var(--on-dark-mut);
  margin-bottom: var(--sp-5);
}
.feature__badge {
  display: inline-flex; padding: .22rem .55rem;
  font-size: .68rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: #0f1b28; background: var(--gold-300); border-radius: var(--r-xs);
}
.feature__title {
  font-size: var(--step-4);
  color: #fff;
  letter-spacing: -.016em;
  margin-bottom: var(--sp-5);
  max-width: 24ch;
}
.feature__authors { list-style: none; padding: 0; display: grid; gap: .25rem; margin-bottom: .5rem; }
.feature__authors li { font-size: var(--step-0); color: var(--on-dark); }
.feature__authors .muted { color: var(--on-dark-mut); }
.feature__affil { font-size: var(--step--1); color: var(--on-dark-mut); max-width: 52ch; margin-bottom: var(--sp-6); }
.feature__actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: var(--sp-7); }

.feature__meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px;
  background: var(--on-dark-line);
  border: 1px solid var(--on-dark-line);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.feature__meta-grid > div { background: rgba(255,255,255,.03); padding: .85rem 1rem; }
.feature__meta-grid dt {
  font-size: .68rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--gold-300); margin-bottom: .25rem;
}
.feature__meta-grid dd { font-size: var(--step--1); color: var(--on-dark); }
.feature__meta-grid a { color: var(--teal-300); }

.feature__aside { display: grid; gap: 1.5rem; }
.feature__block {
  padding-left: 1.1rem;
  border-left: 1px solid var(--on-dark-line);
}
.feature__block h4 {
  font-family: var(--font-sans);
  font-size: var(--step--2); font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--gold-300);
  margin-bottom: .45rem;
}
.feature__block p { font-size: var(--step--1); color: var(--on-dark-mut); line-height: 1.62; }
.feature__block--caution { border-left-color: var(--gold); }
.feature__block--caution p { color: var(--on-dark); }

/* ==========================================================================
   12  PUBLICATIONS LIBRARY
   ========================================================================== */
.library__controls {
  display: grid; gap: var(--sp-4);
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--sp-6);
}
.library__meta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--sp-4);
}
.library__count { font-size: var(--step--1); color: var(--text-muted); }
.library__count strong { color: var(--text-strong); font-variant-numeric: tabular-nums; }
.library__sort { display: flex; align-items: center; gap: .5rem; }
.library__sort label { font-size: var(--step--1); font-weight: 600; color: var(--text-muted); }
.library__sort select {
  padding: .45rem 2rem .45rem .7rem;
  font-size: var(--step--1); font-weight: 600;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}

.library__results { display: grid; }
.pub {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: clamp(1rem, .5rem + 2vw, 2.25rem);
  padding: clamp(1.35rem, 1rem + 1.5vw, 2rem) 0;
  border-top: 1px solid var(--line);
}
.pub:first-child { border-top: 0; }
.pub__gutter { padding-top: .2rem; }
.pub__year {
  font-family: var(--font-mono); font-size: 1.05rem; font-weight: 600;
  color: var(--text-strong); letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}
.pub__index {
  display: block; margin-top: .45rem;
  font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-faint); font-weight: 700;
}
.pub__head { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; margin-bottom: .6rem; }
.pub__themes { display: flex; flex-wrap: wrap; gap: .3rem; list-style: none; padding: 0; }
.pub__title { font-size: var(--step-2); line-height: 1.24; margin-bottom: .5rem; }
.pub__title a { color: inherit; text-decoration: none; }
.pub__title a:hover { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.pub__authors { font-size: var(--step--1); color: var(--text-muted); margin-bottom: .35rem; max-width: 78ch; }
.pub__authors strong { color: var(--text-strong); }
.pub__venue { font-size: var(--step--1); color: var(--text-faint); margin-bottom: .8rem; }
.pub__venue em { color: var(--text-muted); font-style: italic; }
.pub__summary { font-size: var(--step-0); color: var(--text); max-width: 74ch; }
.pub__abstract { margin-top: .9rem; max-width: 74ch; }
.pub__abstract summary {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: var(--step--1); font-weight: 600; color: var(--accent);
  cursor: pointer; list-style: none;
}
.pub__abstract summary::-webkit-details-marker { display: none; }
.pub__abstract summary::after {
  content: ""; width: 6px; height: 6px; border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor; transform: rotate(45deg) translateY(-1px);
  transition: transform var(--dur) var(--ease);
}
.pub__abstract[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.pub__abstract blockquote {
  margin-top: .75rem; padding: .95rem 1.1rem;
  background: var(--surface-2); border-left: 2px solid var(--line-strong);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-family: var(--font-serif); font-size: var(--step-0); font-style: italic;
  color: var(--text-muted); line-height: 1.6;
}
.pub__abstract cite {
  display: block; margin-top: .6rem;
  font-family: var(--font-sans); font-style: normal;
  font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-faint);
}
.pub__foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem;
  margin-top: 1.15rem; padding-top: .9rem;
  border-top: 1px solid var(--line);
}
.pub__links { display: flex; flex-wrap: wrap; gap: .9rem; }
.pub__verified, .pub__role, .pub__note {
  font-size: .74rem; color: var(--text-faint); display: inline-flex; align-items: center; gap: .35rem;
}
.pub__note { flex-basis: 100%; }
.pub__verified .icon { color: var(--accent); }
.library__empty {
  padding: var(--sp-8) var(--sp-4);
  text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--r-md);
}
.library__empty h3 { font-size: var(--step-2); margin-bottom: .5rem; }
.library__empty p { font-size: var(--step--1); color: var(--text-muted); max-width: 46ch; margin-inline: auto; }
.library__empty .btn { margin-top: var(--sp-5); }

/* Metrics ---------------------------------------------------------------- */
.metrics {
  margin-top: var(--sp-9);
  padding: clamp(1.35rem, 1rem + 2vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.metrics__head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: .5rem; margin-bottom: .7rem;
}
.metrics__title { font-size: var(--step-2); }
.metrics__asof { font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: var(--gold-ink); }
.metrics__notice { font-size: var(--step--1); color: var(--text-muted); max-width: 74ch; margin-bottom: var(--sp-5); }
.metrics__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden;
}
.metrics__grid > div { background: var(--surface); padding: 1rem 1.1rem; }
.metrics__grid dt {
  font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: .35rem;
}
.metrics__grid dd { display: flex; align-items: baseline; gap: .5rem; }
.metrics__num {
  font-family: var(--font-serif); font-size: 1.7rem; color: var(--text-strong);
  line-height: 1; font-variant-numeric: tabular-nums;
}
.metrics__src { font-size: .68rem; color: var(--text-faint); }
.metrics__hindex {
  display: flex; gap: .6rem; align-items: flex-start;
  margin-top: var(--sp-5); font-size: var(--step--1); color: var(--text-muted);
}
.metrics__hindex .icon { color: var(--gold); margin-top: .22rem; }
.metrics__links { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: var(--sp-5); }
.metrics__pending { margin-top: var(--sp-5); border-top: 1px solid var(--line); padding-top: var(--sp-4); }
.metrics__pending summary {
  font-size: var(--step--1); font-weight: 600; color: var(--text-muted); cursor: pointer;
}
.metrics__pending ul { list-style: none; padding: 0; margin-top: .8rem; display: grid; gap: .7rem; }
.metrics__pending li { font-size: var(--step--1); color: var(--text-muted); padding-left: 1rem; position: relative; }
.metrics__pending li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 1px; background: var(--gold); }
.metrics__pending strong { color: var(--text-strong); }

/* ==========================================================================
   13  CLINICAL LABORATORY CAPABILITIES
   ========================================================================== */
.capabilities {
  list-style: none; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
}
.capability {
  background: var(--bg);
  padding: clamp(1.25rem, 1rem + 1.4vw, 1.9rem);
  position: relative;
  transition: background var(--dur) var(--ease);
}
.capability:hover { background: var(--surface); }
.capability__num {
  display: block; font-family: var(--font-mono); font-size: .74rem;
  color: var(--gold-ink); font-weight: 600; margin-bottom: .6rem; letter-spacing: .04em;
}
.capability__title { font-size: var(--step-1); margin-bottom: .45rem; line-height: 1.3; }
.capability p { font-size: var(--step--1); color: var(--text-muted); line-height: 1.6; }

/* ==========================================================================
   14  COLLABORATION
   ========================================================================== */
.collab__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: start;
}
.collab__col > .notice { margin-top: var(--sp-6); }
.collab__heading {
  font-family: var(--font-sans);
  font-size: var(--step--2); font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--text-faint);
  padding-bottom: .7rem; margin-bottom: var(--sp-5);
  border-bottom: 1px solid var(--line);
}
.collab__list { list-style: none; padding: 0; display: grid; gap: var(--sp-5); }
.collab__list li {
  padding-left: 1.35rem; position: relative;
  font-size: var(--step-0); color: var(--text-muted); line-height: 1.62;
}
.collab__list li::before {
  content: ""; position: absolute; left: 0; top: .7em;
  width: 7px; height: 7px; border: 1px solid var(--gold);
  transform: rotate(45deg);
}
.collab__list strong { display: block; color: var(--text-strong); margin-bottom: .15rem; }
.collab__cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--sp-4);
}
.collab__card {
  padding: 1.2rem 1.25rem;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.collab__card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.collab__card .icon { color: var(--accent); margin-bottom: .7rem; }
.collab__card h4 { font-size: var(--step-0); margin-bottom: .35rem; }
.collab__card p { font-size: var(--step--1); color: var(--text-muted); line-height: 1.55; }

/* ==========================================================================
   15  CONTACT
   ========================================================================== */
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(2rem, 1rem + 4vw, 4rem);
  align-items: start;
}
.contact-form {
  padding: clamp(1.35rem, 1rem + 2vw, 2.5rem);
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  display: grid; gap: var(--sp-5);
}
.contact-form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--sp-5); }
.contact-form__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--line);
}
.contact-form__privacy { font-size: .78rem; color: var(--text-faint); max-width: 46ch; }
.btn.is-busy { opacity: .7; pointer-events: none; }

.form-status {
  display: flex; gap: .75rem; align-items: flex-start;
  padding: 1rem 1.15rem; border-radius: var(--r-sm);
  font-size: var(--step--1); line-height: 1.58;
  border: 1px solid var(--line-strong); background: var(--surface-2);
}
.form-status .icon { margin-top: .2rem; }
.form-status--success { border-color: var(--accent); background: var(--accent-soft); color: var(--text-strong); }
.form-status--success .icon { color: var(--accent); }
.form-status--error { border-color: #B4432F; background: rgba(180,67,47,.08); color: var(--text-strong); }
.form-status--error .icon { color: #B4432F; }
.form-status--info .icon { color: var(--gold); }
.form-status h3 { font-family: var(--font-sans); font-size: var(--step-0); font-weight: 700; margin-bottom: .2rem; }

.contact-list { list-style: none; padding: 0; display: grid; gap: 1rem; }
.contact-list li { display: flex; gap: .75rem; align-items: flex-start; }
.contact-list .icon { color: var(--accent); margin-top: .25rem; }
.contact-list dt, .contact-list__label {
  display: block; font-size: .7rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-faint); margin-bottom: .15rem;
}
.contact-list__value { font-size: var(--step--1); color: var(--text-strong); word-break: break-word; }
.contact-list__value a { color: var(--accent); }

.profile-list { list-style: none; padding: 0; display: grid; gap: .5rem; }
.profile-list a {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .7rem .85rem;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  text-decoration: none; color: var(--text-strong);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.profile-list a:hover { border-color: var(--line-strong); background: var(--surface-2); }
.profile-list__label { font-size: var(--step--1); font-weight: 700; }
.profile-list__handle { display: block; font-size: .74rem; color: var(--text-faint); font-weight: 400; }
.profile-list .icon { color: var(--text-faint); }

.contact__aside { display: grid; gap: var(--sp-5); }
.contact__aside > .notice { margin: 0; }

/* ==========================================================================
   16  FOOTER
   ========================================================================== */
.site-footer {
  background: var(--navy);
  color: var(--on-dark-mut);
  padding-top: clamp(2.5rem, 2rem + 3vw, 4.5rem);
}
html[data-theme="dark"] .site-footer { background: #071120; }
.footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 1rem + 3vw, 3.5rem);
  padding-bottom: clamp(2rem, 1.5rem + 2vw, 3rem);
}
.footer__name { font-size: var(--step-2); color: #fff; margin-bottom: .5rem; }
.footer__roles { font-size: var(--step--1); color: var(--gold-300); margin-bottom: .7rem; }
.footer__org { font-size: var(--step--1); max-width: 34ch; }
.footer__heading {
  font-family: var(--font-sans);
  font-size: var(--step--2); font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: #fff; margin-bottom: 1rem;
}
.footer__nav ul { list-style: none; padding: 0; display: grid; gap: .5rem; }
.footer__nav a {
  font-size: var(--step--1); color: var(--on-dark-mut);
  text-decoration: none; border-bottom: 1px solid transparent; padding-bottom: 1px;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.footer__nav a:hover { color: #fff; border-bottom-color: var(--gold); }

.footer__base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-4);
  padding-block: var(--sp-5) var(--sp-6);
  border-top: 1px solid var(--on-dark-line);
  font-size: .76rem; color: rgba(255,255,255,.5);
}
.footer__disclaimer { max-width: 62ch; }

.to-top {
  position: fixed; right: clamp(1rem, 2vw, 2rem); bottom: clamp(1rem, 2vw, 2rem);
  z-index: 90;
  display: grid; place-items: center; width: 44px; height: 44px;
  background: var(--navy); color: #fff;
  border: 1px solid var(--navy-700); border-radius: var(--r-sm);
  box-shadow: var(--shadow-md);
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.to-top:hover { transform: translateY(-3px); background: var(--navy-700); }

/* ==========================================================================
   17  UTILITIES, MOTION, RESPONSIVE, PRINT
   ========================================================================== */
.js .reveal { opacity: 0; transform: translateY(16px); }
.js .reveal.is-visible {
  opacity: 1; transform: none;
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
.js .reveal.is-visible:nth-child(2) { transition-delay: .05s; }
.js .reveal.is-visible:nth-child(3) { transition-delay: .1s; }
.js .reveal.is-visible:nth-child(4) { transition-delay: .15s; }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 1080px) {
  .nav { display: none; }
  .header__compact { display: flex; }

  .site-header.nav-open .nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-4);
    position: absolute; left: 0; right: 0; top: 100%;
    padding: var(--sp-5) var(--gutter) var(--sp-6);
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
  }
  .site-header.nav-open .nav__list { flex-direction: column; align-items: stretch; gap: .1rem; }
  .site-header.nav-open .nav__link { padding: .8rem .75rem; font-size: var(--step-0); }
  .site-header.nav-open .nav__link.is-active::after { left: .75rem; right: auto; width: 22px; }
  .site-header.nav-open .nav__actions { justify-content: space-between; }
  .site-header.nav-open .nav__cta { flex: 1; }

  .hero__inner { grid-template-columns: minmax(0, 1fr); }
  .hero__visual { order: -1; justify-content: flex-start; }
  .portrait { width: min(70%, 320px); }
  .hero__art { right: auto; left: 40%; bottom: -6%; }
  .hero__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .about__grid,
  .collab__grid,
  .contact__grid,
  .feature { grid-template-columns: minmax(0, 1fr); }
  .explorer { grid-template-columns: minmax(0, 1fr); }
  .explorer__list { display: flex; overflow-x: auto; gap: .35rem; padding-bottom: .6rem; scrollbar-width: thin; }
  .domain-tab { flex: none; grid-template-columns: auto auto; width: auto; border-left-width: 1px; border-radius: var(--r-sm); }
  .domain-tab__title { white-space: nowrap; font-size: .95rem; }
  .domain-tab__dot { display: none; }
  .explorer__hint { display: none; }
  .footer__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  :root { --header-h: 64px; }
  .brand__meta { display: none; }
  .hero__facts { grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); }
  .hero__statement blockquote { font-size: var(--step-1); }
  .portrait { width: min(78%, 300px); }
  .hero__art { display: none; }
  .timeline::before { left: 4px; }
  .timeline__item { padding-left: 1.9rem; }
  .pub { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .pub__gutter { display: flex; align-items: baseline; gap: .75rem; }
  .pub__index { margin-top: 0; }
  .domain-panel__head { grid-template-columns: minmax(0, 1fr); }
  .domain-panel__art { width: 64px; height: 64px; }
  .domain-panel__art .icon--56 { width: 40px; height: 40px; }
  .footer__inner { grid-template-columns: minmax(0, 1fr); }
  .metrics__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section__head { margin-bottom: var(--sp-6); }
  .contact-form__foot { flex-direction: column; align-items: stretch; }
  .contact-form__foot .btn { width: 100%; }
}

@media (max-width: 460px) {
  .metrics__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__roles { font-size: var(--step-0); }
  .hero__contact-list { grid-template-columns: minmax(0, 1fr); }
  .hero__whatsapp { width: 100%; }
}

/* Reduced motion --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .btn:hover, .collab__card:hover, .to-top:hover { transform: none; }
}

@media (prefers-contrast: more) {
  :root { --line: #A9B4BF; --line-strong: #7C8894; --text-muted: #3A4A5A; }
}

/* Forced colours --------------------------------------------------------- */
@media (forced-colors: active) {
  .btn, .chip, .tag, .panel, .capability, .collab__card { border: 1px solid CanvasText; }
  .domain-tab[aria-selected="true"] { border-left: 3px solid Highlight; }
}

/* Print ------------------------------------------------------------------ */
@media print {
  .site-header, .to-top, .hero__backdrop, .hero__art, .progress-rail, .skip-link { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section { padding-block: 1.2rem; break-inside: avoid; }
  .hero, .section--navy, .site-footer { background: #fff !important; color: #000 !important; }
  .hero__title, .hero__statement blockquote, .feature__title, .footer__name { color: #000 !important; }
  a { text-decoration: underline; }
  .pub__abstract { display: block; }
  .pub__abstract blockquote { border-left: 2px solid #999; }
}
