:root {
  color-scheme: light;
  --ink: #15211d;
  --muted: #5c6b64;
  --paper: #f8f5ec;
  --paper-strong: #fffdf6;
  --line: rgba(21, 33, 29, 0.14);
  --accent: #0f8f87;
  --accent-strong: #0b625e;
  --copper: #b7633b;
  --night: #111818;
  --night-soft: rgba(17, 24, 24, 0.78);
  --white: #ffffff;
  --shadow: 0 22px 70px rgba(17, 24, 24, 0.14);
  --radius: 8px;
  --max: 1180px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --ink: #eef4ed;
  --muted: #aebbb4;
  --paper: #111818;
  --paper-strong: #17211f;
  --line: rgba(238, 244, 237, 0.14);
  --accent: #34b6aa;
  --accent-strong: #8bd6cf;
  --copper: #d68a62;
  --night: #090d0d;
  --night-soft: rgba(9, 13, 13, 0.8);
  --white: #f8f5ec;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

section {
  scroll-margin-top: 110px;
}

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

body::selection {
  background: rgba(15, 143, 135, 0.28);
}

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

svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

#hero-scene {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  background: #101818;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  padding: 16px 24px;
  color: #f8f5ec;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.site-header[data-elevated="true"] {
  background: color-mix(in srgb, var(--paper-strong) 88%, transparent);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  width: min(100%, var(--max));
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  font-weight: 760;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.82rem;
  line-height: 1;
}

.brand-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 8%, transparent);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  color: currentColor;
  font-size: 0.92rem;
  font-weight: 680;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: color-mix(in srgb, currentColor 12%, transparent);
}

.icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid color-mix(in srgb, currentColor 36%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, currentColor 8%, transparent);
  color: currentColor;
  cursor: pointer;
}

.icon-button:hover,
.icon-button:focus-visible {
  background: color-mix(in srgb, currentColor 14%, transparent);
}

.theme-icon {
  position: relative;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.theme-icon::after {
  position: absolute;
  top: -3px;
  right: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

main {
  position: relative;
  z-index: 1;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: end;
  gap: 44px;
  width: min(100% - 48px, var(--max));
  min-height: 88svh;
  margin: 0 auto;
  padding: 150px 0 64px;
  color: #f8f5ec;
}

.hero::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 12, 12, 0.84), rgba(8, 12, 12, 0.5) 46%, rgba(8, 12, 12, 0.2)),
    linear-gradient(180deg, rgba(8, 12, 12, 0.16), rgba(8, 12, 12, 0.82));
  content: "";
  pointer-events: none;
}

.hero-content {
  max-width: 760px;
}

.eyebrow,
.section-kicker,
.panel-label {
  margin: 0;
  color: var(--copper);
  font-size: 0.78rem;
  font-weight: 820;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #e5b58f;
}

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

h1 {
  max-width: 10ch;
  margin-bottom: 18px;
  font-size: clamp(4.2rem, 8vw, 8.5rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 700px;
  margin-bottom: 34px;
  color: rgba(248, 245, 236, 0.86);
  font-size: clamp(1.12rem, 2.1vw, 1.42rem);
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  gap: 10px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 760;
  white-space: nowrap;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

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

.button-primary {
  background: #f8f5ec;
  color: #111818;
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #ffffff;
}

.button-secondary {
  border-color: rgba(248, 245, 236, 0.34);
  background: rgba(248, 245, 236, 0.08);
  color: #f8f5ec;
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: rgba(248, 245, 236, 0.55);
  background: rgba(248, 245, 236, 0.14);
}

.button-icon {
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.05rem;
}

.hero-panel {
  padding: 22px;
  border: 1px solid rgba(248, 245, 236, 0.22);
  border-radius: var(--radius);
  background: rgba(12, 20, 20, 0.56);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.focus-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.focus-list span {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid rgba(248, 245, 236, 0.16);
  color: rgba(248, 245, 236, 0.9);
  font-weight: 720;
}

.focus-list span:last-child {
  border-bottom: 0;
}

.section,
.contact-section,
.site-footer {
  background: var(--paper);
}

.section {
  padding: 86px 24px;
}

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

.section-grid,
.section-heading,
.split-section,
.contact-section,
.site-footer {
  width: min(100% - 48px, var(--max));
  margin: 0 auto;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(280px, 0.7fr);
  gap: 80px;
  align-items: start;
}

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

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

.section-body {
  color: var(--muted);
  font-size: 1.04rem;
}

.signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.signal-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 760;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--accent-strong);
  font-weight: 780;
}

.text-link:hover,
.text-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: min(100% - 48px, var(--max));
  margin: 0 auto;
}

.project-card {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-strong);
  box-shadow: 0 1px 0 rgba(17, 24, 24, 0.04);
}

.project-card:nth-child(2) {
  border-top-color: color-mix(in srgb, var(--accent) 58%, var(--line));
}

.project-card:nth-child(3) {
  border-top-color: color-mix(in srgb, var(--copper) 70%, var(--line));
}

.project-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
  text-transform: uppercase;
}

.project-card h3 {
  margin-bottom: 12px;
  font-size: 1.35rem;
  letter-spacing: 0;
}

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

.project-card a {
  color: var(--accent-strong);
  font-weight: 800;
}

.project-card a:hover,
.project-card a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(240px, 0.55fr) minmax(320px, 1fr);
  gap: 70px;
  align-items: start;
}

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

.note-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 18px;
  min-height: 78px;
  border-bottom: 1px solid var(--line);
}

.note-item:hover .note-title,
.note-item:focus-visible .note-title {
  color: var(--accent-strong);
}

.note-date {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 740;
}

.note-title {
  overflow-wrap: anywhere;
  font-size: 1.08rem;
  font-weight: 760;
}

.note-arrow {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent-strong);
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 36px;
  align-items: center;
  padding: 76px 0;
  border-top: 1px solid var(--line);
}

.contact-section .button-primary {
  background: var(--ink);
  color: var(--paper);
}

.contact-section .button-secondary {
  border-color: var(--line);
  background: var(--paper-strong);
  color: var(--ink);
}

.contact-copy {
  max-width: 760px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  padding: 28px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 680;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 48%, transparent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 92svh;
    padding-top: 132px;
  }

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

  .section-grid,
  .split-section,
  .contact-section {
    grid-template-columns: 1fr;
    gap: 30px;
  }

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

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

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

  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .site-nav {
    grid-column: 1 / -1;
    justify-content: space-between;
    overflow-x: auto;
    border-radius: var(--radius);
  }

  .site-nav a {
    flex: 1 0 auto;
    justify-content: center;
    padding: 0 10px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .icon-button {
    width: 38px;
    height: 38px;
  }

  .hero,
  .section-grid,
  .section-heading,
  .split-section,
  .contact-section,
  .site-footer,
  .project-grid {
    width: min(100% - 32px, var(--max));
  }

  .hero {
    gap: 28px;
    padding-bottom: 42px;
  }

  h1 {
    font-size: 4rem;
  }

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

  .hero-actions,
  .contact-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
    white-space: normal;
    text-align: center;
  }

  .section {
    padding: 64px 0;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .note-item {
    grid-template-columns: 1fr 34px;
    gap: 8px 14px;
    padding: 18px 0;
  }

  .note-date {
    grid-column: 1 / -1;
  }
}

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

  .brand-text {
    max-width: 160px;
  }
}
