/* ==========================================================================
   Chia-Kai Chang · Educational Omics Lab
   Brand: Uedu  (#00b297 primary, #3C6F9A blue, #3C938A teal)
   ========================================================================== */

:root {
  --brand: #00b297;
  --brand-dark: #008f79;
  --blue: #3C6F9A;
  --blue-dark: #2c5578;
  --teal: #3C938A;
  --accent: #D9861C;
  --gradient: linear-gradient(149deg, #3C6F9A, #3C938A);
  --gradient-soft: linear-gradient(149deg, rgba(60, 111, 154, .08), rgba(0, 178, 151, .08));

  --ink: #1d2b3a;
  --ink-2: #3d4b5a;
  --muted: #627284;
  --line: #e2e9f0;
  --bg: #ffffff;
  --bg-soft: #f7fafc;
  --bg-tint: #eef7f5;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(29, 43, 58, .06), 0 1px 3px rgba(29, 43, 58, .05);
  --shadow: 0 8px 24px rgba(29, 43, 58, .08);
  --shadow-lg: 0 18px 40px rgba(29, 43, 58, .12);

  --container: 1160px;
  --header-h: 68px;
  --font: "Inter", "Microsoft JhengHei", "PingFang TC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; transition: color .15s; }
a:hover { color: var(--brand-dark); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid rgba(0, 178, 151, .5); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip-link:focus { left: 8px; color: #fff; }

.icon { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-fill { fill: currentColor; stroke: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--gradient); color: #fff;
  font-weight: 800; font-size: 15px; letter-spacing: .02em;
  box-shadow: 0 4px 12px rgba(60, 111, 154, .3);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-weight: 700; font-size: 17px; }
.brand-sub { font-size: 12.5px; color: var(--muted); font-weight: 500; }

.site-nav ul { display: flex; gap: 4px; list-style: none; }
.site-nav a {
  display: block; padding: 8px 14px; border-radius: 999px;
  color: var(--ink-2); font-weight: 500; font-size: 15px;
}
.site-nav a:hover { color: var(--blue); background: var(--bg-soft); }
.site-nav a[aria-current="page"] { color: var(--brand-dark); background: var(--bg-tint); font-weight: 600; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 10px;
  width: 42px; height: 42px; align-items: center; justify-content: center; color: var(--ink); cursor: pointer;
}
.nav-toggle .icon { width: 22px; height: 22px; }

/* ---------- Buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: 15px; line-height: 1;
  border: 1.5px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s, color .15s;
}
.btn .icon { transition: transform .15s; }
.btn:hover .icon { transform: translateX(3px); }
.btn-primary { background: var(--gradient); color: #fff; box-shadow: 0 6px 16px rgba(60, 111, 154, .28); }
.btn-primary:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 10px 22px rgba(60, 111, 154, .34); }
.btn-ghost { background: #fff; color: var(--blue); border-color: #c9d8e6; }
.btn-ghost:hover { color: var(--brand-dark); border-color: var(--brand); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; line-height: 1.6;
  background: var(--bg-soft); color: var(--muted); border: 1px solid var(--line);
}
.chip-journal { background: rgba(60, 111, 154, .1); color: var(--blue-dark); border-color: transparent; }
.chip-conference { background: rgba(0, 178, 151, .1); color: var(--brand-dark); border-color: transparent; }
.chip-accepted { background: rgba(217, 134, 28, .12); color: #a8640c; border-color: transparent; }

.badge-award {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: #fff6e8; color: #a8640c; border: 1px solid #f3dcb6;
}

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 38px); }
.section-head p { color: var(--muted); font-size: 17px; margin: 0; }
.eyebrow {
  display: inline-block; margin: 0 0 12px;
  font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand-dark);
}
.section-foot { margin-top: 36px; text-align: center; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 80px; background: var(--bg); }
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(60px); z-index: 0; pointer-events: none;
}
.hero::before { width: 520px; height: 520px; right: -120px; top: -140px; background: rgba(0, 178, 151, .14); }
.hero::after { width: 420px; height: 420px; left: -160px; bottom: -200px; background: rgba(60, 111, 154, .12); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(36px, 5vw, 58px); font-weight: 800; letter-spacing: -.025em; margin-bottom: 12px; }
.hero h1 .grad { white-space: nowrap; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-role { font-size: 19px; font-weight: 600; color: var(--blue); margin-bottom: 18px; }
.hero-intro { font-size: 17.5px; color: var(--ink-2); max-width: 600px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 30px; }
.hero-tags .chip { background: #fff; color: var(--ink-2); font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 28px; }
.hero-links a { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; font-size: 15px; color: var(--muted); }
.hero-links a:hover { color: var(--blue); }

.hero-photo { position: relative; justify-self: center; width: min(400px, 100%); aspect-ratio: 1; }
.hero-photo::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--gradient); box-shadow: var(--shadow-lg);
}
.hero-photo::after {
  content: ""; position: absolute; inset: -14px; border-radius: 50%;
  border: 2px dashed rgba(0, 178, 151, .35);
}
.hero-photo picture { position: absolute; inset: 10px; z-index: 1; border-radius: 50%; overflow: hidden; background: #fff; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.hero-badge {
  position: absolute; z-index: 2; left: -8px; bottom: 14%;
  background: #fff; border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; color: var(--ink);
}
.hero-badge .icon { color: var(--accent); width: 22px; height: 22px; }
.hero-badge small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }

/* ---------- Stats ---------- */
.stats { margin-top: -36px; position: relative; z-index: 2; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.stat { padding: 26px 24px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat-num { font-size: 34px; font-weight: 800; color: var(--ink); line-height: 1.1; letter-spacing: -.02em; }
.stat-num span { color: var(--brand); }
.stat-label { font-size: 14px; color: var(--muted); margin-top: 6px; }
.stats-sub { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; margin-top: 22px; font-size: 14.5px; color: var(--muted); }
.stats-sub strong { color: var(--ink); }

/* ---------- Cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3 { font-size: 19px; }
.card p { color: var(--muted); font-size: 15.5px; }
.card p:last-child { margin-bottom: 0; }

.pillar { border-top: 4px solid var(--c, var(--brand)); position: relative; }
.pillar-icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  background: color-mix(in srgb, var(--c) 12%, white); color: var(--c);
}
.pillar-icon .icon { width: 24px; height: 24px; }
.pillar-omics { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 16px; }
.pillar-omics .chip { background: color-mix(in srgb, var(--c) 10%, white); color: var(--c); border-color: transparent; }
.pillar dl { margin: 0; font-size: 14.5px; }
.pillar dt { font-weight: 700; color: var(--ink); font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; margin-top: 12px; }
.pillar dd { margin: 2px 0 0; color: var(--muted); }

/* ---------- Omics diagram ---------- */
.omics { display: grid; grid-template-columns: .95fr 1.05fr; gap: 48px; align-items: center; }
.omics-figure { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 24px; box-shadow: var(--shadow-sm); }
.omics-text h2 { font-size: clamp(28px, 3.4vw, 38px); }
.omics-text p { color: var(--muted); font-size: 17px; }
.legend { list-style: none; display: grid; gap: 12px; margin-top: 22px; }
.legend li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.legend .dot { width: 14px; height: 14px; border-radius: 50%; margin-top: 5px; flex: none; background: var(--c); }
.legend strong { color: var(--ink); display: block; }
.legend span { color: var(--muted); }

/* ---------- Featured ---------- */
.feature {
  display: grid; grid-template-columns: 1.1fr 1fr; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
}
.feature-img { min-height: 320px; background: var(--bg-soft); }
.feature-img img { width: 100%; height: 100%; object-fit: cover; }
.feature-body { padding: 44px; display: flex; flex-direction: column; justify-content: center; }
.feature-body h3 { font-size: 26px; }
.feature-body p { color: var(--muted); font-size: 16.5px; }

/* ---------- Selected publications (home) ---------- */
.pub-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.pub-card {
  display: flex; flex-direction: column; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  color: inherit; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.pub-card:hover { color: inherit; transform: translateY(-3px); box-shadow: var(--shadow); border-color: #cfe6e1; }
.pub-card-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pub-card .venue { font-size: 13px; font-weight: 700; color: var(--blue); letter-spacing: .02em; }
.pub-card h3 { font-size: 17px; margin: 0; line-height: 1.4; }
.pub-card:hover h3 { color: var(--blue-dark); }
.pub-card .authors { font-size: 14px; color: var(--muted); margin: 0; }
.pub-card .authors strong { color: var(--ink); }

/* ---------- News & awards ---------- */
.two-col { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: start; }
.news { list-style: none; border-left: 2px solid var(--line); }
.news li { position: relative; padding: 0 0 22px 26px; }
.news li::before {
  content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 3px solid var(--brand);
}
.news time { display: block; font-size: 13px; font-weight: 700; color: var(--brand-dark); letter-spacing: .04em; }
.news p { margin: 2px 0 0; font-size: 15.5px; }
.award-list { list-style: none; display: grid; gap: 14px; }
.award {
  display: flex; gap: 14px; padding: 18px; border-radius: var(--radius);
  background: linear-gradient(135deg, #fffaf1, #fff); border: 1px solid #f3e3c8;
}
.award .icon { width: 26px; height: 26px; color: var(--accent); margin-top: 2px; }
.award h3 { font-size: 16px; margin: 0 0 2px; }
.award p { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- Funders ---------- */
.funders { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 28px 56px; }
.funders img { height: 52px; width: auto; filter: grayscale(1); opacity: .7; transition: filter .2s, opacity .2s; }
.funders img:hover { filter: none; opacity: 1; }

/* ---------- CTA ---------- */
.cta {
  background: var(--gradient); color: #fff; border-radius: 22px;
  padding: 52px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow-lg);
}
.cta h2 { color: #fff; font-size: clamp(24px, 3vw, 32px); margin-bottom: 6px; }
.cta p { margin: 0; opacity: .9; font-size: 17px; }
.cta .btn { background: #fff; color: var(--blue-dark); }
.cta .btn:hover { color: var(--brand-dark); }

/* ---------- Page hero ---------- */
.page-hero { padding: 64px 0 52px; background: var(--gradient-soft); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(34px, 4.6vw, 50px); font-weight: 800; letter-spacing: -.02em; margin-bottom: 10px; }
.page-hero .lead { font-size: 18px; color: var(--muted); max-width: 720px; margin: 0; }

/* ---------- About ---------- */
.bio { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
.bio-photo img { border-radius: 20px; box-shadow: var(--shadow-lg); width: 100%; }
.bio-text p { font-size: 17px; }
.bio-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.timeline { list-style: none; position: relative; max-width: 820px; }
.timeline::before { content: ""; position: absolute; left: 150px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { display: grid; grid-template-columns: 150px 1fr; gap: 28px; padding-bottom: 26px; position: relative; }
.timeline li::after {
  content: ""; position: absolute; left: 144px; top: 6px; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 3px solid var(--blue);
}
.timeline li:first-child::after { border-color: var(--brand); background: var(--brand); }
.timeline .when { font-size: 14px; font-weight: 600; color: var(--muted); text-align: right; padding-right: 22px; }
.timeline h3 { font-size: 17px; margin: 0; padding-left: 8px; }
.timeline p { margin: 0; color: var(--muted); font-size: 15px; padding-left: 8px; }

.status { font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; display: inline-block; margin-bottom: 12px; }
.status-done { background: rgba(0, 178, 151, .12); color: var(--brand-dark); }
.status-progress { background: rgba(60, 111, 154, .1); color: var(--blue-dark); }
.meta { display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--muted); margin: 4px 0 0; }
.meta .icon { width: 16px; height: 16px; }

/* ---------- Research ---------- */
.project { display: flex; flex-direction: column; border-left: 4px solid var(--c, var(--brand)); }
.project .chip { align-self: flex-start; margin-bottom: 14px; background: color-mix(in srgb, var(--c) 10%, white); color: var(--c); border-color: transparent; }
.project.is-featured { background: linear-gradient(160deg, #f1fbf8, #fff 60%); }
.project-flags { display: flex; gap: 8px; flex-wrap: wrap; }
.flag { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--brand); color: #fff; }
.flag-recruit { background: var(--accent); }

.grant { display: flex; flex-direction: column; }
.grant-top { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.grant-role { font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 6px; background: var(--blue); color: #fff; }
.grant-agency { font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 6px; background: var(--bg-tint); color: var(--brand-dark); }
.grant h3 { font-size: 16.5px; line-height: 1.45; }
.grant-foot { margin-top: auto; padding-top: 16px; border-top: 1px dashed var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.grant-foot > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.grant-foot .icon { width: 15px; height: 15px; }
.grant-amount { font-weight: 800; color: var(--ink); font-size: 16px; }

/* ---------- Publications page ---------- */
.pub-toolbar {
  position: sticky; top: var(--header-h); z-index: 10; background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  padding: 16px 0; border-bottom: 1px solid var(--line); margin-bottom: 32px;
}
.toolbar-row { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; }
.filter-group { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-btn {
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  transition: background .15s, color .15s, border-color .15s;
}
.filter-btn:hover { border-color: var(--brand); color: var(--brand-dark); }
.filter-btn[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.filter-btn .count { opacity: .7; font-weight: 500; margin-left: 4px; }
.search { position: relative; flex: 1 1 240px; max-width: 320px; }
.search .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; height: 16px; }
.search input {
  width: 100%; font: inherit; font-size: 14.5px; padding: 9px 14px 9px 38px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink);
}
.search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0, 178, 151, .15); }
.pub-section { margin-bottom: 44px; }
.pub-section > h2 { font-size: 22px; display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 2px solid var(--line); }
.pub-section > h2 .n { font-size: 14px; color: var(--muted); font-weight: 600; }
.pub-list { list-style: none; }
.pub { display: grid; grid-template-columns: 110px 1fr; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.pub-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.pub-year { font-size: 20px; font-weight: 800; color: var(--ink); line-height: 1; }
.pub-title { font-size: 17px; margin: 0 0 6px; line-height: 1.45; }
.pub-title a { color: var(--ink); }
.pub-title a:hover { color: var(--blue); }
.pub-authors { margin: 0; font-size: 15px; color: var(--ink-2); }
.pub-authors strong { color: var(--brand-dark); }
.pub-venue { margin: 2px 0 0; font-size: 15px; color: var(--muted); }
.pub-extra { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 13.5px; }
.pub-doi { color: var(--muted); }
.pub-doi:hover { color: var(--blue); }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
[hidden] { display: none !important; }

/* ---------- Teaching ---------- */
.course { display: flex; flex-direction: column; }
.course-code { font-size: 13px; font-weight: 800; color: var(--brand-dark); letter-spacing: .06em; }
.course h3 { font-size: 18px; margin: 4px 0 12px; }
.course ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.talks { list-style: none; display: grid; gap: 14px; }
.talk {
  display: grid; grid-template-columns: 120px 1fr auto; gap: 20px; align-items: center;
  padding: 20px 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.talk time { font-weight: 700; color: var(--blue); font-size: 14.5px; }
.talk h3 { font-size: 16.5px; margin: 0 0 2px; }
.talk p { margin: 0; color: var(--muted); font-size: 14.5px; }
.talk .btn { padding: 9px 16px; font-size: 14px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 32px; align-items: stretch; }
.contact-list { list-style: none; display: grid; gap: 14px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.contact-item .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-tint); color: var(--brand-dark); flex: none; }
.contact-item .ic .icon { width: 20px; height: 20px; }
.contact-item h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 4px; }
.contact-item p { margin: 0; color: var(--ink); font-weight: 500; }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); min-height: 380px; box-shadow: var(--shadow-sm); }
.map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 48px 0 0; font-size: 14.5px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: flex-start; }
.footer-brand img { height: 40px; width: auto; margin-bottom: 14px; }
.footer-brand p { color: var(--muted); margin: 0; }
.footer-links { display: grid; gap: 10px; }
.footer-links a { display: inline-flex; align-items: center; gap: 9px; color: var(--ink-2); }
.footer-links a:hover { color: var(--brand-dark); }
.footer-bottom { margin-top: 36px; padding-top: 18px; padding-bottom: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; }
.footer-bottom p { margin: 0; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 120px 0; }
.notfound .code { font-size: 96px; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .omics, .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  :root { --header-h: 62px; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; background: #fff;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    padding: 12px 24px 20px; display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 2px; }
  .site-nav a { padding: 12px 14px; border-radius: 10px; font-size: 16px; }

  .hero { padding: 48px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-photo { width: min(300px, 80%); order: -1; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .feature { grid-template-columns: 1fr; }
  .feature-img { min-height: 220px; }
  .feature-body { padding: 28px; }
  .pub-cards, .grid-2 { grid-template-columns: 1fr; }
  .bio, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .bio-photo { max-width: 420px; }
  .section { padding: 64px 0; }
  .cta { padding: 36px 28px; }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .grid-3 { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
  .stat { padding: 20px 16px; }
  .stat-num { font-size: 28px; }
  .pub { grid-template-columns: 1fr; gap: 8px; }
  .pub-meta { flex-direction: row; align-items: center; }
  .pub-year { font-size: 16px; }
  .timeline::before { left: 6px; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; padding-left: 30px; }
  .timeline li::after { left: 0; }
  .timeline .when { text-align: left; padding: 0; }
  .timeline h3, .timeline p { padding-left: 0; }
  .talk { grid-template-columns: 1fr; gap: 8px; }
  .talk .btn { justify-self: start; }
  .search { max-width: none; }
  .card { padding: 22px; }
  .pub-toolbar { position: static; }
}
