/* =============================================================
   Dr. Khadija Batool — academic personal website
   style.css

   Contents
     01  Tokens & themes
     02  Reset & base
     03  Typography
     04  Layout helpers
     05  Buttons, chips, badges
     06  Header & navigation
     07  Hero
     08  Sections & cards
     09  Timeline
     10  Publications
     11  News & contact
     12  Footer & floating controls
     13  Motion & reveal
     14  Responsive
     15  Print
   ============================================================= */

/* ============ 01  TOKENS & THEMES ============ */
:root {
  /* brand palette */
  --c-bg:        #FAFBFC;
  --c-primary:   #1E3A5F;
  --c-secondary: #4F7CAC;
  --c-accent:    #2CB1A1;
  --c-text:      #222222;
  --c-light:     #EDF2F7;

  /* derived surface tokens */
  --surface:        #FFFFFF;
  --surface-alt:    #F4F7FA;
  --surface-sunken: var(--c-light);
  --border:         #E2E8F0;
  --border-strong:  #CBD5E1;
  --text:           var(--c-text);
  --text-muted:     #5A6675;
  --text-soft:      #75808F;
  --link:           var(--c-primary);
  --accent-soft:    rgba(44, 177, 161, .12);
  --primary-soft:   rgba(30, 58, 95, .07);
  --hero-wash-a:    rgba(79, 124, 172, .10);
  --hero-wash-b:    rgba(44, 177, 161, .08);
  --grid-line:      rgba(30, 58, 95, .05);

  /* elevation */
  --shadow-xs: 0 1px 2px rgba(15, 32, 51, .04);
  --shadow-sm: 0 1px 3px rgba(15, 32, 51, .05), 0 6px 16px -10px rgba(15, 32, 51, .18);
  --shadow-md: 0 2px 6px rgba(15, 32, 51, .06), 0 14px 32px -18px rgba(15, 32, 51, .26);
  --shadow-lg: 0 4px 12px rgba(15, 32, 51, .07), 0 28px 60px -26px rgba(15, 32, 51, .32);

  /* shape */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* rhythm */
  --space-section: clamp(4.5rem, 8vw, 7.5rem);
  --container: 1140px;
  --header-h: 72px;

  /* type */
  --font-head: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* motion */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --t-fast: .16s;
  --t-base: .28s;
}

html[data-theme="dark"] {
  --c-bg:        #0E1621;
  --surface:     #16202C;
  --surface-alt: #131C27;
  --surface-sunken: #1B2735;
  --border:        #253243;
  --border-strong: #35465C;
  --text:        #E7EDF4;
  --text-muted:  #A6B3C4;
  --text-soft:   #8896A9;
  --c-primary:   #8FB3DC;
  --c-secondary: #6E9BC9;
  --link:        #9CC0E6;
  --accent-soft: rgba(44, 177, 161, .16);
  --primary-soft: rgba(143, 179, 220, .10);
  --hero-wash-a: rgba(79, 124, 172, .16);
  --hero-wash-b: rgba(44, 177, 161, .10);
  --grid-line:   rgba(143, 179, 220, .06);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .35), 0 6px 16px -10px rgba(0, 0, 0, .6);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, .35), 0 14px 32px -18px rgba(0, 0, 0, .7);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, .4), 0 28px 60px -26px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  font-feature-settings: "kern", "liga", "calt";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color var(--t-base) var(--ease), color var(--t-base) var(--ease);
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

a {
  color: var(--link);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}
a:hover { color: var(--c-accent); }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

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

::selection { background: var(--accent-soft); color: var(--text); }

.sr-only {
  position: absolute; 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: 10px; left: 10px; z-index: 999;
  transform: translateY(-160%);
  background: var(--c-primary); color: #fff;
  padding: .7rem 1.15rem; border-radius: var(--r-sm);
  font-weight: 600; font-size: .9rem;
  transition: transform var(--t-base) var(--ease);
}
.skip-link:focus { transform: translateY(0); color: #fff; }

/* ============ 03  TYPOGRAPHY ============ */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.012em;
  color: var(--text);
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 5.4vw, 4rem); font-weight: 700; letter-spacing: -.022em; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
h3 { font-size: clamp(1.12rem, 1.6vw, 1.3rem); }
h4 { font-size: 1.06rem; }

em { font-style: italic; }
strong, b { font-weight: 600; }

.muted { color: var(--text-muted); }
.small { font-size: .88rem; }

.note {
  display: flex; align-items: center; gap: .65rem;
  margin-top: 2.5rem; padding: 1rem 1.25rem;
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--c-accent);
  border-radius: var(--r-md);
  color: var(--text-muted); font-size: .93rem;
  box-shadow: var(--shadow-xs);
}
.note .icon { color: var(--c-accent); flex: none; }

/* ============ 04  LAYOUT HELPERS ============ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.15rem, 4vw, 2.25rem);
}

.section { padding-block: var(--space-section); position: relative; }
.section--alt { background: var(--surface-alt); }
html[data-theme="dark"] .section--alt { background: var(--surface-alt); }

.section__head { max-width: 60ch; margin-bottom: clamp(2.25rem, 4vw, 3.25rem); }

.section__eyebrow {
  font-size: .74rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: .7rem;
}

.section__title { position: relative; margin-bottom: .55rem; }
.section__title::after {
  content: ""; display: block;
  width: 46px; height: 3px; margin-top: .85rem;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--c-accent), var(--c-secondary));
}

.section__lede {
  color: var(--text-muted);
  font-size: 1.03rem;
  max-width: 62ch;
  margin-top: 1.1rem;
}

.subsection-title {
  display: flex; align-items: center; gap: .6rem;
  font-size: 1.18rem; margin: 3.25rem 0 1.75rem;
}
.subsection-title .icon { color: var(--c-accent); }

.grid { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
/* Two even columns rather than auto-fit, so a four-card set never breaks 3 + 1. */
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(272px, 1fr)); }
@media (max-width: 760px) { .grid--2 { grid-template-columns: minmax(0, 1fr); } }

.icon { width: 20px; height: 20px; flex: none; }
.icon--sm { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; }

/* ============ 05  BUTTONS, CHIPS, BADGES ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .78rem 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: .94rem; font-weight: 600;
  letter-spacing: .005em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--t-fast) var(--ease),
              box-shadow var(--t-base) var(--ease),
              background-color var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease),
              color var(--t-base) var(--ease);
}
.btn .icon { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--c-primary); color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: #17304f; color: #fff; box-shadow: var(--shadow-md); }
html[data-theme="dark"] .btn--primary { background: var(--c-accent); color: #06231f; }
html[data-theme="dark"] .btn--primary:hover { background: #35c7b5; color: #06231f; }

.btn--outline {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
  box-shadow: var(--shadow-xs);
}
.btn--outline:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
  box-shadow: var(--shadow-sm);
}

.btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
}
.btn--ghost:hover { color: var(--c-accent); background: var(--accent-soft); }

.btn--full { width: 100%; }

.btn--mini {
  padding: .5rem 1rem; font-size: .84rem;
  background: var(--surface); border-color: var(--border);
  color: var(--text-muted);
}
.btn--mini:hover { border-color: var(--c-accent); color: var(--c-accent); }

.link-btn {
  background: none; border: 0; padding: 0;
  color: var(--c-accent); font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px;
}

.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .22rem .68rem;
  border-radius: var(--r-pill);
  background: var(--primary-soft);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .74rem; font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}
.chip--accent {
  background: var(--accent-soft);
  border-color: rgba(44, 177, 161, .3);
  color: #14776c;
}
html[data-theme="dark"] .chip--accent { color: #5fd6c6; }

.chip--live {
  background: var(--accent-soft);
  border-color: rgba(44, 177, 161, .35);
  color: #14776c;
  margin-left: .5rem;
}
html[data-theme="dark"] .chip--live { color: #5fd6c6; }
.chip--live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--c-accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.badges { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
.badges li {
  padding: .34rem .78rem;
  border-radius: var(--r-pill);
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .82rem; line-height: 1.5;
  transition: border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
}
.badges li:hover {
  border-color: var(--c-accent);
  color: var(--text);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.1rem; }
.tags li {
  font-size: .76rem; font-weight: 500;
  color: var(--c-secondary);
  padding: .2rem .6rem;
  border-radius: var(--r-xs);
  background: var(--primary-soft);
}

.bullets { margin-top: .9rem; display: grid; gap: .5rem; }
.bullets li {
  position: relative;
  padding-left: 1.35rem;
  color: var(--text-muted);
  font-size: .94rem;
  line-height: 1.65;
}
.bullets li::before {
  content: ""; position: absolute;
  left: 0; top: .62em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-accent);
  opacity: .75;
}

/* ============ 06  HEADER & NAVIGATION ============ */
.scroll-progress {
  position: fixed; inset: 0 0 auto 0; z-index: 120;
  height: 3px; background: transparent; pointer-events: none;
}
.scroll-progress span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--c-secondary), var(--c-accent));
  border-radius: 0 var(--r-pill) var(--r-pill) 0;
}

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--c-bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease),
              background-color var(--t-base) var(--ease);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .site-header { background: var(--c-bg); }
}
.site-header.is-stuck {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: flex; align-items: center; gap: 1rem;
  min-height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--text); }
.brand__mark {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--c-primary);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700; font-size: .95rem;
  letter-spacing: .02em;
  box-shadow: var(--shadow-xs);
  transition: transform var(--t-base) var(--ease), background-color var(--t-base) var(--ease);
}
html[data-theme="dark"] .brand__mark { background: var(--c-accent); color: #06231f; }
.brand:hover .brand__mark { transform: rotate(-4deg) scale(1.04); }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text strong { font-family: var(--font-head); font-size: 1.03rem; font-weight: 600; }
.brand__text small { font-size: .7rem; color: var(--text-soft); letter-spacing: .1em; text-transform: uppercase; }

.nav { margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: .1rem; }
.nav__list a {
  position: relative;
  display: block;
  padding: .5rem .68rem;
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: .875rem; font-weight: 500;
  transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.nav__list a::after {
  content: ""; position: absolute;
  left: 50%; bottom: 2px;
  width: 0; height: 2px;
  border-radius: var(--r-pill);
  background: var(--c-accent);
  transform: translateX(-50%);
  transition: width var(--t-base) var(--ease);
}
.nav__list a:hover { color: var(--text); background: var(--primary-soft); }
.nav__list a:hover::after,
.nav__list a.is-active::after { width: 18px; }
.nav__list a.is-active { color: var(--text); font-weight: 600; }

.header__actions { display: flex; align-items: center; gap: .4rem; margin-left: .35rem; }

.icon-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text-muted);
  transition: color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
}
.icon-btn:hover { color: var(--c-accent); border-color: var(--c-accent); transform: translateY(-1px); }
.icon-btn .icon { grid-area: 1 / 1; }

#themeToggle .icon--moon { display: none; }
html[data-theme="dark"] #themeToggle .icon--sun { display: none; }
html[data-theme="dark"] #themeToggle .icon--moon { display: block; }

.nav-toggle { display: none; }
.nav-toggle .icon--closemenu { display: none; }
.nav-toggle[aria-expanded="true"] .icon--menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon--closemenu { display: block; }

.nav-scrim {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(11, 20, 31, .45);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  opacity: 0; transition: opacity var(--t-base) var(--ease);
}
.nav-scrim.is-visible { opacity: 1; }

/* ============ 07  HERO ============ */
.hero {
  position: relative;
  padding-block: clamp(3.25rem, 7vw, 6rem) clamp(3.5rem, 7vw, 6rem);
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 460px at 12% 8%, var(--hero-wash-a), transparent 62%),
    radial-gradient(700px 420px at 88% 92%, var(--hero-wash-b), transparent 60%),
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 100% 46px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 46px 100%;
  -webkit-mask-image: radial-gradient(120% 88% at 50% 22%, #000 42%, transparent 100%);
  mask-image: radial-gradient(120% 88% at 50% 22%, #000 42%, transparent 100%);
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(0, .88fr);
  gap: clamp(2rem, 5vw, 4.25rem);
  align-items: center;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .38rem .9rem .38rem .7rem;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  color: var(--text-muted);
  font-size: .8rem; font-weight: 600;
  letter-spacing: .02em;
  margin-bottom: 1.35rem;
}
.eyebrow .icon { width: 17px; height: 17px; color: var(--c-accent); }

#heroName { margin-bottom: .35rem; }
.hero__suffix { color: var(--c-secondary); font-weight: 500; font-size: .58em; letter-spacing: 0; }

.hero__role {
  font-size: clamp(1.05rem, 1.9vw, 1.28rem);
  font-weight: 600;
  color: var(--c-secondary);
  margin-bottom: .85rem;
}

.hero__affil {
  display: flex; flex-wrap: wrap; align-items: center; gap: .45rem;
  color: var(--text-muted);
  font-size: .95rem;
  margin-bottom: 1.5rem;
}
.hero__affil .icon { width: 17px; height: 17px; color: var(--c-secondary); }
.dot { width: 4px; height: 4px; border-radius: 50%; background: var(--border-strong); margin-inline: .3rem; }

.hero__fields {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin-bottom: 1.65rem;
}
.hero__fields li {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .44rem .9rem;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  font-size: .84rem; font-weight: 500;
  color: var(--text-muted);
  transition: transform var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              box-shadow var(--t-base) var(--ease);
}
.hero__fields li:hover {
  transform: translateY(-2px);
  border-color: var(--c-accent);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.hero__fields .icon { width: 16px; height: 16px; color: var(--c-accent); }

.hero__bio {
  max-width: 58ch;
  color: var(--text-muted);
  font-size: 1.02rem;
  margin-bottom: 2rem;
  border-left: 2px solid var(--border);
  padding-left: 1.15rem;
}

.hero__cta { display: flex; flex-wrap: wrap; gap: .7rem; }

.hero__portrait { margin: 0; position: relative; justify-self: center; width: 100%; max-width: 380px; }
.portrait__frame {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.portrait__frame::after {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
  pointer-events: none;
}
.hero__portrait:hover .portrait__frame { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.portrait__frame img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

.portrait__badge {
  position: absolute;
  left: 50%; bottom: -18px;
  transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .5rem 1rem;
  white-space: nowrap;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  font-size: .78rem; font-weight: 600;
  color: var(--text-muted);
}
.portrait__badge .icon { width: 15px; height: 15px; color: var(--c-accent); }

/* ============ 08  SECTIONS & CARDS ============ */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3.25rem);
  align-items: start;
}
.about__text p { color: var(--text-muted); font-size: 1.01rem; }
.about__text p + p { margin-top: 1.1rem; }
.about__aside { display: grid; gap: 1.25rem; position: sticky; top: calc(var(--header-h) + 28px); }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
.stat {
  padding: 1.15rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  transition: transform var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease);
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.stat__num {
  display: block;
  font-family: var(--font-head);
  font-size: 2rem; font-weight: 700; line-height: 1.1;
  color: var(--c-primary);
}
html[data-theme="dark"] .stat__num { color: var(--c-accent); }
.stat__label { display: block; margin-top: .3rem; font-size: .8rem; color: var(--text-soft); line-height: 1.45; }

.card {
  padding: clamp(1.35rem, 2.4vw, 1.8rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  transition: transform var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card--quiet { background: var(--surface-sunken); box-shadow: none; }
.card--quiet:hover { transform: none; box-shadow: none; }

.card__title {
  display: flex; align-items: center; gap: .55rem;
  font-size: 1.08rem;
  margin-bottom: .6rem;
}
.card__title .icon { color: var(--c-accent); width: 18px; height: 18px; }

.card__icon {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  margin-bottom: 1.05rem;
  border-radius: var(--r-md);
  background: var(--primary-soft);
  color: var(--c-primary);
  transition: background-color var(--t-base) var(--ease),
              color var(--t-base) var(--ease),
              transform var(--t-base) var(--ease);
}
html[data-theme="dark"] .card__icon { color: var(--c-primary); }
.card__icon--accent { background: var(--accent-soft); color: #17877b; }
html[data-theme="dark"] .card__icon--accent { color: var(--c-accent); }
.card:hover .card__icon,
.project:hover .card__icon { background: var(--accent-soft); color: #17877b; transform: scale(1.05); }
html[data-theme="dark"] .card:hover .card__icon,
html[data-theme="dark"] .project:hover .card__icon { color: var(--c-accent); }

.card--interest p { color: var(--text-muted); font-size: .93rem; }
.card--interest .card__title { font-size: 1.05rem; }

.card--award { display: flex; align-items: flex-start; gap: 1.05rem; }
.card--award .card__icon { margin-bottom: 0; }
.card--award .card__title { margin-bottom: .25rem; font-size: 1.02rem; }
.card--award .muted { font-size: .9rem; margin: 0; }

.project {
  position: relative;
  padding: clamp(1.4rem, 2.4vw, 1.9rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: transform var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease);
}
.project::before {
  content: ""; position: absolute; inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--c-accent), var(--c-secondary));
  opacity: 0;
  transition: opacity var(--t-base) var(--ease);
}
.project:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.project:hover::before { opacity: 1; }
.project__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.project__head .card__icon { margin-bottom: 1rem; }
.project__title { font-size: 1.14rem; margin-bottom: .25rem; }
.project__org { color: var(--c-secondary); font-size: .87rem; font-weight: 600; margin-bottom: .8rem; }
.project p { color: var(--text-muted); font-size: .94rem; }

/* ============ 09  TIMELINE ============ */
.timeline { position: relative; display: grid; gap: 1.15rem; padding-left: 2.6rem; }
.timeline::before {
  content: ""; position: absolute;
  left: 19px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--c-accent), var(--border) 22%, var(--border) 78%, transparent);
  border-radius: var(--r-pill);
}
.timeline__item { position: relative; }

.timeline__dot {
  position: absolute;
  left: -2.6rem; top: 1.15rem;
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--c-secondary);
  box-shadow: var(--shadow-xs);
  transition: color var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease),
              transform var(--t-base) var(--ease);
}
.timeline__dot .icon { width: 18px; height: 18px; }
.timeline__item:hover .timeline__dot {
  color: var(--c-accent); border-color: var(--c-accent); transform: scale(1.06);
}
.timeline__dot--live { color: var(--c-accent); border-color: var(--c-accent); }
.timeline__dot--live::after {
  content: ""; position: absolute; inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--c-accent);
  opacity: .35;
}

.timeline__card {
  padding: 1.25rem 1.45rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  transition: transform var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease);
}
.timeline__item:hover .timeline__card {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.timeline__date {
  display: flex; align-items: center; flex-wrap: wrap;
  font-size: .78rem; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: .45rem;
}
.timeline__title { font-size: 1.12rem; margin-bottom: .2rem; }
.timeline__org { color: var(--text-muted); font-size: .92rem; margin-bottom: 0; }
.timeline__desc { margin-top: .55rem; color: var(--text-soft); font-size: .91rem; }

.timeline--compact .timeline__card { padding: 1rem 1.2rem; }
.timeline--compact .timeline__title { font-size: 1rem; }

/* ============ 10  PUBLICATIONS ============ */
.pub-tools {
  display: flex; flex-wrap: wrap; gap: .7rem;
  align-items: center;
  margin-bottom: 1.15rem;
}
.field { position: relative; display: flex; align-items: center; }
.field--search { flex: 1 1 300px; min-width: 240px; }
.field > .icon:first-child {
  position: absolute; left: .9rem;
  color: var(--text-soft); pointer-events: none;
  width: 17px; height: 17px;
}
.field input[type="search"] {
  width: 100%;
  padding: .72rem 2.5rem .72rem 2.6rem;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text);
  font-size: .92rem;
  -webkit-appearance: none; appearance: none;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.field input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.field input[type="search"]:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}
.field__clear {
  position: absolute; right: .55rem;
  display: grid; place-items: center;
  width: 28px; height: 28px;
  border: 0; border-radius: 50%;
  background: var(--surface-sunken);
  color: var(--text-muted);
}
.field__clear:hover { color: var(--c-accent); }
.field__clear .icon { width: 14px; height: 14px; }

.field select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  padding: .72rem 2.4rem .72rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text);
  font-size: .92rem;
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.field select:focus { border-color: var(--c-accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
.field__chev {
  position: absolute; right: .85rem;
  width: 16px; height: 16px;
  color: var(--text-soft); pointer-events: none;
}

.pub-count { color: var(--text-soft); font-size: .84rem; margin-bottom: 1.6rem; }

.pub-list { display: grid; gap: .8rem; }

.pub-group {
  display: flex; align-items: center; gap: .55rem;
  font-size: 1.05rem;
  margin: 1.6rem 0 .35rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.pub-group:first-child { margin-top: 0; }
.pub-group .icon { color: var(--c-accent); width: 18px; height: 18px; }
.pub-group[hidden] { display: none; }

.pub {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 1.1rem;
  padding: 1.2rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  transition: transform var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease);
}
.pub:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.pub[hidden] { display: none; }

.pub__year {
  font-family: var(--font-head);
  font-size: 1.28rem; font-weight: 600;
  color: var(--c-secondary);
  padding-top: .1rem;
  border-right: 1px solid var(--border);
}
.pub__title {
  font-family: var(--font-body);
  font-size: 1.02rem; font-weight: 600;
  line-height: 1.45;
  letter-spacing: -.005em;
  margin-bottom: .4rem;
}
.pub__authors { color: var(--text-muted); font-size: .89rem; margin-bottom: .25rem; }
.pub__authors b { color: var(--text); }
.pub__venue { color: var(--text-soft); font-size: .86rem; margin-bottom: 0; }
.pub__tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .65rem; margin-bottom: 0; }

.pub__actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .85rem; }
.pub-action {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .34rem .78rem;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text-muted);
  font-size: .78rem; font-weight: 600;
  transition: color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease);
}
.pub-action:hover { color: var(--c-accent); border-color: var(--c-accent); background: var(--accent-soft); }
.pub-action .icon { width: 14px; height: 14px; }

.pub-detail {
  margin-top: .85rem;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-sunken);
  overflow: hidden;
}
.pub-detail__head {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .5rem .5rem .5rem .9rem;
  border-bottom: 1px solid var(--border);
  font-size: .74rem; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-soft);
}
.pub-detail pre {
  margin: 0;
  padding: .9rem;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: .79rem;
  line-height: 1.6;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-word;
}

.pub-empty { margin-top: 1.5rem; color: var(--text-muted); }

/* ============ 11  NEWS & CONTACT ============ */
.news { display: grid; gap: .7rem; }
.news__item {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
  padding: 1.1rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  transition: transform var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease);
}
.news__item:hover { transform: translateX(4px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.news__date {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .78rem; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--c-accent);
  padding-top: .18rem;
}
.news__date .icon { width: 15px; height: 15px; }
.news__item p { color: var(--text-muted); font-size: .95rem; }

.contact {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: clamp(1.5rem, 3.5vw, 2.75rem);
  align-items: start;
}

.contact-list { display: grid; gap: .85rem; margin-bottom: 1.5rem; }
.contact-list li {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
  transition: transform var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              box-shadow var(--t-base) var(--ease);
}
.contact-list li:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.contact-list .card__icon { margin-bottom: 0; width: 40px; height: 40px; }
.contact-list li:hover .card__icon { background: var(--accent-soft); color: #17877b; }
html[data-theme="dark"] .contact-list li:hover .card__icon { color: var(--c-accent); }
.contact-list__label {
  display: block;
  font-size: .72rem; font-weight: 600;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: .12rem;
}
.contact-list a { font-weight: 500; }

.contact__form .card__title { margin-bottom: .4rem; }
.contact__form:hover { transform: none; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
.form-field { display: block; margin-top: 1rem; }
.form-field label {
  display: block;
  font-size: .8rem; font-weight: 600;
  color: var(--text-muted);
  margin-bottom: .4rem;
}
.form-field input, .form-field textarea {
  width: 100%;
  padding: .72rem .9rem;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--c-bg);
  color: var(--text);
  font-size: .93rem;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-field input:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-field input[aria-invalid="true"], .form-field textarea[aria-invalid="true"] { border-color: #d9534f; }
.form-error { display: block; margin-top: .3rem; font-size: .78rem; color: #d9534f; }
.contact__form .btn { margin-top: 1.35rem; }
.form-status { margin-top: .85rem; font-size: .85rem; color: var(--c-accent); min-height: 1.2em; }

/* ============ 12  FOOTER & FLOATING CONTROLS ============ */
.site-footer {
  padding-block: clamp(2.75rem, 5vw, 4rem);
  background: var(--surface);
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer__inner { display: grid; justify-items: center; gap: .35rem; }
.brand--footer { margin-bottom: .85rem; }
.footer__name { font-family: var(--font-head); font-size: 1.2rem; font-weight: 600; margin: 0; }
.footer__role { color: var(--text-soft); font-size: .9rem; margin: 0 0 .35rem; }

.footer__links { display: flex; gap: .55rem; margin: .9rem 0 1.3rem; }
.footer__links a {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  background: var(--c-bg);
  transition: color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease);
}
.footer__links a:hover {
  color: var(--c-accent); border-color: var(--c-accent);
  background: var(--accent-soft); transform: translateY(-3px);
}

.footer__copy { color: var(--text-soft); font-size: .84rem; margin: 0; }
.footer__credit { color: var(--text-soft); font-size: .84rem; margin: .2rem 0 0; }
.heart { color: #e5484d; }

.to-top {
  position: fixed; right: clamp(1rem, 3vw, 1.9rem); bottom: clamp(1rem, 3vw, 1.9rem);
  z-index: 95;
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-muted);
  box-shadow: var(--shadow-md);
  opacity: 0; transform: translateY(10px) scale(.94);
  transition: opacity var(--t-base) var(--ease),
              transform var(--t-base) var(--ease),
              color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease);
}
.to-top.is-visible { opacity: 1; transform: translateY(0) scale(1); }
.to-top:hover { color: var(--c-accent); border-color: var(--c-accent); }

.toast {
  position: fixed; left: 50%; bottom: 28px;
  z-index: 130;
  transform: translate(-50%, 18px);
  display: flex; align-items: center; gap: .5rem;
  padding: .7rem 1.15rem;
  border-radius: var(--r-pill);
  background: var(--c-primary);
  color: #fff;
  font-size: .86rem; font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
html[data-theme="dark"] .toast { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ============ 13  MOTION & REVEAL ============ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ============ 14  RESPONSIVE ============ */
@media (max-width: 1080px) {
  .nav__list { gap: 0; }
  .nav__list a { padding: .5rem .52rem; font-size: .84rem; }
}

@media (max-width: 960px) {
  :root { --header-h: 64px; }

  .nav-toggle { display: grid; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    z-index: 95;
    margin: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity var(--t-base) var(--ease),
                transform var(--t-base) var(--ease),
                visibility var(--t-base) var(--ease);
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__list { flex-direction: column; align-items: stretch; padding: .6rem clamp(1.15rem, 4vw, 2.25rem) 1.1rem; }
  .nav__list a { padding: .8rem .35rem; font-size: .98rem; border-bottom: 1px solid var(--border); border-radius: 0; }
  .nav__list li:last-child a { border-bottom: 0; }
  .nav__list a::after { display: none; }
  .nav__list a.is-active { color: var(--c-accent); }

  .hero__inner { grid-template-columns: 1fr; }
  .hero__portrait { grid-row: 1; max-width: 268px; margin-bottom: 1.25rem; }
  .hero__bio { font-size: .98rem; }

  .about { grid-template-columns: 1fr; }
  .about__aside { position: static; }

  .contact { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: .97rem; }

  .brand__text small { display: none; }

  .hero { padding-block: 2.25rem 3rem; }
  .hero__cta .btn { flex: 1 1 auto; justify-content: center; }

  .stats { grid-template-columns: 1fr 1fr; }

  .timeline { padding-left: 2.15rem; }
  .timeline::before { left: 15px; }
  .timeline__dot { left: -2.15rem; width: 32px; height: 32px; top: 1.05rem; }
  .timeline__dot .icon { width: 15px; height: 15px; }
  .timeline__card { padding: 1.05rem 1.15rem; }
  .timeline__item:hover .timeline__card { transform: none; }

  .pub { grid-template-columns: 1fr; gap: .5rem; padding: 1.1rem 1.15rem; }
  .pub__year { border-right: 0; font-size: 1rem; color: var(--c-accent); }

  .news__item { grid-template-columns: 1fr; gap: .45rem; }
  .news__item:hover { transform: none; }

  .form-row { grid-template-columns: 1fr; }

  .pub-tools { gap: .55rem; }
  .field select { width: 100%; }
  .field:not(.field--search) { flex: 1 1 140px; }
  .btn--mini { flex: 1 1 auto; }
}

@media (max-width: 380px) {
  .hero__fields li { font-size: .79rem; padding: .38rem .72rem; }
}

/* ============ 15  ACCESSIBILITY & PRINT ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media (prefers-contrast: more) {
  :root { --border: #94A3B8; --text-muted: #33404F; }
}

@media print {
  .site-header, .scroll-progress, .to-top, .nav-scrim,
  .pub-tools, .pub-count, .contact__form, .hero__cta, .toast { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section { padding-block: 1.25rem; break-inside: avoid; }
  .card, .pub, .timeline__card, .news__item, .project {
    box-shadow: none; border: 1px solid #ccc; break-inside: avoid;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  a { color: #000; text-decoration: underline; }
}
