:root {
  color-scheme: light;
  --bg: #f7f7f3;
  --panel: #ffffff;
  --panel-soft: #fbfbf8;
  --ink: #1f2420;
  --muted: #657069;
  --soft: #8a928c;
  --line: #dfe4de;
  --line-soft: #ebeee9;
  --accent: #2f6f5b;
  --accent-soft: #e7f1ec;
  --warm: #8a5f38;
  --shadow: rgba(35, 48, 41, 0.06);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #111411;
  --panel: #171b18;
  --panel-soft: #141814;
  --ink: #f0f3ee;
  --muted: #aeb8b0;
  --soft: #818c84;
  --line: #2d352f;
  --line-soft: #252c27;
  --accent: #8fc7ae;
  --accent-soft: rgba(143, 199, 174, 0.12);
  --warm: #d3a36f;
  --shadow: rgba(0, 0, 0, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, rgba(47, 111, 91, 0.055) 0 1px, transparent 1px),
    linear-gradient(180deg, rgba(47, 111, 91, 0.045) 0 1px, transparent 1px),
    var(--bg);
  background-size: 72px 72px;
  color: var(--ink);
}

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

button {
  font: inherit;
}

.site-shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 22px;
  align-items: center;
  min-height: 64px;
  margin: 12px 0 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  box-shadow: 0 10px 28px var(--shadow);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
}

.brand-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.brand-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-links a,
.topbar button {
  color: var(--muted);
}

.nav-links a {
  padding: 8px 10px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  white-space: nowrap;
  transition:
    background 160ms ease,
    color 160ms ease;
}

.nav-links a:hover,
.topbar button:hover {
  background: var(--accent-soft);
  color: var(--ink);
}

.top-actions {
  display: flex;
  gap: 6px;
}

.icon-button,
.language-toggle {
  display: inline-grid;
  min-width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
}

.language-toggle {
  padding: 0 10px;
  font-weight: 760;
}

.icon-sun,
.button-icon {
  display: inline-block;
  width: 15px;
  height: 15px;
  background: currentColor;
}

.icon-sun {
  border-radius: 50%;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 16%, transparent);
}

.arrow-icon {
  clip-path: polygon(15% 45%, 68% 45%, 46% 24%, 58% 12%, 98% 50%, 58% 88%, 46% 76%, 68% 55%, 15% 55%);
}

.code-icon {
  clip-path: polygon(
    22% 18%,
    0 50%,
    22% 82%,
    32% 72%,
    18% 50%,
    32% 28%,
    78% 18%,
    100% 50%,
    78% 82%,
    68% 72%,
    82% 50%,
    68% 28%
  );
}

.mail-icon {
  clip-path: polygon(4% 18%, 96% 18%, 96% 82%, 4% 82%, 4% 18%, 50% 58%, 96% 18%, 96% 30%, 50% 70%, 4% 30%);
}

main {
  display: grid;
  gap: 72px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 28px;
  align-items: stretch;
}

.hero-main,
.brief-card,
.overview-grid,
.contact-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  box-shadow: 0 12px 34px var(--shadow);
}

.hero-main {
  display: grid;
  align-content: center;
  min-height: 460px;
  padding: clamp(28px, 5vw, 54px);
}

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

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

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(2rem, 3.65vw, 3.65rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.45rem, 2.65vw, 2.35rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
  line-height: 1.36;
}

.hero-lede {
  max-width: 740px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.08rem);
  line-height: 1.84;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.primary-link,
.secondary-link,
.contact-actions a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 13px;
  border-radius: var(--radius);
  font-size: 0.92rem;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.primary-link {
  border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line));
  background: var(--accent-soft);
  color: var(--ink);
}

.secondary-link,
.contact-actions a {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--muted);
}

.primary-link:hover,
.secondary-link:hover,
.contact-actions a:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  color: var(--ink);
}

.brief-card {
  display: grid;
  align-content: start;
  padding: 28px;
}

.brief-name {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 1.22rem;
  font-weight: 800;
}

.brief-role {
  margin-bottom: 20px;
  color: var(--muted);
  line-height: 1.6;
}

.brief-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.brief-list div {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.brief-list span,
.work-meta span,
.work-card dt,
.evidence-list time {
  color: var(--warm);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brief-list p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.68;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  background: var(--panel);
}

.overview-grid article {
  min-height: 164px;
  padding: 22px;
  border-right: 1px solid var(--line);
}

.overview-grid article:last-child {
  border-right: 0;
}

.overview-grid h3 {
  color: var(--ink);
  font-size: 1rem;
}

.overview-grid p,
.section-copy p,
.section-heading > p,
.focus-item p,
.work-card dd,
.capability-grid li,
.note-card p,
.evidence-list p,
footer {
  color: var(--muted);
  line-height: 1.75;
}

.section {
  display: grid;
  gap: 26px;
}

.split-section {
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 34px;
  align-items: start;
}

.section-copy {
  position: sticky;
  top: 104px;
}

.section-copy p:last-child,
.section-heading > p {
  margin-bottom: 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(280px, 0.58fr);
  gap: 34px;
  align-items: end;
}

.focus-list,
.capability-grid {
  display: grid;
  gap: 12px;
}

.focus-item,
.capability-grid article,
.note-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 82%, transparent);
}

.focus-item h3,
.capability-grid h3,
.note-card h3 {
  color: var(--ink);
}

.focus-item p,
.note-card p {
  margin-bottom: 0;
}

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

.work-card {
  display: flex;
  flex-direction: column;
  min-height: 430px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  box-shadow: 0 8px 26px var(--shadow);
}

.work-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 30px;
  margin-bottom: 14px;
}

.work-meta a {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}

.quiet-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.work-card h3 {
  margin-bottom: 16px;
  font-size: 1.18rem;
}

.work-card dl {
  display: grid;
  gap: 13px;
  margin: 0;
}

.work-card dt {
  margin-bottom: 4px;
}

.work-card dd {
  margin: 0;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
  padding-top: 18px;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 0.77rem;
}

.capability-grid article {
  display: grid;
  gap: 10px;
}

.capability-grid .tag-row {
  margin-top: 0;
  padding-top: 0;
}

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

.note-card {
  min-height: 230px;
}

.evidence-section {
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 34px;
  align-items: start;
}

.evidence-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.evidence-list article {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.evidence-list p {
  margin-bottom: 0;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  padding: clamp(24px, 4vw, 42px);
}

.contact-section h2 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(1.32rem, 2.25vw, 2rem);
}

.contact-actions {
  justify-content: flex-end;
  margin-top: 0;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0 42px;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

footer a {
  color: var(--accent);
  font-weight: 800;
}

.js .reveal {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 420ms ease,
    transform 420ms ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .nav-links {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-top: 8px;
    border-top: 1px solid var(--line);
  }

  .top-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .hero,
  .split-section,
  .section-heading,
  .evidence-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .hero-main {
    min-height: 0;
  }

  .section-copy {
    position: static;
  }

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

  .overview-grid article:nth-child(2) {
    border-right: 0;
  }

  .overview-grid article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

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

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

@media (max-width: 720px) {
  .site-shell {
    width: min(100% - 24px, 1180px);
  }

  .topbar {
    top: 8px;
    margin: 8px 0 34px;
    gap: 10px;
  }

  .brand-mark,
  .icon-button,
  .language-toggle {
    width: 34px;
    min-width: 34px;
    height: 34px;
  }

  .brand-copy small {
    display: none;
  }

  .language-toggle {
    padding: 0 8px;
  }

  .nav-links {
    justify-content: space-between;
  }

  .nav-links a {
    padding: 7px 6px;
    font-size: 0.82rem;
  }

  main {
    gap: 56px;
  }

  h1 {
    font-size: clamp(1.85rem, 8.5vw, 2.55rem);
  }

  h2 {
    font-size: clamp(1.35rem, 6vw, 1.86rem);
  }

  .hero-main,
  .brief-card,
  .focus-item,
  .capability-grid article,
  .note-card,
  .contact-section {
    padding: 20px;
  }

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

  .overview-grid article {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .overview-grid article:last-child {
    border-bottom: 0;
  }

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

  .hero-actions,
  .contact-actions {
    display: grid;
  }

  .primary-link,
  .secondary-link,
  .contact-actions a {
    justify-content: center;
    width: 100%;
  }

  .evidence-list article {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
