:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #eef2ff;
  --text: #172033;
  --muted: #667085;
  --primary: #3657d6;
  --primary-dark: #243aa5;
  --accent: #7568ff;
  --line: #e2e7f0;
  --shadow-sm: 0 10px 30px rgba(31, 49, 89, 0.08);
  --shadow-lg: 0 24px 70px rgba(42, 58, 108, 0.14);
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 34px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 3%, rgba(117, 104, 255, 0.08), transparent 24rem),
    radial-gradient(circle at 95% 22%, rgba(54, 87, 214, 0.08), transparent 28rem),
    var(--bg);
  font-family: Inter, Aptos, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
}

::selection {
  color: #fff;
  background: var(--primary);
}

.page-shell {
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
}

/* Navigation */
.site-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 76px;
  border-bottom: 1px solid rgba(226, 231, 240, 0.9);
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.site-nav-container {
  max-width: 1160px;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin: 0;
  color: var(--text);
  font-weight: 750;
  letter-spacing: -0.02em;
}

.navbar-brand:hover {
  color: var(--text);
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 8px 24px rgba(54, 87, 214, 0.25);
  font-size: 0.95rem;
  letter-spacing: -0.03em;
}

.brand-name {
  font-size: 0.98rem;
}

.navbar-nav {
  gap: 5px;
}

.site-navbar .nav-link {
  position: relative;
  padding: 10px 14px !important;
  border-radius: 10px;
  color: #526078;
  font-size: 0.93rem;
  font-weight: 650;
}

.site-navbar .nav-link:hover,
.site-navbar .nav-link.active {
  color: var(--primary);
  background: #f0f3ff;
}

.nav-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 14px;
  padding: 10px 17px;
  border-radius: 12px;
  color: #fff;
  background: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-contact:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(23, 32, 51, 0.2);
}

.navbar-toggler {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  box-shadow: none !important;
}

/* Home */
.home-main {
  padding: 58px 0 86px;
}

.hero-section {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 58px;
  align-items: center;
  min-height: 600px;
  padding: 72px;
  border: 1px solid rgba(215, 222, 239, 0.95);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 92% 15%, rgba(117, 104, 255, 0.18), transparent 17rem),
    linear-gradient(135deg, #ffffff 0%, #f6f7ff 58%, #edf0ff 100%);
  box-shadow: var(--shadow-lg);
}

.hero-section::before,
.hero-section::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero-section::before {
  width: 180px;
  height: 180px;
  left: -70px;
  bottom: -85px;
  border: 1px solid rgba(54, 87, 214, 0.15);
}

.hero-section::after {
  width: 85px;
  height: 85px;
  right: 34%;
  top: 45px;
  background-image: radial-gradient(rgba(54, 87, 214, 0.22) 1.2px, transparent 1.2px);
  background-size: 11px 11px;
}

.hero-copy,
.hero-visual {
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-kicker {
  margin: 0 0 13px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow span {
  width: 28px;
  height: 2px;
  border-radius: 99px;
  background: var(--primary);
}

.hero-copy h1 {
  max-width: 720px;
  margin: 0;
  color: var(--text);
  font-size: clamp(3.5rem, 6.8vw, 6.1rem);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 0.93;
}

.hero-copy h1 span {
  color: var(--primary);
}

.hero-lead {
  max-width: 680px;
  margin: 27px 0 0;
  color: #526078;
  font-size: 1.13rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.btn-primary-modern,
.btn-secondary-modern {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 21px;
  border-radius: 13px;
  font-size: 0.95rem;
  font-weight: 750;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary-modern {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #4f6de2);
  box-shadow: 0 13px 30px rgba(54, 87, 214, 0.25);
}

.btn-primary-modern:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 17px 36px rgba(54, 87, 214, 0.31);
}

.btn-secondary-modern {
  border: 1px solid #d5dceb;
  color: var(--text);
  background: rgba(255, 255, 255, 0.78);
}

.btn-secondary-modern:hover {
  color: var(--primary);
  background: #fff;
  transform: translateY(-2px);
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 31px;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #59667c;
  font-size: 0.9rem;
  font-weight: 650;
}

.hero-links a:hover {
  color: var(--primary);
}

.hero-visual {
  min-height: 430px;
  display: grid;
  place-items: center;
}

.portrait-frame {
  width: min(340px, 100%);
  aspect-ratio: 1;
  padding: 10px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--primary), var(--accent), #b0b7ff);
  box-shadow: 0 25px 55px rgba(55, 68, 126, 0.27);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  border: 8px solid #fff;
  border-radius: 50%;
}

.affiliation-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 215px;
  padding: 13px 15px;
  border: 1px solid rgba(222, 226, 239, 0.95);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.91);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

.affiliation-card-top {
  top: 28px;
  right: -22px;
}

.affiliation-card-bottom {
  bottom: 27px;
  left: -28px;
}

.mini-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  color: var(--primary);
  background: #edf0ff;
}

.affiliation-card small,
.affiliation-card strong {
  display: block;
}

.affiliation-card small {
  color: var(--muted);
  font-size: 0.7rem;
}

.affiliation-card strong {
  color: var(--text);
  font-size: 0.79rem;
  line-height: 1.35;
}

.research-band {
  display: grid;
  grid-template-columns: 245px 1fr;
  gap: 40px;
  align-items: center;
  margin-top: 34px;
  padding: 32px 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.compact-heading h2 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.035em;
}

.topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.topic-list span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid #dfe4f0;
  border-radius: 999px;
  color: #46536a;
  background: #f9faff;
  font-size: 0.87rem;
  font-weight: 650;
}

.topic-list i {
  color: var(--primary);
}

.content-section {
  padding-top: 92px;
}

.section-heading h2,
.about-panel h2,
.page-header h1 {
  margin: 0;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.section-heading h2,
.about-panel h2 {
  font-size: clamp(2rem, 4vw, 3.15rem);
}

.split-heading {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 60px;
  align-items: end;
  margin-bottom: 34px;
}

.split-heading > p {
  margin: 0 0 5px;
  color: var(--muted);
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.focus-card {
  min-height: 355px;
  display: flex;
  flex-direction: column;
  padding: 29px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.focus-card:hover {
  transform: translateY(-6px);
  border-color: #cfd7ef;
  box-shadow: 0 20px 48px rgba(32, 49, 93, 0.13);
}

.featured-card {
  background: linear-gradient(155deg, #ffffff, #f1f3ff);
}

.focus-icon,
.project-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--primary);
  background: #eef1ff;
  font-size: 1.15rem;
}

.card-label {
  margin: 23px 0 7px;
  color: var(--primary);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.focus-card h3 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 780;
  letter-spacing: -0.03em;
}

.focus-card p:not(.card-label) {
  margin: 16px 0 22px;
  color: var(--muted);
}

.focus-card a {
  margin-top: auto;
  font-size: 0.92rem;
  font-weight: 750;
}

.focus-card a i {
  margin-left: 6px;
  font-size: 0.8rem;
}

.about-panel {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  margin-top: 92px;
  padding: 55px;
  border-radius: var(--radius-lg);
  color: #fff;
  background:
    radial-gradient(circle at 80% 20%, rgba(117, 104, 255, 0.35), transparent 18rem),
    linear-gradient(135deg, #172033, #21356f);
  box-shadow: var(--shadow-lg);
}

.about-panel .section-kicker {
  color: #abbcff;
}

.about-panel h2 {
  color: #fff;
}

.about-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.79);
}

.about-copy p + p {
  margin-top: 18px;
}

/* Inner pages */
.page-main {
  flex: 1;
  padding: 68px 0 92px;
}

.page-header {
  max-width: 810px;
  margin-bottom: 48px;
}

.page-header h1 {
  font-size: clamp(3rem, 7vw, 5.5rem);
}

.page-header > p:last-child {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

/* Publications */
.publication-list {
  display: grid;
  gap: 15px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.publication-card {
  position: relative;
  padding: 25px 28px 25px 62px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: #5c687b;
  background: var(--surface);
  box-shadow: 0 7px 24px rgba(32, 49, 93, 0.055);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.publication-card::before {
  content: "\f15c";
  position: absolute;
  top: 27px;
  left: 25px;
  color: var(--primary);
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 1.1rem;
}

.publication-card:hover {
  transform: translateY(-3px);
  border-color: #ccd5ee;
  box-shadow: 0 14px 34px rgba(32, 49, 93, 0.1);
}

.publication-card > strong:first-child {
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 780;
  line-height: 1.45;
}

.publication-card em {
  color: var(--primary-dark);
  font-style: normal;
  font-weight: 750;
}

.publication-card strong:not(:first-child) {
  color: #384459;
  font-weight: 700;
}

.poster-section {
  margin-top: 76px;
}

.section-title {
  margin: 0 0 26px;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.poster-card {
  display: block;
  height: 100%;
  overflow: hidden;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.poster-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 42px rgba(32, 49, 93, 0.13);
}

.poster-image {
  width: 100%;
  aspect-ratio: 0.72;
  object-fit: cover;
  border-radius: 12px;
}

/* Timeline */
.modern-timeline {
  position: relative;
  margin: 0;
  padding: 0 0 0 34px;
  border: 0;
}

.modern-timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 9px;
  width: 2px;
  border-radius: 99px;
  background: linear-gradient(var(--primary), #cbd3ef);
}

.timeline-card {
  position: relative;
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  margin: 0 0 22px;
}

.timeline-card::before {
  content: "";
  position: absolute;
  top: 27px;
  left: -31px;
  width: 15px;
  height: 15px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 1px #bfc9e7;
}

.timeline-date {
  padding-top: 23px;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.surface-card {
  padding: 24px 27px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 8px 26px rgba(32, 49, 93, 0.06);
}

.surface-card h5 {
  margin: 0 0 9px;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 770;
}

.surface-card p {
  margin: 0;
  color: var(--muted);
}

.surface-card a {
  font-weight: 700;
}

/* Projects */
.project-card {
  display: grid;
  grid-template-columns: 58px 1fr;
  column-gap: 22px;
  margin-bottom: 20px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.project-card .project-icon {
  grid-row: 1 / span 5;
}

.project-card h2,
.project-card p {
  grid-column: 2;
}

.project-card h2 {
  margin: 0 0 14px;
  color: var(--text);
  border: 0;
  padding: 0;
  font-size: 1.55rem;
  font-weight: 790;
  letter-spacing: -0.035em;
}

.project-card p {
  margin: 0 0 13px;
  color: var(--muted);
}

.project-card p:last-child {
  margin-bottom: 0;
}

.project-card strong {
  color: #354259;
}

/* Hobbies */
.hobby-card {
  overflow: hidden;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.hobby-card .row {
  min-height: 260px;
}

.hobby-card .col-md-6,
.hobby-card .col-md-4 {
  padding: 0;
}

.hobby-card .col-md-4 {
  width: 50%;
  display: flex;
  align-items: center;
}

.hobby-image {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.hobby-card .card-body {
  padding: 34px;
}

.hobby-card .card-title {
  margin-bottom: 12px;
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 790;
}

.hobby-card .card-text {
  color: var(--muted);
}

/* Footer */
.site-footer {
  margin-top: auto;
  color: #d6dced;
  background: #121a2b;
}

.footer-inner {
  max-width: 1160px;
  min-height: 170px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 40px;
  align-items: center;
}

.footer-inner strong {
  color: #fff;
}

.footer-inner p {
  margin: 4px 0 0;
  color: #95a0b5;
  font-size: 0.88rem;
}

.footer-links {
  display: flex;
  gap: 10px;
}

.footer-links a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #e8ecf7;
  background: rgba(255, 255, 255, 0.04);
}

.footer-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.footer-inner .copyright {
  margin: 0;
  white-space: nowrap;
}

/* Responsive */
@media (max-width: 991.98px) {
  .site-navbar .navbar-collapse {
    margin-top: 15px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-sm);
  }

  .nav-contact {
    margin: 10px 0 0;
  }

  .hero-section {
    grid-template-columns: 1fr;
    gap: 42px;
    padding: 56px;
  }

  .hero-visual {
    order: -1;
    min-height: 390px;
  }

  .portrait-frame {
    width: 300px;
  }

  .affiliation-card-top {
    right: 8%;
  }

  .affiliation-card-bottom {
    left: 8%;
  }

  .research-band,
  .split-heading,
  .about-panel {
    grid-template-columns: 1fr;
    gap: 25px;
  }

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

  .focus-card:last-child {
    grid-column: 1 / -1;
  }

  .footer-inner {
    grid-template-columns: 1fr auto;
    padding-block: 35px;
  }

  .footer-inner .copyright {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767.98px) {
  .page-shell {
    width: min(100% - 26px, 1160px);
  }

  .brand-name {
    display: none;
  }

  .home-main,
  .page-main {
    padding-top: 28px;
  }

  .hero-section {
    min-height: auto;
    padding: 34px 24px 40px;
    border-radius: 25px;
  }

  .hero-copy h1 {
    font-size: clamp(3rem, 17vw, 4.5rem);
  }

  .hero-lead {
    font-size: 1rem;
  }

  .hero-visual {
    min-height: 315px;
  }

  .portrait-frame {
    width: 230px;
  }

  .affiliation-card {
    min-width: 182px;
    padding: 10px 11px;
  }

  .affiliation-card-top {
    top: 5px;
    right: -4px;
  }

  .affiliation-card-bottom {
    bottom: 0;
    left: -4px;
  }

  .hero-links span {
    display: none;
  }

  .research-band {
    padding: 26px 22px;
  }

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

  .focus-card:last-child {
    grid-column: auto;
  }

  .about-panel {
    margin-top: 70px;
    padding: 34px 25px;
    border-radius: 25px;
  }

  .page-header {
    margin-bottom: 35px;
  }

  .timeline-card {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .timeline-date {
    padding-top: 0;
  }

  .timeline-card::before {
    top: 6px;
  }

  .publication-card {
    padding: 24px 22px 24px 52px;
  }

  .publication-card::before {
    left: 20px;
  }

  .project-card {
    grid-template-columns: 1fr;
    padding: 25px;
  }

  .project-card .project-icon {
    grid-row: auto;
    margin-bottom: 18px;
  }

  .project-card h2,
  .project-card p {
    grid-column: 1;
  }

  .hobby-card .col-md-4 {
    width: 100%;
  }

  .hobby-image {
    min-height: 220px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  .footer-inner .copyright {
    grid-column: auto;
  }
}

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

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

/* Homepage profile layout: a more personal, less corporate introduction */
.profile-hero {
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.28fr);
  gap: 62px;
  min-height: auto;
  padding: 62px 68px;
  background:
    radial-gradient(circle at 5% 100%, rgba(117, 104, 255, 0.09), transparent 19rem),
    linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
}

.profile-hero::after {
  display: none;
}

.profile-hero .profile-portrait {
  min-height: auto;
}

.profile-hero .portrait-frame {
  width: min(315px, 100%);
}

.profile-hero .hero-copy h1 {
  max-width: 700px;
  font-size: clamp(3.2rem, 5.2vw, 4.85rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.hero-kicker {
  margin-bottom: 12px;
}

.hero-biography {
  max-width: 710px;
  margin-top: 25px;
}

.hero-biography p {
  margin: 0;
  color: #526078;
  font-size: 1.02rem;
  line-height: 1.82;
}

.hero-biography p + p {
  margin-top: 15px;
}

.home-footer-inner {
  min-height: 118px;
  grid-template-columns: auto auto;
  justify-content: space-between;
}

@media (max-width: 991.98px) {
  .profile-hero {
    grid-template-columns: 1fr;
    gap: 38px;
    padding: 50px;
  }

  .profile-hero .profile-portrait {
    order: -1;
  }

  .profile-hero .portrait-frame {
    width: 280px;
  }
}

@media (max-width: 767.98px) {
  .profile-hero {
    padding: 34px 24px 38px;
  }

  .profile-hero .portrait-frame {
    width: 220px;
  }

  .profile-hero .hero-copy h1 {
    font-size: clamp(2.7rem, 13vw, 4rem);
  }

  .hero-biography p {
    font-size: 0.98rem;
    line-height: 1.75;
  }

  .home-footer-inner {
    grid-template-columns: 1fr;
    justify-content: center;
  }
}


/* =========================================================
   V3 corrections: clean inner-page layout and personal home
   ========================================================= */
.profile-hero .portrait-frame {
  width: min(315px, 100%);
  aspect-ratio: 4 / 5;
  padding: 7px;
  border-radius: 26px;
  background: linear-gradient(145deg, var(--primary), var(--accent), #b0b7ff);
}
.profile-hero .portrait-frame img {
  border-width: 7px;
  border-radius: 20px;
  object-position: center 22%;
}
.minimal-footer-inner {
  min-height: 118px;
  grid-template-columns: auto auto;
  justify-content: space-between;
}
.project-stack { display: grid; gap: 22px; }
.compact-project-card { min-height: 0; }
.project-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 750; }

/* News: year-based card archive instead of a long timeline */
.news-header { max-width: 850px; }
.news-year + .news-year { margin-top: 70px; }
.year-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.year-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(2rem, 4vw, 3.15rem);
  font-weight: 820;
  letter-spacing: -0.055em;
}
.year-heading span { color: var(--muted); font-size: .86rem; font-weight: 650; }
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.news-card {
  min-height: 100%;
  padding: 27px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(32, 49, 93, .065);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.news-card:hover {
  transform: translateY(-4px);
  border-color: #cdd6ef;
  box-shadow: 0 17px 42px rgba(32, 49, 93, .11);
}
.news-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 19px; }
.news-icon {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--primary);
  background: #eef1ff;
}
.news-category {
  color: var(--primary-dark);
  font-size: .73rem;
  font-weight: 820;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.news-card time { display: block; margin-bottom: 8px; color: var(--muted); font-size: .82rem; font-weight: 680; }
.news-card h2 {
  margin: 0 0 13px;
  color: var(--text);
  font-size: 1.28rem;
  font-weight: 790;
  letter-spacing: -.03em;
  line-height: 1.32;
}
.news-copy, .news-copy p { margin: 0; color: var(--muted); font-size: .94rem; line-height: 1.72; }
.news-copy a { font-weight: 730; }
.category-talk { background: #fff0eb; color: #b74c27; }
.category-visit { background: #edf8ff; color: #19719e; }
.category-mentoring { background: #f3efff; color: #6c4bc7; }
.category-service { background: #eef9f1; color: #2f8050; }
.category-training { background: #fff8e8; color: #9a6b09; }
.category-milestone { background: #eef1ff; color: var(--primary); }

@media (max-width: 767.98px) {
  .profile-hero .portrait-frame { width: 230px; border-radius: 22px; }
  .profile-hero .portrait-frame img { border-radius: 16px; }
  .minimal-footer-inner { grid-template-columns: 1fr; justify-content: center; }
  .news-grid { grid-template-columns: 1fr; }
  .year-heading { align-items: flex-end; }
  .year-heading span { text-align: right; }
}
.hobby-card .col-md-6:last-child {
  display: flex;
  align-items: center;
}
@media (max-width: 767.98px) {
  .hobby-card .col-md-6:last-child { display: block; }
}

/* V6: circular portrait on the right, timeless project metadata, publication archive */
.profile-hero {
  grid-template-columns: minmax(0, 1.32fr) minmax(230px, 0.68fr);
  gap: 58px;
}
.profile-hero .hero-copy { order: 1; }
.profile-hero .profile-portrait { order: 2; }
.profile-hero .portrait-frame {
  width: min(300px, 100%);
  aspect-ratio: 1 / 1;
  padding: 3px;
  border-radius: 50%;
}
.profile-hero .portrait-frame img {
  border-width: 3px;
  border-radius: 50%;
  object-position: center center;
}

.project-heading-row {
  grid-column: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.project-heading-row h2 { margin-bottom: 14px; }
.project-period {
  flex: 0 0 auto;
  margin-top: 3px;
  padding: 6px 10px;
  border: 1px solid #d9e0f1;
  border-radius: 999px;
  color: var(--primary-dark);
  background: #f3f5ff;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .03em;
}

.publication-archive { display: grid; gap: 58px; }
.publication-year-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}
.publication-year-heading::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}
.publication-year-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 820;
  letter-spacing: -.05em;
}
.publication-card-header { margin-bottom: 8px; }
.publication-date {
  color: var(--primary);
  font-size: .76rem;
  font-weight: 820;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.publication-authors {
  margin: 10px 0 8px;
  color: #59667a;
  line-height: 1.65;
}
.publication-meta {
  display: grid;
  gap: 3px;
  color: #687489;
  font-size: .93rem;
  line-height: 1.55;
}
.publication-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 15px;
}
.publication-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #d4dcf0;
  border-radius: 10px;
  color: var(--primary-dark);
  background: #f7f8ff;
  font-size: .82rem;
  font-weight: 780;
}
.publication-action:hover {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}

@media (max-width: 991.98px) {
  .profile-hero { grid-template-columns: 1fr; }
  .profile-hero .profile-portrait { order: -1; }
  .profile-hero .portrait-frame { width: 260px; }
}
@media (max-width: 767.98px) {
  .profile-hero .portrait-frame,
  .profile-hero .portrait-frame img { border-radius: 50%; }
  .profile-hero .portrait-frame { width: 215px; }
  .project-heading-row { grid-column: 1; display: block; }
  .project-period { display: inline-block; margin: 0 0 14px; }
  .publication-archive { gap: 44px; }
}


/* V7: flat publication archive and PB Invaders arcade */
.publication-archive-flat {
  display: block;
}
.publication-list-flat {
  gap: 17px;
}
.publication-list-flat .publication-card {
  padding-top: 27px;
  padding-bottom: 27px;
}

.arcade-main {
  width: min(1220px, calc(100% - 40px));
}
.arcade-header {
  max-width: 900px;
}
.arcade-card {
  overflow: hidden;
  padding: 26px;
  border: 1px solid rgba(207, 216, 239, .95);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(240,243,255,.96));
  box-shadow: var(--shadow-lg);
}
.arcade-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding: 4px 4px 22px;
}
.arcade-overline {
  margin: 0 0 4px;
  color: var(--primary);
  font-size: .72rem;
  font-weight: 820;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.arcade-toolbar h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -.04em;
}
.arcade-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.arcade-stats span {
  min-width: 92px;
  padding: 8px 11px;
  border: 1px solid #dce3f4;
  border-radius: 12px;
  color: #718097;
  background: rgba(255,255,255,.82);
  font-size: .73rem;
  font-weight: 720;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.arcade-stats strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
  letter-spacing: 0;
}
.game-stage {
  position: relative;
  overflow: hidden;
  width: 100%;
  border: 1px solid rgba(120, 143, 223, .32);
  border-radius: 22px;
  background: #080d20;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.035), 0 22px 46px rgba(18, 27, 67, .19);
}
#gameCanvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
}
.game-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 9, 25, .62);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  transition: opacity .2s ease, visibility .2s ease;
}
.game-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.game-overlay-panel {
  width: min(440px, 100%);
  padding: 32px;
  border: 1px solid rgba(169, 184, 255, .3);
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(145deg, rgba(22,32,77,.95), rgba(12,18,45,.94));
  box-shadow: 0 24px 65px rgba(0,0,0,.36);
  text-align: center;
}
.game-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 16px;
  padding: 6px 10px;
  border: 1px solid rgba(142, 163, 255, .3);
  border-radius: 999px;
  color: #cbd4ff;
  background: rgba(126, 143, 255, .1);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .075em;
  text-transform: uppercase;
}
.game-overlay-panel h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(2.1rem, 6vw, 3.35rem);
  font-weight: 850;
  letter-spacing: -.06em;
}
.game-overlay-panel p {
  margin: 14px auto 23px;
  color: rgba(236,240,255,.74);
  line-height: 1.65;
}
.game-start-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 13px 32px rgba(76, 93, 219, .35);
  font-weight: 800;
}
.arcade-help {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  padding: 19px 5px 0;
  color: #6b778c;
  font-size: .83rem;
}
.arcade-help span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.arcade-help kbd {
  min-width: 25px;
  padding: 3px 6px;
  border: 1px solid #d8dfef;
  border-bottom-width: 2px;
  border-radius: 6px;
  color: #35415a;
  background: #fff;
  box-shadow: none;
  font-family: inherit;
  font-size: .72rem;
  font-weight: 760;
  text-align: center;
}
.arcade-text-button {
  margin-left: auto;
  padding: 7px 11px;
  border: 1px solid #d6deef;
  border-radius: 9px;
  color: var(--primary-dark);
  background: #fff;
  font-size: .8rem;
  font-weight: 780;
}
.arcade-controls {
  display: none;
  grid-template-columns: repeat(3, 68px);
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}
.arcade-controls button {
  width: 68px;
  height: 58px;
  border: 1px solid #d3dcf2;
  border-radius: 17px;
  color: var(--primary-dark);
  background: #fff;
  box-shadow: 0 8px 20px rgba(32,49,93,.08);
  font-size: 1.05rem;
  touch-action: none;
}
.arcade-controls .fire-control {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}
.arcade-controls button:active {
  transform: translateY(2px);
}

@media (max-width: 991.98px) {
  .arcade-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .arcade-stats {
    justify-content: flex-start;
  }
}
@media (max-width: 767.98px), (hover: none) and (pointer: coarse) {
  .arcade-card {
    padding: 15px;
    border-radius: 24px;
  }
  .arcade-toolbar {
    gap: 16px;
    padding-bottom: 16px;
  }
  .arcade-stats {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .arcade-stats span {
    min-width: 0;
  }
  .game-stage {
    border-radius: 16px;
  }
  .arcade-controls {
    display: grid;
  }
  .arcade-help {
    justify-content: center;
  }
  .arcade-help span {
    display: none;
  }
  .arcade-text-button {
    margin-left: 0;
  }
  .game-overlay-panel {
    padding: 24px 18px;
  }
}

/* V10: mobile arcade controls and preview polish */
.mobile-game-note {
  display: none;
  margin: 14px auto 0;
  color: #6b778c;
  font-size: 0.82rem;
  text-align: center;
}

.arcade-page,
.game-stage,
.arcade-controls,
.arcade-controls button {
  -webkit-user-select: none;
  user-select: none;
}

@media (max-width: 767.98px), (hover: none) and (pointer: coarse) {
  .arcade-page {
    overscroll-behavior-y: contain;
  }

  .arcade-main {
    width: min(100% - 16px, 1220px);
    padding-top: 18px;
  }

  .arcade-header {
    margin-bottom: 26px;
  }

  .arcade-header h1 {
    font-size: clamp(2.35rem, 12vw, 3.5rem);
  }

  .arcade-header > p:last-child {
    margin-top: 14px;
    font-size: 0.98rem;
  }

  .arcade-card {
    padding: 12px;
  }

  .arcade-toolbar h2 {
    font-size: 1.65rem;
  }

  .arcade-overline {
    font-size: 0.65rem;
  }

  .arcade-controls {
    grid-template-columns: repeat(3, minmax(72px, 84px));
    gap: 12px;
  }

  .arcade-controls button {
    width: 100%;
    height: 62px;
    font-size: 1.18rem;
  }

  .mobile-game-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }
}


/* V11: research interests, selected publications, updated news, mobile arcade */
.publication-intro {
  max-width: 760px;
}

.scholar-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 760;
}

.scholar-inline-link i {
  font-size: 0.78em;
}

.selected-publications .publication-card {
  padding-top: 29px;
  padding-bottom: 29px;
}

.publication-objective {
  margin: 16px 0 0;
  padding: 15px 17px;
  border-left: 3px solid var(--primary);
  border-radius: 0 12px 12px 0;
  color: #536075;
  background: #f7f8ff;
  line-height: 1.68;
}

.publication-objective strong {
  color: var(--primary-dark) !important;
}

.category-publication { background: #eef1ff; color: var(--primary); }
.category-research { background: #edf8ff; color: #19719e; }
.category-teaching { background: #fff5e8; color: #98600a; }

.mobile-game-actions {
  display: none;
  justify-content: center;
  margin-top: 14px;
}

.mobile-start-button {
  min-width: 190px;
  min-height: 50px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 13px 30px rgba(76, 93, 219, .28);
  font-weight: 800;
  touch-action: manipulation;
}

.mobile-start-button[hidden] {
  display: none !important;
}

@media (max-width: 767.98px), (hover: none) and (pointer: coarse) {
  .mobile-game-actions {
    display: flex;
  }

  .game-overlay {
    padding: 8px;
  }

  .game-overlay-panel {
    width: min(310px, 100%);
    max-height: calc(100% - 12px);
    padding: 14px 12px;
    border-radius: 14px;
  }

  .game-badge {
    display: none;
  }

  .game-overlay-panel h2 {
    font-size: clamp(1.45rem, 8vw, 2rem);
    letter-spacing: -0.04em;
  }

  .game-overlay-panel p,
  .game-start-button {
    display: none;
  }

  .mobile-game-note {
    margin-top: 12px;
  }
}


/* V12: thematic publication groups and year-based news navigation */
.publication-areas {
  display: grid;
  gap: 64px;
}

.publication-area {
  display: grid;
  grid-template-columns: minmax(210px, .72fr) minmax(0, 1.7fr);
  gap: 38px;
  align-items: start;
}

.publication-area-heading {
  position: sticky;
  top: 112px;
}

.publication-area-heading h2 {
  margin: 6px 0 13px;
  color: var(--text);
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 820;
  letter-spacing: -.045em;
  line-height: 1.12;
}

.publication-area-heading > p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

.publication-area .publication-list {
  gap: 20px;
}

.publication-area .publication-card {
  padding-top: 29px;
  padding-bottom: 29px;
}

.publication-area .publication-objective {
  font-size: .97rem;
}

.news-year-nav {
  display: flex;
  gap: 10px;
  margin: -12px 0 46px;
  padding: 7px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 8px 24px rgba(32,49,93,.055);
  scrollbar-width: none;
}

.news-year-nav::-webkit-scrollbar { display: none; }

.news-year-link {
  flex: 0 0 auto;
  min-width: 68px;
  padding: 10px 15px;
  border-radius: 11px;
  color: var(--muted);
  text-align: center;
  font-size: .9rem;
  font-weight: 780;
  text-decoration: none;
}

.news-year-link:hover {
  color: var(--primary-dark);
  background: #f2f4ff;
  text-decoration: none;
}

.news-year-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 8px 18px rgba(76,93,219,.22);
}

.news-year-page { margin-top: 0; }

.news-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.news-pager-link {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  width: fit-content;
  color: var(--text);
  font-weight: 780;
  text-decoration: none;
}

.news-pager-link span { display: grid; }
.news-pager-link small {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 680;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.news-pager-link-next { justify-self: end; text-align: right; }
.news-pager-link:hover { color: var(--primary); text-decoration: none; }
.category-presentation { background: #eef1ff; color: var(--primary); }

@media (max-width: 991.98px) {
  .publication-area {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .publication-area-heading { position: static; max-width: 720px; }
}

@media (max-width: 575.98px) {
  .publication-areas { gap: 50px; }
  .news-year-nav { width: 100%; margin-bottom: 34px; }
  .news-year-link { min-width: 62px; padding-inline: 12px; }
  .news-pager { gap: 10px; }
}
