:root {
  --bg: #06080f;
  --panel: rgba(12, 18, 32, 0.72);
  --panel-strong: rgba(15, 24, 42, 0.92);
  --text: #eef6ff;
  --muted: #95a3b8;
  --line: rgba(144, 238, 255, 0.18);
  --cyan: #4de7ff;
  --green: #73ffb7;
  --pink: #ff6bd6;
  --violet: #8f7dff;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 16% 12%, rgba(77, 231, 255, 0.16), transparent 28rem),
    radial-gradient(circle at 85% 18%, rgba(255, 107, 214, 0.12), transparent 24rem),
    linear-gradient(180deg, #05070d 0%, #080b14 46%, #05070d 100%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  content: "";
  background-image:
    linear-gradient(rgba(77, 231, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 231, 255, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 82%);
}

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

#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.aurora {
  position: fixed;
  z-index: -1;
  width: 34rem;
  height: 34rem;
  border-radius: 999px;
  filter: blur(72px);
  opacity: 0.35;
  pointer-events: none;
  animation: floatAura 10s ease-in-out infinite alternate;
}

.aurora-one {
  top: 10%;
  left: -14rem;
  background: rgba(77, 231, 255, 0.28);
}

.aurora-two {
  right: -16rem;
  bottom: 12%;
  background: rgba(115, 255, 183, 0.18);
  animation-delay: -3s;
}

.scanline {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.09;
  background: linear-gradient(to bottom, transparent 50%, rgba(255, 255, 255, 0.12) 51%, transparent 52%);
  background-size: 100% 8px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 20px 0;
  backdrop-filter: blur(18px);
}

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

.brand {
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(77, 231, 255, 0.38);
  border-radius: 8px;
  color: var(--cyan);
  background: rgba(77, 231, 255, 0.08);
  box-shadow: 0 0 26px rgba(77, 231, 255, 0.2);
}

.nav-links {
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(7, 10, 18, 0.62);
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  transition:
    color 180ms ease,
    background 180ms ease;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(77, 231, 255, 0.12);
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.72fr);
  gap: 44px;
  min-height: calc(100vh - 78px);
  align-items: center;
  padding-top: 56px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: clamp(56px, 9vw, 116px);
  line-height: 0.9;
  letter-spacing: 0;
}

h1 span {
  display: block;
  margin-top: 16px;
  font-size: clamp(32px, 5vw, 66px);
  color: transparent;
  background: linear-gradient(90deg, var(--cyan), var(--green), var(--pink));
  background-clip: text;
  -webkit-background-clip: text;
}

.hero-lead {
  max-width: 700px;
  margin-bottom: 24px;
  color: #c5d3e4;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

.typed-line {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--cyan);
  background: rgba(77, 231, 255, 0.07);
  font-family: "Cascadia Code", Consolas, monospace;
  box-shadow: inset 0 0 24px rgba(77, 231, 255, 0.08);
}

.cursor {
  width: 8px;
  height: 20px;
  background: var(--green);
  animation: blink 1s steps(2) infinite;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.hero-actions a {
  position: relative;
  overflow: hidden;
  padding: 13px 20px;
  border: 1px solid rgba(77, 231, 255, 0.34);
  border-radius: 8px;
  background: rgba(77, 231, 255, 0.1);
  font-weight: 700;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.hero-actions a:last-child {
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.05);
}

.hero-actions a:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 44px rgba(77, 231, 255, 0.16);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(77, 231, 255, 0.12), transparent 40%),
    var(--panel);
  box-shadow: var(--shadow);
}

.hero-panel::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.12), transparent 45%);
  transform: translateX(-120%);
  animation: panelSweep 5s ease-in-out infinite;
}

.orbit-wrap {
  position: relative;
  display: grid;
  width: min(100%, 330px);
  aspect-ratio: 1;
  margin: 10px auto 34px;
  place-items: center;
}

.orbit,
.core {
  position: absolute;
  border-radius: 999px;
}

.orbit {
  border: 1px solid rgba(77, 231, 255, 0.28);
}

.orbit::after {
  position: absolute;
  top: 18%;
  left: 12%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  content: "";
  background: var(--green);
  box-shadow: 0 0 22px var(--green);
}

.orbit-a {
  inset: 9%;
  animation: rotate 10s linear infinite;
}

.orbit-b {
  inset: 22%;
  transform: rotate(70deg);
  animation: rotateReverse 7s linear infinite;
}

.core {
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  color: #071019;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  font-size: 34px;
  font-weight: 900;
  box-shadow:
    0 0 38px rgba(77, 231, 255, 0.45),
    inset 0 0 24px rgba(255, 255, 255, 0.42);
}

.signal-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.signal-grid div,
.skill-card,
.project-card,
.timeline-item,
.info-card {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: var(--panel);
  backdrop-filter: blur(16px);
}

.signal-grid div {
  padding: 18px;
}

.signal-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--cyan);
  font-size: 28px;
}

.signal-grid span,
.section-heading p,
.skill-card p,
.project-card p,
.project-card li,
.timeline-item p,
.info-card p {
  color: var(--muted);
  line-height: 1.75;
}

.section-heading {
  max-width: 680px;
  margin-bottom: 34px;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(30px, 5vw, 54px);
  letter-spacing: 0;
}

.skills-grid,
.project-grid,
.footer-grid {
  display: grid;
  gap: 16px;
}

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

.skill-card {
  position: relative;
  overflow: hidden;
  min-height: 228px;
  padding: 24px;
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    background 220ms ease;
}

.skill-card::before,
.project-card::before,
.info-card::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(77, 231, 255, 0.18), transparent 16rem);
  transition: opacity 180ms ease;
}

.skill-card:hover,
.project-card:hover,
.info-card:hover {
  transform: translateY(-6px);
  border-color: rgba(77, 231, 255, 0.34);
  background: var(--panel-strong);
}

.skill-card:hover::before,
.project-card:hover::before,
.info-card:hover::before {
  opacity: 1;
}

.skill-card span {
  display: inline-block;
  margin-bottom: 30px;
  color: var(--cyan);
  font-family: "Cascadia Code", Consolas, monospace;
}

.skill-card h3,
.project-card h3,
.timeline-item h3,
.info-card h3 {
  position: relative;
  margin-bottom: 12px;
  font-size: 22px;
}

.skill-card p,
.project-card p,
.timeline-item p,
.info-card p {
  position: relative;
  margin-bottom: 0;
}

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

.project-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  box-shadow: 0 14px 52px rgba(0, 0, 0, 0.24);
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    background 220ms ease;
}

.project-top {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 13px;
}

.project-top strong {
  padding: 6px 10px;
  border: 1px solid rgba(115, 255, 183, 0.26);
  border-radius: 999px;
  color: var(--green);
  background: rgba(115, 255, 183, 0.08);
}

.project-card ul {
  position: relative;
  display: grid;
  gap: 9px;
  margin: 18px 0 0;
  padding-left: 18px;
}

.project-card li::marker {
  color: var(--cyan);
}

.timeline {
  position: relative;
  display: grid;
  gap: 18px;
}

.timeline::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 13px;
  width: 1px;
  content: "";
  background: linear-gradient(to bottom, transparent, var(--cyan), transparent);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 20px;
  padding: 24px;
}

.dot {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  margin-top: 2px;
  border: 1px solid rgba(77, 231, 255, 0.42);
  border-radius: 50%;
  background: #06111c;
  box-shadow: 0 0 0 7px rgba(77, 231, 255, 0.06);
}

.timeline-item.is-visible .dot {
  background: var(--cyan);
  box-shadow:
    0 0 0 7px rgba(77, 231, 255, 0.1),
    0 0 24px rgba(77, 231, 255, 0.7);
}

time {
  display: block;
  margin-bottom: 8px;
  color: var(--green);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 14px;
}

.footer-section {
  padding-bottom: 64px;
}

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

.info-card {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  padding: 24px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 38px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 14px;
}

.site-footer a {
  color: var(--cyan);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 700ms ease,
    transform 700ms ease;
  transition-delay: var(--delay, 0ms);
}

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

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes floatAura {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(42px, -34px, 0) scale(1.08);
  }
}

@keyframes panelSweep {
  0%,
  52% {
    transform: translateX(-120%);
  }
  82%,
  100% {
    transform: translateX(120%);
  }
}

@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}

@keyframes rotateReverse {
  to {
    transform: rotate(-360deg);
  }
}

@media (max-width: 920px) {
  .site-header {
    align-items: flex-start;
    gap: 14px;
  }

  .nav-links {
    max-width: 70%;
    overflow-x: auto;
  }

  .hero,
  .skills-grid,
  .project-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-panel {
    max-width: 560px;
  }
}

@media (max-width: 620px) {
  .site-header,
  .section-shell,
  .site-footer {
    width: min(100% - 28px, 1180px);
  }

  .site-header {
    position: relative;
    flex-direction: column;
    padding-top: 16px;
  }

  .nav-links {
    width: 100%;
    max-width: none;
    justify-content: space-between;
    border-radius: 8px;
  }

  .nav-links a {
    padding: 8px 10px;
    font-size: 13px;
  }

  .section-shell {
    padding: 64px 0;
  }

  .hero {
    padding-top: 30px;
  }

  h1 {
    font-size: clamp(48px, 18vw, 72px);
  }

  h1 span {
    font-size: clamp(28px, 11vw, 42px);
  }

  .typed-line {
    width: 100%;
    font-size: 13px;
  }

  .hero-actions a {
    flex: 1 1 140px;
    text-align: center;
  }

  .hero-panel,
  .skill-card,
  .project-card,
  .timeline-item,
  .info-card {
    padding: 20px;
  }

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

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

  .site-footer {
    flex-direction: column;
    gap: 10px;
  }
}

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