/* ==========================================================================
   Prof. Sakunthala Yatigammana Ekanayake — Academic Portfolio
   Palette: deep navy · ivory · gold · neutral slate
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  --navy-950: #060f1f;
  --navy-900: #0a1a33;
  --navy-800: #0f2447;
  --navy-700: #16305c;
  --navy-600: #1f4079;

  --gold-600: #8c6a21;   /* gold for text on light backgrounds (AA) */
  --gold-500: #b8923f;
  --gold-400: #cfa94f;
  --gold-300: #e2c27a;
  --gold-200: #f0dfb5;

  --ivory: #faf7f0;
  --ivory-2: #f3eee2;
  --white: #ffffff;

  /* semantic (light) */
  --bg: var(--ivory);
  --bg-alt: var(--ivory-2);
  --surface: var(--white);
  --text: #1c2740;
  --muted: #5a6578;
  --heading: var(--navy-900);
  --accent-text: var(--gold-600);
  --line: rgba(10, 26, 51, 0.12);
  --line-strong: rgba(10, 26, 51, 0.28);
  --shadow-sm: 0 1px 2px rgba(10, 26, 51, 0.06), 0 4px 14px rgba(10, 26, 51, 0.05);
  --shadow-md: 0 10px 30px rgba(10, 26, 51, 0.10);
  --shadow-lg: 0 24px 60px rgba(6, 15, 31, 0.28);

  --font-display: "Playfair Display", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 18px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 76px;
}

:root[data-theme="dark"] {
  --bg: #07101f;
  --bg-alt: #0a1629;
  --surface: #0f1f3a;
  --text: #cfd6e4;
  --muted: #9aa6bc;
  --heading: #f6f0e0;
  --accent-text: var(--gold-300);
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.28);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 14px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.4s ease, color 0.4s ease;
}
body.is-loading, body.nav-open { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, dl, dd, figure { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
::selection { background: var(--gold-300); color: var(--navy-950); }

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

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.center { text-align: center; margin-top: 2.5rem; }
.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; }
.fine { font-size: 0.85rem; color: var(--muted); margin-top: 2rem; }
.muted { color: var(--muted); }

.ico { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.skip-link {
  position: fixed; left: 1rem; top: -4rem; z-index: 300;
  background: var(--gold-400); color: var(--navy-950); padding: 0.6rem 1rem; border-radius: 8px; font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* ---------- 3. Preloader ---------- */
.preloader { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; color: var(--gold-200); }
.pre-panel { position: absolute; left: 0; right: 0; height: 50.5%; background: var(--navy-950); transition: transform 0.95s var(--ease); }
.pre-panel::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 100%, rgba(207, 169, 79, 0.10), transparent 60%); }
.pre-top { top: 0; }
.pre-bottom { bottom: 0; }
.pre-bottom::after { background: radial-gradient(circle at 50% 0%, rgba(207, 169, 79, 0.10), transparent 60%); }
.pre-center { position: relative; text-align: center; transition: opacity 0.45s ease, transform 0.6s var(--ease); }
.pre-mark { position: relative; width: 132px; height: 132px; margin: 0 auto 1.6rem; display: grid; place-items: center; }
.pre-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.pre-ring circle { fill: none; stroke-width: 1.5; }
.pre-ring-bg { stroke: rgba(240, 223, 181, 0.16); }
.pre-ring-fg { stroke: var(--gold-400); stroke-linecap: round; stroke-dasharray: 339.3; stroke-dashoffset: 339.3; animation: ringDraw 1.6s 0.15s var(--ease) forwards; }
.pre-mono { font-family: var(--font-display); font-weight: 600; font-size: 2.6rem; letter-spacing: 0.04em; color: var(--gold-200); opacity: 0; transform: scale(0.9); animation: monoIn 0.9s 0.35s var(--ease) forwards; }
.pre-name { font-family: var(--font-display); font-size: 1.35rem; letter-spacing: 0.04em; color: #f6f0e0; opacity: 0; animation: fadeUp 0.8s 0.7s var(--ease) forwards; }
.pre-sub { margin-top: 0.25rem; font-size: 0.72rem; letter-spacing: 0.32em; text-transform: uppercase; color: var(--gold-300); opacity: 0; animation: fadeUp 0.8s 0.9s var(--ease) forwards; }
.pre-bar { width: 180px; height: 2px; margin: 1.6rem auto 0; background: rgba(240, 223, 181, 0.16); overflow: hidden; border-radius: 2px; }
.pre-bar i { display: block; height: 100%; width: 0; background: var(--gold-400); transition: width 0.3s ease; }
.preloader.is-done .pre-top { transform: translateY(-101%); }
.preloader.is-done .pre-bottom { transform: translateY(101%); }
.preloader.is-done .pre-center { opacity: 0; transform: scale(1.06); }
@keyframes ringDraw { to { stroke-dashoffset: 0; } }
@keyframes monoIn { to { opacity: 1; transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- 4. Scroll progress & header ---------- */
.scroll-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 250; background: linear-gradient(90deg, var(--gold-500), var(--gold-300)); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); pointer-events: none; }

.site-header {
  --hdr-fg: #f6f0e0;
  position: fixed; inset: 0 0 auto 0; z-index: 200; height: var(--header-h);
  color: var(--hdr-fg);
  transition: height 0.3s ease;
}
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -2; opacity: 0; pointer-events: none;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  box-shadow: 0 1px 0 var(--line);
  transition: opacity 0.4s ease;
}
.site-header.is-scrolled { --hdr-fg: var(--heading); height: 66px; }
.site-header.is-scrolled::before { opacity: 1; }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }

.brand { display: flex; align-items: center; gap: 0.8rem; }
.brand-mark {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%;
  border: 1.5px solid var(--gold-400); font-family: var(--font-display); font-weight: 600; font-size: 1rem; letter-spacing: 0.04em;
  color: var(--gold-300); background: rgba(10, 26, 51, 0.55); transition: transform 0.5s var(--ease), background-color 0.3s;
}
.is-scrolled .brand-mark { color: var(--gold-200); background: var(--navy-900); }
.brand:hover .brand-mark { transform: rotate(360deg); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; letter-spacing: 0.01em; }
.brand-text small { font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.72; }

.nav ul { display: flex; align-items: center; gap: clamp(0.9rem, 1.8vw, 1.8rem); }
.nav a { position: relative; font-size: 0.86rem; font-weight: 500; letter-spacing: 0.02em; padding: 0.4rem 0; opacity: 0.88; transition: opacity 0.2s; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--gold-400); transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.4s var(--ease); }
.nav a:hover, .nav a.is-active { opacity: 1; }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.nav .nav-cta { padding: 0.5rem 1.1rem; border: 1px solid var(--gold-400); border-radius: 999px; color: inherit; transition: background-color 0.3s, color 0.3s; }
.nav .nav-cta::after { display: none; }
.nav .nav-cta:hover { background: var(--gold-400); color: var(--navy-950); }

.header-actions { display: flex; align-items: center; gap: 0.4rem; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid transparent; background: transparent; color: inherit; transition: background-color 0.25s, border-color 0.25s, transform 0.3s var(--ease); }
.icon-btn:hover { background: rgba(207, 169, 79, 0.16); border-color: rgba(207, 169, 79, 0.5); }
.icon-btn .ico { width: 20px; height: 20px; }
#themeToggle .ico-sun { display: none; }
[data-theme="dark"] #themeToggle .ico-sun { display: block; }
[data-theme="dark"] #themeToggle .ico-moon { display: none; }
.menu-btn { display: none; }
.menu-btn .ico-close { display: none; }
.menu-btn[aria-expanded="true"] .ico-open { display: none; }
.menu-btn[aria-expanded="true"] .ico-close { display: block; }

/* ---------- 5. Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden; color: #f6f0e0;
  min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--header-h) + 2.5rem) 0 2rem;
  background: linear-gradient(165deg, var(--navy-950) 0%, var(--navy-900) 52%, var(--navy-800) 100%);
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero-orb { position: absolute; z-index: -3; border-radius: 50%; filter: blur(70px); will-change: transform; }
.orb-1 { width: 46vw; height: 46vw; max-width: 640px; max-height: 640px; right: -10%; top: -12%; background: radial-gradient(circle, rgba(207, 169, 79, 0.30), transparent 65%); animation: drift 22s ease-in-out infinite alternate; }
.orb-2 { width: 40vw; height: 40vw; max-width: 560px; max-height: 560px; left: -12%; bottom: -18%; background: radial-gradient(circle, rgba(46, 94, 175, 0.42), transparent 65%); animation: drift 26s ease-in-out infinite alternate-reverse; }
.hero-grid {
  position: absolute; inset: 0; z-index: -2; opacity: 0.5;
  background-image: linear-gradient(rgba(240, 223, 181, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(240, 223, 181, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%);
}
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(4%, 6%, 0) scale(1.12); } }

.hero-inner { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.hero-eyebrow { display: flex; align-items: center; gap: 0.9rem; font-size: 0.74rem; font-weight: 500; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold-300); }
.hero-eyebrow .rule { width: 44px; height: 1px; background: var(--gold-400); transform-origin: 0 50%; }
.hero-name { margin-top: 1.4rem; font-family: var(--font-display); font-weight: 600; font-size: clamp(2.6rem, 6.4vw, 5.2rem); line-height: 1.05; letter-spacing: -0.01em; }
.hero-name .line { display: block; overflow: hidden; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.hero-name .line-inner { display: inline-block; }
.hero-name .prefix { font-style: italic; font-weight: 500; font-size: 0.5em; color: var(--gold-300); margin-right: 0.15em; vertical-align: 0.35em; }
.hero-name .gold { color: var(--gold-300); font-style: italic; }
.hero-role { margin-top: 1.6rem; min-height: 2.1em; font-size: clamp(1.1rem, 2.1vw, 1.55rem); font-weight: 500; color: #fff; display: flex; align-items: center; flex-wrap: wrap; }
.caret { display: inline-block; width: 2px; height: 1.15em; margin-left: 4px; background: var(--gold-400); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-affil { margin-top: 0.1rem; color: rgba(246, 240, 224, 0.7); font-size: 0.98rem; }
.hero-interests { margin-top: 1.9rem; display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 1rem; padding: 0.7rem 1.1rem; border: 1px solid rgba(240, 223, 181, 0.2); border-radius: 999px; width: fit-content; max-width: 100%; background: rgba(255, 255, 255, 0.03); }
.hero-interests .lbl { font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-300); }
.rotator { display: inline-block; font-weight: 500; color: #fff; min-width: 12ch; }
.rotator.swap { animation: rotIn 0.6s var(--ease); }
@keyframes rotIn { from { opacity: 0; transform: translateY(60%); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
.hero-cta { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: 0.9rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; padding: 0.9rem 1.6rem; border-radius: 999px; border: 1px solid transparent; font-weight: 600; font-size: 0.92rem; letter-spacing: 0.02em; transition: transform 0.35s var(--ease), background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s; will-change: transform; }
.btn .ico { transition: transform 0.35s var(--ease); }
.btn:hover .ico { transform: translateX(4px); }
.btn-gold { background: var(--gold-400); color: var(--navy-950); box-shadow: 0 8px 24px rgba(207, 169, 79, 0.28); }
.btn-gold:hover { background: var(--gold-300); box-shadow: 0 12px 32px rgba(207, 169, 79, 0.4); }
.btn-ghost { border-color: rgba(240, 223, 181, 0.4); color: #f6f0e0; }
.btn-ghost:hover { background: rgba(240, 223, 181, 0.1); border-color: var(--gold-300); }
.btn-outline { border-color: var(--line-strong); color: var(--heading); background: transparent; }
.btn-outline:hover { border-color: var(--gold-500); background: var(--surface); }

/* portrait */
.hero-visual { display: flex; justify-content: center; }
.portrait { position: relative; width: min(340px, 78vw); will-change: transform; transition: transform 0.25s ease-out; }
.portrait-frame { position: relative; aspect-ratio: 7 / 9; border-radius: 999px 999px 26px 26px; overflow: hidden; border: 1px solid rgba(226, 194, 122, 0.7); box-shadow: var(--shadow-lg), 0 0 0 8px rgba(255, 255, 255, 0.04); background: var(--navy-800); }
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; transform: scale(1.02); }
.portrait-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(6, 15, 31, 0.45)); }
.portrait-ring { position: absolute; inset: -16px -16px 16px 16px; border: 1px solid rgba(226, 194, 122, 0.45); border-radius: 999px 999px 26px 26px; z-index: -1; transition: transform 0.6s var(--ease); }
.portrait:hover .portrait-ring { transform: translate(-6px, 6px); }
.badge { position: absolute; display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 0.95rem; max-width: 250px; border-radius: 14px; background: rgba(10, 26, 51, 0.72); border: 1px solid rgba(226, 194, 122, 0.35); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: var(--shadow-md); font-size: 0.74rem; line-height: 1.35; color: rgba(246, 240, 224, 0.78); }
.badge .ico { width: 26px; height: 26px; color: var(--gold-300); }
.badge strong { display: block; font-size: 0.8rem; color: #fff; font-weight: 600; }
.badge-a { left: -14%; bottom: 5%; animation: float 6s ease-in-out infinite; }
.badge-b { right: -9%; top: 10%; animation: float 7s ease-in-out -2s infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* stats */
.hero-stats { margin-top: clamp(2.5rem, 6vw, 4.5rem); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid rgba(240, 223, 181, 0.18); border-radius: var(--radius); background: rgba(255, 255, 255, 0.035); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); overflow: hidden; }
.stat { padding: 1.3rem 1.5rem; display: flex; flex-direction: column-reverse; gap: 0.15rem; position: relative; }
.stat + .stat::before { content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1px; background: rgba(240, 223, 181, 0.18); }
.stat dd { font-family: var(--font-display); font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 600; color: var(--gold-300); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat dt { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(246, 240, 224, 0.7); }

.scroll-cue { position: absolute; left: 50%; bottom: 0.6rem; width: 22px; height: 36px; margin-left: -11px; border: 1.5px solid rgba(240, 223, 181, 0.45); border-radius: 12px; opacity: 0.8; }
.scroll-cue span { position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--gold-300); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70%, 100% { transform: translateY(12px); opacity: 0; } }

/* hero entrance (after preloader) */
.js .hero-name .line-inner { transform: translateY(112%); }
.js .hero-eyebrow, .js .hero-role, .js .hero-affil, .js .hero-interests, .js .hero-cta, .js .hero-visual, .js .stats { opacity: 0; transform: translateY(22px); }
.js .hero-eyebrow .rule { transform: scaleX(0); }
.js .scroll-cue { opacity: 0; }
.is-ready .hero-name .line-inner { transform: none; transition: transform 1.2s var(--ease); }
.is-ready .hero-name .line:nth-child(2) .line-inner { transition-delay: 0.12s; }
.is-ready .hero-eyebrow .rule { transform: none; transition: transform 1s 0.1s var(--ease); }
.is-ready .hero-eyebrow, .is-ready .hero-role, .is-ready .hero-affil, .is-ready .hero-interests, .is-ready .hero-cta, .is-ready .hero-visual, .is-ready .stats { opacity: 1; transform: none; transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
.is-ready .hero-eyebrow { transition-delay: 0s; }
.is-ready .hero-role { transition-delay: 0.45s; }
.is-ready .hero-affil { transition-delay: 0.55s; }
.is-ready .hero-interests { transition-delay: 0.65s; }
.is-ready .hero-cta { transition-delay: 0.78s; }
.is-ready .hero-visual { transition-delay: 0.35s; }
.is-ready .stats { transition-delay: 0.95s; }
.is-ready .scroll-cue { opacity: 0.8; transition: opacity 1s 1.4s; }

/* ---------- 6. Sections ---------- */
.section { position: relative; padding: clamp(4.5rem, 9vw, 8rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-navy { background: var(--navy-900); color: rgba(246, 240, 224, 0.82); --heading: #f6f0e0; --accent-text: var(--gold-300); --muted: rgba(246, 240, 224, 0.66); --line: rgba(240, 223, 181, 0.16); --surface: rgba(255, 255, 255, 0.045); --text: rgba(246, 240, 224, 0.82); overflow: hidden; }
.section-navy::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 50% at 90% 0%, rgba(207, 169, 79, 0.10), transparent 70%), radial-gradient(50% 50% at 0% 100%, rgba(46, 94, 175, 0.20), transparent 70%); }
.section-navy > .container { position: relative; }

.section-head { max-width: 780px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.eyebrow { display: inline-flex; align-items: center; gap: 0.8rem; font-size: 0.76rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent-text); }
.eyebrow b { font-family: var(--font-display); font-size: 0.95rem; letter-spacing: 0.06em; font-weight: 600; }
.eyebrow::after { content: ""; width: 46px; height: 1px; background: var(--gold-500); }
.section-head h2 { margin-top: 0.9rem; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.9rem, 4vw, 3.1rem); line-height: 1.15; letter-spacing: -0.005em; color: var(--heading); }
.section-sub { margin-top: 1rem; max-width: 62ch; color: var(--muted); font-size: 1.05rem; }

.subhead { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin: clamp(3.5rem, 7vw, 5.5rem) 0 2rem; }
.subhead h3, .sub-title, .col-title { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; color: var(--heading); }
.sub-title { margin: clamp(3rem, 6vw, 4.5rem) 0 1.4rem; }

/* scroll reveal */
.js .reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* spotlight on cards */
.spot { position: relative; overflow: hidden; }
.spot::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.4s; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(207, 169, 79, 0.16), transparent 60%); }
.spot:hover::before { opacity: 1; }
.tilt { transform-style: preserve-3d; transition: transform 0.45s var(--ease), box-shadow 0.4s, opacity 0.9s var(--ease); will-change: transform; }

.pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font-size: 0.85rem; font-weight: 500; transition: background-color 0.25s, color 0.25s, border-color 0.25s, transform 0.3s var(--ease); }
.pill b { font-weight: 600; font-size: 0.72rem; padding: 0.05rem 0.45rem; border-radius: 999px; background: var(--line); color: var(--muted); }
.pill:hover { border-color: var(--gold-500); transform: translateY(-1px); }
.pill.is-active { background: var(--navy-900); border-color: var(--navy-900); color: var(--gold-200); }
.pill.is-active b { background: rgba(240, 223, 181, 0.18); color: var(--gold-200); }
[data-theme="dark"] .pill.is-active { background: var(--gold-400); border-color: var(--gold-400); color: var(--navy-950); }
[data-theme="dark"] .pill.is-active b { background: rgba(6, 15, 31, 0.18); color: var(--navy-950); }

/* ---------- 7. About ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.about-text p { color: var(--text); margin-bottom: 1.2rem; max-width: 68ch; }
.about-text .lead { font-family: var(--font-display); font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.5; color: var(--heading); }
.interest-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.6rem; }
.interest-chips li { padding: 0.35rem 0.85rem; font-size: 0.82rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); transition: border-color 0.3s, transform 0.3s var(--ease), color 0.3s; }
.interest-chips li:hover { border-color: var(--gold-500); color: var(--accent-text); transform: translateY(-2px); }

.about-card { padding: clamp(1.5rem, 3vw, 2.2rem); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); border-top: 3px solid var(--gold-400); position: sticky; top: calc(var(--header-h) + 1.5rem); }
.about-card h3 { font-size: 0.74rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent-text); font-weight: 600; margin-bottom: 1rem; }
.facts { margin-bottom: 1.8rem; }
.facts div { display: grid; grid-template-columns: 96px 1fr; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.facts dt { color: var(--muted); font-size: 0.82rem; }
.facts dd { color: var(--heading); font-weight: 500; }
.check li { position: relative; padding-left: 1.5rem; margin-bottom: 0.65rem; font-size: 0.93rem; line-height: 1.55; }
.check li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 7px; height: 7px; border-radius: 50%; background: var(--gold-400); box-shadow: 0 0 0 4px rgba(207, 169, 79, 0.18); }

/* ---------- 8. Awards ---------- */
.awards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.2rem; }
.award { grid-column: span 2; padding: 1.8rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: transform 0.45s var(--ease), border-color 0.3s; }
.award:hover { transform: translateY(-6px); border-color: rgba(226, 194, 122, 0.55); }
.award:first-child { grid-column: span 3; }
.award:nth-child(2) { grid-column: span 3; }
.award-year { display: block; font-family: var(--font-display); font-size: 2.8rem; font-weight: 600; line-height: 1; color: var(--gold-300); margin-bottom: 1rem; }
.award h3 { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.3; color: var(--heading); font-weight: 600; margin-bottom: 0.5rem; }
.award p { font-size: 0.9rem; color: var(--muted); }

/* ---------- 9. Research themes & projects ---------- */
.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.theme { padding: 2rem 1.8rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.theme:hover { box-shadow: var(--shadow-md); border-color: rgba(184, 146, 63, 0.5); }
.theme-ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; margin-bottom: 1.3rem; background: var(--navy-900); color: var(--gold-300); transition: transform 0.5s var(--ease); }
.theme:hover .theme-ico { transform: rotate(-8deg) scale(1.08); }
.theme-ico .ico { width: 24px; height: 24px; }
.theme h3 { font-family: var(--font-display); font-size: 1.28rem; font-weight: 600; color: var(--heading); margin-bottom: 0.6rem; }
.theme p { font-size: 0.93rem; color: var(--muted); line-height: 1.65; }

.projects { position: relative; display: flex; flex-direction: column; gap: 1.4rem; }
.projects::before { content: ""; position: absolute; left: 118px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(var(--gold-400), var(--line) 20%, var(--line) 85%, transparent); }
.proj { display: grid; grid-template-columns: 118px 1fr; gap: 0; align-items: start; }
.proj-year { position: relative; padding: 1.5rem 1.6rem 0 0; text-align: right; }
.proj-year span { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; color: var(--accent-text); white-space: nowrap; }
.proj-year::after { content: ""; position: absolute; right: -6px; top: 1.78rem; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--gold-400); z-index: 1; transition: background-color 0.3s, transform 0.3s var(--ease); }
.proj:hover .proj-year::after { background: var(--gold-400); transform: scale(1.3); }
.proj[data-status="ongoing"] .proj-year::after { background: var(--gold-400); box-shadow: 0 0 0 5px rgba(207, 169, 79, 0.2); }
.proj-card { margin-left: 2rem; padding: 1.5rem 1.7rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform 0.4s var(--ease), box-shadow 0.3s, border-color 0.3s; }
.proj:hover .proj-card { transform: translateX(4px); box-shadow: var(--shadow-md); border-color: rgba(184, 146, 63, 0.5); }
.proj-top { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem 1rem; margin-bottom: 0.7rem; }
.status { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; padding: 0.25rem 0.65rem; border-radius: 999px; }
.st-ongoing { background: rgba(207, 169, 79, 0.2); color: var(--gold-600); }
[data-theme="dark"] .st-ongoing { color: var(--gold-300); }
.st-completed { background: var(--line); color: var(--muted); }
.proj-loc { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.8rem; color: var(--muted); }
.proj-card h4 { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.4; font-weight: 600; color: var(--heading); }
.proj-fund { display: flex; align-items: flex-start; gap: 0.5rem; margin-top: 0.7rem; font-size: 0.86rem; color: var(--muted); }
.proj-fund .ico { margin-top: 0.2rem; color: var(--gold-500); }
.proj-sum { margin-top: 0.9rem; font-size: 0.93rem; color: var(--text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.proj-card.is-open .proj-sum { display: block; -webkit-line-clamp: unset; }
.proj-toggle { margin-top: 0.8rem; padding: 0; border: 0; background: none; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.03em; color: var(--accent-text); }
.proj-toggle:hover { text-decoration: underline; text-underline-offset: 4px; }
.proj.is-filtered-out { display: none; }

/* ---------- 10. Publications ---------- */
.pub-tools { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem 1.5rem; }
.search { position: relative; flex: 1 1 280px; max-width: 380px; }
.search .ico { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { width: 100%; padding: 0.75rem 1rem 0.75rem 2.8rem; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 0.92rem; transition: border-color 0.25s, box-shadow 0.25s; }
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--gold-500); box-shadow: 0 0 0 4px rgba(207, 169, 79, 0.2); }
.pub-count { margin: 1.4rem 0 0.4rem; font-size: 0.85rem; color: var(--muted); min-height: 1.5em; }

.pubs { border-top: 1px solid var(--line); }
.pub { display: grid; grid-template-columns: 84px 1fr; gap: 1.2rem; padding: 1.35rem 0.6rem; border-bottom: 1px solid var(--line); transition: background-color 0.3s, padding 0.4s var(--ease); }
.pub:hover { background: color-mix(in srgb, var(--surface) 70%, transparent); padding-left: 1.2rem; }
.pub-year { font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; color: var(--accent-text); line-height: 1.3; }
.pub-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.5rem; }
.pub-kind, .pub-tag { font-size: 0.64rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; padding: 0.2rem 0.6rem; border-radius: 999px; }
.pub-kind { background: var(--navy-900); color: var(--gold-200); }
[data-theme="dark"] .pub-kind { background: rgba(207, 169, 79, 0.18); color: var(--gold-200); }
.pk-journal { background: var(--navy-700); }
.pk-conference { background: #3a4f78; }
.pk-chapter { background: #6b5320; }
.pk-book { background: var(--gold-600); color: #fff; }
.pk-other { background: #566075; }
.pub-tag { border: 1px solid var(--line-strong); color: var(--muted); }
.pub-text { font-size: 0.95rem; line-height: 1.7; color: var(--text); max-width: 92ch; overflow-wrap: anywhere; }
.pub-links { margin-top: 0.7rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.chip-link { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.8rem; border-radius: 999px; border: 1px solid var(--gold-500); font-size: 0.78rem; font-weight: 600; color: var(--accent-text); transition: background-color 0.25s, color 0.25s; }
.chip-link:hover { background: var(--gold-400); color: var(--navy-950); border-color: var(--gold-400); }
.pub-empty { padding: 3rem 0; text-align: center; color: var(--muted); }
.js .pub.reveal-in { animation: pubIn 0.6s var(--ease) both; }
@keyframes pubIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- 11. Talks ---------- */
.talks { position: relative; display: flex; flex-direction: column; gap: 1.1rem; }
.talk { display: grid; grid-template-columns: 110px 1fr; gap: 1.5rem; align-items: stretch; }
.talk-date { padding-top: 1.35rem; text-align: right; display: flex; flex-direction: column; }
.talk-date strong { font-family: var(--font-display); font-size: 1.6rem; line-height: 1.1; color: var(--accent-text); font-weight: 600; }
.talk-date span { font-size: 0.8rem; color: var(--muted); }
.talk-body { padding: 1.35rem 1.6rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform 0.4s var(--ease), border-color 0.3s, box-shadow 0.3s; }
.talk:hover .talk-body { transform: translateX(6px); border-color: rgba(184, 146, 63, 0.55); box-shadow: var(--shadow-md); }
.role { display: inline-block; margin-bottom: 0.55rem; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; padding: 0.22rem 0.65rem; border-radius: 999px; }
.role-keynote { background: var(--gold-400); color: var(--navy-950); }
.role-plenary { background: var(--navy-900); color: var(--gold-200); }
[data-theme="dark"] .role-plenary { background: rgba(207, 169, 79, 0.2); }
.role-speaker, .role-invited { background: var(--line); color: var(--muted); }
.talk-body h4 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; line-height: 1.4; color: var(--heading); }
.talk-ev { margin-top: 0.4rem; font-size: 0.92rem; color: var(--text); }
.talk-place { margin-top: 0.5rem; display: flex; align-items: center; gap: 0.4rem; font-size: 0.84rem; color: var(--muted); }
.talk-place .ico { color: var(--gold-500); }

/* ---------- 12. Teaching ---------- */
.teach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.teach { padding: 1.9rem 1.7rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: border-color 0.3s, box-shadow 0.3s, opacity 0.9s var(--ease), transform 0.45s var(--ease); }
.teach:hover { border-color: rgba(226, 194, 122, 0.55); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25); }
.teach-since { display: inline-block; font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; color: var(--gold-300); margin-bottom: 0.9rem; }
.teach h3 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; color: #f6f0e0; margin-bottom: 0.6rem; line-height: 1.3; }
.teach p { font-size: 0.92rem; color: rgba(246, 240, 224, 0.72); }
.visit { border-top: 1px solid var(--line); }
.visit li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 1rem 2rem; padding: 1.15rem 0; border-bottom: 1px solid var(--line); transition: padding 0.4s var(--ease); }
.visit li:hover { padding-left: 0.8rem; }
.visit strong { font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; color: #f6f0e0; }
.visit span { font-size: 0.92rem; color: rgba(246, 240, 224, 0.72); }

/* ---------- 13. Journey timelines ---------- */
.journey { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.col-title { margin-bottom: 1.6rem; }
.timeline { position: relative; padding-left: 1.7rem; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(var(--gold-400), var(--line) 18%, var(--line)); }
.tl-item { position: relative; margin-bottom: 1.15rem; }
.tl-dot { position: absolute; left: -1.7rem; top: 1.45rem; width: 13px; height: 13px; border-radius: 50%; background: var(--bg); border: 2px solid var(--gold-400); transition: background-color 0.3s, transform 0.3s var(--ease); }
.tl-item:hover .tl-dot, .tl-item.is-now .tl-dot { background: var(--gold-400); }
.tl-item.is-now .tl-dot { box-shadow: 0 0 0 5px rgba(207, 169, 79, 0.22); }
.tl-card { padding: 1.2rem 1.4rem; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform 0.4s var(--ease), border-color 0.3s; }
.tl-item:hover .tl-card { transform: translateX(4px); border-color: rgba(184, 146, 63, 0.5); }
.tl-date { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 0.3rem; }
.tl-card h4 { font-family: var(--font-display); font-size: 1.12rem; font-weight: 600; line-height: 1.35; color: var(--heading); }
.tl-place { margin-top: 0.15rem; font-size: 0.9rem; color: var(--text); }
.tl-note { margin-top: 0.5rem; font-size: 0.85rem; color: var(--muted); line-height: 1.6; }

/* ---------- 14. Service ---------- */
.service-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.3rem; }
.svc { padding: 1.8rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.svc-wide { grid-column: 1 / -1; }
.svc h3 { display: flex; align-items: center; gap: 0.7rem; font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; color: var(--heading); margin-bottom: 1.1rem; }
.svc h3 .ico { color: var(--gold-500); width: 22px; height: 22px; }
.plain li { position: relative; padding: 0.5rem 0 0.5rem 1.25rem; font-size: 0.92rem; line-height: 1.6; border-bottom: 1px dashed var(--line); break-inside: avoid; }
.plain li:last-child { border-bottom: 0; }
.plain li::before { content: ""; position: absolute; left: 0; top: 1.05em; width: 6px; height: 1px; background: var(--gold-500); }
.two-col { column-count: 2; column-gap: 2.5rem; }

.accordions { margin-top: 2.2rem; border-top: 1px solid var(--line); }
.acc { border-bottom: 1px solid var(--line); }
.acc summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.3rem 0.2rem; cursor: pointer; list-style: none; font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; color: var(--heading); transition: color 0.25s, padding 0.3s var(--ease); }
.acc summary::-webkit-details-marker { display: none; }
.acc summary:hover { color: var(--accent-text); padding-left: 0.6rem; }
.acc summary .ico { transition: transform 0.4s var(--ease); color: var(--gold-500); width: 24px; height: 24px; }
.acc[open] summary .ico { transform: rotate(180deg); }
.acc .plain { padding: 0 0.2rem 1.5rem; animation: accIn 0.5s var(--ease); }
@keyframes accIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- 15. Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.contact-info li { display: flex; gap: 1.1rem; align-items: flex-start; padding: 1.2rem 0; border-bottom: 1px solid var(--line); color: rgba(246, 240, 224, 0.85); }
.contact-info li:first-child { padding-top: 0; }
.contact-info .ico { width: 24px; height: 24px; margin-top: 0.25rem; color: var(--gold-300); }
.contact-info span { display: block; font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-300); margin-bottom: 0.2rem; }
.contact-info a { color: #fff; font-weight: 500; background: linear-gradient(var(--gold-400), var(--gold-400)) 0 100% / 0 1px no-repeat; transition: background-size 0.4s var(--ease); overflow-wrap: anywhere; }
.contact-info a:hover { background-size: 100% 1px; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; padding: clamp(1.4rem, 3vw, 2.2rem); border-radius: var(--radius); background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(240, 223, 181, 0.2); }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field.full, .full { grid-column: 1 / -1; }
.field label { font-size: 0.76rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-300); }
.field input, .field textarea { width: 100%; padding: 0.8rem 1rem; border-radius: 10px; border: 1px solid rgba(240, 223, 181, 0.25); background: rgba(6, 15, 31, 0.5); color: #fff; font-size: 0.95rem; transition: border-color 0.25s, box-shadow 0.25s; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold-400); box-shadow: 0 0 0 4px rgba(207, 169, 79, 0.2); }
.field input.is-invalid, .field textarea.is-invalid { border-color: #e5877b; }
.form-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 1.4rem; }
.form-note { font-size: 0.84rem; color: rgba(246, 240, 224, 0.66); }

/* ---------- 16. Footer & utilities ---------- */
.site-footer { padding: 2rem 0; background: var(--navy-950); color: rgba(246, 240, 224, 0.75); font-size: 0.85rem; border-top: 1px solid rgba(240, 223, 181, 0.12); }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 2rem; }
.site-footer .muted { color: rgba(246, 240, 224, 0.5); }

.to-top { position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem); z-index: 150; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--gold-400); background: var(--navy-900); color: var(--gold-300); box-shadow: var(--shadow-md); opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity 0.4s, transform 0.4s var(--ease), background-color 0.3s; }
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--gold-400); color: var(--navy-950); }

/* ---------- 17. Responsive ---------- */
@media (max-width: 1080px) {
  .themes { grid-template-columns: repeat(2, 1fr); }
  .teach-grid { grid-template-columns: repeat(2, 1fr); }
  .brand-text small { display: none; }
}

@media (max-width: 960px) {
  .menu-btn { display: grid; }
  .nav {
    position: fixed; inset: 0; z-index: -1; display: flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--navy-950) 97%, transparent); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
    clip-path: circle(0% at calc(100% - 44px) 38px); visibility: hidden;
    transition: clip-path 0.7s var(--ease), visibility 0s 0.7s;
  }
  .nav ul { flex-direction: column; gap: 0.4rem; text-align: center; }
  .nav a { font-family: var(--font-display); font-size: 1.9rem; color: #f6f0e0; opacity: 0; transform: translateY(16px); transition: opacity 0.5s, transform 0.6s var(--ease); display: inline-block; }
  .nav .nav-cta { margin-top: 0.8rem; font-family: var(--font-body); font-size: 1rem; }
  .nav-open .nav { clip-path: circle(150% at calc(100% - 44px) 38px); visibility: visible; transition: clip-path 0.8s var(--ease), visibility 0s; }
  .nav-open .nav a { opacity: 1; transform: none; }
  .nav-open .nav li:nth-child(1) a { transition-delay: 0.15s; } .nav-open .nav li:nth-child(2) a { transition-delay: 0.2s; }
  .nav-open .nav li:nth-child(3) a { transition-delay: 0.25s; } .nav-open .nav li:nth-child(4) a { transition-delay: 0.3s; }
  .nav-open .nav li:nth-child(5) a { transition-delay: 0.35s; } .nav-open .nav li:nth-child(6) a { transition-delay: 0.4s; }
  .nav-open .nav li:nth-child(7) a { transition-delay: 0.45s; } .nav-open .nav li:nth-child(8) a { transition-delay: 0.5s; }
  .nav-open .site-header { --hdr-fg: #f6f0e0; }
  .nav-open .site-header::before { opacity: 0; }
  .nav-open .brand-mark { color: var(--gold-300); background: rgba(10, 26, 51, 0.55); }
  .brand, .header-actions { position: relative; z-index: 2; }

  .hero { min-height: auto; padding-top: calc(var(--header-h) + 2rem); padding-bottom: 4.5rem; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .portrait { width: min(250px, 62vw); }
  .badge-a { left: -18%; } .badge-b { right: -16%; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3)::before { display: none; }
  .stat:nth-child(n + 3) { border-top: 1px solid rgba(240, 223, 181, 0.18); }
  .scroll-cue { display: none; }

  .about-grid, .contact-grid, .journey { grid-template-columns: 1fr; }
  .about-card { position: static; }
  .awards { grid-template-columns: repeat(2, 1fr); }
  .award, .award:first-child, .award:nth-child(2) { grid-column: span 1; }
  .award:first-child { grid-column: 1 / -1; }
  .visit li { grid-template-columns: 1fr; gap: 0.3rem; }
  .two-col { column-count: 1; }
}

@media (max-width: 720px) {
  .themes, .teach-grid, .service-grid { grid-template-columns: 1fr; }
  .awards { grid-template-columns: 1fr; }
  .award:first-child { grid-column: auto; }
  .hero-interests { border-radius: 18px; }
  .hero-eyebrow { letter-spacing: 0.16em; font-size: 0.7rem; }
  .hero-eyebrow .rule { width: 28px; flex: none; }
  .badge { display: none; }
  .projects::before { left: 5px; }
  .proj { grid-template-columns: 1fr; }
  .proj-year { text-align: left; padding: 0 0 0.5rem 1.6rem; }
  .proj-year::after { left: 0; right: auto; top: 0.45rem; }
  .proj-card { margin-left: 1.6rem; padding: 1.2rem; }
  .talk { grid-template-columns: 1fr; gap: 0.5rem; }
  .talk-date { flex-direction: row; align-items: baseline; gap: 0.6rem; text-align: left; padding-top: 0; }
  .talk-body { padding: 1.2rem; }
  .pub { grid-template-columns: 1fr; gap: 0.3rem; }
  .pub:hover { padding-left: 0.6rem; }
  .contact-form { grid-template-columns: 1fr; }
  .search { max-width: none; }
  .brand-text strong { font-size: 0.95rem; }
}

@media (max-width: 420px) {
  .stat { padding: 1rem; }
  .hero-cta .btn { flex: 1 1 100%; }
}

/* ---------- 18. Motion preferences & print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js .reveal, .js .hero-name .line-inner, .js .hero-eyebrow, .js .hero-role, .js .hero-affil, .js .hero-interests, .js .hero-cta, .js .hero-visual, .js .stats { opacity: 1; transform: none; }
}

@media print {
  .preloader, .site-header, .scroll-progress, .hero-canvas, .hero-orb, .hero-grid, .scroll-cue, .to-top, .pub-tools, #pubMore, .contact-form, .proj-toggle { display: none !important; }
  body { background: #fff; color: #000; }
  .hero, .section-navy { background: #fff !important; color: #000 !important; min-height: 0; padding: 1rem 0; }
  .hero * , .section-navy * { color: #000 !important; }
  .js .reveal, .js .hero-name .line-inner, .js .hero-eyebrow, .js .hero-role, .js .hero-affil, .js .hero-interests, .js .hero-cta, .js .hero-visual, .js .stats { opacity: 1 !important; transform: none !important; }
  .pub[hidden], .proj.is-filtered-out { display: block !important; }
  .proj-sum { -webkit-line-clamp: unset; display: block; }
  details > * { display: block; }
}
