@font-face {
  font-family: "ShelterScript";
  src: url("./assets/YingHuaYuLuo-subfont.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #040510;
  --panel: rgba(12, 18, 34, 0.56);
  --panel-strong: rgba(17, 23, 44, 0.72);
  --line: rgba(196, 218, 255, 0.24);
  --text: #f7fbff;
  --muted: #b7c7dc;
  --cyan: #7dd3fc;
  --violet: #c084fc;
  --rose: #f0abfc;
  --gold: #fde68a;
  --green: #86efac;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
  --radius: 8px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

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

body {
  min-width: 320px;
  margin: 0;
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 12%, rgba(125, 211, 252, 0.20), transparent 32%),
    radial-gradient(circle at 84% 20%, rgba(192, 132, 252, 0.18), transparent 30%),
    radial-gradient(circle at 48% 92%, rgba(253, 230, 138, 0.11), transparent 32%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.75;
  letter-spacing: 0;
}

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

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

#starfield,
.aurora {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  transform: translateZ(0);
  will-change: transform;
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

#starfield {
  display: block;
  z-index: 0;
}

.aurora {
  z-index: 1;
  background:
    linear-gradient(115deg, transparent 0 20%, rgba(125, 211, 252, 0.08) 34%, transparent 50% 100%),
    linear-gradient(35deg, transparent 0 28%, rgba(240, 171, 252, 0.08) 44%, transparent 64% 100%);
  opacity: 0.78;
}

.side-nav {
  position: fixed;
  z-index: 30;
  top: 50%;
  left: 24px;
  width: 112px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  transform: translateY(-50%);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(7, 11, 24, 0.58);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.side-nav a {
  position: relative;
  min-height: 34px;
  display: grid;
  align-items: center;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.side-nav a::before {
  content: "";
  position: absolute;
  left: 5px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.4;
}

.side-nav a:hover,
.side-nav a.active {
  color: var(--text);
  background: linear-gradient(90deg, rgba(125, 211, 252, 0.18), rgba(192, 132, 252, 0.10));
  transform: translateX(3px);
}

.side-nav a.active::before {
  box-shadow: 0 0 14px var(--cyan);
  opacity: 1;
}

.nav-divider {
  height: 1px;
  margin: 7px 6px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

main,
.site-footer {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100% - 280px));
  margin-left: auto;
  margin-right: auto;
}

main {
  display: grid;
  gap: 28px;
  padding: 36px 0 28px;
}

section {
  min-height: 88vh;
  scroll-margin-top: 22px;
}

.section-panel,
.glass-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.035)),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.section-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 6vw, 76px);
}

.hero {
  position: relative;
  min-height: calc(100vh - 72px);
  overflow: hidden;
}

.hero::after,
.section-panel::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(125, 211, 252, 0.42), rgba(240, 171, 252, 0.34), transparent);
  opacity: 0.75;
}

.window-dots {
  position: absolute;
  top: 22px;
  left: 22px;
  display: flex;
  gap: 9px;
}

.window-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  box-shadow: 0 0 16px currentColor;
}

.window-dots span:nth-child(1) {
  color: #ff6b8b;
  background: #ff6b8b;
}

.window-dots span:nth-child(2) {
  color: #f8d56a;
  background: #f8d56a;
}

.window-dots span:nth-child(3) {
  color: #77efb5;
  background: #77efb5;
}

.eyebrow,
.kicker {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 14px;
  font-family: Georgia, "Times New Roman", "Songti SC", "Noto Serif CJK SC", serif;
  font-size: clamp(36px, 5.8vw, 64px);
  font-weight: 500;
  line-height: 1.28;
  text-shadow: 0 0 22px rgba(125, 211, 252, 0.42), 0 18px 60px rgba(0, 0, 0, 0.65);
}

.subtitle {
  max-width: 760px;
  margin-bottom: 32px;
  color: var(--muted);
  font-family: "ShelterScript", Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 5.2vw, 68px);
  line-height: 1.08;
  text-shadow: 0 0 20px rgba(125, 211, 252, 0.36), 0 14px 42px rgba(0, 0, 0, 0.52);
}

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

.glass-button {
  min-height: 44px;
  display: inline-grid;
  place-items: center;
  padding: 0 18px;
  border: 1px solid rgba(125, 211, 252, 0.38);
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.16);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.glass-button:hover {
  border-color: rgba(240, 171, 252, 0.72);
  background: rgba(240, 171, 252, 0.16);
  transform: translateY(-2px);
}

.glass-button.quiet {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  gap: 28px;
  align-items: stretch;
}

.copy-block {
  padding: clamp(28px, 5vw, 54px);
}

.copy-block h2,
.section-heading h2 {
  margin-bottom: 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 5vw, 58px);
  font-weight: 500;
  line-height: 1.12;
  text-shadow: 0 0 28px rgba(125, 211, 252, 0.28);
}

.copy-block p,
.section-heading p,
.skill-card p,
.orbital-card p,
.mini-card span,
.contact-card span {
  color: var(--muted);
}

.about-text {
  max-width: 720px;
  margin-top: 28px;
  color: var(--muted);
  font-size: clamp(18px, 1.7vw, 24px);
  font-weight: 700;
  line-height: 1.85;
}

.about-text p {
  margin-bottom: 16px;
}

.portrait {
  position: relative;
  min-height: 470px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 34px;
}

.portrait img {
  width: min(280px, 76vw);
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  box-shadow: 0 0 55px rgba(125, 211, 252, 0.22), 0 28px 90px rgba(0, 0, 0, 0.5);
}

.orbit-ring {
  position: absolute;
  width: 74%;
  aspect-ratio: 1;
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 50%;
  transform: rotateX(68deg) rotateZ(-22deg);
}

.ring-two {
  width: 94%;
  border-color: rgba(240, 171, 252, 0.18);
  transform: rotateX(64deg) rotateZ(28deg);
}

.section-heading {
  max-width: 740px;
  margin-bottom: 28px;
}

.skill-grid,
.orbital-grid,
.contact-grid,
.mini-grid {
  display: grid;
  gap: 16px;
}

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

.skill-card,
.contact-card,
.orbital-card,
.mini-card {
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.skill-card:hover,
.contact-card:hover,
.orbital-card:hover,
.mini-card:hover {
  border-color: rgba(125, 211, 252, 0.48);
  background:
    linear-gradient(145deg, rgba(125, 211, 252, 0.13), rgba(240, 171, 252, 0.075)),
    var(--panel-strong);
  transform: translateY(-3px);
}

.skill-card {
  padding: 20px;
}

.skill-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.skill-top h3,
.orbital-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
}

.skill-top span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.progress-line {
  height: 18px;
  display: grid;
  align-items: center;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.11) 0 1px, transparent 1px 12px),
    rgba(0, 0, 0, 0.18);
}

.progress-line span {
  width: calc(var(--level) * 1%);
  height: 100%;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent), transparent 48%), var(--accent)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.18) 0 7px, transparent 7px 12px);
  box-shadow: 0 0 22px color-mix(in srgb, var(--accent), transparent 42%);
}

.contact-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.contact-card {
  min-height: 184px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
  padding: 22px;
  text-align: center;
}

.contact-card img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(125, 211, 252, 0.28));
}

.contact-card strong,
.mini-card strong {
  font-size: 18px;
}

.contact-card span,
.mini-card span {
  font-size: 13px;
  line-height: 1.5;
}

.orbital-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.orbital-card,
.mini-card {
  min-height: 190px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
  padding: 22px;
  text-align: center;
}

.orbital-card img,
.mini-card img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 24px rgba(125, 211, 252, 0.18);
}

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

.site-footer {
  padding: 32px 0 50px;
  color: var(--muted);
  text-align: center;
}

.site-footer h2 {
  margin-bottom: 8px;
  font-family: "ShelterScript", Georgia, serif;
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 500;
  color: var(--text);
}

.site-footer small {
  color: rgba(223, 235, 255, 0.62);
}

.site-footer strong {
  color: var(--gold);
  font-size: 1.08em;
}

@media (max-width: 1100px) {
  .side-nav {
    top: auto;
    right: 14px;
    bottom: 14px;
    left: 14px;
    width: auto;
    max-height: none;
    flex-direction: row;
    align-items: center;
    transform: none;
    overflow-x: auto;
  }

  .side-nav a {
    flex: 0 0 auto;
  }

  .side-nav a::before,
  .nav-divider {
    display: none;
  }

  main,
  .site-footer {
    width: min(100% - 28px, 920px);
    margin-left: auto;
    margin-right: auto;
  }

  main {
    padding-bottom: 92px;
  }

  .site-footer {
    padding-bottom: 118px;
  }

  .section-grid,
  .skill-grid,
  .contact-grid,
  .orbital-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .portrait {
    min-height: 320px;
  }
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 16px;
  }

  .section-panel,
  .glass-card {
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.018)),
      rgba(9, 14, 28, 0.42);
    box-shadow: 0 16px 46px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  section {
    min-height: auto;
  }

  .section-panel {
    padding: 28px 18px;
  }

  .hero {
    min-height: calc(100vh - 118px);
    padding-top: 74px;
  }

  h1 {
    font-size: clamp(30px, 9.5vw, 42px);
    line-height: 1.34;
  }

  .subtitle {
    font-size: clamp(28px, 11vw, 42px);
    line-height: 1.12;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    max-width: 260px;
  }

  .glass-button {
    width: 100%;
    min-height: 46px;
  }

  .section-grid,
  .skill-grid,
  .contact-grid,
  .orbital-grid,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .copy-block {
    padding: 24px 18px;
  }

  .copy-block h2,
  .section-heading h2 {
    font-size: clamp(28px, 10vw, 42px);
  }

  .about-text {
    font-size: clamp(16px, 4.7vw, 20px);
    line-height: 1.8;
  }

  .portrait {
    min-height: 280px;
  }

  .contact-card,
  .orbital-card,
  .mini-card {
    min-height: 156px;
  }
}

@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;
  }
}
