:root {
  --bg-base: #090b14;
  --bg-surface: rgba(17, 23, 42, 0.72);
  --bg-surface-strong: rgba(22, 30, 54, 0.88);
  --border-subtle: rgba(148, 163, 184, 0.16);
  --border-glow: rgba(56, 189, 248, 0.42);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-cyan: #38bdf8;
  --accent-indigo: #818cf8;
  --accent-pink: #f472b6;
  --accent-green: #34d399;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow-card: 0 24px 60px rgba(2, 6, 23, 0.55);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei UI", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  left: -999px;
  top: 12px;
  z-index: 999;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent-cyan);
  color: #06121e;
  font-weight: 700;
}

.skip-link:focus {
  left: 16px;
}

/* Ambient dark anime background */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 15%, rgba(56, 189, 248, 0.14), transparent 42%),
    radial-gradient(circle at 85% 20%, rgba(129, 140, 248, 0.16), transparent 44%),
    radial-gradient(circle at 60% 85%, rgba(244, 114, 182, 0.09), transparent 45%),
    linear-gradient(180deg, #090b14 0%, #0b1020 55%, #080a12 100%);
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
}

.glow-cyan {
  width: 420px;
  height: 420px;
  top: -120px;
  left: -80px;
  background: rgba(56, 189, 248, 0.28);
}

.glow-indigo {
  width: 480px;
  height: 480px;
  top: 8%;
  right: -140px;
  background: rgba(129, 140, 248, 0.25);
}

.glow-pink {
  width: 360px;
  height: 360px;
  bottom: -100px;
  left: 35%;
  background: rgba(244, 114, 182, 0.18);
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 90%);
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 11, 20, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-indigo));
  color: #070b14;
  font-weight: 900;
  font-size: 18px;
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.32);
}

.brand-dot,
.sky-dot {
  color: var(--accent-cyan);
}

#navigation {
  display: flex;
  align-items: center;
  gap: 6px;
}

#navigation a {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease, background 0.2s ease;
}

#navigation a:hover,
#navigation a.active {
  color: var(--text-primary);
  background: rgba(56, 189, 248, 0.12);
}

#navigation a.active {
  color: var(--accent-cyan);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.2s ease;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-2px);
}

.button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.button-primary {
  padding: 13px 24px;
  font-size: 15px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-indigo));
  color: #06101f;
  box-shadow: 0 12px 30px rgba(56, 189, 248, 0.28);
}

.button-primary:hover {
  box-shadow: 0 16px 36px rgba(56, 189, 248, 0.42);
}

.button-ghost {
  padding: 13px 22px;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.button-ghost:hover {
  border-color: var(--border-glow);
  background: rgba(56, 189, 248, 0.08);
}

.button-small {
  padding: 9px 16px;
  font-size: 13px;
  border-radius: 10px;
}

.button-small svg {
  width: 15px;
  height: 15px;
}

.button-soft {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(129, 140, 248, 0.24));
  border-color: rgba(56, 189, 248, 0.4);
  color: #e0f2fe;
}

.button-soft:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.34), rgba(129, 140, 248, 0.36));
}

.button-outline {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}

/* Hero Section */
.hero {
  padding: 68px 0 56px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 44px;
}

.hero.hero-centered {
  grid-template-columns: 1fr;
  padding: 86px 0 64px;
  max-width: 780px;
}

.compact-projects {
  grid-template-columns: minmax(290px, 460px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent-cyan);
  text-transform: uppercase;
}

.tiny-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 12px var(--accent-cyan);
}

.hero h1 {
  margin: 0;
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero h1 span {
  background: linear-gradient(120deg, #e0f2fe 0%, #38bdf8 45%, #a78bfa 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-description {
  margin: 18px 0 22px;
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 520px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.hero-badges span {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid var(--border-subtle);
  color: #cbd5e1;
}

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

/* Preview Window */
.preview-window {
  background: var(--bg-surface-strong);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.72), 0 0 40px rgba(56, 189, 248, 0.1);
  backdrop-filter: blur(20px);
}

.preview-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(9, 13, 26, 0.85);
  border-bottom: 1px solid var(--border-subtle);
}

.window-dots {
  display: flex;
  gap: 7px;
}

.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #fb7185; }
.dot-amber { background: #fbbf24; }
.dot-green { background: #34d399; }

.preview-window-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.preview-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.14);
  color: var(--accent-green);
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.preview-stage {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #05070e;
  overflow: hidden;
}

.preview-stage video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-hud {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(9, 11, 20, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
}

.hud-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #e2e8f0;
}

.hud-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

.hud-key {
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 11px;
}

.preview-statusbar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-subtle);
  border-top: 1px solid var(--border-subtle);
}

.preview-statusbar > div {
  background: rgba(13, 18, 34, 0.94);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.preview-statusbar strong {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.preview-statusbar span {
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 600;
}

/* Sections */
.showcase,
.works,
.about {
  padding: 40px 0;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.section-name {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.26);
  color: var(--accent-cyan);
}

.section-icon svg {
  width: 18px;
  height: 18px;
}

.section-heading h2,
.section-heading h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.section-heading h2 span,
.section-heading h3 span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 8px;
  letter-spacing: 0.08em;
}

.section-number {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature-card {
  padding: 22px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(16px);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
}

.feature-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-indigo);
  margin-bottom: 8px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.feature-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

/* Project Cards */
.project-section + .project-section {
  margin-top: 44px;
}

.app-projects,
.game-projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 20px;
}

.project-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: 0 28px 65px rgba(2, 6, 23, 0.72), 0 0 32px rgba(56, 189, 248, 0.12);
}

.project-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.project-image {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  overflow: hidden;
  padding: 8px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.24);
  flex-shrink: 0;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.project-status {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.28);
}

.project-subtitle {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-indigo);
}

.project-card h4 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 700;
}

.project-description {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--text-secondary);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 20px;
}

.project-tags span {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--border-subtle);
  color: #cbd5e1;
}

.project-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pending-link {
  font-size: 12px;
  color: var(--text-muted);
}

.download-meta {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--accent-cyan);
}

.project-resources {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
  font-size: 13px;
}

.project-resources a {
  color: var(--text-secondary);
  transition: color 0.18s ease;
}

.project-resources a:hover {
  color: var(--accent-cyan);
}

.download-note {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.placeholder-note {
  margin: 28px 0 0;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: rgba(148, 163, 184, 0.06);
  border: 1px solid var(--border-subtle);
  font-size: 13px;
  color: var(--text-secondary);
}

/* About */
.about-card {
  padding: 34px 32px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(17, 23, 42, 0.85), rgba(30, 27, 75, 0.6));
  border: 1px solid rgba(129, 140, 248, 0.25);
  backdrop-filter: blur(18px);
}

.about-card h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3vw, 30px);
}

.about-card p:last-child {
  margin: 0;
  color: var(--text-secondary);
  max-width: 640px;
}

/* Footer */
.site-footer {
  margin-top: 32px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--border-subtle);
  font-size: 13px;
  color: var(--text-muted);
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-brand {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
}

.footer-brand span {
  color: var(--accent-cyan);
}

.footer-copy {
  margin: 4px 0 0;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

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

.footer-registration {
  margin: 18px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  font-size: 12px;
}

.footer-registration a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.footer-registration a:hover {
  color: var(--text-secondary);
}

/* Mobile Responsive */
@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 42px 0 32px;
    gap: 32px;
  }

  .hero.hero-centered {
    padding: 56px 0 40px;
  }

  .compact-projects {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .container {
    width: calc(100% - 28px);
  }

  .menu-toggle {
    display: inline-flex;
  }

  #navigation {
    position: fixed;
    top: 70px;
    left: 14px;
    right: 14px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(13, 18, 34, 0.96);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.6);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    display: none;
  }

  #navigation.is-open {
    display: flex;
  }

  #navigation a {
    padding: 12px 14px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .button {
    width: 100%;
  }

  .mobile-break {
    display: none;
  }

  .preview-statusbar {
    grid-template-columns: 1fr;
  }

  .about-card {
    padding: 24px 20px;
  }

  .footer-top,
  .footer-registration {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
