:root {
  --bg: #f2f0e9;
  --surface: #e7e5dc;
  --surface-strong: #dedbd0;
  --ink: #141714;
  --muted: #656963;
  --line: rgba(20, 23, 20, 0.16);
  --accent: #e7542f;
  --acid: #cbf36a;
  --dark: #101311;
  --light: #f6f4ec;
  --shadow: 0 28px 90px rgba(20, 23, 20, 0.14);
  --page: min(1180px, calc(100vw - 48px));
}

[data-theme="dark"] {
  --bg: #101311;
  --surface: #191d1a;
  --surface-strong: #242924;
  --ink: #f2f0e9;
  --muted: #a4aaa2;
  --line: rgba(242, 240, 233, 0.16);
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  transition: color 300ms ease, background-color 300ms ease;
  overflow-x: hidden;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-150%);
  transition: transform 180ms ease;
}

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

.ambient {
  position: fixed;
  z-index: -1;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.08;
  pointer-events: none;
}

.ambient-one {
  top: -180px;
  right: -120px;
  background: var(--accent);
}

.ambient-two {
  bottom: 10vh;
  left: -240px;
  background: var(--acid);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  width: var(--page);
  height: 78px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 10px;
  letter-spacing: 0.03em;
}

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

.nav a {
  position: relative;
  color: var(--muted);
  font-size: 13px;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -4px;
  height: 1px;
  background: var(--ink);
  transition: right 180ms ease;
}

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

.nav a:hover::after {
  right: 0;
}

.theme-toggle {
  justify-self: end;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease;
}

.theme-toggle:hover {
  transform: rotate(20deg);
  background: var(--surface);
}

.hero {
  width: var(--page);
  min-height: 750px;
  margin: 0 auto;
  padding: 112px 0 84px;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  align-items: center;
  gap: 80px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow > span {
  width: 22px;
  height: 1px;
  background: currentColor;
}

.hero h1,
.section-heading h2,
.about-copy h2,
.contact-inner h2 {
  margin: 0;
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.hero h1 {
  max-width: 790px;
  font-size: clamp(48px, 6.25vw, 86px);
}

.accent {
  position: relative;
  z-index: 0;
  white-space: nowrap;
}

.accent::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -0.03em;
  right: -0.02em;
  bottom: 0.09em;
  height: 0.22em;
  background: var(--accent);
  transform: rotate(-1deg);
  opacity: 0.88;
}

.hero-intro {
  max-width: 630px;
  margin: 36px 0 0;
  color: var(--muted);
  font-size: 18px;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  min-width: 184px;
  padding: 13px 18px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  font-size: 13px;
  font-weight: 650;
  transition: transform 180ms ease, color 180ms ease, background-color 180ms ease;
}

.button:hover {
  transform: translateY(-3px);
}

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

.button-secondary {
  background: transparent;
}

.portrait-wrap {
  position: relative;
  min-height: 470px;
  display: grid;
  place-items: center;
}

.portrait-card {
  position: relative;
  z-index: 2;
  width: min(320px, 78vw);
  aspect-ratio: 0.82;
  padding: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transform: rotate(2.5deg);
}

.portrait-card::before {
  content: "COATRAIN / 2026";
  position: absolute;
  z-index: 2;
  right: -63px;
  top: 64px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.22em;
  transform: rotate(90deg);
}

.portrait-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(0.75) contrast(1.04);
}

.orbit {
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.orbit-large {
  width: 450px;
  height: 450px;
  animation: spin 28s linear infinite;
}

.orbit-large::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  top: 50%;
  right: -5px;
  border-radius: 50%;
  background: var(--accent);
}

.orbit-small {
  width: 380px;
  height: 250px;
  transform: rotate(-22deg);
}

.status-card {
  position: absolute;
  z-index: 3;
  left: -24px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 230px;
  padding: 15px 18px;
  color: var(--dark);
  background: var(--acid);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
  transform: rotate(-2deg);
}

.status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(231, 84, 47, 0.18);
}

.status-card small,
.status-card strong {
  display: block;
}

.status-card small {
  font-size: 8px;
  letter-spacing: 0.16em;
}

.status-card strong {
  margin-top: 2px;
  font-size: 12px;
}

.signal-row {
  width: var(--page);
  margin: 0 auto;
  padding: 36px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr) 1.4fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.signal-row p {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 12px;
  border-right: 1px solid var(--line);
}

.signal-row strong {
  font-family: Georgia, serif;
  font-size: 30px;
  font-weight: 500;
}

.signal-row span,
.signal-note {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.signal-row .signal-note {
  justify-content: flex-end;
  text-align: right;
  border-right: 0;
}

.section {
  width: var(--page);
  margin: 0 auto;
  padding: 140px 0;
}

.section-heading {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 80px;
  align-items: end;
  margin-bottom: 68px;
}

.section-heading .eyebrow {
  margin-bottom: 20px;
}

.section-heading h2,
.about-copy h2 {
  font-size: clamp(38px, 5vw, 66px);
}

.section-heading > p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
}

.project {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  transition: transform 240ms ease, background-color 300ms ease;
}

.project:hover {
  transform: translateY(-6px);
}

.project-index {
  position: absolute;
  z-index: 3;
  top: 24px;
  left: 26px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.project-featured {
  min-height: 510px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
}

.project-visual {
  position: relative;
  min-height: 510px;
  overflow: hidden;
  background: #cfed75;
}

.visual-animation::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  top: 50%;
  left: 50%;
  border: 2px solid #151913;
  border-radius: 44% 56% 62% 38%;
  transform: translate(-50%, -50%) rotate(18deg);
}

.visual-animation::after {
  content: "";
  position: absolute;
  width: 88px;
  height: 88px;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 32px rgba(231, 84, 47, 0.16);
}

.frame {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 200px;
  height: 300px;
  border: 1px solid rgba(21, 25, 19, 0.75);
  transform-origin: center;
}

.frame-one {
  transform: translate(-50%, -50%) rotate(-17deg);
}

.frame-two {
  transform: translate(-50%, -50%) rotate(0deg);
}

.frame-three {
  transform: translate(-50%, -50%) rotate(17deg);
}

.visual-caption {
  position: absolute;
  right: 28px;
  bottom: 24px;
  color: #151913;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.project-copy {
  position: relative;
  z-index: 2;
  padding: 68px 56px 54px;
  display: flex;
  flex-direction: column;
}

.project-meta {
  display: flex;
  gap: 9px;
  margin-bottom: 32px;
}

.project-meta span {
  padding: 5px 9px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project h3 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: clamp(32px, 3.6vw, 52px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.project-copy > p {
  margin: 26px 0 38px;
  color: var(--muted);
  font-size: 14px;
}

.text-link {
  width: fit-content;
  margin-top: auto;
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
  font-size: 12px;
  font-weight: 700;
}

.text-link span {
  display: inline-block;
  margin-left: 12px;
  transition: transform 180ms ease;
}

.text-link:hover span {
  transform: translate(3px, -3px);
}

.project-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.research-preview {
  padding-top: 20px;
}

.research-preview-card {
  position: relative;
  min-height: 480px;
  padding: 58px 60px;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(260px, 1.2fr);
  align-items: center;
  overflow: hidden;
  color: var(--dark);
  background: var(--acid);
  box-shadow: var(--shadow);
  transition: transform 240ms ease;
}

.research-preview-card:hover {
  transform: translateY(-6px);
}

.research-preview-card::after {
  content: "";
  position: absolute;
  width: 470px;
  height: 470px;
  right: 9%;
  border: 1px solid rgba(16, 19, 17, 0.28);
  border-radius: 50%;
}

.research-preview-copy {
  position: relative;
  z-index: 2;
  max-width: 470px;
}

.research-preview .project-meta span {
  color: rgba(16, 19, 17, 0.68);
  border-color: rgba(16, 19, 17, 0.24);
}

.research-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 26px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.research-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(231, 84, 47, 0.16);
}

.research-preview-copy h3 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: clamp(54px, 7vw, 92px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.88;
}

.research-preview-copy > p:last-child {
  max-width: 400px;
  margin: 28px 0 0;
  color: rgba(16, 19, 17, 0.66);
  font-size: 14px;
}

.research-preview-mark {
  position: relative;
  z-index: 2;
  justify-self: center;
  font-family: Georgia, serif;
  font-size: clamp(150px, 20vw, 290px);
  line-height: 1;
  transform: rotate(-8deg);
}

.research-preview-link {
  position: absolute;
  z-index: 3;
  right: 32px;
  bottom: 28px;
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
  font-size: 11px;
  font-weight: 750;
}

.research-preview-link b {
  margin-left: 12px;
}

.project-small {
  min-height: 430px;
  display: grid;
  grid-template-columns: 1fr 190px;
}

.project-small .project-copy {
  padding: 66px 36px 38px;
}

.project-small h3 {
  font-size: clamp(30px, 3vw, 42px);
}

.mini-visual {
  position: relative;
  min-height: 100%;
  overflow: hidden;
}

.visual-class {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #171917;
  background: #f0ab9c;
}

.visual-class span {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 26px;
}

.visual-class span:nth-child(2) {
  margin-left: 44px;
  background: var(--acid);
}

.visual-ledger {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: 28px;
  background: #a8bce0;
}

.visual-ledger span {
  height: 58px;
  border: 1px solid #171917;
  background: rgba(246, 244, 236, 0.22);
}

.visual-ledger span:nth-child(2) {
  width: 70%;
}

.visual-ledger span:nth-child(3) {
  width: 84%;
}

.about-section {
  min-height: 710px;
  display: grid;
  grid-template-columns: 0.55fr 1.1fr 0.7fr;
  gap: 68px;
  align-items: center;
  border-top: 1px solid var(--line);
}

.about-number {
  display: grid;
  place-items: center;
  width: 180px;
  height: 180px;
  color: var(--dark);
  background: var(--accent);
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 112px;
  line-height: 1;
  transform: rotate(-8deg);
}

.about-copy > p:not(.eyebrow) {
  max-width: 640px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 15px;
}

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

.principles p {
  margin: 0;
  padding: 20px 0;
  display: flex;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  font-family: Georgia, serif;
  font-size: 17px;
}

.principles span {
  color: var(--muted);
  font-family: sans-serif;
  font-size: 9px;
}

.contact-section {
  position: relative;
  min-height: 650px;
  padding: 120px max(24px, calc((100vw - 1180px) / 2));
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  overflow: hidden;
  color: var(--light);
  background: var(--dark);
}

.contact-section::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image: linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to right, transparent, black);
}

.contact-inner {
  position: relative;
  z-index: 2;
}

.eyebrow.light {
  color: rgba(246, 244, 236, 0.62);
}

.contact-inner h2 {
  max-width: 700px;
  font-size: clamp(46px, 6vw, 78px);
}

.contact-inner > p:not(.eyebrow) {
  max-width: 560px;
  margin: 30px 0 40px;
  color: rgba(246, 244, 236, 0.6);
}

.button-light {
  color: var(--dark);
  background: var(--acid);
  border-color: var(--acid);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.social-links .button {
  min-width: 150px;
}

.button-social {
  color: var(--light);
  border-color: rgba(246, 244, 236, 0.32);
  background: rgba(246, 244, 236, 0.04);
}

.button-social:hover {
  border-color: var(--light);
  background: rgba(246, 244, 236, 0.1);
}

.contact-orbit {
  position: relative;
  z-index: 2;
  min-height: 400px;
  display: grid;
  place-items: center;
}

.contact-core {
  z-index: 2;
  display: grid;
  place-items: center;
  width: 100px;
  height: 100px;
  color: var(--dark);
  background: var(--accent);
  border-radius: 50%;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.contact-ring {
  position: absolute;
  border: 1px solid rgba(246, 244, 236, 0.25);
  border-radius: 50%;
}

.ring-one {
  width: 280px;
  height: 280px;
  animation: pulse 4s ease-in-out infinite;
}

.ring-two {
  width: 430px;
  height: 260px;
  transform: rotate(-28deg);
}

footer {
  width: 100%;
  padding: 28px max(24px, calc((100vw - 1180px) / 2));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  color: rgba(246, 244, 236, 0.55);
  background: var(--dark);
  border-top: 1px solid rgba(246, 244, 236, 0.14);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-brand {
  color: var(--light);
}

.footer-links {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-links a {
  color: var(--light);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { transform: scale(0.95); opacity: 0.55; }
  50% { transform: scale(1.05); opacity: 1; }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal-delay {
  transition-delay: 120ms;
}

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

@media (max-width: 980px) {
  :root { --page: min(100% - 36px, 760px); }

  .hero {
    min-height: auto;
    padding-top: 86px;
    grid-template-columns: 1fr;
    gap: 84px;
  }

  .hero-copy { max-width: 700px; }
  .portrait-wrap { min-height: 520px; }
  .signal-row { grid-template-columns: repeat(3, 1fr); }
  .signal-note { display: none !important; }
  .signal-row p:nth-child(3) { border-right: 0; }
  .section-heading { grid-template-columns: 1fr; gap: 24px; }
  .section-heading > p { max-width: 520px; }
  .project-featured { grid-template-columns: 1fr; }
  .project-visual { min-height: 420px; }
  .project-grid { grid-template-columns: 1fr; }
  .research-preview-card { grid-template-columns: 1fr 0.8fr; }
  .about-section { grid-template-columns: 180px 1fr; }
  .principles { grid-column: 2; }
  .contact-section { grid-template-columns: 1fr; }
  .contact-orbit { position: absolute; right: -130px; opacity: 0.45; }
}

@media (max-width: 660px) {
  :root { --page: calc(100vw - 32px); }

  .site-header {
    height: 68px;
    grid-template-columns: 1fr auto;
  }

  .nav { display: none; }
  .hero { padding: 72px 0 68px; gap: 52px; }
  .hero h1 { font-size: clamp(42px, 13vw, 60px); }
  .hero-intro { font-size: 16px; }
  .portrait-wrap { min-height: 410px; }
  .portrait-card { width: 255px; }
  .orbit-large { width: 330px; height: 330px; }
  .orbit-small { width: 300px; height: 190px; }
  .status-card { left: 0; min-width: 210px; }
  .signal-row { padding: 26px 0; }
  .signal-row p { flex-direction: column; gap: 0; }
  .signal-row strong { font-size: 24px; }
  .signal-row span { font-size: 8px; }
  .section { padding: 96px 0; }
  .section-heading { margin-bottom: 46px; }
  .project-visual { min-height: 330px; }
  .project-copy { padding: 56px 28px 34px; }
  .project-grid { gap: 14px; margin-top: 14px; }
  .project-small { min-height: 560px; grid-template-columns: 1fr; }
  .project-small .project-copy { min-height: 350px; }
  .mini-visual { min-height: 210px; }
  .visual-class { flex-direction: row; }
  .visual-class span:nth-child(2) { margin: 30px 0 0; }
  .research-preview-card { min-height: 620px; padding: 48px 28px; grid-template-columns: 1fr; align-content: center; }
  .research-preview-card::after { width: 300px; height: 300px; right: -80px; bottom: -60px; }
  .research-preview-copy h3 { font-size: 58px; }
  .research-preview-mark { position: absolute; right: -20px; bottom: 20px; font-size: 180px; opacity: 0.45; }
  .about-section { display: block; }
  .about-number { width: 110px; height: 110px; margin-bottom: 52px; font-size: 72px; }
  .principles { margin-top: 56px; }
  .contact-section { min-height: 620px; padding-top: 94px; padding-bottom: 94px; }
  .contact-inner h2 { font-size: clamp(44px, 13vw, 62px); }
  .social-links { max-width: 340px; }
  .social-links .button { flex: 1 1 140px; }
  .contact-orbit { right: -220px; }
  footer { grid-template-columns: 1fr auto; }
  footer > p { display: none; }
  .footer-links { gap: 12px; font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
