:root {
  color-scheme: light;
  --ink: #15201c;
  --muted: #5c6863;
  --paper: #f7f5ef;
  --panel: #ffffff;
  --line: #d9ddd5;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --coral: #c75b4b;
  --gold: #c59b45;
  --shadow: 0 20px 60px rgba(21, 32, 28, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
}

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

.site-header {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 64px);
  background: rgba(247, 245, 239, 0.86);
  border-bottom: 1px solid rgba(217, 221, 213, 0.8);
  backdrop-filter: blur(18px);
}

.brand {
  font-weight: 800;
  letter-spacing: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 32px);
  color: var(--muted);
  font-size: 15px;
}

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

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 120px clamp(20px, 7vw, 96px) 80px;
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(247, 245, 239, 0.95) 0%, rgba(247, 245, 239, 0.82) 36%, rgba(247, 245, 239, 0.28) 72%),
    linear-gradient(0deg, rgba(21, 32, 28, 0.3), rgba(21, 32, 28, 0.04));
}

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

.eyebrow,
.section-kicker,
.card-tag {
  margin: 0 0 14px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(48px, 9vw, 112px);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 620px;
  margin-bottom: 32px;
  color: #32403b;
  font-size: clamp(19px, 2.2vw, 26px);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  font-weight: 760;
}

.button.primary {
  background: var(--ink);
  color: #fff;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.5);
}

.section {
  max-width: 1160px;
  margin: 0 auto;
  padding: 84px clamp(20px, 5vw, 64px);
}

.intro,
.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 84px);
  align-items: start;
}

.section h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: 0;
}

.intro p:last-child,
.contact-links {
  color: var(--muted);
  font-size: 18px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-note {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding-top: 0;
  padding-bottom: 0;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.metric {
  padding: 28px;
  background: var(--paper);
}

.metric strong {
  display: block;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1;
}

.metric span {
  color: var(--muted);
}

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

.card {
  min-height: 250px;
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(21, 32, 28, 0.06);
}

.card:nth-child(2) .card-tag {
  color: var(--coral);
}

.card:nth-child(3) .card-tag {
  color: #836116;
}

.card h3 {
  margin-bottom: 14px;
  font-size: 24px;
  line-height: 1.2;
}

.card p {
  color: var(--muted);
}

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

.project-card {
  min-height: 310px;
  display: flex;
  flex-direction: column;
  padding: 30px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(21, 32, 28, 0.06);
}

.project-card:hover {
  border-color: rgba(15, 118, 110, 0.45);
  transform: translateY(-2px);
}

.project-card h3 {
  margin-bottom: 14px;
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.12;
}

.project-card p {
  color: var(--muted);
  font-size: 17px;
}

.card-meta {
  width: fit-content;
  margin-top: auto;
  padding-top: 20px;
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 760;
}

.archive {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(32px, 6vw, 72px);
  border-top: 1px solid var(--line);
}

.archive-list {
  display: grid;
  gap: 16px;
}

.archive-list article,
.stack-list article {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.archive-list h3,
.stack-list h3 {
  margin-bottom: 8px;
  font-size: 21px;
}

.archive-list p,
.stack-list p {
  margin-bottom: 0;
  color: var(--muted);
}

.text-link {
  grid-column: 2;
  width: fit-content;
  margin-top: -24px;
  color: var(--accent-dark);
  font-weight: 800;
  border-bottom: 1px solid currentColor;
}

.notes {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.note-list {
  display: grid;
  gap: 12px;
}

.note-list a {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  font-size: 19px;
}

.note-list a:hover span {
  color: var(--accent-dark);
}

time {
  flex: 0 0 auto;
  color: var(--muted);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-links a {
  width: fit-content;
  border-bottom: 1px solid currentColor;
}

.project-page {
  padding-top: 90px;
}

.project-hero {
  max-width: 1160px;
  margin: 0 auto;
  padding: 96px clamp(20px, 5vw, 64px) 60px;
}

.project-hero h1 {
  max-width: 900px;
  font-size: clamp(44px, 8vw, 96px);
}

.project-hero p:last-child {
  max-width: 780px;
  color: #32403b;
  font-size: clamp(19px, 2.2vw, 25px);
}

.project-layout {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(32px, 6vw, 84px);
  padding: 0 clamp(20px, 5vw, 64px) 96px;
}

.project-aside {
  position: sticky;
  top: 96px;
  align-self: start;
  display: grid;
  gap: 10px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
}

.project-aside a {
  width: fit-content;
  margin-top: 8px;
  color: var(--accent-dark);
  font-weight: 800;
  border-bottom: 1px solid currentColor;
}

.project-content {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(28px, 5vw, 56px);
}

.project-content h2 {
  margin: 42px 0 14px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
}

.project-content h2:first-child {
  margin-top: 0;
}

.project-content li {
  margin-bottom: 10px;
  color: var(--muted);
}

.project-hero.compact {
  padding-bottom: 32px;
}

.layer-model {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(32px, 6vw, 72px);
  padding-top: 0;
}

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

.layer-grid article,
.material-stack article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

.layer-grid span,
.material-stack span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 30px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--accent-dark);
  font-weight: 900;
}

.layer-grid h3,
.material-stack h2 {
  margin-bottom: 10px;
}

.layer-grid p {
  margin-bottom: 0;
  color: var(--muted);
}

.archive-matrix {
  padding-top: 40px;
}

.matrix-list {
  display: grid;
  gap: 18px;
}

.matrix-list article {
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 54px);
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.matrix-list h3 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1.2;
}

.matrix-list h3 a {
  border-bottom: 1px solid currentColor;
}

.matrix-list dl {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 10px 18px;
  margin: 0;
}

.matrix-list dt {
  color: var(--accent-dark);
  font-weight: 850;
}

.matrix-list dd {
  margin: 0;
  color: var(--muted);
}

.material-stack {
  display: grid;
  gap: 18px;
  padding-top: 0;
}

.material-stack article {
  display: grid;
  grid-template-columns: 70px minmax(180px, 0.42fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.material-stack h2 {
  font-size: clamp(24px, 3vw, 36px);
}

.material-stack ul {
  margin: 0;
  color: var(--muted);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(20px, 5vw, 64px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 760px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 16px;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }

  .hero {
    min-height: 86vh;
    padding-top: 64px;
  }

  .hero-overlay {
    background:
      linear-gradient(0deg, rgba(247, 245, 239, 0.96) 0%, rgba(247, 245, 239, 0.82) 56%, rgba(247, 245, 239, 0.36) 100%),
      linear-gradient(0deg, rgba(21, 32, 28, 0.26), rgba(21, 32, 28, 0.04));
  }

  .intro,
  .contact,
  .grid,
  .project-grid,
  .archive,
  .metrics,
  .project-layout,
  .layer-model,
  .layer-grid,
  .matrix-list article,
  .matrix-list dl,
  .material-stack article {
    grid-template-columns: 1fr;
  }

  .text-link {
    grid-column: auto;
    margin-top: 0;
  }

  .section {
    padding-top: 60px;
    padding-bottom: 60px;
  }

  .section-heading {
    display: block;
  }

  .card {
    min-height: 0;
  }

  .project-card {
    min-height: 0;
  }

  .project-page {
    padding-top: 0;
  }

  .project-hero {
    padding-top: 60px;
  }

  .project-aside {
    position: static;
  }

  .material-stack article {
    gap: 10px;
  }

  .note-list a,
  .footer {
    flex-direction: column;
  }
}
