/* =========================
   Theme Tokens
   Shared design variables used by all pages.
   ========================= */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #eef3ff;
  --text: #152238;
  --muted: #5f6b80;
  --primary: #0f4c81;
  --primary-strong: #0a3560;
  --accent: #129490;
  --border: #d9e1ee;
  --shadow: 0 12px 30px rgba(10, 32, 64, 0.08);
}

/* Dark mode overrides. */
[data-theme="dark"] {
  --bg: #0a1220;
  --surface: #111b2c;
  --surface-soft: #18253a;
  --text: #eaf0fb;
  --muted: #9fb0ca;
  --primary: #69a6e3;
  --primary-strong: #90c1f2;
  --accent: #3ad0b6;
  --border: #2a3b58;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

/* =========================
   Global Base
   ========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Sora", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  transition:
    background-color 0.35s ease,
    color 0.35s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

.container {
  width: min(1240px, 94%);
  margin-inline: auto;
}

main {
  flex: 1;
}

/* =========================
   Header / Navbar
   ========================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: #082a4d;
  border-bottom: 1px solid #0f3b67;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.site-header .brand,
.site-header .brand small {
  color: #e7f0ff;
}

.site-header .nav-link {
  color: #c7dbff;
}

.site-header .nav-link:hover,
.site-header .nav-link:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.site-header .menu-toggle,
.site-header .theme-btn {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.site-header .nav-links {
  background: #082a4d;
  border-color: #1b4e82;
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 1rem;
}

.brand {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand small {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
  margin-top: 2px;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  padding: 0.42rem 0.62rem;
  cursor: pointer;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  padding: 0.58rem 0.84rem;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.93rem;
  transition:
    background-color 0.25s ease,
    color 0.25s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--text);
  background: var(--surface-soft);
}

.nav-link.active {
  color: #ffffff;
  background: linear-gradient(130deg, var(--primary), var(--accent));
}

.theme-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  padding: 0.52rem 0.75rem;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  cursor: pointer;
}

/* =========================
   Hero / About
   ========================= */
.section {
  padding: 3.6rem 0;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(300px, 420px) 1fr;
  gap: clamp(1.4rem, 3vw, 2.6rem);
  align-items: start;
}

.intro-grid > .portrait-card {
  grid-column: 1;
  grid-row: 1;
}

.intro-grid > article:not(.portrait-card) {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.portrait-card {
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--surface) 84%, #ffffff),
    var(--surface-soft)
  );
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 0.7rem 0.7rem 0;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.portrait-card img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
}

.eyebrow {
  color: var(--primary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.headline {
  margin: 0;
  font-size: clamp(1.7rem, 3.3vw, 2.75rem);
  line-height: 1.23;
}

.summary {
  color: var(--muted);
  font-size: 1rem;
  margin: 1rem 0 1.2rem;
  text-align: justify;
  text-justify: inter-word;
}

.summary-block .summary {
  margin: 0;
}

.summary-block .summary + .summary {
  margin-top: 0.9rem;
}

.summary-block {
  margin-top: 0.75rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.64rem;
  margin-top: 1rem;
}

.social-link {
  border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--border));
  border-radius: 999px;
  padding: 0.56rem 0.82rem;
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--surface-soft) 86%, var(--surface)),
    var(--surface)
  );
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: color-mix(in srgb, var(--primary-strong) 88%, var(--text));
  box-shadow: 0 4px 12px rgba(10, 40, 80, 0.08);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.social-link:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 65%, var(--primary));
  box-shadow: 0 10px 18px rgba(15, 55, 110, 0.2);
  background: color-mix(in srgb, var(--surface-soft) 92%, #ffffff);
}

.social-link:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 70%, var(--primary));
  outline-offset: 2px;
}

.about-insights {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  margin-top: 0.1rem;
}

.positions-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1rem 0.95rem;
}

.positions-panel h3,
.interests-panel h3 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
}

.positions-timeline {
  list-style: none;
  margin: 0.2rem 0 0;
  padding: 0;
}

.position-item {
  position: relative;
  margin-left: 0.35rem;
  padding: 0 0 0.95rem 1rem;
  border-left: 2px solid color-mix(in srgb, var(--primary) 28%, var(--border));
}

.position-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 0.22rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.position-item:last-child {
  padding-bottom: 0.2rem;
}

.position-role {
  font-size: 0.94rem;
  font-weight: 700;
  margin: 0;
}

.position-org {
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-size: 0.87rem;
}

.position-time {
  display: inline-block;
  margin-top: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.16rem 0.5rem;
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--primary);
  background: color-mix(in srgb, var(--surface-soft) 72%, var(--surface));
}

.interests-panel {
  background: linear-gradient(
    165deg,
    color-mix(in srgb, var(--surface-soft) 72%, var(--surface)),
    color-mix(in srgb, var(--surface) 86%, #ffffff)
  );
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
}

.interest-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.2rem;
}

.interest-pill {
  border-radius: 999px;
  padding: 0.36rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border));
  color: var(--primary-strong);
  background: color-mix(in srgb, var(--surface) 70%, var(--surface-soft));
}

.interest-pill:nth-child(2n) {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  color: color-mix(in srgb, var(--accent) 72%, var(--text));
}

.interest-pill:nth-child(3n) {
  border-color: color-mix(in srgb, var(--primary-strong) 38%, var(--border));
  color: var(--text);
}

.interest-note {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.interests-inline {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border-left: 4px solid color-mix(in srgb, var(--accent) 72%, var(--primary));
}

.interests-inline .interest-cloud {
  margin-top: 0.3rem;
}

/* =========================
   News Highlights
   ========================= */
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.section-title {
  margin: 0;
  font-size: clamp(1.26rem, 2.2vw, 1.6rem);
}

.cta-link {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.92rem;
}

.news-stack {
  display: flex;
  flex-direction: column;
  gap: 0.78rem;
}

.news-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.92rem 1rem 0.9rem;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 12px 80px minmax(0, 1fr) auto;
  gap: 0.2rem 0.78rem;
  align-items: start;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.news-item:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 65%, var(--border));
  box-shadow: 0 16px 34px rgba(10, 32, 64, 0.13);
}

.news-main {
  min-width: 0;
}

.news-bullet {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #3a7afe;
  margin-top: 0.42rem;
}

.news-entry {
  margin: 0;
  font-size: 0.99rem;
  line-height: 1.55;
  color: var(--muted);
  text-align: justify;
  text-justify: inter-word;
}

.news-meta {
  justify-self: end;
}

.news-tag {
  border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border));
  color: var(--primary);
  background: color-mix(in srgb, var(--surface-soft) 70%, var(--surface));
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
}

.news-date-inline {
  display: inline-block;
  color: #0f4ed1;
  font-weight: 700;
  white-space: nowrap;
  margin-top: 0.05rem;
}

.news-entry strong {
  color: var(--text);
}

/* =========================
   Generic Page Body
   ========================= */
.page-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: clamp(1.1rem, 2.8vw, 2rem);
  box-shadow: var(--shadow);
}

.placeholder-text {
  color: var(--muted);
  max-width: 72ch;
}

/* =========================
   CV Page
   ========================= */
.cv-shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.cv-head h1 {
  margin: 0;
}

.cv-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  padding: 0.62rem 1rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.cv-download-btn:hover,
.cv-download-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(10, 32, 64, 0.2);
}

.cv-preview-wrap {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-soft) 55%, var(--surface));
  padding: 0.4rem;
  min-height: 68vh;
}

.cv-preview {
  width: 100%;
  height: 68vh;
  border: 0;
  border-radius: 10px;
  background: #ffffff;
}

.cv-preview-status {
  margin: 0;
  padding: 0.45rem 0.4rem 0.65rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.cv-last-updated {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

/* =========================
   Roles Page
   ========================= */
.roles-shell {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.roles-heading {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.roles-intro {
  margin: 0.35rem 0 1.35rem;
  color: var(--muted);
  font-size: 1rem;
}

.roles-timeline {
  display: grid;
  gap: 0.9rem;
}

.role-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 5px solid color-mix(in srgb, var(--primary) 72%, var(--accent));
  border-radius: 14px;
  padding: 1rem 1rem 0.95rem;
  box-shadow: var(--shadow);
  transition:
    transform 0.22s ease,
    background-color 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.role-card:hover {
  transform: scale(1.015);
  background: color-mix(in srgb, var(--surface-soft) 40%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 34%, var(--border));
  box-shadow: 0 16px 34px rgba(10, 32, 64, 0.16);
}

.role-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.role-title {
  margin: 0;
  font-size: 1.16rem;
}

.role-period {
  border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--border));
  border-radius: 999px;
  padding: 0.15rem 0.58rem;
  background: color-mix(in srgb, var(--surface-soft) 65%, var(--surface));
  color: var(--primary-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.role-org {
  margin: 0.28rem 0 0;
  font-weight: 600;
  color: var(--text);
}

.role-note {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.role-points {
  margin: 0.52rem 0 0;
  padding-left: 1.2rem;
}

.role-points li {
  margin: 0.24rem 0;
}

/* =========================
   Teaching Page
   ========================= */
.teaching-shell {
  padding: clamp(1rem, 2vw, 1.45rem);
}

.teaching-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.teaching-heading {
  margin: 0;
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
}

.teaching-intro {
  margin: 0.38rem 0 1rem;
  color: var(--muted);
  font-size: 0.96rem;
  max-width: 75ch;
}

.teaching-catalog {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
}

.course-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  padding: 0.9rem 1rem;
  align-items: center;
  transition: background-color 0.2s ease;
}

.course-row + .course-row {
  border-top: 1px solid var(--border);
}

.course-row:hover {
  background: color-mix(in srgb, var(--surface-soft) 55%, var(--surface));
}

.course-main {
  display: flex;
  flex-direction: column;
  gap: 0.24rem;
}

.course-title {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.35;
}

.course-meta {
  margin: 0;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.course-level {
  margin: 0;
  color: color-mix(in srgb, var(--accent) 70%, var(--text));
  font-size: 0.8rem;
  font-weight: 600;
}

.course-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: justify;
  text-justify: inter-word;
}

.course-outline-link {
  border-radius: 8px;
  padding: 0.38rem 0.7rem;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--border));
  background: color-mix(in srgb, var(--surface-soft) 78%, var(--surface));
  color: color-mix(in srgb, var(--primary-strong) 80%, var(--text));
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition:
    transform 0.18s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.course-outline-link:hover,
.course-outline-link:focus-visible {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--primary) 50%, var(--border));
  background: color-mix(in srgb, var(--surface-soft) 90%, var(--surface));
}

/* =========================
   Contact Page
   ========================= */
.contact-shell {
  padding: clamp(1rem, 2vw, 1.45rem);
}

.contact-header {
  margin-bottom: 1rem;
}

.contact-heading {
  margin: 0;
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
}

.contact-intro {
  margin: 0.38rem 0 0;
  color: var(--muted);
  font-size: 0.96rem;
  max-width: 72ch;
}

.contact-availability {
  margin: 0.95rem 0 1rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--border));
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--surface-soft) 85%, var(--surface)),
    color-mix(in srgb, var(--surface) 88%, #ffffff)
  );
}

.availability-label {
  margin: 0 0 0.45rem;
  color: var(--primary-strong);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.availability-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.48rem;
}

.availability-tag {
  border-radius: 999px;
  padding: 0.3rem 0.62rem;
  border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--border));
  background: color-mix(in srgb, var(--surface) 80%, var(--surface-soft));
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 0.9rem;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.contact-card-title {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
}

.contact-address {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.contact-item {
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px dashed
    color-mix(in srgb, var(--border) 70%, var(--surface-soft));
}

.contact-label {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.contact-links a {
  color: var(--text);
  font-weight: 600;
  width: fit-content;
}

.contact-links a:hover,
.contact-links a:focus-visible {
  color: var(--primary);
  text-decoration: underline;
}

.contact-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.contact-socials {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.52rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
  font-weight: 600;
  width: fit-content;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease;
}

.contact-social-link:hover,
.contact-social-link:focus-visible {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 44%, var(--border));
}

.contact-qr-wrap {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px dashed
    color-mix(in srgb, var(--border) 70%, var(--surface-soft));
}

.contact-qr-title {
  margin: 0 0 0.55rem;
  font-size: 0.96rem;
}

.contact-qr {
  width: min(100%, 250px);
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #ffffff;
}

/* =========================
   Awards Page
   ========================= */
.awards-shell {
  padding: clamp(0.9rem, 1.8vw, 1.2rem);
}

.awards-hero {
  position: relative;
  margin: 0 0 1.05rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #1f2f5e;
}

.awards-hero-pagewide {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  border-left: 0;
  border-right: 0;
  border-radius: 0;
}

.awards-hero-image {
  width: 100%;
  height: 490px;
  object-fit: cover;
}

.awards-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(8, 23, 48, 0.56) 0%,
    rgba(8, 23, 48, 0.72) 100%
  );
}

.awards-hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #f4f8ff;
  padding: 1rem;
}

.awards-hero-kicker {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.9;
}

.awards-hero-content h1 {
  margin: 0.2rem 0 0.5rem;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.1;
}

.awards-hero-content p {
  margin: 0;
  font-size: clamp(1rem, 1.8vw, 1.24rem);
  max-width: 58ch;
}

.awards-list {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.75rem;
}

.award-item {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.award-item:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 38%, var(--border));
  box-shadow: 0 16px 34px rgba(10, 32, 64, 0.13);
}

.award-thumb-wrap {
  width: 290px;
  height: 190px;
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--surface-soft) 75%, var(--surface)),
    #d9e4f6
  );
}

.award-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.award-body {
  padding: 1rem 1.06rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.award-title {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.35;
}

.award-status {
  color: var(--primary);
  font-size: 0.88em;
  font-weight: 700;
}

.award-desc {
  margin: 0.42rem 0 0;
  color: var(--muted);
  line-height: 1.6;
  text-align: justify;
  text-justify: inter-word;
}

/* =========================
   Publications Page
   ========================= */
.publications-shell {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.publications-heading {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  /* text-transform: lowercase; */
}

.publications-subtitle {
  margin: 0.35rem 0 2rem;
  color: var(--muted);
  font-size: 1.02rem;
}

.publication-year-group + .publication-year-group {
  margin-top: 1.9rem;
}

.publication-year {
  margin: 0 0 0.95rem;
  font-size: clamp(1.58rem, 2.7vw, 2rem);
  line-height: 1.1;
}

.publication-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.publication-item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
}

.publication-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2f65c7;
  margin-top: 0.85rem;
}

.publication-content {
  min-width: 0;
}

.publication-title-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: start;
  gap: 0.6rem;
}

.pub-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  padding: 0.16rem 0.46rem;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.1;
  white-space: nowrap;
}

.pub-tag-journal {
  color: #164ea9;
  background: #dce9ff;
}

.pub-tag-conference {
  color: #116b4f;
  background: #daf8ee;
}

.pub-tag-preprint {
  color: #7a2f95;
  background: #f2ddff;
}

.publication-title {
  margin: 0;
  font-size: clamp(0.85rem, 1.2vw, 1.2rem);
  line-height: 1.35;
  color: #09439c;
  min-width: 0;
}

.publication-main {
  min-width: 0;
}

.publication-heading {
  display: block;
}

.publication-title strong {
  font-weight: 800;
}

.publication-heading .publication-title {
  display: inline;
}

.publication-authors,
.publication-venue {
  margin: 0;
}

.publication-authors {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.publication-venue {
  font-size: 0.95rem;
  margin-top: 0.1rem;
}

.publication-venue em {
  font-style: italic;
  font-weight: 700;
}

.publication-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.26rem;
  gap: 0.34rem;
}

.pub-action-btn,
.pub-action-link {
  border: 1px solid #bfd0ee;
  border-radius: 999px;
  background: #f4f8ff;
  color: #123d80;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  line-height: 1;
  padding: 0.3rem 0.54rem;
}

.pub-action-btn {
  cursor: pointer;
  font-family: inherit;
}

.pub-action-link {
  text-decoration: none;
}

.pub-action-btn:hover,
.pub-action-btn:focus-visible,
.pub-action-link:hover,
.pub-action-link:focus-visible,
.pub-action-btn.active {
  background: #e2ecff;
  border-color: #9fb7e0;
  color: #082e5f;
}

.publication-expand {
  margin-top: 0.56rem;
  border-radius: 8px;
  padding: 0.78rem 0.85rem;
  background: #dbe7f3;
  color: #354a60;
  font-size: 0.95rem;
  line-height: 1.58;
  text-align: justify;
  text-justify: inter-word;
}

.publication-bib {
  background: #efe7f2;
}

.publication-bib pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.45;
  font-family: "Consolas", "Courier New", monospace;
}

.best-paper-tag {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  vertical-align: middle;
  margin-left: 0.45rem;
  border-radius: 999px;
  padding: 0.12rem 0.52rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #ffffff;
  background: linear-gradient(135deg, #460905, #901e0a);
}

[data-theme="dark"] .publication-title {
  color: #83b6fb;
}

[data-theme="dark"] .pub-tag-journal {
  color: #c7deff;
  background: #1d3e75;
}

[data-theme="dark"] .pub-tag-conference {
  color: #b4f6dd;
  background: #1c5f4c;
}

[data-theme="dark"] .pub-tag-preprint {
  color: #edd2ff;
  background: #5b2f70;
}

[data-theme="dark"] .pub-action-btn,
[data-theme="dark"] .pub-action-link {
  color: #d7e9ff;
  background: #1b2f4f;
  border-color: #365684;
}

[data-theme="dark"] .pub-action-btn:hover,
[data-theme="dark"] .pub-action-btn:focus-visible,
[data-theme="dark"] .pub-action-link:hover,
[data-theme="dark"] .pub-action-link:focus-visible,
[data-theme="dark"] .pub-action-btn.active {
  background: #284977;
  border-color: #4f75aa;
  color: #eff7ff;
}

[data-theme="dark"] .publication-expand {
  color: #deecfd;
  background: #1f304a;
}

[data-theme="dark"] .publication-bib {
  background: #342a3f;
}

/* =========================
   Footer
   ========================= */
.site-footer {
  border-top: 1px solid #0f3b67;
  background: #082a4d;
  padding: 1.4rem 0 2rem;
  margin-top: 2.2rem;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #d2e2ff;
  font-size: 0.88rem;
}

/* =========================
   Responsive Rules
   Optimized for desktop, tablet, and mobile.
   ========================= */
@media (max-width: 1050px) {
  .nav-links {
    position: absolute;
    top: 74px;
    left: 4%;
    right: 4%;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.55rem;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition:
      opacity 0.2s ease,
      transform 0.2s ease;
  }

  .nav-links.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .intro-grid {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .intro-grid > .portrait-card,
  .intro-grid > article:not(.portrait-card),
  .about-insights {
    grid-column: auto;
    grid-row: auto;
  }

  .about-insights {
    margin-top: 0.2rem;
  }

  .portrait-card {
    max-width: 430px;
  }
}

@media (max-width: 720px) {
  .section {
    padding: 2.7rem 0;
  }

  .about-insights {
    margin-top: 0.1rem;
  }

  .news-item {
    grid-template-columns: 10px 1fr;
    padding: 0.92rem 0.9rem 0.9rem;
    gap: 0.45rem 0.62rem;
  }

  .news-date-inline {
    grid-column: 2;
    margin-top: 0;
  }

  .news-main {
    grid-column: 2;
  }

  .news-meta {
    grid-column: 2;
    justify-self: start;
    margin-top: 0.38rem;
  }

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

  .cv-preview-wrap,
  .cv-preview {
    min-height: 62vh;
    height: 62vh;
  }

  .role-card {
    padding: 0.88rem 0.85rem 0.8rem;
  }

  .role-title {
    font-size: 1.03rem;
  }

  .role-org,
  .role-note,
  .role-points li {
    font-size: 0.92rem;
  }

  .teaching-shell {
    padding: 0.9rem;
  }

  .course-row {
    grid-template-columns: 1fr;
    gap: 0.55rem;
    padding: 0.8rem 0.85rem;
  }

  .course-outline-link {
    width: fit-content;
  }

  .contact-shell {
    padding: 0.9rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-card {
    padding: 0.88rem 0.85rem;
  }

  .awards-shell {
    padding: 0.9rem;
  }

  .awards-hero-image {
    height: 260px;
  }

  .award-item {
    grid-template-columns: 1fr;
  }

  .award-thumb-wrap {
    width: 100%;
    height: 230px;
  }

  .publication-item {
    grid-template-columns: 12px minmax(0, 1fr);
    gap: 0.54rem;
  }

  .publication-title {
    font-size: 1rem;
  }

  .publication-authors,
  .publication-venue {
    font-size: 0.9rem;
  }

  .publication-expand {
    font-size: 0.9rem;
    padding: 0.7rem 0.72rem;
  }
}
