/* =========================================================================
   about.pjlabs.net — Academic homepage
   Refined editorial design: warm paper, ASU maroon, gold whisper, serif.
   Restraint-first typography & whitespace (top-scholar / journal feel).
   Drop-in compatible with the existing markup + site.js (class names kept).
   ========================================================================= */

@font-face { font-family: "Fraunces"; src: url("/assets/fonts/fraunces.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/assets/fonts/newsreader.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/assets/fonts/newsreader-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("/assets/fonts/hanken-grotesk.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;

  /* Surfaces — warm paper */
  --paper: #faf8f3;
  --paper-2: #f4f0e8;
  --surface: #ffffff;
  --surface-2: #fcfaf6;
  --surface-3: #f7f3ec;

  /* Ink + warm neutrals */
  --ink: #1c1813;
  --ink-soft: #423d35;
  --muted: #6c655b;
  --faint: #9a9286;
  --line: #ece6da;
  --line-2: #e2dacc;
  --line-strong: #d6ccba;

  /* Accent — ASU maroon (dominant), gold (whisper) */
  --maroon: #8c1d40;
  --maroon-deep: #6c1431;
  --maroon-bright: #a82850;
  --maroon-tint: #f7edf0;
  --maroon-line: rgba(140, 29, 64, 0.22);
  --gold: #b8860b;
  --gold-soft: #f0e6cb;

  --success: #15663f;

  /* Soft, warm, layered shadows */
  --shadow-xs: 0 1px 2px rgba(40, 30, 20, 0.04);
  --shadow-sm: 0 1px 2px rgba(40, 30, 20, 0.04), 0 4px 10px -4px rgba(40, 30, 20, 0.08);
  --shadow: 0 2px 4px rgba(40, 30, 20, 0.04), 0 16px 36px -18px rgba(40, 30, 20, 0.20);
  --shadow-lg: 0 6px 16px -8px rgba(40, 30, 20, 0.14), 0 36px 70px -34px rgba(40, 30, 20, 0.34);

  --r-sm: 9px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 26px;
  --content: 1140px;
  --measure: 64ch;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font-display: "Fraunces", "Noto Serif SC", "Songti SC", Georgia, serif;
  --font-body: "Newsreader", "Noto Serif SC", "Songti SC", Georgia, serif;
  --font-ui: "Hanken Grotesk", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  font-family: var(--font-body);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--paper);
  background-image:
    radial-gradient(1100px 520px at 8% -8%, rgba(140, 29, 64, 0.035), transparent 60%),
    radial-gradient(1000px 600px at 100% 0%, rgba(184, 134, 11, 0.04), transparent 58%);
  background-attachment: fixed;
  color: var(--ink);
  font-size: 18.5px;
  line-height: 1.72;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "kern" 1, "liga" 1, "onum" 1;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 540;
  font-optical-sizing: auto;
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.018em;
  margin: 0 0 0.4em;
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--maroon); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--maroon-deep); }

img { max-width: 100%; display: block; }
::selection { background: var(--maroon); color: #fff; }

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

/* Eyebrow / kicker — small caps label */
.eyebrow {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--maroon);
  margin: 0 0 0.9em;
}

/* =========================================================================
   Header / navigation
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px max(24px, calc((100vw - var(--content)) / 2));
  background: rgba(250, 248, 243, 0.78);
  border-bottom: 1px solid transparent;
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header:hover { border-bottom-color: var(--line); }

.brand { display: inline-flex; align-items: center; gap: 13px; color: var(--ink); font-family: var(--font-display); font-weight: 560; font-size: 19px; letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }
.brand-mark {
  position: relative;
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border: 1px solid var(--maroon-line);
  border-radius: 50%;
  background: linear-gradient(160deg, #fff, var(--paper));
  color: var(--maroon-deep);
  font-family: var(--font-display);
  font-size: 13px; font-weight: 640; letter-spacing: 0.02em;
  box-shadow: var(--shadow-xs), inset 0 1px 0 #fff;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.brand-mark::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 11px; border-top: 1px solid rgba(184, 134, 11, 0.5); }
.brand:hover .brand-mark { transform: translateY(-1px); border-color: var(--maroon); }

.site-nav { display: flex; align-items: center; gap: 1px; font-family: var(--font-ui); font-size: 14.5px; font-weight: 560; }
.site-nav a {
  position: relative;
  display: inline-flex; align-items: center;
  min-height: 38px; padding: 0 14px;
  border-radius: 8px;
  color: var(--muted);
  transition: color 0.2s var(--ease);
}
.site-nav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 1.5px;
  background: var(--maroon); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; opacity: 0;
  transition: transform 0.26s var(--ease), opacity 0.26s var(--ease);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after { transform: scaleX(1); opacity: 0.5; }
.site-nav a.active { color: var(--maroon); }
.site-nav a.active::after { transform: scaleX(1); opacity: 1; }
.site-nav .lang-link {
  margin-left: 8px; padding: 0 12px; min-height: 32px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--ink-soft); font-weight: 700; letter-spacing: 0.02em;
}
.site-nav .lang-link::after { display: none; }
.site-nav .lang-link:hover { border-color: var(--maroon); color: var(--maroon); }

.nav-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--surface); color: var(--ink); font-size: 18px; cursor: pointer; }

/* =========================================================================
   Main layout
   ========================================================================= */
main { width: min(var(--content), calc(100vw - 48px)); margin: 0 auto; padding: 72px 0 104px; }

/* =========================================================================
   Hero — faculty layout
   ========================================================================= */
.faculty-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.92fr); gap: 64px; align-items: start; }

.faculty-main .eyebrow { font-size: 13px; letter-spacing: 0.2em; }
.faculty-main h1 {
  font-size: clamp(34px, 4.6vw, 58px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.022em;
  margin: 0 0 14px;
  max-width: 18ch;
  text-wrap: balance;
}
.faculty-main .hero-role {
  font-family: var(--font-ui);
  font-size: clamp(14px, 1.5vw, 16px);
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.01em;
  margin: 0 0 26px;
  padding-left: 17px;
  position: relative;
}
.faculty-main .hero-role::before {
  content: "";
  position: absolute;
  left: 0; top: 0.16em; bottom: 0.16em;
  width: 3px; border-radius: 3px;
  background: linear-gradient(var(--maroon), var(--gold));
}
.faculty-main .lead {
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.62;
  color: var(--ink-soft);
  max-width: 42ch;
  margin: 0 0 38px;
  font-weight: 400;
}

/* Stat strip — elegant number blocks */
.stat-strip { display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 40px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat-item { display: flex; flex-direction: column; gap: 3px; padding: 18px 30px 16px 0; margin-right: 30px; position: relative; }
.stat-item:not(:last-child)::after { content: ""; position: absolute; right: 0; top: 22px; bottom: 18px; width: 1px; background: var(--line); }
.stat-item strong { font-family: var(--font-display); font-size: 34px; font-weight: 500; line-height: 1; color: var(--maroon-deep); letter-spacing: -0.01em; }
.stat-item span { font-family: var(--font-ui); font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

/* Home brief panels */
.home-brief { display: grid; gap: 20px; }
.brief-panel {
  position: relative;
  padding: 26px 28px 26px 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.brief-panel:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.brief-panel::before { content: ""; position: absolute; left: 0; top: 26px; bottom: 26px; width: 3px; border-radius: 0 3px 3px 0; background: linear-gradient(var(--maroon), var(--gold)); }
.brief-panel > span { display: block; font-family: var(--font-ui); font-size: 11.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--maroon); margin-bottom: 11px; }
.brief-panel p { color: var(--ink-soft); font-size: 17px; line-height: 1.68; }
.theme-panel ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 9px; }
.theme-panel li { font-family: var(--font-ui); font-size: 13.5px; font-weight: 560; color: var(--ink-soft); padding: 8px 15px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface-2); transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease); }
.theme-panel li:hover { border-color: var(--maroon); color: var(--maroon); background: var(--maroon-tint); }

/* Faculty card — portrait + details */
.faculty-card {
  position: sticky; top: 96px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 14px 14px 26px;
  box-shadow: var(--shadow);
  text-align: center;
}
.faculty-photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-lg); background: var(--paper-2); }
.faculty-photo.research-image { aspect-ratio: 4 / 3.4; filter: saturate(0.94) contrast(1.02); }
.faculty-card h2 { font-size: 26px; font-weight: 540; margin: 22px 0 5px; letter-spacing: -0.015em; }
.faculty-title { font-family: var(--font-ui); font-size: 13.5px; font-weight: 560; color: var(--muted); line-height: 1.5; margin: 0 16px 18px; }
.faculty-details { margin: 0 16px 18px; padding: 16px 0 6px; border-top: 1px solid var(--line); text-align: left; }
.faculty-details > div { margin-bottom: 8px; }
.faculty-details dt { font-family: var(--font-ui); font-size: 10.5px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--faint); margin-bottom: 2px; }
.faculty-details dd { margin: 0; font-family: var(--font-ui); font-size: 14px; color: var(--ink-soft); word-break: break-word; }
.faculty-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 0 12px; }
.faculty-links a {
  font-family: var(--font-ui); font-size: 13px; font-weight: 600;
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--ink-soft);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.faculty-links a:first-child { background: var(--maroon); border-color: var(--maroon); color: #fff; box-shadow: 0 8px 18px -10px var(--maroon); }
.faculty-links a:first-child:hover { background: var(--maroon-deep); transform: translateY(-1px); }
.faculty-links a:hover { border-color: var(--maroon); color: var(--maroon); transform: translateY(-1px); }
.is-pending { display: none !important; }

/* =========================================================================
   Section pages
   ========================================================================= */
.section-page { max-width: 780px; }
.plain-section h2, .contact-heading h2 {
  font-size: clamp(32px, 4.3vw, 44px);
  font-weight: 500;
  letter-spacing: -0.025em;
  position: relative;
  padding-bottom: 18px;
  margin-bottom: 34px;
}
.plain-section h2::after, .contact-heading h2::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 56px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--maroon), var(--gold));
}
.section-copy, .profile-copy { font-size: 19px; line-height: 1.78; color: var(--ink-soft); max-width: var(--measure); }
.profile-copy a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: var(--maroon-line); }
.profile-copy a:hover { text-decoration-color: var(--maroon); }

.research-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 13px; }
.research-list li {
  position: relative; padding: 18px 22px 18px 50px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  font-size: 17px; color: var(--ink-soft); box-shadow: var(--shadow-xs);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.research-list li:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--line-strong); }
.research-list li::before { content: ""; position: absolute; left: 22px; top: 50%; transform: translateY(-50%); width: 9px; height: 9px; border-radius: 50%; background: var(--maroon); box-shadow: 0 0 0 4px var(--maroon-tint); }

/* =========================================================================
   Generic list — posts / news / projects / publications / education
   ========================================================================= */
.simple-list { display: grid; gap: 18px; }
.simple-list article {
  position: relative; padding: 28px 30px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s var(--ease);
}
.simple-list article:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.simple-list time { display: inline-block; font-family: var(--font-ui); font-size: 12px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--maroon); margin-bottom: 9px; }
.simple-list h3 { font-size: 23px; font-weight: 540; margin: 0 0 9px; letter-spacing: -0.012em; }
.simple-list h3 a { color: var(--ink); background-image: linear-gradient(var(--maroon), var(--maroon)); background-size: 0% 1.5px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size 0.3s var(--ease), color 0.2s var(--ease); }
.simple-list h3 a:hover { color: var(--maroon); background-size: 100% 1.5px; }
.simple-list p { color: var(--ink-soft); font-size: 17px; margin: 0 0 7px; }
.simple-list article > a:not(.text-link) { font-family: var(--font-ui); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.simple-list.compact article { padding: 24px 28px; }
.simple-list.compact h3 { font-size: 21px; margin-bottom: 5px; }

/* Publications */
.publication-item h3 { line-height: 1.25; }
.publication-item .authors { font-family: var(--font-ui); font-size: 15px; color: var(--ink-soft); margin-bottom: 5px; }
.publication-item .authors b { color: var(--ink); font-weight: 700; }
.publication-item p:nth-of-type(2) { font-style: italic; color: var(--muted); font-size: 16px; }
.publication-item p { font-size: 16.5px; }
.link-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.link-row a {
  font-family: var(--font-ui); font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em;
  padding: 8px 15px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--ink-soft);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}
.link-row a:hover { border-color: var(--maroon); color: var(--maroon); background: var(--maroon-tint); transform: translateY(-1px); }
.text-link { font-family: var(--font-ui); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Playground cards */
.project-demo-page { max-width: 920px; }
.empty-state {
  padding: 28px 30px;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 15px;
}
.project-demo-list { gap: 22px; }
.project-demo-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(230px, 32%) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}
.project-demo-body { min-width: 0; }
.project-demo-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.project-demo-meta time { margin-bottom: 0; }
.project-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: #6b4a05;
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.demo-note {
  margin-top: 14px !important;
  font-family: var(--font-ui);
  font-size: 14.5px !important;
  line-height: 1.55;
  color: var(--muted) !important;
}
.playground-thumb {
  position: relative;
  display: grid;
  align-content: end;
  min-height: 184px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.78), rgba(255,255,255,0.92)),
    linear-gradient(135deg, var(--maroon-tint), var(--gold-soft));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.82);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.playground-thumb:hover {
  transform: translateY(-2px);
  border-color: var(--maroon-line);
  box-shadow: var(--shadow-xs);
}
.thumb-scope {
  position: absolute;
  inset: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(rgba(140, 29, 64, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 29, 64, 0.05) 1px, transparent 1px),
    #fffdf9;
  background-size: 100% 28px, 42px 100%, auto;
}
.thumb-scope svg {
  position: absolute;
  inset: 8px 0 0;
  width: 100%;
  height: calc(100% - 8px);
}
.thumb-axis {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--line-strong);
}
.thumb-wave {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}
.thumb-wave.clean { stroke: var(--teal); }
.thumb-wave.noisy { stroke: var(--maroon); opacity: 0.82; stroke-width: 3; }
.thumb-wave.filtered { stroke: var(--blue); stroke-width: 4.5; }
.thumb-readout {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 9px;
  display: flex;
  gap: 7px;
}
.thumb-readout span {
  height: 6px;
  border-radius: 99px;
  background: var(--gold-soft);
}
.thumb-readout span:nth-child(1) { width: 28%; }
.thumb-readout span:nth-child(2) { width: 18%; background: var(--maroon-tint); }
.thumb-readout span:nth-child(3) { width: 24%; background: rgba(31, 122, 116, 0.15); }
.project-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 12px;
}
.project-actions .playground-launch {
  background: var(--maroon);
  border-color: var(--maroon);
  color: #fff;
}
.project-actions .playground-launch:hover {
  background: var(--maroon-deep);
  color: #fff;
}
.playground-inline-only {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 15px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 700;
}

/* =========================================================================
   Post detail — reading
   ========================================================================= */
.post-detail { max-width: 72ch; margin: 0 auto; }
.back-link { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-ui); font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 28px; transition: color 0.2s var(--ease), gap 0.2s var(--ease); }
.back-link::before { content: "\2190"; font-size: 16px; }
.back-link:hover { color: var(--maroon); gap: 10px; }
.post-detail h1 { font-size: clamp(36px, 5vw, 54px); font-weight: 500; letter-spacing: -0.025em; line-height: 1.04; margin: 8px 0 20px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.tag-row span { font-family: var(--font-ui); font-size: 12.5px; font-weight: 600; padding: 5px 13px; border-radius: 999px; background: var(--maroon-tint); color: var(--maroon); }
.post-body { font-size: 19.5px; line-height: 1.82; color: var(--ink-soft); }
.post-body a { text-decoration: underline; text-underline-offset: 3px; }

/* =========================================================================
   Contact
   ========================================================================= */
.contact-heading { margin-bottom: 34px; }
.contact-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; }
.contact-primary, .contact-card { padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-sm); transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s var(--ease); }
.contact-primary:hover, .contact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.contact-primary { background: radial-gradient(130% 130% at 0% 0%, var(--maroon-tint), transparent 58%), var(--surface); }
.contact-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--maroon); color: #fff; margin-bottom: 18px; box-shadow: 0 10px 22px -12px var(--maroon); }
.contact-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-primary p, .contact-card p { font-family: var(--font-ui); font-size: 11.5px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--faint); margin: 0 0 7px; }
.contact-primary h3 { font-size: 24px; font-weight: 540; margin: 0 0 20px; word-break: break-word; }
.contact-primary h3 a { color: var(--ink); }
.contact-primary h3 a:hover { color: var(--maroon); }
.contact-action { display: inline-flex; align-items: center; font-family: var(--font-ui); font-size: 14px; font-weight: 700; padding: 12px 22px; border-radius: 999px; background: var(--maroon); color: #fff; box-shadow: 0 10px 22px -12px var(--maroon); transition: background 0.2s var(--ease), transform 0.2s var(--ease); }
.contact-action:hover { background: var(--maroon-deep); color: #fff; transform: translateY(-1px); }
.profile-link-list { display: flex; flex-wrap: wrap; gap: 9px; }
.profile-link-list a { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-ui); font-size: 14px; font-weight: 600; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink-soft); transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease); }
.profile-link-list a:hover { border-color: var(--maroon); color: var(--maroon); background: var(--maroon-tint); transform: translateY(-1px); }
.profile-link-list svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; }

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer { width: min(var(--content), calc(100vw - 48px)); margin: 0 auto; padding: 32px 0 48px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; font-family: var(--font-ui); font-size: 13.5px; color: var(--muted); }
.site-footer a { color: var(--muted); font-weight: 600; }
.site-footer a:hover { color: var(--maroon); }

/* =========================================================================
   Reveal animation (used by site.js)
   ========================================================================= */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: var(--reveal-delay, 0ms); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } .reveal { opacity: 1; transform: none; } }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 940px) {
  .faculty-layout { grid-template-columns: 1fr; gap: 40px; }
  .faculty-card { position: static; max-width: 440px; margin: 0 auto; }
  .faculty-main .lead { max-width: none; }
  .contact-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 17.5px; }
  .nav-toggle { display: inline-grid; place-items: center; }
  .site-nav {
    position: absolute; top: calc(100% + 1px); right: 0; left: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 14px max(20px, calc((100vw - var(--content)) / 2));
    background: var(--paper); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { min-height: 46px; padding: 0 14px; }
  .site-nav a::after { display: none; }
  .site-nav .lang-link { margin-left: 0; align-self: flex-start; margin-top: 6px; }
  main { padding: 44px 0 64px; }
  .stat-item { padding: 16px 22px 14px 0; margin-right: 22px; }
  .stat-item strong { font-size: 29px; }
  .brief-panel { padding: 22px 22px 22px 26px; }
  .simple-list article { padding: 24px 22px; }
  .contact-primary, .contact-card { padding: 26px; }
  .post-body { font-size: 18.5px; }
}
@media (max-width: 540px) {
  main { width: min(var(--content), calc(100vw - 34px)); }
  .faculty-main h1 { font-size: clamp(38px, 12vw, 52px); }
  .faculty-card { max-width: none; }
  .site-footer { flex-direction: column; align-items: flex-start; gap: 10px; padding: 26px 0 40px; }
  .faculty-links, .profile-link-list { justify-content: flex-start; }
  .stat-strip { gap: 0; }
}
@media (max-width: 380px) {
  body { font-size: 16.5px; }
  .faculty-main h1 { font-size: clamp(34px, 13vw, 44px); }
}

/* Faculty card with a full personal poster as the portrait */
.faculty-card.has-poster { padding: 0; overflow: hidden; }
.faculty-card.has-poster .faculty-photo.poster { width: 100%; height: auto; aspect-ratio: auto; border-radius: 0; display: block; }
.poster-actions { padding: 16px 15px 8px; }
.poster-actions .faculty-links { justify-content: center; gap: 8px; }
@media (max-width: 940px) { .faculty-card.has-poster { max-width: 380px; } }

/* =========================================================================
   2026-06-10 — "Alive" layer: hero atmosphere, motion, timeline,
   numbered publications, deep footer, back-to-top.
   Additive: overrides selected rules above, all class names unchanged.
   ========================================================================= */

main { position: relative; }

/* ---- Hero atmosphere: soft glows + animated signal waves ---- */
.hero-atmosphere { position: absolute; inset: -72px 0 auto 0; height: 560px; pointer-events: none; overflow: hidden; z-index: -1; }
.hero-atmosphere .glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55; }
.hero-atmosphere .glow-a { width: 560px; height: 420px; left: -160px; top: -120px; background: radial-gradient(closest-side, rgba(140,29,64,0.13), transparent); animation: glow-drift 16s ease-in-out infinite alternate; }
.hero-atmosphere .glow-b { width: 620px; height: 460px; right: -180px; top: -60px; background: radial-gradient(closest-side, rgba(184,134,11,0.12), transparent); animation: glow-drift 19s ease-in-out infinite alternate-reverse; }
@keyframes glow-drift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(40px, 26px, 0) scale(1.08); } }

.hero-wave { position: absolute; left: 0; right: 0; top: 130px; width: 100%; height: 320px; opacity: 0.5; }
.hero-wave .wave { fill: none; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: wave-draw 2.6s var(--ease) 0.35s forwards; }
.hero-wave .wave-1 { stroke: rgba(140, 29, 64, 0.20); stroke-width: 1.6; }
.hero-wave .wave-2 { stroke: rgba(184, 134, 11, 0.22); stroke-width: 1.2; animation-delay: 0.7s; animation-duration: 3s; }
@keyframes wave-draw { to { stroke-dashoffset: 0; } }

/* ---- Hero entrance: staggered rise on load ---- */
@keyframes rise-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.section-home .faculty-main > * { opacity: 0; animation: rise-in 0.8s var(--ease) forwards; }
.section-home .faculty-main > .eyebrow { animation-delay: 0.05s; }
.section-home .faculty-main > h1 { animation-delay: 0.14s; }
.section-home .faculty-main > .hero-role { animation-delay: 0.26s; }
.section-home .faculty-main > .lead { animation-delay: 0.36s; }
.section-home .faculty-main > .stat-strip { animation-delay: 0.46s; }
.section-home .faculty-main > .home-brief { animation-delay: 0.56s; }
.section-home .faculty-card { opacity: 0; animation: rise-in 0.9s var(--ease) 0.3s forwards; }
/* the JS reveal observer must not re-hide hero elements */
.section-home .faculty-main.reveal, .section-home .faculty-card.reveal,
.section-home .stat-strip.reveal, .section-home .brief-panel.reveal { opacity: initial; transform: none; transition: none; }

/* ---- Poster card: gradient ring + hover lift + sheen ---- */
.faculty-card { transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.faculty-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.faculty-card.has-poster { position: sticky; border: none; background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(160deg, rgba(140,29,64,0.45), rgba(184,134,11,0.4) 55%, rgba(140,29,64,0.25)) border-box;
  border: 1.5px solid transparent; }
.faculty-card.has-poster::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,0.16) 50%, transparent 58%); background-size: 240% 100%; background-position: 110% 0; pointer-events: none; transition: background-position 0.9s var(--ease); }
.faculty-card.has-poster:hover::after { background-position: -60% 0; }

/* ---- Stat numbers: tabular + gold tick ---- */
.stat-item strong { font-variant-numeric: tabular-nums; position: relative; }
.stat-item span { position: relative; padding-left: 14px; }
.stat-item span::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 8px; height: 2px; background: var(--gold); border-radius: 2px; }

/* ---- Section pages: kicker rhythm + ghost flourish ---- */
.plain-section h2, .contact-heading h2 { overflow: visible; }
.section-page { position: relative; }
.section-page::before { content: ""; position: absolute; top: -34px; left: -8px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(closest-side, rgba(140,29,64,0.06), transparent); pointer-events: none; }

/* ---- Education timeline ---- */
.timeline { position: relative; padding-left: 34px; }
.timeline::before { content: ""; position: absolute; left: 10px; top: 14px; bottom: 14px; width: 2px; background: linear-gradient(var(--maroon-line), rgba(184,134,11,0.35)); border-radius: 2px; }
.timeline article { position: relative; }
.timeline article::before { content: ""; position: absolute; left: -31px; top: 32px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--maroon); box-shadow: 0 0 0 4px var(--maroon-tint); }
.timeline article:hover::before { background: var(--gold); border-color: var(--maroon-deep); }
.timeline .timeline-school { font-family: var(--font-ui); font-weight: 650; color: var(--ink-soft); font-size: 16px; margin-bottom: 6px; }

/* ---- Numbered publications ---- */
.simple-list { counter-reset: pub; }
.publication-item { counter-increment: pub; overflow: hidden; }
.publication-item::before { content: counter(pub, decimal-leading-zero); position: absolute; right: 18px; top: 6px; font-family: var(--font-display); font-size: 64px; font-weight: 600; line-height: 1; color: rgba(140, 29, 64, 0.07); pointer-events: none; transition: color 0.3s var(--ease), transform 0.3s var(--ease); }
.publication-item:hover::before { color: rgba(140, 29, 64, 0.13); transform: translateY(-2px); }
.publication-item { border-left: 3px solid transparent; }
.publication-item:hover { border-left-color: var(--maroon); }

/* ---- Card hover: gradient hairline reveal on top edge ---- */
.simple-list article::after, .brief-panel::after {
  content: ""; position: absolute; left: 18px; right: 18px; top: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--maroon), var(--gold)); opacity: 0; transform: scaleX(0.6);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.simple-list article:hover::after, .brief-panel:hover::after { opacity: 0.8; transform: scaleX(1); }
.brief-panel::after { left: 26px; right: 26px; }

/* ---- Deep maroon footer band ---- */
.site-footer { width: 100%; margin: 64px 0 0; padding: 0; border-top: none; display: block; background: linear-gradient(170deg, var(--maroon-deep), #4d0e23 70%); color: rgba(255, 246, 240, 0.82); position: relative; overflow: hidden; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--maroon-bright), var(--gold), var(--maroon-bright)); opacity: 0.85; }
.site-footer::after { content: ""; position: absolute; right: -120px; bottom: -180px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(closest-side, rgba(184,134,11,0.14), transparent); pointer-events: none; }
.footer-inner { width: min(var(--content), calc(100vw - 48px)); margin: 0 auto; padding: 44px 0 36px; display: grid; grid-template-columns: 1.3fr auto; gap: 18px 40px; align-items: center; }
.footer-id { display: flex; flex-direction: column; gap: 5px; }
.footer-name { font-family: var(--font-display); font-size: 24px; font-weight: 540; color: #fff; letter-spacing: -0.01em; }
.footer-tag { font-family: var(--font-ui); font-size: 13px; color: rgba(255, 246, 240, 0.62); letter-spacing: 0.02em; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-family: var(--font-ui); font-size: 14px; font-weight: 600; justify-self: end; }
.footer-nav a { color: rgba(255, 246, 240, 0.78); position: relative; }
.footer-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1.5px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform 0.25s var(--ease); }
.footer-nav a:hover { color: #fff; }
.footer-nav a:hover::after { transform: scaleX(1); }
.footer-meta { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding-top: 20px; border-top: 1px solid rgba(255, 246, 240, 0.14); font-family: var(--font-ui); font-size: 12.5px; color: rgba(255, 246, 240, 0.55); }
.footer-meta a { color: rgba(255, 246, 240, 0.55); font-weight: 600; }
.footer-meta a:hover { color: var(--gold); }

/* ---- Back to top ---- */
.back-to-top { position: fixed; right: 26px; bottom: 26px; z-index: 40; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--maroon-line); background: rgba(255, 255, 255, 0.92); color: var(--maroon); cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s; backdrop-filter: blur(6px); }
.back-to-top svg { width: 19px; height: 19px; }
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--maroon); color: #fff; border-color: var(--maroon); }

/* ---- Scrollbar (WebKit) ---- */
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--paper-2); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 6px; border: 2px solid var(--paper-2); }
::-webkit-scrollbar-thumb:hover { background: var(--maroon-line); }

/* ---- Responsive adjustments for the new layer ---- */
@media (max-width: 720px) {
  .hero-atmosphere { height: 420px; }
  .footer-inner { grid-template-columns: 1fr; padding: 36px 0 30px; }
  .footer-nav { justify-self: start; }
  .back-to-top { right: 18px; bottom: 18px; width: 42px; height: 42px; }
  .publication-item::before { font-size: 48px; }
  .project-demo-card { grid-template-columns: 1fr; }
  .playground-thumb { min-height: 170px; }
  .project-actions a { flex: 1 1 100%; }
  .timeline { padding-left: 28px; }
  .timeline article::before { left: -25px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-wave .wave { animation: none; stroke-dashoffset: 0; }
  .section-home .faculty-main > *, .section-home .faculty-card { opacity: 1; animation: none; }
  .hero-atmosphere .glow { animation: none; }
}

/* Limited rich-text styles from the admin Visual Editor. */
.rt-serif { font-family: Georgia, "Times New Roman", serif; }
.rt-sans { font-family: var(--font-ui); }
.rt-mono { font-family: "SFMono-Regular", Menlo, Consolas, monospace; }
.rt-small { font-size: 0.9em; }
.rt-large { font-size: 1.12em; }
.rt-accent { color: var(--maroon); font-weight: 700; }

/* fine-tuning after live review */
.publication-item h3 { padding-right: 72px; }
.footer-meta { padding-right: 70px; }
@media (max-width: 720px) { .publication-item h3 { padding-right: 52px; } }

/* ── Contact: four-channel brand tiles (2026-06-10) ─────────────────────── */
.contact-page { max-width: 920px; }
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.contact-tile {
  display: flex; align-items: center; gap: 18px;
  padding: 26px 26px; position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); color: var(--ink);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  --ct-brand: var(--maroon);
}
a.contact-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); color: var(--ink); }
@supports (border-color: color-mix(in srgb, red 50%, blue)) {
  a.contact-tile:hover { border-color: color-mix(in srgb, var(--ct-brand) 38%, var(--line)); }
}
.is-mail { --ct-brand: var(--maroon); }
.is-linkedin { --ct-brand: #0a66c2; }
.is-youtube { --ct-brand: #e62117; }
.is-bilibili { --ct-brand: #00a1d6; }
.ct-icon {
  width: 54px; height: 54px; border-radius: 16px; flex: none;
  display: grid; place-items: center;
  background: var(--ct-brand); color: #fff;
  box-shadow: 0 10px 22px -10px var(--ct-brand);
  transition: transform 0.3s var(--ease);
}
.ct-icon svg { width: 26px; height: 26px; fill: #fff; display: block; }
a.contact-tile:hover .ct-icon { transform: scale(1.07) rotate(-4deg); }
.ct-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ct-label { font-family: var(--font-ui); font-size: 11px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--faint); }
.ct-value { font-family: var(--font-ui); font-size: 16px; font-weight: 650; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-hint { color: var(--faint); font-weight: 500; font-size: 13px; }
.ct-arrow { margin-left: auto; color: var(--faint); flex: none; transition: transform 0.25s var(--ease), color 0.25s var(--ease); }
.ct-arrow svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: block; }
a.contact-tile:hover .ct-arrow { color: var(--ct-brand); transform: translate(2px, -2px); }
.contact-tile.is-empty { border-style: dashed; background: var(--surface-2); box-shadow: none; }
.contact-tile.is-empty .ct-icon { opacity: 0.38; box-shadow: none; filter: grayscale(0.25); }
@media (max-width: 720px) {
  .contact-grid { grid-template-columns: 1fr; gap: 13px; }
  .contact-tile { padding: 20px 20px; gap: 15px; }
  .ct-icon { width: 48px; height: 48px; border-radius: 14px; }
  .ct-icon svg { width: 23px; height: 23px; }
}
