:root {
  --ink: #070807;
  --ink-soft: #101110;
  --paper: #f1eee7;
  --muted: rgba(241, 238, 231, .58);
  --line: rgba(241, 238, 231, .16);
  --accent: #ff4b22;
  --acid: #d9ff43;
  --max: 1580px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--paper);
  background: var(--ink);
  font-family: "Inter Tight", "Helvetica Neue", Inter, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background:
    radial-gradient(circle at 78% 12%, rgba(255, 75, 34, .1), transparent 25%),
    radial-gradient(circle at 10% 70%, rgba(217, 255, 67, .035), transparent 24%),
    var(--ink);
}
::selection { color: var(--ink); background: var(--accent); }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { display: block; max-width: 100%; }

.noise {
  position: fixed;
  inset: -50%;
  z-index: 20;
  pointer-events: none;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
  animation: grain .24s steps(2) infinite;
}
@keyframes grain { 0% { transform: translate(0) } 25% { transform: translate(2%, -1%) } 50% { transform: translate(-1%, 2%) } 75% { transform: translate(1%, 1%) } }
.cursor-glow {
  position: fixed;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 75, 34, .08), transparent 68%);
  transform: translate(-50%, -50%);
  transition: opacity .3s;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 88px;
  padding: 0 clamp(22px, 4vw, 74px);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.topbar.is-scrolled { background: rgba(7, 8, 7, .76); border-color: var(--line); backdrop-filter: blur(18px); }
.brand { display: inline-flex; align-items: center; gap: 13px; width: max-content; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  color: var(--ink);
  background: var(--paper);
  font-size: 11px;
  font-weight: 900;
  transition: transform .35s var(--ease), background .3s;
}
.brand:hover .brand-mark { transform: rotate(8deg); background: var(--accent); }
.brand-name, .nav, .lang-toggle { font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.nav { display: flex; gap: clamp(22px, 3vw, 52px); }
.nav a { color: var(--muted); transition: color .25s; }
.nav a:hover { color: var(--paper); }
.lang-toggle {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 0;
  color: var(--paper);
  border: 0;
  background: transparent;
  cursor: pointer;
}
.lang-toggle span { opacity: .35; transition: opacity .25s; }
.lang-toggle span.is-active { opacity: 1; }
.lang-toggle i { width: 1px; height: 14px; transform: rotate(18deg); background: rgba(255,255,255,.4); }

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 150px clamp(22px, 4vw, 74px) 64px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  position: absolute;
  inset: 0;
  opacity: .42;
  background-image: linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 11.111vw 100%, 100% 120px;
  mask-image: linear-gradient(to bottom, black, transparent 90%);
}
.hero-orbit {
  position: absolute;
  border: 1px solid rgba(241, 238, 231, .1);
  border-radius: 50%;
  pointer-events: none;
  transform-style: preserve-3d;
}
.orbit-one { width: 49vw; height: 49vw; right: -12vw; top: -16vw; transform: rotateX(64deg) rotateZ(18deg); }
.orbit-two { width: 34vw; height: 34vw; right: 1vw; top: -9vw; border-color: rgba(255, 75, 34, .32); transform: rotateY(56deg) rotateZ(-20deg); }
.eyebrow {
  position: relative;
  margin: 0;
  color: var(--accent);
  font: 800 clamp(10px, .72vw, 12px)/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.hero h1 {
  position: relative;
  z-index: 1;
  width: min(1300px, 92vw);
  margin: clamp(28px, 5vh, 60px) 0 0;
  font-size: clamp(64px, 10.3vw, 198px);
  font-weight: 570;
  line-height: .83;
  letter-spacing: -.075em;
  text-transform: uppercase;
}
.hero h1 span, .hero h1 em { display: block; }
.hero h1 em { color: transparent; font-style: normal; -webkit-text-stroke: 1.5px var(--paper); transform: translateX(7vw); }
.hero-bottom {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
  margin-top: clamp(54px, 9vh, 105px);
  padding-top: 23px;
  border-top: 1px solid var(--line);
}
.hero-bottom p { width: min(570px, 48vw); margin: 0; color: var(--muted); font-size: clamp(15px, 1.05vw, 19px); line-height: 1.62; }
.text-link { display: flex; align-items: center; gap: 25px; font-size: clamp(16px, 1.1vw, 20px); font-weight: 750; text-transform: uppercase; }
.text-link b { display: grid; place-items: center; width: 49px; height: 49px; color: var(--ink); background: var(--accent); transition: transform .35s var(--ease); }
.text-link:hover b { transform: translateY(5px); }
.hero-index { position: absolute; right: clamp(22px, 4vw, 74px); top: 47%; display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.3); font: 700 10px monospace; transform: rotate(90deg); transform-origin: right; }
.hero-index i { width: 54px; height: 1px; background: rgba(255,255,255,.25); }

.work-section, .about-section, .contact-section { max-width: var(--max); margin: 0 auto; padding-left: clamp(22px, 4vw, 74px); padding-right: clamp(22px, 4vw, 74px); }
.work-section { padding-top: clamp(110px, 14vw, 225px); padding-bottom: clamp(120px, 14vw, 220px); }
.section-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 410px); gap: 8vw; align-items: end; margin-bottom: clamp(80px, 10vw, 155px); }
.section-heading h2, .about-copy h2 {
  margin: 25px 0 0;
  font-size: clamp(44px, 5.4vw, 94px);
  font-weight: 540;
  line-height: .96;
  letter-spacing: -.058em;
  white-space: pre-line;
}
.heading-note { margin: 0; padding-top: 18px; color: var(--muted); border-top: 1px solid var(--line); font-size: clamp(14px, 1vw, 17px); line-height: 1.65; }
.projects { display: grid; gap: clamp(88px, 10vw, 175px); }
.project { display: grid; grid-template-columns: minmax(0, 1.56fr) minmax(310px, .74fr); gap: clamp(38px, 6vw, 105px); align-items: center; perspective: 1200px; }
.project:nth-child(even) { grid-template-columns: minmax(310px, .74fr) minmax(0, 1.56fr); }
.project:nth-child(even) .project-visual { grid-column: 2; grid-row: 1; }
.project:nth-child(even) .project-copy { grid-column: 1; grid-row: 1; }
.project-visual {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  padding: clamp(10px, 1vw, 16px);
  background: #171817;
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 42px 100px rgba(0,0,0,.44), 0 2px 0 rgba(255,255,255,.08) inset;
  transform-style: preserve-3d;
  transition: transform .18s ease-out, border-color .3s;
  will-change: transform;
}
.project-visual-button { width: 100%; color: inherit; text-align: left; cursor: pointer; }
.project-visual::before {
  content: "";
  position: absolute;
  inset: 8%;
  z-index: -1;
  background: var(--accent);
  filter: blur(75px);
  opacity: .1;
  transform: translateZ(-45px);
}
.project-visual::after { content: ""; position: absolute; inset: clamp(10px,1vw,16px); background: linear-gradient(120deg, rgba(255,255,255,.08), transparent 28%, transparent 70%, rgba(0,0,0,.22)); pointer-events: none; }
.project-visual img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.88) contrast(1.03); transition: filter .4s, transform .6s var(--ease); }
.project-visual:hover { border-color: rgba(255,255,255,.45); }
.project-visual:hover img { filter: saturate(1.05) contrast(1.03); transform: scale(1.012); }
.project-featured .project-visual img { object-fit: contain; background: #f5f5f5; }
.pixel-art img { image-rendering: auto; }
.project-number { position: absolute; top: -18px; right: -18px; z-index: 2; display: grid; place-items: center; width: 54px; height: 54px; color: var(--ink); background: var(--accent); font: 900 11px monospace; transform: translateZ(35px); }
.project-copy { position: relative; }
.project-meta { display: flex; justify-content: space-between; gap: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); color: rgba(241,238,231,.4); font: 750 10px/1.4 monospace; letter-spacing: .09em; }
.project-copy h3 { margin: 29px 0 24px; font-size: clamp(43px, 4vw, 73px); font-weight: 560; line-height: .95; letter-spacing: -.055em; }
.project-copy > p { min-height: 5.25em; margin: 0; color: var(--muted); font-size: clamp(15px, 1vw, 18px); line-height: 1.75; }
.enter-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 34px;
  padding: 17px 20px;
  color: var(--paper);
  border: 1px solid rgba(255,255,255,.25);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: color .3s, background .3s, border-color .3s;
  background: transparent;
  cursor: pointer;
}
.enter-button b { font-size: 19px; font-weight: 400; transition: transform .35s var(--ease); }
.enter-button:hover { color: var(--ink); background: var(--paper); border-color: var(--paper); }
.enter-button:hover b { transform: translate(4px, -4px); }

.about-section { padding-top: clamp(100px, 12vw, 190px); padding-bottom: clamp(110px, 13vw, 210px); border-top: 1px solid var(--line); }
.about-label { display: flex; justify-content: space-between; color: rgba(255,255,255,.38); font: 800 10px monospace; letter-spacing: .12em; }
.about-layout { display: grid; grid-template-columns: minmax(260px, .7fr) minmax(0, 1.3fr); gap: clamp(55px, 9vw, 150px); align-items: center; margin-top: clamp(65px, 8vw, 120px); }
.portrait-stage { position: relative; perspective: 900px; transform-style: preserve-3d; }
.portrait-stage img { position: relative; z-index: 2; width: 82%; aspect-ratio: 1; object-fit: cover; border: 1px solid rgba(255,255,255,.2); transform: rotateY(5deg) rotateX(-2deg) translateZ(25px); box-shadow: -30px 35px 80px rgba(0,0,0,.5); }
.portrait-back { position: absolute; top: 8%; right: 3%; width: 82%; aspect-ratio: 1; border: 1px solid var(--accent); transform: translateZ(-30px); }
.portrait-stage > span { position: absolute; left: -26px; bottom: 8%; z-index: 3; padding: 13px 18px; color: var(--ink); background: var(--acid); font: 900 10px monospace; letter-spacing: .08em; transform: rotate(-90deg) translateY(-100%); transform-origin: left bottom; }
.about-copy > p:not(.eyebrow) { max-width: 800px; margin: clamp(35px, 4vw, 62px) 0 0; color: var(--muted); font-size: clamp(17px, 1.32vw, 23px); line-height: 1.76; }
.capabilities { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 39px; }
.capabilities span { padding: 10px 13px; border: 1px solid var(--line); color: rgba(255,255,255,.58); font: 750 10px monospace; letter-spacing: .06em; }

.contact-section { padding-top: clamp(100px, 12vw, 190px); padding-bottom: clamp(90px, 10vw, 150px); border-top: 1px solid var(--line); }
.contact-section h2 { margin: 25px 0 clamp(65px, 8vw, 120px); color: var(--paper); font-size: clamp(76px, 13.2vw, 220px); font-weight: 560; line-height: .84; letter-spacing: -.078em; text-transform: uppercase; }
.contact-links { border-top: 1px solid var(--line); }
.contact-links a { display: grid; grid-template-columns: 140px 1fr auto; gap: 25px; align-items: center; padding: 28px 0; border-bottom: 1px solid var(--line); transition: color .25s, padding .35s var(--ease); }
.contact-links a:hover { color: var(--accent); padding-left: 10px; }
.contact-links small { color: rgba(255,255,255,.36); font: 750 10px monospace; letter-spacing: .1em; }
.contact-links span { font-size: clamp(20px, 2vw, 34px); font-weight: 560; }
.contact-links b { font-size: 25px; font-weight: 400; }
footer { display: flex; justify-content: space-between; gap: 30px; padding: 35px clamp(22px, 4vw, 74px); color: rgba(255,255,255,.33); border-top: 1px solid var(--line); font: 750 9px monospace; letter-spacing: .1em; }

.case-dialog {
  width: min(1120px, calc(100vw - 40px));
  max-height: calc(100svh - 40px);
  padding: 0;
  color: var(--paper);
  border: 1px solid rgba(255,255,255,.22);
  background: #0c0e10;
  box-shadow: 0 50px 160px rgba(0,0,0,.75);
}
.case-dialog::backdrop { background: rgba(0,0,0,.82); backdrop-filter: blur(12px); }
.case-dialog-inner { position: relative; padding: clamp(28px, 5vw, 72px); }
.case-close { position: absolute; top: 24px; right: 24px; display: grid; place-items: center; width: 44px; height: 44px; color: var(--paper); border: 1px solid var(--line); background: transparent; font-size: 28px; font-weight: 300; cursor: pointer; transition: color .25s, background .25s; }
.case-close:hover { color: var(--ink); background: var(--paper); }
.case-dialog h2 { margin: 24px 0 45px; font-size: clamp(44px, 6.2vw, 88px); font-weight: 540; line-height: .94; letter-spacing: -.06em; }
.case-dialog > div > img { width: 100%; border: 1px solid var(--line); }
.case-facts { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.case-facts div { min-height: 118px; padding: 24px; border-right: 1px solid var(--line); }
.case-facts div:last-child { border-right: 0; }
.case-facts small { display: block; margin-bottom: 14px; color: rgba(255,255,255,.36); font: 750 9px monospace; letter-spacing: .1em; }
.case-facts strong { font-size: clamp(14px, 1.15vw, 18px); font-weight: 560; line-height: 1.45; }
.case-summary { max-width: 850px; margin: 40px 0 0; color: var(--muted); font-size: clamp(15px, 1.1vw, 19px); line-height: 1.85; }

.reveal { opacity: 0; transform: translateY(36px); transition: opacity .85s var(--ease), transform .85s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .project, .project:nth-child(even) { grid-template-columns: 1fr; gap: 34px; }
  .project:nth-child(even) .project-visual, .project:nth-child(even) .project-copy { grid-column: 1; grid-row: auto; }
  .project-copy { max-width: 680px; }
  .project-copy > p { min-height: 0; }
  .section-heading { grid-template-columns: 1fr; }
  .heading-note { max-width: 520px; }
  .about-layout { grid-template-columns: .75fr 1.25fr; gap: 55px; }
}

@media (max-width: 700px) {
  .topbar { grid-template-columns: 1fr auto; height: 72px; }
  .brand-name { display: none; }
  .nav { display: none; }
  .hero { min-height: 860px; padding-top: 125px; }
  .hero h1 { width: 100%; font-size: clamp(60px, 20vw, 106px); line-height: .87; }
  .hero h1 em { transform: translateX(0); margin-top: 10px; }
  .hero-bottom { align-items: start; flex-direction: column; }
  .hero-bottom p { width: 100%; }
  .hero-index { display: none; }
  .orbit-one { width: 105vw; height: 105vw; right: -55vw; top: 2vw; }
  .orbit-two { width: 78vw; height: 78vw; right: -30vw; top: 12vw; }
  .section-heading h2, .about-copy h2 { font-size: clamp(43px, 13vw, 70px); }
  .project-number { top: -11px; right: -10px; width: 42px; height: 42px; }
  .project-copy h3 { margin-top: 25px; }
  .project-meta { gap: 10px; }
  .about-label span:last-child { display: none; }
  .about-layout { grid-template-columns: 1fr; }
  .portrait-stage { width: min(90%, 430px); margin-left: 6%; }
  .contact-links a { grid-template-columns: 1fr auto; gap: 8px; }
  .contact-links small { grid-column: 1 / -1; }
  .contact-links span { overflow-wrap: anywhere; }
  footer { flex-direction: column; }
  .case-dialog { width: calc(100vw - 20px); max-height: calc(100svh - 20px); }
  .case-dialog-inner { padding: 54px 20px 30px; }
  .case-close { top: 12px; right: 12px; width: 38px; height: 38px; }
  .case-facts { grid-template-columns: 1fr; }
  .case-facts div { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .case-facts div:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .noise { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .project-visual, .portrait-stage img { transform: none !important; }
}
