/* ==========================================================================
   Dr. Mohd Sakib — personal academic site
   ========================================================================== */

:root {
  --bg: #0B1017;
  --bg-2: #121922;
  --surface: rgba(255, 255, 255, 0.055);
  --surface-2: rgba(255, 255, 255, 0.095);
  --border: rgba(255, 255, 255, 0.105);
  --border-strong: rgba(255, 255, 255, 0.24);
  /* glass */
  --glass: rgba(255, 255, 255, 0.045);
  --glass-hover: rgba(255, 255, 255, 0.085);
  --glass-border: rgba(255, 255, 255, 0.13);
  --glass-sheen: none;
  --glass-blur: saturate(130%) blur(10px);
  --glass-blur-sm: saturate(125%) blur(7px);
  --grid: rgba(255, 255, 255, 0.055);
  --grid-major: rgba(255, 255, 255, 0.085);
  --glass-top: inset 0 1px 0 rgba(255, 255, 255, 0.10);
  --glass-shadow: 0 12px 30px -22px rgba(0, 0, 0, 0.7);
  --nav-glass: 82%;
  --band: rgba(255, 255, 255, 0.022);
  --text: #E9EFFA;
  --text-2: #AEBCD1;
  --muted: #94A2B8;
  --accent: #22D3EE;
  --accent-2: #60A5FA;
  --accent-soft: rgba(34, 211, 238, 0.13);
  --accent-line: linear-gradient(135deg, #22D3EE, #60A5FA);
  --ok: #34D399;
  --gold: #FBBF24;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.75);
  --nav-h: 70px;
  --radius: 16px;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #FFFFFF;
  --bg-2: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F4F7FB;
  --border: rgba(15, 23, 42, 0.11);
  --border-strong: rgba(15, 23, 42, 0.26);
  /* glass */
  --glass: rgba(255, 255, 255, 0.70);
  --glass-hover: rgba(255, 255, 255, 0.92);
  --grid: rgba(15, 23, 42, 0.062);
  --grid-major: rgba(15, 23, 42, 0.095);
  --glass-border: rgba(15, 23, 42, 0.11);
  --glass-sheen: none;
  --glass-top: inset 0 1px 0 rgba(255, 255, 255, 0.95);
  --glass-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 10px 26px -18px rgba(15, 23, 42, .20);
  --nav-glass: 80%;
  --band: rgba(241, 245, 250, 0.72);
  --text: #0B1220;
  --text-2: #33415C;
  --muted: #5A6A82;
  --accent: #1D4ED8;
  --accent-2: #0E7490;
  --accent-soft: rgba(29, 78, 216, 0.075);
  --accent-line: linear-gradient(135deg, #1D4ED8, #0EA5E9);
  --ok: #047857;
  --gold: #B45309;
  --shadow: 0 10px 30px -20px rgba(15, 23, 42, 0.28);
  color-scheme: light;
}

* { box-sizing: border-box; }

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

html { background: var(--bg); }

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17.2px;
  line-height: 1.74;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .35s ease, color .35s ease;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.018em;
  margin: 0;
}

h2 { font-size: clamp(2.05rem, 3.8vw, 3rem); margin-bottom: .6rem; }
h3 { font-size: 1.22rem; letter-spacing: -0.01em; }

p { margin: 0 0 1rem; color: var(--text-2); }

.wrap { width: min(1180px, 100% - 44px); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: #05121a; padding: .7rem 1.1rem; border-radius: 0 0 10px 0;
  font-weight: 600;
}
.skip:focus { left: 0; }

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

/* ---------- scroll progress ---------- */
.progress {
  position: fixed; inset: 0 auto auto 0; height: 2px; width: 0;
  background: var(--accent-line); z-index: 120; transition: width .08s linear;
}

/* ---------- navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h); z-index: 110;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) var(--nav-glass), transparent);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border-bottom-color: var(--glass-border);
  box-shadow: var(--glass-top);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); gap: 1rem; }

.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; font-weight: 600; }
.brand-mark { width: 40px; height: 40px; object-fit: contain; display: block; flex: none; }
.mark-dark { display: none; }
[data-theme="dark"] .mark-light { display: none; }
[data-theme="dark"] .mark-dark { display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.12; font-size: .95rem; }
.brand-text em { font-style: normal; font-size: .64rem; letter-spacing: .18em; color: var(--muted); text-transform: uppercase; }

.nav-links { display: flex; gap: .3rem; }
.nav-links a {
  text-decoration: none; font-size: .9rem; font-weight: 500; color: var(--text-2);
  padding: .5rem .72rem; border-radius: 9px; transition: color .2s, background .2s; white-space: nowrap;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--text); background: var(--accent-soft); }

.nav-actions { display: flex; align-items: center; gap: .5rem; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  transition: background .2s, border-color .2s, transform .2s;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--border-strong); transform: translateY(-1px); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.i-moon { display: none; }
[data-theme="light"] .i-sun { display: none; }
[data-theme="light"] .i-moon { display: block; }

.burger { display: none; flex-direction: column; gap: 4px; }
.burger span { width: 17px; height: 1.8px; background: currentColor; border-radius: 2px; transition: transform .28s, opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.8px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.8px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { position: relative; padding: calc(var(--nav-h) + 4.5rem) 0 4.5rem; overflow: hidden; }
.hero-bg { display: none; }

.hero-inner {
  position: relative; display: grid; grid-template-columns: 1.15fr .85fr;
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}

.hero-text { padding: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem; margin: 0 0 1.1rem;
  font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }
.eyebrow .line { width: 30px; height: 2px; background: var(--accent-line); border-radius: 2px; }

.hero h1 {
  font-size: clamp(3rem, 7.6vw, 5.3rem); font-weight: 600; margin-bottom: .55rem;
}
.grad {
  background: var(--accent-line); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-role { font-size: 1.02rem; color: var(--text); font-weight: 500; margin-bottom: 1.1rem; }
.lede { font-size: 1.14rem; line-height: 1.68; max-width: 58ch; margin-bottom: 1.5rem; color: var(--text-2); }

.hero-tags { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.8rem; }
.hero-tags span {
  font-size: .78rem; font-weight: 500; padding: .34rem .72rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
}

.cta { display: flex; flex-wrap: wrap; gap: .6rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; cursor: pointer;
  padding: .66rem 1.15rem; border-radius: 11px; font-size: .9rem; font-weight: 600;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  transition: transform .2s, border-color .2s, background .2s, box-shadow .2s;
}
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { transform: translateY(-2px); border-color: var(--border-strong); background: var(--surface-2); }
.btn-primary {
  background: var(--accent-line); border-color: transparent; color: #04121b;
  box-shadow: 0 10px 26px -12px color-mix(in srgb, var(--accent) 70%, transparent);
}
[data-theme="light"] .btn-primary { color: #fff; }
.btn-primary:hover { background: var(--accent-line); filter: brightness(1.07); }

/* hero photo */
.hero-photo { position: relative; justify-self: center; width: min(360px, 84vw); }
.photo-ring {
  position: relative; border-radius: 50%; padding: 6px; background: var(--accent-line);
  box-shadow: var(--shadow);
}
.photo-ring::after {
  content: ''; position: absolute; inset: -18px; border-radius: 50%;
  border: 1px dashed var(--border-strong); opacity: .6; animation: spin 46s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.photo-ring img { width: 100%; height: auto; aspect-ratio: 1 / 1; border-radius: 50%; object-fit: cover; background: var(--surface-2); }

.badge-float {
  position: absolute; display: flex; flex-direction: column; gap: 1px; padding: .6rem .85rem;
  border-radius: 13px;
  background: color-mix(in srgb, var(--bg-2) 34%, transparent);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow), var(--glass-top);
}
.badge-float strong { font-size: .85rem; letter-spacing: -.01em; }
.badge-float span { font-size: .72rem; color: var(--text-2); }
.badge-1 { top: 6%; left: -12%; animation: bob 7s ease-in-out infinite; }
.badge-1 strong { color: var(--gold); }
.badge-2 { bottom: 8%; right: -10%; animation: bob 7s ease-in-out infinite 1.6s; }
.badge-2 strong { color: var(--ok); }
@keyframes bob { 50% { transform: translateY(-9px); } }

/* ---------- stats ---------- */
.stats { padding: 1rem 0 3.5rem; position: relative; }
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px;
  background: transparent; border: 1px solid var(--glass-border);
  border-radius: var(--radius); overflow: hidden;
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow), var(--glass-top);
}
.stat { background: var(--glass-sheen), var(--glass); padding: 1.5rem 1.1rem; text-align: center; transition: background .25s; border-right: 1px solid var(--glass-border); }
.stat:last-child { border-right: 0; }
.stat:hover { background: var(--glass-hover); }
.stat b {
  display: block; font-family: var(--font-display); font-size: 2.3rem; font-weight: 700;
  line-height: 1; letter-spacing: -.03em;
  background: var(--accent-line); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.stat span { display: block; margin-top: .45rem; font-size: .87rem; font-weight: 600; }
.stat em { display: block; font-style: normal; font-size: .74rem; color: var(--muted); margin-top: .1rem; }
.stat-note { font-size: .78rem; color: var(--muted); text-align: center; margin: 1rem auto 0; }

/* ---------- sections ---------- */
.section { padding: clamp(4rem, 8vw, 7rem) 0; position: relative; }
.section.alt { background: var(--band); border-block: 1px solid var(--glass-border); }
.section-lede { font-size: 1.04rem; max-width: 68ch; margin-bottom: 2.4rem; }
.section > .wrap > h2 { margin-bottom: 1.1rem; }

.panel {
  background: var(--glass-sheen), var(--glass);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), var(--glass-top);
  border-radius: var(--radius);
  padding: 1.6rem; transition: border-color .25s, transform .25s, box-shadow .25s;
}
.panel:hover { border-color: var(--border-strong); }
.panel h3 { margin-bottom: 1rem; }
.panel p:last-child { margin-bottom: 0; }

/* about */
.about-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 2.4rem; margin-top: 1.8rem; }
.about-copy p { font-size: 1.03rem; }
.about-side { display: grid; gap: 1.1rem; align-content: start; }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.6rem; }
.chips span {
  font-size: .79rem; padding: .32rem .7rem; border-radius: 8px;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  color: var(--text); font-weight: 500;
}

.timeline { list-style: none; margin: 0; padding: 0 0 0 1.35rem; position: relative; }
.timeline::before { content: ''; position: absolute; left: 3px; top: 7px; bottom: 7px; width: 1.5px; background: var(--border); }
.timeline li { position: relative; padding-bottom: 1.3rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ''; position: absolute; left: -1.35rem; top: 7px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg-2); border: 2px solid var(--accent);
}
.timeline .when { display: block; font-size: .73rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.timeline strong { display: block; font-size: 1rem; margin-top: .15rem; }
.timeline .where { display: block; font-size: .87rem; color: var(--text-2); }
.timeline p { font-size: .87rem; margin: .35rem 0 0; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.2rem; margin-top: 1.5rem; }
.card {
  position: relative;
  background: var(--glass-sheen), var(--glass);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), var(--glass-top);
  border-radius: var(--radius); padding: 1.6rem; overflow: hidden;
  transition: transform .28s ease, border-color .28s, box-shadow .28s;
}
.card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--accent-line);
  transform: scaleX(0); transform-origin: left; transition: transform .4s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.card:hover::before { transform: scaleX(1); }
.card.feature { grid-column: span 1; }
.card h3 { margin-bottom: .35rem; }
.card-sub { font-size: .88rem; color: var(--accent); font-weight: 500; margin-bottom: .9rem; }
.card p { font-size: .94rem; }
.card-tag {
  display: inline-block; margin-bottom: .8rem; font-size: .7rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; padding: .26rem .6rem; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
}
.card-tag.now { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); color: var(--accent); }
.card-tag.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); border-color: color-mix(in srgb, var(--ok) 38%, transparent); color: var(--ok); }

.ticks { list-style: none; margin: .9rem 0 0; padding: 0; display: grid; gap: .6rem; }
.ticks.tight { gap: .45rem; }
.ticks li { position: relative; padding-left: 1.5rem; font-size: .93rem; color: var(--text-2); }
.ticks li::before {
  content: ''; position: absolute; left: 0; top: .52em; width: 7px; height: 7px; rotate: 45deg;
  background: var(--accent-line); border-radius: 1.5px;
}
.ticks strong, .ticks em { color: var(--text); }
.fine { font-size: .81rem; color: var(--muted); }

/* ---------- publications ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.chip-btn {
  cursor: pointer; font-family: inherit; font-size: .85rem; font-weight: 600;
  padding: .5rem .95rem; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); transition: all .2s;
}
.chip-btn:hover { color: var(--text); border-color: var(--border-strong); }
.chip-btn.is-on { background: var(--accent-line); border-color: transparent; color: #04121b; }
[data-theme="light"] .chip-btn.is-on { color: #fff; }

.pubs { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.pub {
  display: grid; grid-template-columns: 74px 1fr; gap: 1.2rem; align-items: start;
  padding: 1.35rem 1.5rem; border: 1px solid var(--glass-border); border-radius: var(--radius);
  background: var(--glass-sheen), var(--glass);
  backdrop-filter: var(--glass-blur-sm); -webkit-backdrop-filter: var(--glass-blur-sm);
  box-shadow: var(--glass-shadow), var(--glass-top);
  transition: transform .25s, border-color .25s, background .25s;
}
.pub:hover { transform: translateX(4px); border-color: var(--border-strong); background: var(--glass-hover); }
.pub.hidden { display: none; }
.year {
  font-family: var(--font-display); font-size: 1.28rem; font-weight: 700; letter-spacing: -.02em;
  color: var(--muted); padding-top: .05rem;
}
.pub h3 { font-size: 1.06rem; line-height: 1.35; margin-bottom: .4rem; }
.pub h3 sup { font-size: .65em; }
.authors { font-size: .89rem; margin-bottom: .18rem; color: var(--text-2); }
.authors b { color: var(--text); font-weight: 600; }
.venue { font-size: .87rem; color: var(--muted); margin-bottom: .6rem; }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .55rem; }
.tags span {
  font-size: .7rem; font-weight: 600; letter-spacing: .05em; padding: .18rem .5rem;
  border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
}
.t-scie { color: var(--accent) !important; border-color: color-mix(in srgb, var(--accent) 36%, transparent) !important; background: var(--accent-soft) !important; }
.t-q1 { color: var(--ok) !important; border-color: color-mix(in srgb, var(--ok) 40%, transparent) !important; background: color-mix(in srgb, var(--ok) 13%, transparent) !important; }
.t-award { color: var(--gold) !important; border-color: color-mix(in srgb, var(--gold) 40%, transparent) !important; background: color-mix(in srgb, var(--gold) 13%, transparent) !important; }
.t-review, .t-accept, .t-book { color: var(--accent-2) !important; border-color: color-mix(in srgb, var(--accent-2) 38%, transparent) !important; background: color-mix(in srgb, var(--accent-2) 12%, transparent) !important; }
.doi {
  display: inline-block; font-size: .8rem; text-decoration: none; color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 38%, transparent); transition: border-color .2s;
  word-break: break-all;
}
.doi:hover { border-bottom-color: var(--accent); }

.inprep { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.2rem; margin-top: 2rem; }
.inprep p { font-size: .92rem; }

/* ---------- grants ---------- */
.grant {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 2rem; align-items: center;
  padding: 2rem; border-radius: var(--radius); margin-top: 1.5rem;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent);
  background: linear-gradient(135deg, var(--accent-soft), transparent 62%), var(--glass-sheen), var(--glass);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow), var(--glass-top);
}
.grant h3 { font-size: 1.4rem; margin-bottom: .6rem; }
.grant p:last-child { margin-bottom: 0; }
.grant-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; margin: 0; }
.grant-meta dt { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.grant-meta dd { margin: .2rem 0 0; font-size: .97rem; font-weight: 600; }
.grant-meta .ok { color: var(--ok); }
.ip-cards { margin-top: 1.2rem; }

/* ---------- teaching / service ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 1.6rem; align-items: start; }
.courses { list-style: none; margin: 0; padding: 0; }
.courses li {
  display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
  padding: .6rem 0; border-bottom: 1px dashed var(--border); font-size: .93rem;
}
.courses li:last-of-type { border-bottom: none; }
.courses em { font-style: normal; font-size: .78rem; color: var(--muted); white-space: nowrap; }
.sub-label { font-size: .72rem; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: 1.3rem 0 .6rem; }
.panel .sub-label:first-of-type { margin-top: 0; }
.skills { margin-top: 1.2rem; }
.skill-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.3rem; }
.skill-grid h4 { margin: 0 0 .25rem; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.skill-grid p { font-size: .92rem; margin: 0; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.15fr .9fr .95fr; gap: 1.2rem; align-items: start; }
.contact-list { list-style: none; margin: 0 0 1.4rem; padding: 0; display: grid; gap: 1rem; }
.contact-list li { display: grid; grid-template-columns: 1fr auto; gap: .5rem .8rem; align-items: center; }
.c-label { grid-column: 1 / -1; font-size: .71rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.contact-list a { color: var(--accent); text-decoration: none; font-size: .95rem; word-break: break-all; }
.contact-list a:hover { text-decoration: underline; }
.c-plain { font-size: .93rem; color: var(--text-2); grid-column: 1 / -1; }
.copy {
  cursor: pointer; font-family: inherit; font-size: .72rem; font-weight: 600; padding: .3rem .6rem;
  border-radius: 7px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2);
  transition: all .2s;
}
.copy:hover { color: var(--text); border-color: var(--border-strong); }
.copy.done { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }

.profiles, .refs { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.profiles a {
  display: flex; flex-direction: column; text-decoration: none; padding: .7rem .9rem;
  border-radius: 11px; border: 1px solid var(--border); background: var(--surface-2);
  transition: transform .2s, border-color .2s;
}
.profiles a:hover { transform: translateX(3px); border-color: var(--accent); }
.profiles strong { font-size: .93rem; }
.profiles span { font-size: .79rem; color: var(--muted); }
.refs li { padding-bottom: .8rem; border-bottom: 1px dashed var(--border); }
.refs li:last-child { border-bottom: none; padding-bottom: 0; }
.refs strong { display: block; font-size: .95rem; }
.refs span { display: block; font-size: .82rem; color: var(--muted); margin: .1rem 0 .2rem; }
.refs a { font-size: .84rem; color: var(--accent); text-decoration: none; word-break: break-all; }
.refs a:hover { text-decoration: underline; }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--glass-border); background: var(--band);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  padding: 2.5rem 0;
}
.footer-inner { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.footer-inner > div:first-child { display: flex; flex-direction: column; }
.footer-inner strong { font-family: var(--font-display); font-size: 1.05rem; }
.footer-inner span { font-size: .84rem; color: var(--muted); }
.footer-links { display: flex; gap: 1.2rem; }
.footer-links a { font-size: .87rem; color: var(--text-2); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.footer .fine { width: 100%; margin: 0; padding-top: 1.2rem; border-top: 1px solid var(--border); }

.to-top {
  position: fixed; right: 22px; bottom: 22px; width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 12px; cursor: pointer; z-index: 100; opacity: 0; pointer-events: none;
  background: var(--accent-line); border: none; color: #04121b;
  box-shadow: 0 10px 26px -12px color-mix(in srgb, var(--accent) 70%, transparent);
  transition: opacity .3s, transform .3s;
}
[data-theme="light"] .to-top { color: #fff; }
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { transform: translateY(-3px); }
.to-top svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid .panel:first-child { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; gap: 0;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border); padding: .6rem 22px 1.1rem;
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: all .26s ease;
    max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: .8rem .6rem; border-radius: 9px; font-size: .97rem; }
  .burger { display: flex; }
  .hero-inner { grid-template-columns: 1fr; text-align: left; }
  .hero-photo { order: -1; width: min(250px, 62vw); justify-self: start; margin-bottom: .6rem; }
  .badge-1 { left: auto; right: -34%; top: 2%; }
  .badge-2 { right: -30%; bottom: 2%; }
  .about-grid, .two-col { grid-template-columns: 1fr; }
  .grant { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  body { font-size: 16.6px; }
  .wrap { width: min(1180px, 100% - 32px); }
  .hero { padding-top: calc(var(--nav-h) + 2.6rem); }
  .hero h1 { font-size: clamp(2.6rem, 13vw, 3.6rem); }
  .badge-float { padding: .45rem .65rem; }
  .badge-1 { right: -18%; }
  .badge-2 { right: -14%; }
  .stat b { font-size: 1.9rem; }
  .pub { grid-template-columns: 1fr; gap: .4rem; padding: 1.15rem 1.2rem; }
  .year { font-size: 1rem; }
  .contact-grid { grid-template-columns: 1fr; }
  .grant { padding: 1.5rem; }
  .grant-meta { grid-template-columns: 1fr 1fr; gap: .9rem; }
  .panel, .card { padding: 1.3rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 420px) {
  .badge-float { display: none; }
  .hero-photo { width: min(200px, 56vw); }
}

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

@media print {
  body::before { display: none; }
  .nav, .to-top, .progress, .hero-bg, .filters, .badge-float { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding: 1.2rem 0; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- glass: profile links, graceful degradation, mobile cost ---------- */
.profiles a {
  background: var(--glass-sheen), var(--glass);
  backdrop-filter: var(--glass-blur-sm); -webkit-backdrop-filter: var(--glass-blur-sm);
  border-color: var(--glass-border);
  box-shadow: var(--glass-top);
}
.profiles a:hover { background: var(--glass-hover); }

/* Content surfaces use alpha fills without blur, so the illustration stays
   visible in every section, including browsers without backdrop-filter. */

/* viewers who ask for reduced transparency get flat, opaque surfaces */
@media (prefers-reduced-transparency: reduce) {
  .nav.scrolled, .nav-links, .hero-text, .panel, .card, .pub, .grant, .stat-grid, .footer, .badge-float, .profiles a {
    backdrop-filter: none; -webkit-backdrop-filter: none;
    background: var(--bg-2);
  }
  .stat { background: var(--bg-2); }
  body::before { opacity: .35; }
}

/* ---------- page texture: blueprint grid behind everything ---------- */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 184px 184px, 184px 184px, 46px 46px, 46px 46px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 76%, rgba(0,0,0,.42) 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 76%, rgba(0,0,0,.42) 100%);
}

/* a grid-filled card peeking out behind the portrait */
.hero-photo::before {
  content: ''; position: absolute; z-index: 0;
  width: 82%; height: 82%; right: -9%; bottom: -7%;
  border: 1px solid var(--border); border-radius: 26px;
  background-color: var(--surface-2);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 23px 23px;
}
.photo-ring { position: relative; z-index: 1; }
.badge-float { z-index: 3; }

/* cards get more presence and a clearer lift */
.card, .panel { transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease, background .25s ease; }
.card:hover, .panel:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
  box-shadow: 0 2px 4px rgba(15, 23, 42, .05), 0 18px 40px -22px rgba(15, 23, 42, .30);
}
.pub:hover { border-color: color-mix(in srgb, var(--accent) 42%, transparent); }

/* section headings sit on a short rule */
.section > .wrap > h2 { position: relative; padding-top: .75rem; }
.section > .wrap > h2::before {
  content: ''; position: absolute; top: 0; left: 0; width: 56px; height: 3px;
  border-radius: 3px; background: var(--accent-line);
}

/* stat strip reads as one panel of cells */
.stat-grid { overflow: hidden; }
.stat { position: relative; }
.stat::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 2px;
  background: var(--accent-line); transform: scaleX(0); transition: transform .3s ease;
}
.stat:hover::after { transform: scaleX(1); }

@media (max-width: 680px) {
  body::before { background-size: 138px 138px, 138px 138px, 34px 34px, 34px 34px; }
  .hero-photo::before { display: none; }
}
