:root {
  --ink: #061615;
  --deep: #082c2b;
  --forest: #0d5a53;
  --moss: #6b8877;
  --mint: #70f0d8;
  --mist: #e9f4ef;
  --paper: #f8f5eb;
  --chalk: #f2efe4;
  --line: rgba(8, 44, 43, 0.16);
  --glass: rgba(248, 245, 235, 0.72);
  --shadow: rgba(3, 32, 30, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(112, 240, 216, 0.22), transparent 28rem),
    radial-gradient(circle at 88% 10%, rgba(14, 92, 85, 0.2), transparent 24rem),
    linear-gradient(132deg, #faf5e8 0%, #eef6f1 48%, #dceee9 100%);
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  content: "";
  background-image:
    linear-gradient(rgba(8, 44, 43, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 44, 43, 0.07) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black 0%, rgba(0, 0, 0, 0.42) 56%, transparent 100%);
}

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

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

main {
  display: flex;
  flex-direction: column;
}

section {
  scroll-margin-top: 96px;
}

#city-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  opacity: 0.68;
}

.cursor-glow {
  position: fixed;
  z-index: -1;
  width: 32rem;
  height: 32rem;
  border-radius: 999px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(112, 240, 216, 0.2), transparent 62%);
  filter: blur(8px);
  transform: translate(-50%, -50%);
  transition: opacity 180ms ease;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0.12;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 260 260' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.site-header {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 20;
  display: flex;
  width: min(1120px, calc(100% - 32px));
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid rgba(8, 44, 43, 0.16);
  border-radius: 999px;
  background: rgba(248, 245, 235, 0.74);
  box-shadow: 0 18px 60px rgba(5, 38, 36, 0.12);
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
}

.brand,
.nav {
  display: flex;
  align-items: center;
}

.brand {
  position: relative;
  gap: 10px;
  font-size: 0.94rem;
}

.brand-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: var(--paper);
  background: var(--deep);
  letter-spacing: -0.04em;
  overflow: hidden;
  box-shadow: 0 0 0 2px rgba(248, 245, 235, 0.94), 0 8px 22px rgba(5, 38, 36, 0.16);
  transform-origin: center;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.brand-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 32%;
}

.brand:hover .brand-avatar,
.brand:focus-visible .brand-avatar {
  box-shadow: 0 0 0 3px rgba(112, 240, 216, 0.54), 0 12px 28px rgba(5, 38, 36, 0.2);
  transform: scale(1.18);
}

.nav {
  gap: 4px;
}

.nav a {
  padding: 9px 11px;
  border-radius: 999px;
  color: rgba(6, 22, 21, 0.7);
  font-size: 0.86rem;
  transition: color 180ms ease, background 180ms ease;
}

.nav a:hover,
.language-toggle:hover {
  color: var(--ink);
  background: rgba(14, 92, 85, 0.09);
}

.language-toggle {
  display: inline-flex;
  min-width: 42px;
  height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid rgba(8, 44, 43, 0.16);
  border-radius: 999px;
  color: rgba(6, 22, 21, 0.72);
  background: rgba(248, 245, 235, 0.56);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.language-toggle:active {
  transform: scale(0.96);
}

.language-toggle:focus-visible {
  outline: 2px solid rgba(112, 240, 216, 0.72);
  outline-offset: 3px;
}

.section-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  scroll-margin-top: 96px;
}

.hero {
  order: 1;
  display: grid;
  min-height: 100dvh;
  grid-template-columns: minmax(0, 1.04fr) minmax(360px, 0.96fr);
  gap: 46px;
  align-items: center;
  padding: 118px 0 80px;
}

.section-kicker,
.panel-label {
  color: var(--forest);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(4.2rem, 9.2vw, 8.4rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
}

.hero h1 span {
  display: block;
  width: max-content;
  max-width: 100%;
  margin-top: 18px;
  color: var(--forest);
  font-size: clamp(2.05rem, 3.55vw, 3.78rem);
  line-height: 1.08;
  letter-spacing: -0.07em;
  white-space: nowrap;
}

.hero-lede {
  max-width: 56ch;
  color: rgba(6, 22, 21, 0.78);
  font-size: clamp(1rem, 1.48vw, 1.18rem);
  line-height: 1.82;
}

.profile-strip,
.hero-actions,
.contact-actions,
.project-meta,
.contact-lines {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-strip {
  margin-top: 22px;
}

.profile-strip span,
.project-meta span {
  padding: 7px 10px;
  border: 1px solid rgba(8, 44, 43, 0.13);
  border-radius: 999px;
  color: rgba(6, 22, 21, 0.68);
  background: rgba(248, 245, 235, 0.48);
  font-size: 0.82rem;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.hero-actions,
.contact-actions {
  margin-top: 28px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 850;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.button:active {
  transform: translateY(1px) scale(0.98);
}

.button.primary {
  color: #effffb;
  background: var(--deep);
  box-shadow: 0 18px 42px rgba(8, 44, 43, 0.22);
}

.button.ghost {
  border: 1px solid rgba(8, 44, 43, 0.18);
  color: var(--deep);
  background: rgba(248, 245, 235, 0.56);
  backdrop-filter: blur(12px);
}

.hero-index {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 28px;
}

.hero-index article {
  min-height: 138px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(248, 245, 235, 0.56);
  box-shadow: 0 14px 44px rgba(8, 44, 43, 0.08);
  backdrop-filter: blur(16px);
}

.hero-index strong {
  display: block;
  color: var(--deep);
  font-size: 1rem;
}

.hero-index span {
  display: block;
  margin-top: 24px;
  color: rgba(6, 22, 21, 0.66);
  font-size: 0.86rem;
  line-height: 1.55;
}

.hero-visual {
  position: relative;
  min-height: 640px;
  perspective: 1100px;
}

.network-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(620px, 90vw);
  height: min(620px, 90vw);
  overflow: hidden;
  border: 1px solid rgba(8, 44, 43, 0.16);
  border-radius: 44px;
  background:
    radial-gradient(circle at 50% 46%, rgba(112, 240, 216, 0.18), transparent 18rem),
    linear-gradient(rgba(8, 44, 43, 0.048) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 44, 43, 0.048) 1px, transparent 1px),
    rgba(248, 245, 235, 0.64);
  background-size: auto, 34px 34px, 34px 34px, auto;
  box-shadow: 0 34px 100px rgba(5, 40, 38, 0.14);
  transform: translate(-50%, -50%) rotateX(4deg) rotateY(-4deg);
  backdrop-filter: blur(18px);
}

.network-card::before {
  position: absolute;
  inset: 20px;
  z-index: 1;
  content: "";
  border: 1px solid rgba(13, 90, 83, 0.18);
  border-radius: 32px;
  pointer-events: none;
}

.network-card::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background:
    linear-gradient(112deg, rgba(248, 245, 235, 0.76) 0%, transparent 28%, rgba(112, 240, 216, 0.12) 62%, transparent 100%),
    radial-gradient(circle at 15% 15%, rgba(255, 255, 255, 0.5), transparent 16rem);
  pointer-events: none;
}

.method-network {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  touch-action: none;
  user-select: none;
}

.network-link {
  stroke: rgba(6, 22, 21, 0.18);
  stroke-width: 1.05;
  transition: stroke 180ms ease, stroke-width 180ms ease, opacity 180ms ease;
}

.network-link.secondary {
  stroke: rgba(13, 90, 83, 0.12);
  stroke-dasharray: 3 8;
}

.network-link.is-active {
  stroke: rgba(13, 90, 83, 0.72);
  stroke-width: 2.3;
  opacity: 1;
}

.graph-node {
  cursor: grab;
  transition: opacity 180ms ease, filter 180ms ease;
}

.graph-node:active {
  cursor: grabbing;
}

.graph-node circle {
  fill: rgba(248, 245, 235, 0.86);
  stroke: rgba(8, 44, 43, 0.42);
  stroke-width: 1.4;
  filter: drop-shadow(0 12px 18px rgba(5, 40, 38, 0.12));
}

.graph-node.major circle {
  fill: rgba(13, 90, 83, 0.92);
  stroke: rgba(112, 240, 216, 0.72);
  stroke-width: 1.8;
}

.graph-node.keyword circle {
  fill: rgba(112, 240, 216, 0.56);
  stroke: rgba(13, 90, 83, 0.48);
}

.graph-node.core circle {
  fill: #061615;
  stroke: rgba(112, 240, 216, 0.8);
  stroke-width: 2.2;
}

.graph-node text {
  fill: rgba(6, 22, 21, 0.82);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.03em;
  paint-order: stroke;
  stroke: rgba(248, 245, 235, 0.9);
  stroke-width: 4px;
  stroke-linejoin: round;
}

.graph-node.major text,
.graph-node.core text {
  fill: #f8f5eb;
  stroke: rgba(6, 22, 21, 0.36);
  stroke-width: 3px;
}

.graph-node.core text {
  font-size: 18px;
  letter-spacing: -0.04em;
}

.graph-node.keyword text {
  font-size: 12.5px;
}

.graph-node.is-muted {
  opacity: 0.28;
}

.graph-node.is-active {
  filter: drop-shadow(0 0 16px rgba(112, 240, 216, 0.34));
}

.network-hint {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 3;
  padding: 9px 14px;
  border: 1px solid rgba(8, 44, 43, 0.14);
  border-radius: 999px;
  color: rgba(6, 22, 21, 0.64);
  background: rgba(248, 245, 235, 0.7);
  font-size: 0.8rem;
  font-weight: 700;
  backdrop-filter: blur(14px);
}

.network-metric {
  position: absolute;
  z-index: 4;
  width: 172px;
  padding: 16px 18px;
  border: 1px solid rgba(248, 245, 235, 0.65);
  border-radius: 22px;
  background: rgba(248, 245, 235, 0.74);
  box-shadow: 0 18px 46px rgba(5, 40, 38, 0.13);
  backdrop-filter: blur(18px);
}

.network-metric strong {
  display: block;
  color: var(--forest);
  font-size: 2.15rem;
  line-height: 1;
  letter-spacing: -0.06em;
}

.network-metric span {
  display: block;
  margin-top: 8px;
  color: rgba(6, 22, 21, 0.65);
  font-size: 0.78rem;
  line-height: 1.5;
}

.network-metric-a {
  top: 70px;
  right: 18px;
  animation: float 7s ease-in-out infinite;
}

.network-metric-b {
  bottom: 76px;
  left: 16px;
  animation: float 7s ease-in-out 1.5s infinite;
}

.research {
  order: 2;
  scroll-margin-top: 108px;
}

.practice {
  order: 3;
  scroll-margin-top: 126px;
}

.teaching {
  order: 4;
}

.ai-lab {
  order: 5;
}

.contact {
  order: 6;
}

.research,
.practice,
.teaching,
.ai-lab,
.contact {
  padding: 70px 0 47px;
}

.practice {
  padding-top: 90px;
}

.section-heading {
  margin-bottom: 30px;
  padding-left: 4px;
}

.section-heading h2,
.contact h2 {
  max-width: 980px;
  margin: 10px 0 0;
  font-size: clamp(2.15rem, 4.7vw, 4.8rem);
  line-height: 1.04;
  letter-spacing: -0.08em;
  text-wrap: balance;
}

.research-title,
.practice-title {
  display: grid;
  gap: 10px;
}

.practice-title {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: clamp(18px, 2.4vw, 32px);
  max-width: none;
  white-space: nowrap;
}

.research-title span,
.practice-title span {
  color: var(--forest);
  font-size: clamp(2.2rem, 3.8vw, 3.65rem);
  font-weight: 850;
  line-height: 1.15;
  letter-spacing: -0.05em;
  white-space: nowrap;
  word-break: keep-all;
}

.research-title strong,
.practice-title strong {
  display: block;
  max-width: 1040px;
  color: var(--ink);
  font-size: clamp(1.9rem, 3.15vw, 3.1rem);
  font-weight: 850;
  line-height: 1.12;
  letter-spacing: -0.07em;
}

.practice-title strong {
  flex: 1 1 auto;
  max-width: none;
  font-size: clamp(1.42rem, 2.05vw, 2.05rem);
  white-space: nowrap;
}

html[lang="en"] .practice-title {
  align-items: center;
}

html[lang="en"] .practice-title strong {
  flex: 0 1 min(640px, 44vw);
  max-width: 640px;
  font-size: clamp(1.04rem, 1.32vw, 1.42rem);
  line-height: 1.1;
  letter-spacing: -0.055em;
  white-space: normal;
  text-wrap: balance;
}

.practice .section-heading h2,
.teaching .section-heading h2,
.ai-lab .section-heading h2 {
  max-width: 1080px;
  font-size: clamp(2.25rem, 4.15vw, 4.1rem);
  line-height: 1.1;
}

.section-heading p {
  max-width: 800px;
  color: rgba(6, 22, 21, 0.72);
  font-size: 1.04rem;
  line-height: 1.86;
}

.research .section-heading p {
  max-width: 1180px;
}

.research-map-wall {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
}

.research-map-wall article,
.paper-card,
.project-card,
.project-index,
.teaching-ledger,
.skill-card,
.contact-panel {
  position: relative;
  border: 1px solid var(--line);
  background: var(--glass);
  box-shadow: 0 24px 80px rgba(8, 44, 43, 0.1);
  backdrop-filter: blur(20px);
}

.research-map-wall article {
  overflow: hidden;
  border-radius: 34px;
}

.research-map-wall img {
  width: 100%;
  height: 340px;
  object-fit: cover;
}

.research-map-wall h3,
.project-copy h3,
.project-index h3,
.paper-title h3,
.skill-copy h3 {
  margin: 0;
  color: var(--deep);
  font-size: 1.65rem;
  letter-spacing: -0.05em;
}

.research-map-wall h3,
.research-map-wall p {
  padding-inline: 24px;
}

.research-map-wall h3 {
  padding-top: 22px;
}

.research-map-wall p {
  margin: 10px 0 24px;
  color: rgba(6, 22, 21, 0.7);
  line-height: 1.75;
}

.paper-section {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(8, 44, 43, 0.13);
  border-radius: 36px;
  background: rgba(248, 245, 235, 0.44);
  backdrop-filter: blur(18px);
}

.paper-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 8px 18px;
}

.paper-title p {
  max-width: 480px;
  margin: 0;
  color: rgba(6, 22, 21, 0.64);
  line-height: 1.65;
}

.paper-rail {
  display: grid;
  grid-auto-columns: minmax(280px, 360px);
  grid-auto-flow: column;
  grid-template-rows: repeat(2, minmax(250px, auto));
  gap: 14px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 2px 4px 16px;
  cursor: grab;
  scroll-snap-type: x proximity;
}

.paper-rail.is-dragging,
.teaching-ledger.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.paper-rail::-webkit-scrollbar,
.project-rail::-webkit-scrollbar,
.teaching-ledger::-webkit-scrollbar {
  height: 10px;
}

.paper-rail::-webkit-scrollbar-track,
.project-rail::-webkit-scrollbar-track,
.teaching-ledger::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(8, 44, 43, 0.08);
}

.paper-rail::-webkit-scrollbar-thumb,
.project-rail::-webkit-scrollbar-thumb,
.teaching-ledger::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(8, 44, 43, 0.24);
}

.paper-card {
  display: flex;
  min-height: 250px;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: 28px;
  scroll-snap-align: start;
}

.paper-card span,
.skill-copy span {
  color: var(--forest);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.paper-card h4 {
  margin: 12px 0;
  color: var(--deep);
  font-size: 1.08rem;
  line-height: 1.34;
}

.paper-card p {
  margin: 0;
  color: rgba(6, 22, 21, 0.62);
  font-size: 0.9rem;
  line-height: 1.58;
}

.paper-card a {
  display: inline-flex;
  width: fit-content;
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--paper);
  background: var(--deep);
  font-size: 0.84rem;
  font-weight: 850;
}

.thesis-card {
  color: var(--paper);
  background:
    linear-gradient(135deg, rgba(8, 44, 43, 0.96), rgba(14, 92, 85, 0.82)),
    var(--deep);
}

.thesis-card span,
.thesis-card h4,
.thesis-card p {
  color: var(--paper);
}

.thesis-card a {
  color: var(--deep);
  background: var(--mint);
}

.project-showcase {
  display: grid;
  gap: 16px;
}

.project-card {
  overflow: hidden;
  border-radius: 34px;
}

.project-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  min-height: 520px;
}

.project-image {
  overflow: hidden;
  background: rgba(8, 44, 43, 0.09);
}

.project-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 282px;
  object-fit: cover;
  transition: transform 900ms cubic-bezier(0.19, 1, 0.22, 1);
}

.project-card:hover .project-image img {
  transform: scale(1.055);
}

.project-rail {
  display: grid;
  grid-auto-columns: minmax(390px, 460px);
  grid-auto-flow: column;
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 2px 4px 18px;
  cursor: grab;
  scroll-snap-type: x mandatory;
}

.project-rail.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.project-rail .project-card {
  min-height: 570px;
  scroll-snap-align: start;
  background:
    linear-gradient(180deg, rgba(248, 245, 235, 0.94), rgba(248, 245, 235, 0.82)),
    var(--glass);
}

.project-rail .project-image img {
  height: 292px;
  min-height: 292px;
}

.project-rail::after {
  width: 12px;
  content: "";
}

.project-copy {
  padding: 28px;
}

.project-copy p {
  color: rgba(6, 22, 21, 0.72);
  line-height: 1.78;
}

.project-index {
  margin-top: 16px;
  padding: 26px;
  border-radius: 34px;
}

.project-index ul {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.project-index li {
  min-height: 86px;
  padding: 14px;
  border: 1px solid rgba(8, 44, 43, 0.12);
  border-radius: 20px;
  color: rgba(6, 22, 21, 0.72);
  background: rgba(255, 255, 255, 0.24);
  font-size: 0.9rem;
  line-height: 1.48;
}

.subsection-title {
  margin: 0 0 14px;
  color: var(--forest);
  font-size: clamp(1.55rem, 2.5vw, 2.35rem);
  letter-spacing: -0.055em;
}

.teaching-ledger {
  display: grid;
  grid-auto-columns: minmax(220px, 250px);
  grid-auto-flow: column;
  gap: 1px;
  overflow-x: auto;
  border-radius: 34px;
  background: rgba(8, 44, 43, 0.12);
  overscroll-behavior-inline: contain;
  cursor: grab;
  scroll-snap-type: x proximity;
}

.teaching-ledger article {
  min-height: 260px;
  padding: 22px;
  background: rgba(248, 245, 235, 0.72);
  scroll-snap-align: start;
}

.teaching-ledger span {
  color: var(--forest);
  font-size: 0.78rem;
  font-weight: 900;
}

.teaching-ledger strong {
  display: block;
  margin-top: 40px;
  color: var(--deep);
  font-size: 1.08rem;
  line-height: 1.35;
}

.teaching-ledger p {
  color: rgba(6, 22, 21, 0.64);
  font-size: 0.9rem;
  line-height: 1.62;
}

.skill-rail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  overflow: visible;
  padding-bottom: 0;
}

.skill-card {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 20px;
  min-height: 0;
  padding: 26px;
  border-radius: 34px;
  background:
    radial-gradient(circle at 90% 0%, rgba(112, 240, 216, 0.22), transparent 24rem),
    var(--glass);
}

.skill-copy p {
  color: rgba(6, 22, 21, 0.7);
  line-height: 1.75;
}

.route-map {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
  margin: 0;
  padding: 0;
  list-style: none;
}

.route-map::before {
  position: absolute;
  top: 50%;
  left: 5%;
  right: 5%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(14, 92, 85, 0.42), transparent);
}

.route-map li {
  position: relative;
  display: flex;
  min-height: 158px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
  border: 1px solid rgba(8, 44, 43, 0.13);
  border-radius: 20px;
  color: rgba(6, 22, 21, 0.76);
  background:
    linear-gradient(180deg, rgba(248, 245, 235, 0.42), rgba(248, 245, 235, 0.84)),
    rgba(248, 245, 235, 0.66);
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.45;
  overflow: hidden;
}

.route-map li::after {
  position: absolute;
  inset: auto 12px 12px;
  height: 3px;
  content: "";
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(13, 90, 83, 0.9), rgba(112, 240, 216, 0.78));
}

.route-map strong {
  display: block;
  margin-bottom: 8px;
  color: var(--deep);
  font-size: 1rem;
  letter-spacing: -0.05em;
}

.route-map span {
  display: block;
  padding-bottom: 14px;
}

.route-map li::before {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 8px;
  height: 8px;
  content: "";
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 22px rgba(112, 240, 216, 0.9);
  animation: pulse 2.4s ease-in-out infinite;
}

.contact-panel {
  overflow: hidden;
  padding: clamp(34px, 5.8vw, 76px);
  border-radius: 42px;
  background:
    linear-gradient(135deg, rgba(8, 44, 43, 0.93), rgba(14, 92, 85, 0.84)),
    var(--deep);
  color: var(--paper);
}

.contact-panel .section-kicker {
  color: var(--paper);
}

.contact-position {
  max-width: 1180px;
  margin: 0;
  padding: clamp(20px, 3.2vw, 38px);
  border: 1px solid rgba(248, 245, 235, 0.22);
  border-radius: 28px;
  color: rgba(248, 245, 235, 0.84);
  background:
    linear-gradient(135deg, rgba(248, 245, 235, 0.08), rgba(248, 245, 235, 0.02)),
    rgba(248, 245, 235, 0.05);
  font-size: clamp(1.16rem, 1.48vw, 1.44rem);
  font-weight: 760;
  line-height: 1.72;
  letter-spacing: -0.035em;
  backdrop-filter: blur(12px);
}

.contact-position span {
  display: block;
}

.contact-position span:nth-child(2) {
  white-space: nowrap;
}

.contact-position span + span {
  margin-top: 4px;
}

.contact-position span:last-child {
  color: var(--paper);
}

.contact-panel .button.ghost {
  border-color: rgba(248, 245, 235, 0.28);
  color: var(--paper);
  background: rgba(248, 245, 235, 0.08);
}

.contact-lines {
  margin-top: 28px;
  color: rgba(233, 244, 239, 0.78);
  font-weight: 800;
}

.contact-lines span {
  padding: 9px 12px;
  border: 1px solid rgba(248, 245, 235, 0.18);
  border-radius: 999px;
  background: rgba(248, 245, 235, 0.08);
}

.reveal,
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero .reveal {
  opacity: 0.08;
  transform: translateY(28px);
  transition: opacity 760ms ease, transform 760ms cubic-bezier(0.19, 1, 0.22, 1);
}

.hero .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 {
  transition-delay: 120ms;
}

.delay-2 {
  transition-delay: 220ms;
}

.delay-3 {
  transition-delay: 320ms;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-16px);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.88);
  }
  50% {
    opacity: 1;
    transform: scale(1.18);
  }
}

@media (max-width: 1120px) {
  .hero-index,
  .project-index ul {
    grid-template-columns: repeat(2, 1fr);
  }

  .teaching-ledger {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .nav {
    display: none;
  }

  .hero,
  .research-map-wall,
  .project-card.featured,
  .skill-card {
    grid-template-columns: 1fr;
  }

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

  .project-showcase {
    grid-template-columns: 1fr;
  }

  .project-rail {
    grid-auto-columns: minmax(320px, 82vw);
  }

  .skill-rail {
    grid-template-columns: 1fr;
  }

  .route-map {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .route-map::before {
    display: none;
  }
}

@media (max-width: 640px) {
  .section-shell {
    width: min(100% - 32px, 1180px);
  }

  .site-header {
    top: 12px;
    width: calc(100% - 32px);
    left: 50%;
    transform: translateX(-50%);
  }

  .hero {
    gap: 18px;
    padding-top: 108px;
  }

  .hero h1 {
    font-size: clamp(4.1rem, 18vw, 4.8rem);
  }

  .hero h1 span {
    width: auto;
    font-size: 1.78rem;
    line-height: 1.04;
    white-space: normal;
  }

  .hero-lede {
    max-width: 34ch;
    font-size: 0.98rem;
  }

  .profile-strip,
  .hero-index {
    max-width: none;
  }

  .hero-copy {
    max-width: 100%;
  }

  .profile-strip span {
    padding: 7px 9px;
    font-size: 0.78rem;
  }

  .hero-index article {
    min-height: auto;
    padding: 18px 20px;
  }

  .hero-index span {
    margin-top: 18px;
  }

  .hero-index,
  .project-index ul,
  .teaching-ledger {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 430px;
    overflow: hidden;
  }

  .network-card {
    width: 88vw;
    height: 88vw;
    min-height: 390px;
    border-radius: 30px;
    transform: translate(-50%, -50%);
  }

  .network-card::before {
    inset: 12px;
    border-radius: 22px;
  }

  .network-metric {
    width: 132px;
    padding: 14px;
  }

  .network-metric strong {
    font-size: 1.68rem;
  }

  .network-metric span {
    font-size: 0.7rem;
  }

  .network-metric-a {
    top: 36px;
    right: 12px;
  }

  .network-metric-b {
    bottom: 50px;
    left: 12px;
  }

  .network-hint {
    right: 14px;
    bottom: 14px;
    font-size: 0.68rem;
  }

  .graph-node text {
    font-size: 13px;
  }

  .graph-node.keyword text {
    font-size: 11.2px;
  }

  .section-heading h2,
  .contact h2 {
    font-size: 2.18rem;
    letter-spacing: -0.06em;
  }

  .research-title strong,
  .practice-title strong {
    font-size: 2rem;
  }

  .practice-title {
    display: grid;
    gap: 16px;
  }

  .practice-title strong {
    max-width: 100%;
    white-space: normal;
  }

  .practice-title,
  .contact-position span:nth-child(2) {
    white-space: normal;
  }

  .research,
  .practice,
  .teaching,
  .ai-lab,
  .contact {
    padding: 32px 0;
  }

  .research-map-wall img {
    height: 250px;
  }

  .paper-rail {
    grid-auto-columns: minmax(260px, 82vw);
  }

  .paper-title {
    display: block;
  }

  .project-copy,
  .project-index,
  .skill-card {
    padding: 20px;
  }

  .teaching-ledger {
    display: grid;
    grid-auto-flow: row;
    grid-auto-columns: unset;
    grid-template-columns: 1fr;
    gap: 12px;
    overflow: visible;
    border-radius: 28px;
    background: transparent;
    cursor: auto;
    scroll-snap-type: none;
  }

  .teaching-ledger article {
    min-height: auto;
    padding: 20px;
    border: 1px solid rgba(8, 44, 43, 0.13);
    border-radius: 24px;
    background: rgba(248, 245, 235, 0.74);
  }

  .teaching-ledger strong {
    margin-top: 16px;
    font-size: 1.05rem;
  }

  .teaching-ledger p {
    font-size: 0.9rem;
  }

  .skill-rail {
    gap: 12px;
  }

  .skill-card {
    border-radius: 28px;
  }

  .skill-copy h3 {
    font-size: 1.34rem;
    line-height: 1.22;
  }

  .skill-copy p {
    font-size: 0.94rem;
    line-height: 1.72;
  }

  .route-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .route-map li {
    min-height: 132px;
    padding: 14px 12px;
    font-size: 0.78rem;
    line-height: 1.5;
  }

  .route-map strong {
    font-size: 1.05rem;
  }

  .route-map span {
    padding-bottom: 12px;
  }

  .project-rail .project-card {
    min-height: auto;
  }

  .project-rail .project-image img {
    height: 230px;
    min-height: 230px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .cursor-glow,
  #city-canvas {
    display: none;
  }
}
