:root {
  --bg: #0d0d0f;
  --panel: rgba(21, 21, 28, 0.88);
  --panel-strong: #1a1a1e;
  --text: #f9f6f0;
  --muted: #a0a0b0;
  --orange: #e8894a;
  --blue: #00d4ff;
  --pink: #ff6b9d;
  --purple: #b77cff;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --max-width: 1200px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "Noto Sans SC", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(232, 137, 74, 0.16), transparent 30%),
    radial-gradient(circle at top right, rgba(0, 212, 255, 0.14), transparent 25%),
    linear-gradient(180deg, #09090b 0%, #0d0d0f 50%, #12121a 100%);
  color: var(--text);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0;
}

ul {
  margin: 0;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 3px 3px, 4px 4px;
  mix-blend-mode: soft-light;
}

.site-header,
.section,
.site-footer {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(232, 137, 74, 0.24), rgba(183, 124, 255, 0.2));
  font-family: "Cinzel", serif;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text strong {
  font-size: 1rem;
}

.brand-text small,
.eyebrow,
.card-label,
.feature-tag,
.page-kicker {
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.nav a,
.footer-links a {
  color: var(--muted);
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.nav a {
  padding: 10px 14px;
  border-radius: 999px;
}

.nav a:hover,
.nav a.is-active,
.footer-links a:hover,
.resource-card a:hover,
.card-link:hover {
  color: var(--blue);
}

.nav a.is-active {
  background: rgba(255, 255, 255, 0.06);
}

.danmaku-toggle,
.btn {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.danmaku-toggle {
  padding: 12px 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  font-weight: 600;
}

.btn:hover,
.danmaku-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25);
}

.btn-primary {
  color: #111;
  background: linear-gradient(135deg, var(--orange), #ffb678);
}

.btn-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}

.section {
  padding: 56px 0;
}

.hero,
.page-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 40px;
}

.hero {
  min-height: calc(100vh - 84px);
}

.page-hero {
  min-height: 54vh;
  padding-top: 24px;
}

.hero-copy h1,
.section-heading h2,
.feature-card h2,
.page-hero-copy h1,
.hero-stat-box h2 {
  margin: 12px 0 16px;
  font-family: "Cinzel", "Noto Sans SC", serif;
  line-height: 1.08;
}

.hero-copy h1,
.page-hero-copy h1 {
  font-size: clamp(2.8rem, 6vw, 5rem);
}

.hero-lead,
.section-heading p,
.content-card p,
.project-copy p,
.resource-card p,
.mini-card p,
.about-copy p,
.page-hero-copy p,
.hero-stat-box p,
.card-list li,
.check-list li {
  color: var(--muted);
  line-height: 1.8;
}

.hero-actions,
.section-actions {
  display: flex;
  gap: 14px;
  margin: 30px 0 0;
  flex-wrap: wrap;
}

.hero-stats,
.metric-row,
.tag-list {
  display: flex;
  gap: 18px;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
}

.hero-stats {
  margin: 34px 0 0;
}

.hero-stats li,
.metric-pill {
  min-width: 130px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.hero-stats strong,
.metric-pill strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.8rem;
  color: var(--orange);
}

.hero-panel,
.page-hero-panel {
  position: relative;
}

.terminal-card,
.feature-card,
.content-card,
.project-card,
.resource-card,
.mini-card,
.avatar-card,
.hero-stat-box,
.detail-card,
.quote-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.terminal-card,
.hero-stat-box,
.detail-card,
.quote-card {
  padding: 22px;
}

.terminal-top {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.terminal-top span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.terminal-top span:first-child {
  background: #ff6b6b;
}

.terminal-top span:nth-child(2) {
  background: #ffd166;
}

.terminal-top span:last-child {
  background: #06d6a0;
}

.terminal-body {
  font-family: "Fira Code", "JetBrains Mono", monospace;
  line-height: 1.9;
  color: #d7f7ff;
}

.spotlight {
  position: absolute;
  right: -10%;
  top: 10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.24), transparent 60%);
  filter: blur(20px);
  animation: drift 7s ease-in-out infinite alternate;
}

.dual-cards,
.content-grid,
.about-layout,
.detail-grid,
.timeline-grid {
  display: grid;
  gap: 22px;
}

.dual-cards,
.detail-grid {
  grid-template-columns: repeat(2, 1fr);
}

.feature-card,
.content-card,
.resource-card,
.mini-card {
  padding: 28px;
}

.feature-card::after,
.content-card::after,
.resource-card::after,
.project-card::after,
.avatar-card::after,
.detail-card::after {
  content: "";
  position: absolute;
  inset: auto -30% -40% auto;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(183, 124, 255, 0.18), transparent 65%);
  pointer-events: none;
}

.section-heading {
  margin-bottom: 26px;
  max-width: 720px;
}

.section-heading h2 {
  font-size: clamp(2rem, 3vw, 3rem);
}

.three-cols {
  grid-template-columns: repeat(3, 1fr);
}

.four-cols {
  grid-template-columns: repeat(4, 1fr);
}

.projects-grid {
  grid-template-columns: repeat(2, 1fr);
}

.project-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 280px;
}

.poster {
  min-height: 100%;
  background-size: cover;
}

.poster-orange {
  background:
    linear-gradient(180deg, rgba(232, 137, 74, 0.15), rgba(0, 0, 0, 0.65)),
    radial-gradient(circle at 30% 20%, rgba(255, 205, 139, 0.6), transparent 35%),
    #24160f;
}

.poster-blue {
  background:
    linear-gradient(180deg, rgba(0, 212, 255, 0.14), rgba(0, 0, 0, 0.65)),
    radial-gradient(circle at 60% 20%, rgba(183, 124, 255, 0.45), transparent 30%),
    #111a24;
}

.poster-purple {
  background:
    linear-gradient(180deg, rgba(183, 124, 255, 0.18), rgba(0, 0, 0, 0.65)),
    radial-gradient(circle at 30% 30%, rgba(255, 107, 157, 0.35), transparent 35%),
    #17111f;
}

.project-copy {
  padding: 28px;
}

.project-copy ul,
.card-list,
.check-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0;
  list-style: none;
}

.project-copy li,
.card-list li,
.check-list li,
.tag-list li {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 0.92rem;
}

.resource-card a,
.card-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--orange);
  font-weight: 600;
}

.about-layout {
  grid-template-columns: 340px 1fr;
  align-items: center;
}

.avatar-card {
  min-height: 360px;
  display: grid;
  place-items: center;
}

.avatar-placeholder {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.4);
  display: grid;
  place-items: center;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.hero-stat-box h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.hero-stat-box .metric-row {
  margin-top: 24px;
}

.metric-row {
  margin: 18px 0 0;
}

.metric-pill {
  flex: 1 1 140px;
}

.timeline-grid {
  grid-template-columns: repeat(3, 1fr);
}

.detail-card h3,
.content-card h3,
.project-copy h3,
.resource-card h3,
.mini-card h3,
.quote-card h3 {
  margin: 12px 0;
}

.quote-card blockquote {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.8;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 24px 0 40px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.danmaku-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 15;
}

.danmaku-item {
  position: absolute;
  right: -30%;
  white-space: nowrap;
  color: rgba(249, 246, 240, 0.78);
  text-shadow: 0 0 18px rgba(0, 212, 255, 0.25);
  animation: danmaku-move linear forwards;
  font-size: 0.95rem;
}

@keyframes danmaku-move {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-155vw);
  }
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(-18px, 24px, 0);
  }
}

@media (max-width: 980px) {
  .site-header,
  .site-footer {
    display: grid;
    justify-content: stretch;
  }

  .hero,
  .page-hero,
  .dual-cards,
  .three-cols,
  .four-cols,
  .projects-grid,
  .about-layout,
  .detail-grid,
  .timeline-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header,
  .section,
  .site-footer {
    width: min(calc(100% - 24px), var(--max-width));
  }

  .hero {
    min-height: auto;
    padding-top: 18px;
  }

  .hero-copy h1,
  .page-hero-copy h1 {
    font-size: 2.4rem;
  }

  .btn,
  .danmaku-toggle {
    width: 100%;
  }

  .hero-actions,
  .section-actions {
    flex-direction: column;
  }
}

