:root {
  --font-sans: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;

  --bg: #FBF8F2;
  --bg-soft: #F5EFE3;
  --surface: #FFFFFF;
  --surface-2: #FCF9F3;
  --text: #101827;
  --muted: #5F6B7A;
  --faint: #8B95A5;
  --gold: #8A5E12;
  --gold-bright: #B4861E;
  --gold-soft: #E8D6AE;
  --teal: #0F766E;
  --border: #E6DDCB;
  --border-strong: #D8C9A8;
  --nav-bg: rgba(251, 248, 242, 0.82);
  --panel: #0B1220;
  --panel-2: #070B13;
  --panel-text: #F3F6FB;
  --panel-muted: #9CA3AF;
  --shadow: 0 24px 70px rgba(16, 24, 39, 0.10);
  --shadow-soft: 0 10px 30px rgba(16, 24, 39, 0.06);
  --btn-bg: #8A5E12;
  --btn-text: #FFFFFF;
  --ring: rgba(138, 94, 18, 0.12);
}

[data-theme="dark"] {
  --bg: #070B13;
  --bg-soft: #0A101B;
  --surface: #0D1526;
  --surface-2: #101A2C;
  --text: #F3F6FB;
  --muted: #A7B1C2;
  --faint: #7F8BA0;
  --gold: #D4A24C;
  --gold-bright: #F0CD87;
  --gold-soft: #3A2E18;
  --teal: #2F8F83;
  --border: #1E2A3F;
  --border-strong: #2A3A55;
  --nav-bg: rgba(7, 11, 19, 0.78);
  --panel: #0A1222;
  --panel-2: #05080F;
  --panel-text: #F3F6FB;
  --panel-muted: #9CA3AF;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.50);
  --shadow-soft: 0 12px 36px rgba(0, 0, 0, 0.35);
  --btn-bg: #D4A24C;
  --btn-text: #0B1220;
  --ring: rgba(212, 162, 76, 0.16);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(900px 560px at 88% -8%, rgba(192, 138, 46, 0.12), transparent 62%),
    radial-gradient(720px 500px at -6% 100%, rgba(15, 118, 110, 0.07), transparent 62%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(16, 24, 39, 0.07) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 66%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 66%);
  opacity: 0.55;
}

[data-theme="dark"] body::before {
  background:
    radial-gradient(900px 560px at 88% -8%, rgba(212, 162, 76, 0.10), transparent 62%),
    radial-gradient(720px 500px at -6% 100%, rgba(47, 143, 131, 0.08), transparent 62%);
}

[data-theme="dark"] body::after {
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  opacity: 0.35;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

::selection {
  background: var(--gold);
  color: var(--btn-text);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.82rem;
  font-weight: 600;
  transform: translateY(-150%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
}

.nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(212, 162, 76, 0.35);
}

.brand-dot {
  color: var(--gold);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.nav-links a {
  position: relative;
  padding: 6px 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transition: right 0.25s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.is-active::after {
  right: 0;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.theme-toggle,
.menu-toggle {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 50%;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover,
.menu-toggle:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: var(--surface);
}

.menu-toggle {
  display: none;
  border-radius: 12px;
}

.icon-sun,
.icon-close {
  display: none;
}

[data-theme="dark"] .icon-sun {
  display: block;
}

[data-theme="dark"] .icon-moon {
  display: none;
}

.site-header.nav-open .icon-menu {
  display: none;
}

.site-header.nav-open .icon-close {
  display: block;
}

/* Shared type + buttons */
.eyebrow,
.section-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow {
  font-size: 0.7rem;
}

.eyebrow-line,
.section-kicker::before {
  content: "";
  flex: 0 0 auto;
  width: 28px;
  height: 1px;
  background: var(--gold);
  opacity: 0.65;
}

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

h1 {
  margin-bottom: 24px;
  font-size: clamp(3rem, 5.6vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.gold {
  color: var(--gold);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: var(--btn-text);
  box-shadow: 0 8px 24px rgba(138, 94, 18, 0.18);
}

[data-theme="dark"] .btn-primary {
  box-shadow: 0 8px 28px rgba(212, 162, 76, 0.16);
}

.btn-primary:hover {
  box-shadow: 0 12px 30px rgba(138, 94, 18, 0.28);
}

.btn-ghost {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-gold {
  background: #D4A24C;
  color: #0B1220;
}

.btn-gold:hover {
  background: #F0CD87;
}

/* Hero */
.hero-copy,
.hero-art {
  min-width: 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 48px;
  align-items: center;
  padding: 92px 0 84px;
}

.hero-lede {
  max-width: 620px;
  margin-bottom: 18px;
  color: var(--text);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 500;
  line-height: 1.45;
}

.hero-lede strong {
  color: var(--gold);
  font-weight: 600;
}

.hero-body {
  max-width: 580px;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 1rem;
}

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

.hero-stats {
  display: flex;
  max-width: 560px;
  margin: 0;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

.hero-stats > div {
  min-width: 0;
  padding-right: 32px;
  margin-right: 32px;
  border-right: 1px solid var(--border);
}

.hero-stats > div:last-child {
  padding-right: 0;
  margin-right: 0;
  border-right: 0;
}

.hero-stats dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 550;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-stats dd {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

/* Emblem */
.hero-art {
  width: 100%;
  max-width: 520px;
  justify-self: end;
}

.emblem-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1.04;
  padding: 30px;
  overflow: hidden;
  border: 1px solid rgba(212, 162, 76, 0.28);
  border-radius: 32px;
  background:
    radial-gradient(120% 100% at 50% 28%, rgba(212, 162, 76, 0.20) 0%, rgba(212, 162, 76, 0) 55%),
    linear-gradient(155deg, #101B31 0%, #070B13 72%);
  box-shadow:
    0 36px 90px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.emblem-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 72%);
  opacity: 0.7;
}

.ding-art {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 20px 28px rgba(0, 0, 0, 0.32));
}

.seal {
  position: absolute;
  z-index: 2;
  top: 22px;
  right: 22px;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(212, 162, 76, 0.55);
  border-radius: 6px;
  background: rgba(7, 11, 19, 0.5);
  box-shadow: inset 0 0 0 4px rgba(212, 162, 76, 0.04);
  color: #D4A24C;
  font-family: var(--font-serif);
  font-size: 24px;
  line-height: 1;
}

.emblem-caption {
  position: absolute;
  z-index: 2;
  right: 26px;
  bottom: 20px;
  left: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #7E8CA1;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.caption-cn {
  color: #D4A24C;
  font-family: var(--font-serif);
  font-size: 0.8rem;
  letter-spacing: 0.32em;
}

/* Sections */
.section {
  padding: 96px 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: 84px;
}

.section-soft {
  background: var(--bg-soft);
}

.section-head {
  max-width: 780px;
  margin-bottom: 44px;
}

.section-sub {
  max-width: 620px;
  margin: 16px 0 0;
  color: var(--muted);
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.about-lead {
  max-width: 560px;
  margin: 0;
  color: var(--text);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.55;
}

.about-lead strong {
  color: var(--gold);
  font-weight: 600;
}

.about-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.info-card {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.info-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
  transform: translateY(-3px);
}

.info-label {
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 0.6rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.info-card h3 {
  margin-bottom: 8px;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.info-card p {
  flex: 1;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.info-card a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 600;
}

.info-card a:hover {
  color: var(--text);
}

/* Focus */
.focus-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.focus-card {
  position: relative;
  display: flex;
  min-height: 230px;
  flex-direction: column;
  overflow: hidden;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.focus-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(500px 200px at 100% 0%, rgba(192, 138, 46, 0.08), transparent 62%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.focus-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
  transform: translateY(-4px);
}

.focus-card:hover::before {
  opacity: 1;
}

.focus-num {
  position: absolute;
  top: 18px;
  right: 22px;
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 2.6rem;
  line-height: 1;
  opacity: 0.16;
}

.focus-card h3 {
  margin: 26px 0 10px;
  font-size: 1.12rem;
  letter-spacing: -0.015em;
}

.focus-card p {
  flex: 1;
  max-width: 420px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.63rem;
  letter-spacing: 0.04em;
}

/* Selected work */
.featured-work {
  position: relative;
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 40px;
  align-items: center;
  overflow: hidden;
  padding: 38px 40px;
  border: 1px solid rgba(212, 162, 76, 0.28);
  border-radius: 26px;
  background:
    radial-gradient(700px 300px at 85% 10%, rgba(212, 162, 76, 0.18), transparent 60%),
    linear-gradient(145deg, #0E1729 0%, #070B13 80%);
  box-shadow: var(--shadow);
  color: #F3F6FB;
}

.featured-work::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(212, 162, 76, 0.12);
  border-radius: 50%;
  pointer-events: none;
}

.featured-label {
  margin-bottom: 14px;
  color: #D4A24C;
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.featured-work h3 {
  margin-bottom: 14px;
  color: #F3F6FB;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.featured-work p {
  max-width: 620px;
  margin-bottom: 20px;
  color: #AEBACD;
  font-size: 0.95rem;
}

.featured-work .tag {
  border-color: rgba(212, 162, 76, 0.25);
  background: rgba(212, 162, 76, 0.06);
  color: #D8C5A0;
}

.featured-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
  padding-left: 32px;
  border-left: 1px solid rgba(212, 162, 76, 0.2);
}

.featured-stats strong {
  display: block;
  color: #D4A24C;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.featured-stats span {
  display: block;
  margin-top: 6px;
  color: #7E8CA1;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.featured-stats .btn {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 4px;
}

.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}

.project-card {
  position: relative;
  display: flex;
  min-height: 210px;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.project-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
  transform: translateY(-3px);
}

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

.project-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--gold);
}

.project-icon svg {
  width: 16px;
  height: 16px;
}

.project-name {
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.project-name::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.project-name:hover {
  color: var(--gold);
}

.project-arrow {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.project-card:hover .project-arrow {
  color: var(--gold);
  transform: translate(2px, -2px);
}

.project-card p {
  flex: 1;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.project-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.72rem;
}

.lang {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: auto;
}

.lang-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lang, #3572A5);
  box-shadow: 0 0 0 3px rgba(53, 114, 165, 0.1);
}

.meta {
  display: flex;
  align-items: center;
  gap: 5px;
}

.meta svg {
  width: 13px;
  height: 13px;
  color: var(--faint);
}

.work-more {
  margin: 28px 0 0;
}

.work-more a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 600;
}

.work-more a:hover {
  color: var(--text);
}

/* Stack */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.stack-card {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
}

.stack-card h3 {
  margin-bottom: 6px;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.stack-note {
  margin-bottom: 18px;
  color: var(--faint);
  font-size: 0.72rem;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.76rem;
}

.pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

.stack-card--agents .pill::before {
  background: var(--teal);
}

.stack-card--eng .pill::before {
  background: var(--faint);
}

/* GitHub */
.github-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 44px;
  align-items: center;
  padding: 40px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background:
    radial-gradient(600px 300px at 95% 0%, rgba(192, 138, 46, 0.10), transparent 60%),
    var(--surface);
  box-shadow: var(--shadow-soft);
}

.github-panel h2 {
  margin-bottom: 14px;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.github-panel p {
  max-width: 520px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.github-panel .section-kicker {
  margin-bottom: 14px;
}

.github-panel .hero-actions {
  margin: 24px 0 0;
}

.github-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.github-stat {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
}

.github-stat strong {
  display: block;
  color: var(--gold);
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.github-stat span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* CTA + footer */
.cta-section {
  padding: 110px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.cta-inner {
  max-width: 820px;
}

.cta-section .section-kicker {
  justify-content: center;
}

.cta-section h2 {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
}

.cta-section p {
  max-width: 560px;
  margin: 18px auto 28px;
  color: var(--muted);
}

.cta-section .hero-actions {
  justify-content: center;
  margin-bottom: 0;
}

.site-footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 0.76rem;
}

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

.footer-inner p {
  margin: 0;
}

.site-footer a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
}

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

/* Reveal */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s cubic-bezier(0.2, 0.65, 0.3, 1),
    transform 0.7s cubic-bezier(0.2, 0.65, 0.3, 1);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.js .hero-art.reveal {
  transition-delay: 0.12s;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn,
  .info-card,
  .focus-card,
  .project-card,
  .project-arrow,
  .nav-links a::after {
    transition: none;
  }
}

/* Responsive */
@media (max-width: 1100px) {
  .hero {
    gap: 40px;
  }

  .about-grid {
    gap: 40px;
  }
}

@media (max-width: 960px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-lead {
    max-width: 720px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
    padding-top: 72px;
  }

  .hero-art {
    max-width: 460px;
    justify-self: center;
  }

  .github-panel {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

@media (max-width: 860px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 60;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    margin: 0;
    padding: 14px 24px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    box-shadow: 0 24px 40px rgba(16, 24, 39, 0.10);
  }

  .site-header.nav-open .nav-links {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
  }

  .nav-links a:last-child {
    border-bottom: 0;
  }

  .nav-links a::after {
    display: none;
  }

  .menu-toggle {
    display: grid;
  }
}

@media (max-width: 760px) {
  .section {
    padding: 76px 0;
  }

  .focus-grid,
  .work-grid {
    grid-template-columns: 1fr;
  }

  .featured-work {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px;
  }

  .featured-stats {
    padding-top: 24px;
    padding-left: 0;
    border-top: 1px solid rgba(212, 162, 76, 0.2);
    border-left: 0;
  }

  .featured-stats .btn {
    grid-column: 1 / -1;
  }

  .about-cards {
    grid-template-columns: 1fr 1fr;
  }

  .cta-section {
    padding: 86px 0;
  }

  .footer-inner {
    justify-content: center;
    text-align: center;
  }
}

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

  .nav {
    min-height: 68px;
    gap: 12px;
  }

  .brand {
    font-size: 0.94rem;
  }

  .brand img {
    width: 28px;
    height: 28px;
  }

  .nav-actions {
    gap: 7px;
  }

  .theme-toggle,
  .menu-toggle {
    width: 36px;
    height: 36px;
  }

  .hero {
    padding: 54px 0 64px;
  }

  h1 {
    margin-bottom: 20px;
    font-size: clamp(2.6rem, 11vw, 3.4rem);
    line-height: 1;
  }

  .hero-lede {
    font-size: 1.1rem;
  }

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

  .hero-stats > div {
    padding-right: 12px;
    margin-right: 12px;
  }

  .hero-stats dt {
    font-size: 0.56rem;
    letter-spacing: 0.09em;
  }

  .hero-stats dd {
    font-size: 1.15rem;
  }

  .emblem-panel {
    padding: 18px;
    border-radius: 24px;
  }

  .seal {
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .emblem-caption {
    right: 16px;
    bottom: 12px;
    left: 16px;
    font-size: 0.48rem;
    letter-spacing: 0.14em;
  }

  .caption-cn {
    font-size: 0.7rem;
    letter-spacing: 0.22em;
  }

  .about-cards {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 64px 0;
  }

  .focus-card {
    padding: 24px;
    min-height: 0;
  }

  .focus-card h3 {
    margin-top: 20px;
  }

  .featured-work {
    padding: 24px;
    border-radius: 20px;
  }

  .github-panel {
    padding: 24px;
    border-radius: 20px;
  }

  .github-stats {
    grid-template-columns: 1fr 1fr;
  }

  .github-stat {
    padding: 14px;
  }

  .github-stat strong {
    font-size: 1.55rem;
  }

  .project-card {
    padding: 20px;
  }

  .cta-section {
    padding: 72px 0;
  }

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

  .cta-section .hero-actions .btn {
    width: 100%;
  }
}
