:root {
  color-scheme: dark;
  --bg: #07090d;
  --bg-2: #10151d;
  --panel: #151b24;
  --panel-2: #1e2632;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f4f0e8;
  --muted: #a8b0bd;
  --dim: #77808d;
  --gold: #f4c95d;
  --teal: #60d7c4;
  --red: #f06f63;
  --violet: #a88cff;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius: 8px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Segoe UI", Inter, ui-sans-serif, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(7, 9, 13, 0.92), rgba(7, 9, 13, 0.98)),
    linear-gradient(135deg, rgba(96, 215, 196, 0.08) 0%, transparent 38%),
    linear-gradient(225deg, rgba(240, 111, 99, 0.08) 0%, transparent 36%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent 72%);
}

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

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 48px);
  background: rgba(7, 9, 13, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

.brand {
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(244, 201, 93, 0.5);
  background: linear-gradient(135deg, rgba(244, 201, 93, 0.18), rgba(96, 215, 196, 0.12));
  color: var(--gold);
  border-radius: 6px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.nav {
  gap: 18px;
  color: var(--muted);
  font-size: 0.93rem;
}

.nav a {
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
}

.nav-cta {
  padding: 8px 12px;
  border: 1px solid rgba(244, 201, 93, 0.42);
  border-radius: 6px;
  color: var(--gold);
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 138px clamp(18px, 5vw, 72px) 56px;
}

.hero-media,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.08);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(7, 9, 13, 0.96) 0%, rgba(7, 9, 13, 0.76) 48%, rgba(7, 9, 13, 0.54) 100%),
    linear-gradient(180deg, rgba(7, 9, 13, 0.14) 0%, rgba(7, 9, 13, 0.94) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1040px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: 0;
  line-height: 1.05;
}

h1 {
  max-width: 900px;
  margin-bottom: 22px;
  font-size: 5.6rem;
}

h2 {
  max-width: 860px;
  margin-bottom: 0;
  font-size: 3.6rem;
}

h3 {
  font-size: 1.28rem;
}

.hero-copy {
  max-width: 760px;
  color: #d9dee6;
  font-size: 1.22rem;
}

.hero-actions,
.github-actions,
.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button,
.project-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 800;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover,
.button:focus-visible,
.project-links a:hover,
.project-links a:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--gold);
  color: #12100a;
}

.button-secondary,
.project-links a {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.button-secondary:hover,
.project-links a:hover {
  border-color: rgba(244, 201, 93, 0.42);
  background: rgba(255, 255, 255, 0.08);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 12px;
  max-width: 880px;
  margin: 34px 0 0;
}

.hero-stats div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 21, 30, 0.66);
}

.hero-stats dt {
  color: var(--gold);
  font-size: 1.22rem;
  font-weight: 900;
}

.hero-stats dd {
  margin: 2px 0 0;
  color: var(--muted);
}

.section {
  padding: clamp(62px, 9vw, 112px) clamp(18px, 5vw, 72px);
}

.section-heading {
  max-width: 940px;
  margin-bottom: 32px;
}

.intro-grid,
.project-grid,
.proof-grid {
  display: grid;
  gap: 16px;
}

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

.intro-grid article,
.project-card,
.system-panel,
.github-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025));
  box-shadow: var(--shadow);
}

.intro-grid article {
  padding: 24px;
}

.intro-grid p,
.project-card p,
.project-copy p,
.system-panel p,
.github-card p,
.footer {
  color: var(--muted);
}

.featured-project {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(320px, 0.84fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 22px;
}

.featured-project + .featured-project {
  margin-top: 26px;
}

.ace-feature {
  grid-template-columns: minmax(340px, 0.9fr) minmax(0, 1.1fr);
}

.project-visual {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0b0f15;
  box-shadow: var(--shadow);
}

.visual-main {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
}

.visual-character,
.visual-card {
  position: absolute;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45));
}

.visual-character {
  right: 6%;
  bottom: -4%;
  width: min(40%, 300px);
}

.visual-card {
  left: 6%;
  bottom: 6%;
  width: min(24%, 150px);
  border-radius: 6px;
}

.jianghu-stack {
  padding: 28px;
  background:
    linear-gradient(145deg, rgba(96, 215, 196, 0.14), transparent 48%),
    linear-gradient(315deg, rgba(240, 111, 99, 0.18), transparent 42%),
    #0b0f15;
}

.jianghu-stack::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.34;
}

.battlefield-scene {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 22%;
  height: 58%;
  border: 1px solid rgba(96, 215, 196, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(96, 215, 196, 0.16), rgba(15, 21, 30, 0.7)),
    linear-gradient(90deg, rgba(244, 201, 93, 0.08), rgba(168, 140, 255, 0.08));
  transform: perspective(760px) rotateX(54deg);
  transform-origin: center bottom;
  box-shadow: inset 0 0 46px rgba(96, 215, 196, 0.12), 0 40px 70px rgba(0, 0, 0, 0.36);
}

.battlefield-grid {
  position: absolute;
  inset: 8%;
  border: 1px solid rgba(244, 201, 93, 0.2);
  background-image:
    linear-gradient(90deg, rgba(244, 201, 93, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(244, 201, 93, 0.12) 1px, transparent 1px);
  background-size: 20% 20%;
}

.combatant {
  position: absolute;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border: 1px solid rgba(244, 240, 232, 0.2);
  border-radius: 50%;
  font-weight: 900;
  color: var(--text);
  background: rgba(7, 9, 13, 0.74);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.38);
}

.combatant-player {
  left: 18%;
  top: 44%;
  color: var(--teal);
}

.combatant-rival {
  right: 15%;
  top: 20%;
  color: var(--red);
}

.combat-line {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform-origin: left center;
}

.combat-line-one {
  left: 32%;
  top: 44%;
  width: 42%;
  transform: rotate(-16deg);
}

.combat-line-two {
  left: 28%;
  top: 58%;
  width: 50%;
  transform: rotate(14deg);
  opacity: 0.7;
}

.school-strip,
.status-panel {
  position: absolute;
  z-index: 1;
}

.school-strip {
  left: 28px;
  right: 28px;
  bottom: 26px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.school-strip span {
  padding: 12px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(7, 9, 13, 0.72);
  color: #dce2ea;
  font-size: 0.86rem;
  font-weight: 800;
  text-align: center;
}

.status-panel {
  top: 28px;
  right: 28px;
  min-width: 150px;
  padding: 14px;
  border: 1px solid rgba(244, 201, 93, 0.28);
  border-radius: 6px;
  background: rgba(7, 9, 13, 0.76);
}

.status-panel strong,
.status-panel span {
  display: block;
}

.status-panel strong {
  color: var(--gold);
  font-size: 1.15rem;
}

.status-panel span {
  color: var(--muted);
  font-size: 0.82rem;
}

.ace-stack {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px;
  background:
    linear-gradient(145deg, rgba(244, 201, 93, 0.12), transparent 42%),
    linear-gradient(315deg, rgba(168, 140, 255, 0.18), transparent 48%),
    #0b0f15;
}

.ace-stack::before {
  position: absolute;
  inset: 22px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.app-window {
  position: relative;
  z-index: 1;
  width: min(78%, 470px);
  padding: 18px;
  border: 1px solid rgba(96, 215, 196, 0.24);
  border-radius: 8px;
  background: rgba(15, 21, 30, 0.88);
  box-shadow: 0 28px 58px rgba(0, 0, 0, 0.42);
}

.window-bar {
  display: flex;
  gap: 7px;
  padding-bottom: 18px;
}

.window-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dim);
}

.window-bar span:first-child {
  background: var(--red);
}

.window-bar span:nth-child(2) {
  background: var(--gold);
}

.window-bar span:nth-child(3) {
  background: var(--teal);
}

.score-band {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(244, 201, 93, 0.16), rgba(96, 215, 196, 0.1));
}

.score-band strong {
  color: var(--text);
}

.score-band span {
  color: var(--gold);
  font-weight: 800;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.app-grid div {
  min-height: 88px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.045);
}

.app-grid span,
.app-grid strong,
.mobile-slab span,
.mobile-slab strong {
  display: block;
}

.app-grid span,
.mobile-slab span {
  color: var(--muted);
  font-size: 0.82rem;
}

.app-grid strong {
  margin-top: 8px;
  color: var(--teal);
  font-size: 1.35rem;
}

.mobile-slab {
  position: absolute;
  right: 7%;
  bottom: 8%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 132px;
  height: 238px;
  padding: 16px;
  border: 1px solid rgba(244, 201, 93, 0.28);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 36%),
    rgba(7, 9, 13, 0.88);
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.42);
}

.mobile-slab::before {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 42px;
  height: 5px;
  content: "";
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  transform: translateX(-50%);
}

.mobile-slab strong {
  color: var(--gold);
  font-size: 1.1rem;
}

.project-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid rgba(244, 201, 93, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(244, 201, 93, 0.09), rgba(96, 215, 196, 0.04)),
    var(--panel);
  box-shadow: var(--shadow);
}

.project-kicker,
.repo-type,
.repo-lang {
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-copy h3 {
  margin-bottom: 16px;
  font-size: 3rem;
}

.platform-list {
  display: grid;
  gap: 10px;
  margin: 6px 0 20px;
}

.platform-list article {
  padding: 13px 14px;
  border-left: 2px solid rgba(96, 215, 196, 0.54);
  background: rgba(255, 255, 255, 0.04);
}

.platform-list strong,
.platform-list span {
  display: block;
}

.platform-list strong {
  color: var(--text);
}

.platform-list span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.94rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 6px 0 22px;
  list-style: none;
}

.tag-list li {
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #cdd5df;
  font-size: 0.82rem;
}

.project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 330px;
  padding: 22px;
  overflow: hidden;
}

.project-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, var(--gold), var(--teal));
  opacity: 0.56;
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 26px;
}

.repo-lang {
  color: var(--teal);
  text-align: right;
}

.project-card p {
  flex: 1;
}

.systems-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
}

.system-panel {
  padding: clamp(24px, 4vw, 38px);
}

.system-panel h3 {
  margin-bottom: 14px;
  font-size: 1.6rem;
}

.harness-section {
  background: rgba(255, 255, 255, 0.02);
}

.accent-panel {
  background:
    linear-gradient(135deg, rgba(168, 140, 255, 0.14), rgba(96, 215, 196, 0.08)),
    var(--panel);
}

.timeline {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 26px 0 0;
  list-style: none;
}

.timeline li {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #dce2ea;
}

.timeline span {
  flex: 0 0 auto;
  color: var(--gold);
  font-weight: 900;
}

.proof-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 26px;
}

.proof-grid div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.16);
}

.proof-grid strong,
.proof-grid span {
  display: block;
}

.proof-grid strong {
  color: var(--text);
}

.proof-grid span {
  margin-top: 4px;
  color: var(--muted);
}

.github-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: clamp(24px, 5vw, 52px);
  background:
    linear-gradient(135deg, rgba(244, 201, 93, 0.12), rgba(240, 111, 99, 0.1)),
    var(--panel);
}

.github-card p {
  max-width: 760px;
  margin-bottom: 0;
  font-size: 1.05rem;
}

.github-actions {
  justify-content: flex-end;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  background: #05070a;
  font-size: 0.92rem;
}

.footer p {
  margin: 0;
}

@media (max-width: 1120px) {
  h1 {
    font-size: 4.4rem;
  }

  h2 {
    font-size: 3rem;
  }

  .project-copy h3 {
    font-size: 2.5rem;
  }

  .nav {
    gap: 14px;
  }
}

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

  .intro-grid,
  .featured-project,
  .ace-feature,
  .project-grid,
  .systems-layout,
  .github-card {
    grid-template-columns: 1fr;
  }

  .project-visual {
    min-height: 420px;
  }

  .github-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 12px 16px;
  }

  .brand span:last-child {
    display: none;
  }

  .hero {
    min-height: 88vh;
    padding: 110px 18px 42px;
  }

  h1 {
    font-size: 3.2rem;
  }

  h2 {
    font-size: 2.25rem;
  }

  .hero-copy {
    font-size: 1.05rem;
  }

  .hero-stats,
  .proof-grid,
  .app-grid {
    grid-template-columns: 1fr;
  }

  .project-visual {
    min-height: 330px;
  }

  .visual-character {
    width: 44%;
  }

  .visual-card {
    width: 28%;
  }

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

  .combatant {
    width: 68px;
    height: 68px;
    font-size: 0.8rem;
  }

  .status-panel {
    left: 20px;
    right: auto;
    top: 20px;
  }

  .app-window {
    width: 100%;
  }

  .mobile-slab {
    display: none;
  }

  .score-band {
    display: block;
  }

  .button,
  .project-links a {
    width: 100%;
  }

  .footer {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .nav-cta {
    padding: 8px 10px;
    font-size: 0.86rem;
  }

  h1 {
    font-size: 2.7rem;
  }

  .project-copy h3 {
    font-size: 2.05rem;
  }

  .school-strip {
    left: 18px;
    right: 18px;
    gap: 8px;
  }

  .school-strip span {
    padding: 9px 8px;
  }
}
