:root {
  color-scheme: dark;
  --night: #11211e;
  --night-raised: #1b2e2a;
  --paper: #f2eee5;
  --paper-soft: #d9d8c8;
  --muted: #9eada2;
  --rule: rgba(217, 216, 200, 0.18);
  --signal: #f06a43;
  --lime: #c8d95b;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 85% 5%, rgba(200, 217, 91, 0.1), transparent 28rem),
    radial-gradient(circle at 8% 35%, rgba(240, 106, 67, 0.08), transparent 24rem),
    var(--night);
  color: var(--paper);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  line-height: 1.6;
}

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

a:focus-visible,
.brand:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 5px;
}

.page-shell {
  width: min(100% - 40px, var(--max-width));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--lime);
  color: var(--lime);
  font-family: Georgia, serif;
  font-size: 1.1rem;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: Georgia, "Songti SC", serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.brand small,
.eyebrow,
.card-kicker,
.note-label,
.project-index,
.project-meta,
.status {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand small {
  margin-top: 2px;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
}

nav {
  display: flex;
  gap: 28px;
  color: var(--paper-soft);
  font-size: 0.88rem;
}

nav a {
  padding: 10px 0;
  transition: color 160ms ease;
}

nav a:hover {
  color: var(--lime);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: clamp(40px, 8vw, 120px);
  align-items: end;
  min-height: 590px;
  padding: 96px 0 100px;
  border-bottom: 1px solid var(--rule);
}

.eyebrow {
  margin: 0 0 22px;
  color: var(--signal);
}

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

h1,
h2,
h3 {
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-weight: 500;
}

h1 {
  max-width: 780px;
  margin-bottom: 28px;
  font-size: clamp(3rem, 7vw, 6.6rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

h1 em {
  display: block;
  color: var(--lime);
  font-style: normal;
}

.hero-lede {
  max-width: 660px;
  margin-bottom: 28px;
  color: var(--paper-soft);
  font-size: clamp(1.02rem, 1.7vw, 1.2rem);
  line-height: 1.9;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-facts span {
  padding: 7px 11px;
  border: 1px solid var(--rule);
  color: var(--paper-soft);
  font-size: 0.78rem;
}

.hero-note {
  padding: 24px;
  border: 1px solid rgba(200, 217, 91, 0.35);
  background: rgba(27, 46, 42, 0.72);
}

.note-label {
  margin-bottom: 56px;
  color: var(--lime);
}

.hero-note h2 {
  margin-bottom: 12px;
  font-size: 1.65rem;
}

.hero-note p:not(.note-label) {
  margin-bottom: 26px;
  color: var(--paper-soft);
  font-size: 0.94rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--lime);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
}

.status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(200, 217, 91, 0.12);
}

.section {
  padding: 100px 0;
  border-bottom: 1px solid var(--rule);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 48px;
}

.section-heading h2 {
  margin-bottom: 0;
  color: var(--paper);
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.section-heading-row {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  max-width: none;
}

.section-heading-row > div {
  max-width: 720px;
}

.section-aside {
  max-width: 220px;
  margin: 45px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.about-grid,
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.about-card,
.project-card {
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--rule);
  background: rgba(27, 46, 42, 0.42);
}

.about-card-wide {
  grid-column: span 2;
  min-height: 220px;
}

.card-kicker {
  margin-bottom: 34px;
  color: var(--signal);
}

.card-text {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--paper-soft);
  font-size: 1.05rem;
  line-height: 1.8;
}

.timeline {
  border-top: 1px solid var(--rule);
}

.timeline-item {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 30px;
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
}

.timeline-item time {
  color: var(--lime);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
}

.timeline-item h3 {
  margin-bottom: 8px;
  font-size: 1.45rem;
}

.timeline-item p {
  max-width: 700px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.toolbox-section {
  padding-bottom: 96px;
}

.toolbox-group + .toolbox-group {
  margin-top: 52px;
}

.toolbox-group-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.toolbox-group-heading .card-kicker {
  margin-bottom: 0;
}

.toolbox-group-heading > span {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.tool-card {
  display: flex;
  min-height: 252px;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--rule);
  background: rgba(27, 46, 42, 0.42);
}

.tool-card-featured {
  border-color: rgba(240, 106, 67, 0.45);
}

.tool-card-muted {
  background: rgba(27, 46, 42, 0.24);
}

.tool-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 38px;
  color: var(--signal);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tool-card-topline span:last-child {
  color: var(--lime);
  text-align: right;
}

.tool-card h3 {
  margin-bottom: 12px;
  font-size: 1.5rem;
  line-height: 1.15;
}

.tool-card p {
  max-width: 370px;
  margin-bottom: 24px;
  color: var(--paper-soft);
  font-size: 0.93rem;
  line-height: 1.75;
}

.tool-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: auto;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(200, 217, 91, 0.5);
  color: var(--lime);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color 160ms ease, color 160ms ease;
}

.tool-link:hover {
  border-color: var(--lime);
  color: var(--paper);
}

.tool-link-muted {
  border-bottom-color: var(--rule);
  color: var(--muted);
  cursor: default;
}

.tool-link-muted:hover {
  border-bottom-color: var(--rule);
  color: var(--muted);
}

.toolbox-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.projects-section {
  border-bottom: 0;
}

.project-card {
  min-height: 260px;
}

.project-card-featured {
  border-color: rgba(240, 106, 67, 0.45);
}

.project-index {
  margin-bottom: 38px;
  color: var(--signal);
}

.project-card h3 {
  margin-bottom: 12px;
  font-size: 1.8rem;
}

.project-card p {
  max-width: 460px;
  margin-bottom: 30px;
  color: var(--paper-soft);
  font-size: 0.98rem;
}

.project-meta {
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: none;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0 38px;
  color: var(--muted);
  font-size: 0.76rem;
}

@media (max-width: 780px) {
  .page-shell {
    width: min(100% - 32px, var(--max-width));
  }

  .site-header {
    flex-wrap: wrap;
    min-height: 76px;
    padding: 16px 0 12px;
  }

  nav {
    flex: 1 1 100%;
    justify-content: space-between;
    gap: 16px;
    font-size: 0.78rem;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
    min-height: auto;
    padding: 72px 0 76px;
  }

  h1 {
    font-size: clamp(3rem, 15vw, 5rem);
  }

  .hero-note {
    max-width: 430px;
  }

  .section {
    padding: 76px 0;
  }

  .section-heading-row {
    display: block;
  }

  .section-aside {
    margin-top: 20px;
  }

  .about-grid,
  .project-grid,
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .about-card-wide {
    grid-column: auto;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .toolbox-group-heading {
    display: block;
  }

  .toolbox-group-heading > span {
    display: block;
    margin-top: 8px;
  }

  .site-footer {
    flex-direction: column;
  }
}

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

  nav a {
    transition: none;
  }
}
