/* ==========================================================================
   Yiyan Xu (许艺龑) — Academic Homepage
   Fresh Spring Garden Palette on Pure White:
   Misty Mint-Blue #B4CCD2 · Hydrangea Blue #79A3CE · Daisy Yellow #F0DC84 · Creamy Ivory #F7F7E0
   Light mode only
   ========================================================================== */

:root {
  --paper: #ffffff;
  --paper-2: #f7f7e0;
  --paper-mist: #f2f7f9;
  --paper-card: #ffffff;
  --ink: #1e2a38;
  --ink-2: #4b5d6e;
  --ink-3: #7f94a6;
  --rule: rgba(121, 163, 206, 0.22);
  --rule-strong: rgba(30, 42, 56, 0.65);
  --mist: #b4ccd2;
  --sky: #79a3ce;
  --daisy: #f0dc84;
  --accent: #4c7eb3;
  --accent-soft: #edf4fa;
  --accent-ink: #356394;
  --mark-warm: #f0dc84;
  --mark-oral: rgba(240, 220, 132, 0.24);
  --mark-oral-ink: #7d6420;
  --mark-award-bg: rgba(235, 146, 150, 0.14);
  --mark-award-border: rgba(224, 138, 142, 0.42);
  --mark-award-ink: #a8464c;
  --sketch-shadow: rgba(121, 163, 206, 0.16);

  --display: "Lora", "Noto Serif SC", Georgia, "Times New Roman", serif;
  --pub-display: "Source Serif 4", "Noto Serif SC", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  --cn: "Noto Serif SC", "Songti SC", "PingFang SC", serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1080px;
  --gutter: clamp(20px, 5vw, 52px);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);

  color-scheme: light;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  background: var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

ol,
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
p,
figure,
dl,
dd {
  margin: 0;
}

.wrap {
  width: min(var(--wrap), calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  border-radius: 6px;
  z-index: 200;
}

.skip-link:focus {
  left: 16px;
}

/* Inline Links & Subtle Editorial Highlights */
.inline-link {
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(121, 163, 206, 0.62);
  text-decoration-thickness: 1.3px;
  text-underline-offset: 3px;
  transition: color 0.18s var(--ease), text-decoration-color 0.18s var(--ease);
}

.inline-link:hover {
  color: var(--accent);
  text-decoration-color: var(--sky);
}

/* Hand-drawn highlighter marker — soft pale daisy yellow (#F0DC84) for Oral */
.notion-mark {
  background-color: transparent;
  background-image:
    linear-gradient(
      103deg,
      rgba(240, 220, 132, 0) 0,
      rgba(240, 220, 132, 0.62) 5px,
      rgba(240, 220, 132, 0.36) 24%,
      rgba(240, 220, 132, 0.44) 76%,
      rgba(240, 220, 132, 0.58) calc(100% - 5px),
      rgba(240, 220, 132, 0) 100%
    ),
    linear-gradient(
      178.4deg,
      rgba(240, 220, 132, 0) 0%,
      rgba(240, 220, 132, 0) 24%,
      rgba(240, 220, 132, 0.22) 50%,
      rgba(240, 220, 132, 0.34) 84%,
      rgba(240, 220, 132, 0) 100%
    );
  background-size: 100% 72%, 100% 100%;
  background-position: 0 88%, 0 0;
  background-repeat: no-repeat;
  color: var(--mark-oral-ink);
  padding: 0.03em 0.32em 0.07em;
  margin: 0 -0.18em;
  border-radius: 0.9em 0.34em 0.96em 0.38em / 0.38em 0.62em 0.34em 0.58em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  font-weight: 600;
}

/* Text-only blush-red emphasis for Awards (no background highlight) */
.notion-mark-award {
  background: transparent;
  background-image: none;
  padding: 0;
  margin: 0;
  border-radius: 0;
  color: var(--mark-award-ink);
  font-weight: 600;
}

.muted {
  color: var(--ink-3);
  font-weight: 400;
}

/* ==========================================================================
   Sticky Top Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.brand-avatar-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 18%;
  border: 1.4px solid rgba(15, 23, 42, 0.24);
  background: #ffffff;
  box-shadow: 1.5px 1.5px 0 var(--sketch-shadow);
  flex-shrink: 0;
  transition: transform 0.25s var(--ease), border-color 0.2s var(--ease);
}

.brand:hover .brand-avatar,
.brand-avatar-wrap.is-greeting .brand-avatar {
  transform: rotate(-6deg) scale(1.06);
  border-color: var(--ink);
}

.brand-greeting {
  position: absolute;
  top: calc(100% + 10px);
  left: -2px;
  z-index: 80;
  padding: 5px 11px;
  border-radius: 999px;
  background: #ffffff;
  border: 1.3px solid rgba(15, 23, 42, 0.24);
  box-shadow: 2px 2.5px 0 var(--sketch-shadow);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.005em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-5px) scale(0.94);
  transform-origin: 18px top;
  transition: opacity 0.2s var(--ease), transform 0.24s cubic-bezier(0.22, 1.28, 0.36, 1);
}

.brand-greeting::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 16px;
  width: 8px;
  height: 8px;
  background: #ffffff;
  border-top: 1.3px solid rgba(15, 23, 42, 0.24);
  border-left: 1.3px solid rgba(15, 23, 42, 0.24);
  transform: rotate(45deg);
}

.brand-avatar-wrap.is-greeting .brand-greeting {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.brand-name {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 28px);
  font-size: 14px;
  color: var(--ink-2);
}

.site-nav a {
  position: relative;
  padding: 4px 0;
  transition: color 0.18s var(--ease);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--sky);
  border-radius: 99px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s var(--ease);
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--ink);
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
  transform: scaleX(1);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  padding-top: clamp(44px, 6.5vw, 76px);
  padding-bottom: clamp(44px, 5vw, 68px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 236px;
  gap: clamp(32px, 5vw, 60px);
  align-items: stretch;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.kicker {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 16px;
}

.kicker-sep {
  opacity: 0.55;
}

.kicker-spark {
  color: var(--accent);
  margin-left: 2px;
}

.hero-title {
  font-family: var(--display);
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 22px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-cn {
  font-family: var(--cn);
  font-size: clamp(22px, 2.5vw, 29px);
  font-weight: 400;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}

.hero-lead,
.hero-bio {
  font-size: 15px;
  line-height: 1.74;
  color: var(--ink-2);
  margin-bottom: 0;
  max-width: 66ch;
}

.hero-bio {
  margin-top: 11px;
}

.hero-lead strong,
.hero-bio strong {
  color: var(--ink);
  font-weight: 600;
}

/* Clean Editorial Research Vision Callout */
.vision-callout {
  margin-top: 26px;
  padding: 15px 18px;
  background: var(--paper-card);
  border: 1px solid rgba(180, 204, 210, 0.72);
  border-left: 3px solid var(--sky);
  border-radius: 9px;
  box-shadow: 0 2px 10px rgba(121, 163, 206, 0.08);
  display: flex;
  align-items: flex-start;
  gap: 13px;
  max-width: 100%;
}

.vision-icon {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--ink);
}

.vision-callout p {
  font-size: 14.3px;
  line-height: 1.65;
  color: var(--ink-2);
}

.vision-callout strong {
  color: var(--ink);
  font-weight: 600;
}

/* Portrait & Contact Column */
.hero-aside {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-top: 6px;
  padding-bottom: 2px;
}

.portrait-wrap {
  position: relative;
  width: 192px;
  margin-inline: auto;
}

.portrait-frame {
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid rgba(180, 204, 210, 0.72);
  background: var(--paper-mist);
  box-shadow: 0 8px 24px rgba(121, 163, 206, 0.14);
  aspect-ratio: 1 / 1;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.profile-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.email-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  background: var(--paper-card);
  border: 1px solid rgba(180, 204, 210, 0.75);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  box-shadow: 0 2px 6px rgba(121, 163, 206, 0.09);
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease), background 0.18s var(--ease), transform 0.18s var(--ease);
}

.email-copy-btn:hover {
  border-color: var(--sky);
  background: var(--paper-mist);
  color: var(--ink);
  transform: translateY(-1px);
}

.email-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-icon {
  flex-shrink: 0;
  color: var(--ink-3);
}

.email-copy-btn:hover .copy-icon {
  color: var(--accent);
}

.social-row {
  display: grid;
  grid-template-columns: 1.38fr 1fr;
  gap: 8px;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 8px;
  background: var(--paper-card);
  border: 1px solid rgba(180, 204, 210, 0.75);
  border-radius: 8px;
  font-size: 12.4px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--ink-2);
  box-shadow: 0 2px 6px rgba(121, 163, 206, 0.09);
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease), background 0.18s var(--ease), transform 0.18s var(--ease);
}

.social-pill:hover {
  border-color: var(--sky);
  background: var(--paper-mist);
  color: var(--accent-ink);
  transform: translateY(-1px);
}

/* ==========================================================================
   Editorial Sections (01 – 05)
   ========================================================================== */

.section {
  padding-top: clamp(40px, 5vw, 62px);
  padding-bottom: clamp(18px, 3vw, 32px);
  border-top: 1px solid var(--rule-strong);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-bottom: clamp(24px, 3.2vw, 36px);
}

.section-title-group {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
}

.section-num {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.section h2 {
  font-family: var(--display);
  font-size: clamp(28px, 3.2vw, 36px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}

.section-squiggle {
  color: var(--accent);
  opacity: 0.52;
  align-self: center;
  transform: translateY(2px);
}

.section-note {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
}

/* ==========================================================================
   01 Research — 3-Column Editorial Pillars with Hand-Drawn Mini Sketches
   ========================================================================== */

.research-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--rule);
  padding-bottom: 28px;
}

.research-col {
  padding: 4px 28px 6px;
  border-left: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
}

.research-col:first-child {
  padding-left: 0;
  border-left: 0;
}

.research-col:last-child {
  padding-right: 0;
}

.research-col-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.roman-num {
  font-family: var(--display);
  font-style: italic;
  font-size: 20px;
  color: var(--accent);
  line-height: 1;
}

.pillar-sketch {
  color: var(--ink);
  opacity: 0.85;
  transition: transform 0.25s var(--ease);
}

.research-col:hover .pillar-sketch {
  transform: translateY(-2px) rotate(-2deg);
}

.research-col h3 {
  font-family: var(--display);
  font-size: 18.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 10px;
}

.research-col p {
  font-size: 14.3px;
  line-height: 1.65;
  color: var(--ink-2);
  margin-bottom: 16px;
  flex: 1;
}

.pillar-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 7px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-3);
}

.pillar-tags a {
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: rgba(15, 23, 42, 0.25);
  text-underline-offset: 3px;
  transition: color 0.16s var(--ease), text-decoration-color 0.16s var(--ease);
}

.pillar-tags a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* ==========================================================================
   02 News
   ========================================================================== */

.news-list {
  border-top: 1px solid var(--rule);
}

.news-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 8px 24px;
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}

.news-item[hidden] {
  display: none;
}

.news-date {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.news-text {
  font-size: 14.8px;
  line-height: 1.6;
  color: var(--ink-2);
}

.news-text strong {
  color: var(--ink);
  font-weight: 600;
}

.news-footer {
  margin-top: 14px;
}

.text-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px dashed rgba(15, 23, 42, 0.22);
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease);
}

.text-toggle-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.text-toggle-btn svg {
  transition: transform 0.2s var(--ease);
}

.text-toggle-btn[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* ==========================================================================
   03 Publications (Thumbnail + Venue/Title/Author List/Actions)
   ========================================================================== */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 24px;
}

.filter-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 99px;
  border: 1px solid rgba(180, 204, 210, 0.72);
  background: transparent;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
  transition: all 0.18s var(--ease);
}

.filter-tab:hover {
  border-color: var(--sky);
  color: var(--ink);
  background: var(--paper-mist);
}

.filter-tab.is-active {
  background: var(--accent-soft);
  border-color: var(--sky);
  color: var(--accent-ink);
  box-shadow: 0 2px 6px rgba(121, 163, 206, 0.16);
}

.tab-count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
}

.filter-tab.is-active .tab-count {
  color: var(--accent);
}

.pub-list {
  border-top: 1px solid var(--rule);
}

.pub-item {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 24px 30px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
  align-items: center;
}

.pub-item.is-hidden {
  display: none;
}

/* White museum-matted framework thumbnail button */
.pub-thumb-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 154px;
  padding: 10px;
  background: var(--paper-card);
  border: 1px solid rgba(180, 204, 210, 0.65);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(121, 163, 206, 0.08);
  overflow: hidden;
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.pub-thumb-btn:hover {
  transform: translateY(-2px);
  border-color: var(--sky);
  box-shadow: 0 6px 18px rgba(121, 163, 206, 0.18);
}

.pub-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.28s var(--ease);
}

.pub-thumb-btn:hover img {
  transform: scale(1.025);
}

.thumb-zoom-hint {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(15, 23, 42, 0.14);
  color: var(--ink-2);
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
}

.pub-thumb-btn:hover .thumb-zoom-hint,
.pub-thumb-btn:focus-visible .thumb-zoom-hint {
  opacity: 1;
  transform: translateY(0);
}

.pub-body {
  min-width: 0;
}

.pub-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.venue-tag {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.venue-highlight {
  color: var(--accent-ink);
}

.oral-badge {
  position: relative;
  z-index: 0;
  display: inline-block;
  font-family: var(--mono);
  font-size: 11.2px;
  font-weight: 600;
  padding: 1px 8px 2px;
  color: var(--mark-oral-ink);
  background: transparent;
}

.oral-badge::before {
  content: "";
  position: absolute;
  inset: 22% -1px 4% -1px;
  z-index: -1;
  background: linear-gradient(
    102deg,
    rgba(240, 220, 132, 0.68) 0%,
    rgba(240, 220, 132, 0.44) 32%,
    rgba(240, 220, 132, 0.5) 74%,
    rgba(240, 220, 132, 0.66) 100%
  );
  border-radius: 9px 4px 10px 4px / 5px 7px 4px 6px;
  transform: rotate(-1.2deg) skewX(-9deg);
}

.status-tag {
  font-family: var(--mono);
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 4px;
  background: var(--paper-mist);
  color: var(--accent-ink);
  border: 1px dashed var(--mist);
}

.cat-tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  margin-left: auto;
}

.pub-title {
  font-family: var(--pub-display);
  font-size: 19.5px;
  font-weight: 600;
  line-height: 1.34;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 8px;
}

.pub-title a {
  transition: color 0.16s var(--ease);
}

.pub-title a:hover {
  color: var(--accent);
}

.pub-authors {
  font-size: 14.2px;
  line-height: 1.62;
  color: var(--ink-2);
  margin-bottom: 12px;
}

.pub-authors .me {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(30, 90, 168, 0.45);
  text-decoration-thickness: 1.4px;
  text-underline-offset: 2.5px;
}

.pub-award {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--mark-award-ink);
  line-height: 1.55;
  margin-top: -4px;
  margin-bottom: 12px;
}

.pub-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pub-link {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 5px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: var(--paper-card);
  font-family: var(--mono);
  font-size: 11.8px;
  color: var(--ink-2);
  transition: border-color 0.16s var(--ease), color 0.16s var(--ease), background 0.16s var(--ease);
}

.pub-link:hover,
.pub-link[aria-expanded="true"] {
  border-color: var(--accent);
  color: var(--accent-ink);
  background: var(--accent-soft);
}

/* Collapsible BibTeX Drawer */
.bibtex-box {
  margin-top: 12px;
  background: var(--paper-mist);
  border: 1px solid rgba(180, 204, 210, 0.7);
  border-radius: 8px;
  overflow: hidden;
}

.bibtex-box[hidden] {
  display: none;
}

.bibtex-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.bibtex-copy-btn {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent-ink);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(30, 90, 168, 0.25);
  background: var(--paper-card);
  transition: background 0.16s var(--ease);
}

.bibtex-copy-btn:hover {
  background: var(--accent-soft);
}

.bibtex-box pre {
  margin: 0;
  padding: 12px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 11.8px;
  line-height: 1.55;
  color: var(--ink);
}

/* ==========================================================================
   04 Experience & Education
   ========================================================================== */

.exp-group + .exp-group {
  margin-top: 34px;
}

.exp-subhead {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
}

.exp-list {
  border-top: 1px solid var(--rule);
}

.exp-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}

.exp-icon {
  width: 44px;
  height: 44px;
  padding: 5px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.11);
  background: #ffffff;
  display: grid;
  place-items: center;
  color: var(--ink);
  margin-top: 2px;
  box-shadow: 1.5px 1.5px 0 var(--sketch-shadow);
}

.exp-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.exp-org {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 3px;
}

.exp-role {
  font-size: 14.3px;
  color: var(--ink-2);
  margin-bottom: 4px;
}

.exp-desc {
  font-size: 14px;
  color: var(--ink-3);
}

.exp-date {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
  padding-top: 4px;
}

/* ==========================================================================
   05 Honors & Services
   ========================================================================== */

.two-col-editorial {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(28px, 4.5vw, 60px);
  padding-bottom: 24px;
}

.honors-list {
  border-top: 1px solid var(--rule);
}

.honors-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}

.honor-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.8px;
  font-weight: 500;
  color: var(--ink);
}

.mini-star {
  color: var(--accent);
  flex-shrink: 0;
}

.honor-meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
}

.services-list {
  border-top: 1px solid var(--rule);
}

.service-row {
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
}

.service-row dt {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.service-row dd {
  font-family: var(--mono);
  font-size: 12.6px;
  line-height: 1.65;
  color: var(--ink-2);
}

/* ==========================================================================
   Footer — Dynamic Ocean Tide & Seafoam
   ========================================================================== */

.site-footer {
  position: relative;
  margin-top: 32px;
  background: #ffffff;
  padding: clamp(98px, 11.5vw, 134px) 0 40px;
  overflow: hidden;
}

.footer-tide-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 0;
}

.click-splash-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 950;
}

.footer-inner {
  position: relative;
  z-index: 1;
}

.footer-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(121, 163, 206, 0.28);
}

.footer-kicker {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #607990;
  margin-bottom: 10px;
}

.footer-email {
  font-family: var(--display);
  font-size: clamp(26px, 3.6vw, 38px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgba(30, 42, 56, 0.22);
  text-underline-offset: 6px;
  transition: color 0.18s var(--ease), text-decoration-color 0.18s var(--ease);
}

.footer-email:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.footer-sub {
  margin-top: 10px;
  font-size: 14.2px;
  color: var(--ink-2);
  max-width: 54ch;
}

.footer-doodle {
  color: var(--ink-3);
  flex-shrink: 0;
}

.footer-bottom {
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  font-size: 13.5px;
  color: var(--ink-2);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-links a:hover,
.back-top:hover {
  color: var(--accent);
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: var(--mono);
  font-size: 12px;
  color: #607990;
}

.back-top {
  color: var(--ink-2);
}

/* ==========================================================================
   Lightbox Modal
   ========================================================================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 40px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(1040px, 100%);
  max-height: 90vh;
  background: var(--paper);
  border: 1px solid rgba(15, 23, 42, 0.2);
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.24);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: lightboxIn 0.2s var(--ease);
}

@keyframes lightboxIn {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule);
}

.lightbox-title {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.lightbox-close {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--ink-2);
  flex-shrink: 0;
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}

.lightbox-close:hover {
  background: var(--paper-2);
  color: var(--ink);
}

.lightbox-stage {
  padding: clamp(14px, 2.5vw, 26px);
  background: var(--paper-card);
  overflow: auto;
  display: grid;
  place-items: center;
}

.lightbox-stage img {
  max-width: 100%;
  max-height: 74vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Copy Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 14px);
  padding: 9px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 12.5px;
  opacity: 0;
  pointer-events: none;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Subtle entrance polish — always visible so anchor jumps never flash blank */
.reveal {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-aside {
    order: -1;
    flex-direction: row;
    align-items: center;
    gap: 20px;
  }

  .portrait-wrap {
    width: 140px;
    margin-inline: 0;
    flex-shrink: 0;
  }

  .profile-links {
    flex: 1;
    max-width: 300px;
    padding-inline: 0;
  }

  .research-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .research-col {
    padding: 0 0 20px;
    border-left: 0;
    border-bottom: 1px solid var(--rule);
  }

  .research-col:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .pub-item {
    grid-template-columns: 204px minmax(0, 1fr);
    gap: 20px;
  }

  .pub-thumb-btn {
    height: 132px;
  }

  .two-col-editorial {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 640px) {
  .header-inner {
    height: auto;
    padding: 12px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    gap: 16px;
    white-space: nowrap;
  }

  .hero-aside {
    flex-direction: column;
    align-items: flex-start;
  }

  .portrait-wrap {
    width: 148px;
    margin-inline: 0;
  }

  .profile-links {
    width: 100%;
    max-width: none;
  }

  .news-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .pub-item {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .pub-thumb-btn {
    height: 176px;
  }

  .cat-tag {
    margin-left: 0;
  }

  .exp-item {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .exp-icon {
    width: 40px;
    height: 40px;
  }

  .exp-date {
    grid-column: 2;
    padding-top: 2px;
  }

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js-ready .reveal {
    opacity: 1;
    transform: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
