:root {
  color-scheme: dark;
  --bg: #0c0f0e;
  --surface: #151a17;
  --surface-2: #1d2420;
  --ink: #eef1eb;
  --muted: #9da7a0;
  --line: #313a34;
  --accent: #e4784d;
  --accent-soft: #f2a07c;
  --radius: 22px;
  --max: 1320px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: Geist, "Aptos", "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: fixed; top: 16px; left: 16px; z-index: 100;
  transform: translateY(-180%); padding: 10px 16px; border-radius: 10px;
  background: var(--ink); color: var(--bg);
}
.skip-link:focus { transform: translateY(0); }

.grain {
  position: fixed; inset: 0; z-index: 80; pointer-events: none; opacity: .055;
  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='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}
.ambient {
  position: fixed; z-index: -1; width: 44vw; height: 44vw; border-radius: 50%;
  pointer-events: none; filter: blur(110px); opacity: .13;
}
.ambient-one { top: -20vw; right: -8vw; background: var(--accent); }
.ambient-two { bottom: -24vw; left: -18vw; background: #54856b; }

.site-header {
  position: fixed; top: 18px; left: 50%; z-index: 60;
  translate: -50% 0;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 34px;
  width: min(calc(100% - 36px), 1180px); min-height: 62px; padding: 8px 10px 8px 12px;
  border: 1px solid rgba(255,255,255,.12); border-radius: 999px;
  background: rgba(12,15,14,.72); backdrop-filter: blur(22px) saturate(140%);
  box-shadow: inset 0 1px rgba(255,255,255,.08), 0 18px 50px rgba(0,0,0,.24);
}
.wordmark {
  display: grid; width: 42px; height: 42px; place-items: center;
  border: 1px solid rgba(255,255,255,.35); border-radius: 50%;
  font-weight: 850; letter-spacing: -.06em; text-decoration: none;
}
nav { display: flex; justify-content: center; gap: clamp(18px,3vw,42px); }
nav a { color: var(--muted); font-size: .82rem; font-weight: 700; text-decoration: none; }
nav a:hover { color: var(--ink); }
.nav-contact {
  display: inline-flex; min-height: 42px; align-items: center; padding: 0 18px;
  border-radius: 999px; background: var(--ink); color: var(--bg);
  font-size: .8rem; font-weight: 800; text-decoration: none;
}

.hero {
  position: relative; display: grid; min-height: 100dvh; align-items: center; overflow: hidden;
  padding: 142px 24px 88px; isolation: isolate;
}
#systems-canvas { position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%; }
.hero-wash {
  position: absolute; inset: 0; z-index: -2;
  background: radial-gradient(circle at 50% 44%, rgba(12,15,14,.1) 0, rgba(12,15,14,.64) 44%, var(--bg) 81%);
}
.hero-content { width: min(100%, 1180px); margin: 0 auto; text-align: center; }
.hero-kicker, .eyebrow {
  margin: 0 0 20px; color: var(--accent-soft); font-size: .74rem; font-weight: 850;
  letter-spacing: .14em; text-transform: uppercase;
}
h1, h2, h3, p { text-wrap: pretty; }
h1 {
  max-width: 1180px; margin: 0 auto;
  font-size: clamp(3rem, 6.8vw, 6.9rem); font-weight: 760;
  letter-spacing: -.067em; line-height: .94;
}
.inline-portrait {
  display: inline-block; width: clamp(72px, 9vw, 128px); height: clamp(42px, 5.3vw, 76px);
  margin: 0 .06em; overflow: hidden; border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px; vertical-align: .08em; transform: rotate(-4deg);
}
.inline-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 23%; filter: grayscale(1) contrast(1.12); }
.hero-intro {
  max-width: 700px; margin: 30px auto 0; color: #b7c0ba;
  font-size: clamp(1.03rem, 1.5vw, 1.26rem);
}
.hero-actions { display: flex; justify-content: center; gap: 12px; margin-top: 34px; }
.button {
  position: relative; display: inline-flex; min-height: 54px; align-items: center; justify-content: center;
  padding: 0 23px; border: 1px solid transparent; border-radius: 999px;
  font-size: .88rem; font-weight: 800; text-decoration: none; white-space: nowrap;
}
.button-primary { background: var(--accent); color: #180c07; }
.button-ghost { border-color: rgba(255,255,255,.3); background: rgba(10,12,11,.3); color: var(--ink); }
.button-light { background: var(--ink); color: var(--bg); }
.button-outline-light { border-color: rgba(255,255,255,.45); color: var(--ink); }
.hero-foot {
  position: absolute; right: 24px; bottom: 24px; left: 24px;
  display: flex; justify-content: space-between; max-width: var(--max); margin: auto;
  color: #838e86; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}

.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.marquee-track {
  display: flex; width: max-content; padding: 21px 0;
  animation: marquee 34s linear infinite;
}
.marquee span {
  display: inline-flex; align-items: center; color: #7f8982;
  font-size: .75rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
}
.marquee span::after { content: "/"; margin: 0 30px; color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

.section { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; padding: clamp(120px,15vw,210px) 0; }
.section-heading { max-width: 900px; margin-bottom: 70px; }
h2 { margin: 0; font-size: clamp(2.8rem,5.8vw,6rem); font-weight: 730; letter-spacing: -.06em; line-height: .96; }

.bento {
  display: grid; grid-template-columns: repeat(12,1fr); grid-auto-flow: dense;
  gap: 14px; perspective: 1200px;
}
.bento-item {
  position: relative; display: flex; min-height: 330px; flex-direction: column; justify-content: space-between;
  grid-column: span 4; overflow: hidden; padding: clamp(25px,3vw,42px);
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  transform-style: preserve-3d; will-change: transform;
}
.bento-enterprise { grid-column: span 7; min-height: 410px; background: linear-gradient(145deg,#252e28,var(--surface)); }
.bento-ai { grid-column: span 5; min-height: 410px; background: linear-gradient(145deg,#302118,var(--surface)); }
.bento-item h3 { max-width: 620px; margin: 0; font-size: clamp(1.7rem,3vw,3.2rem); letter-spacing: -.045em; line-height: 1; }
.bento-item p { max-width: 560px; margin: 17px 0 0; color: var(--muted); }
.bento-item > span { color: var(--accent-soft); font-size: .74rem; font-weight: 800; }
.orb-mini { position: absolute; top: -50px; right: -40px; width: 220px; height: 220px; transform-style: preserve-3d; }
.orb-mini i { position: absolute; inset: 18%; border: 1px solid rgba(228,120,77,.42); border-radius: 50%; animation: orb 9s linear infinite; }
.orb-mini i:nth-child(2) { transform: rotateX(68deg); animation-direction: reverse; }
.orb-mini i:nth-child(3) { transform: rotateY(68deg); animation-duration: 13s; }
@keyframes orb { to { transform: rotate(360deg) rotateX(55deg); } }

.projects-pin { position: relative; min-height: 100dvh; overflow: hidden; border-top: 1px solid var(--line); }
.projects-intro {
  position: absolute; top: 11vh; left: max(24px,calc((100vw - var(--max))/2)); z-index: 4; max-width: 560px;
}
.projects-intro h2 { font-size: clamp(2.8rem,5vw,5.4rem); }
.projects-intro > p:last-child { max-width: 500px; color: var(--muted); }
.projects-viewport { display: flex; min-height: 100dvh; align-items: flex-end; overflow: hidden; padding: 0 0 6vh; }
.projects-track { display: flex; gap: 22px; width: max-content; padding: 0 max(24px,calc((100vw - var(--max))/2)); }
.project-slide {
  position: relative; display: grid; flex: 0 0 min(78vw,1080px); min-height: 56vh;
  grid-template-columns: 1.05fr .95fr; overflow: hidden; padding: clamp(26px,4vw,54px);
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.project-lead { background: #1b241f; }
.project-pos { background: #28231c; }
.project-ai { background: #171f24; }
.project-web { background: #211c22; }
.project-meta { position: absolute; top: 26px; right: 30px; left: 30px; display: flex; justify-content: space-between; color: #89938c; font-size: .7rem; font-weight: 750; text-transform: uppercase; }
.project-slide:first-child .project-meta span:first-child { visibility: hidden; }
.project-content { align-self: end; z-index: 2; }
.project-type { margin: 0 0 14px; color: var(--accent-soft); font-size: .73rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.project-content h3 { max-width: 660px; margin: 0; font-size: clamp(2.4rem,5vw,5.6rem); letter-spacing: -.06em; line-height: .91; }
.project-content > p:last-of-type { max-width: 590px; margin: 24px 0 0; color: #aeb7b0; }
.project-links { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 25px; }
.project-links a { color: var(--accent-soft); font-size: .8rem; font-weight: 800; }
.project-visual { position: relative; align-self: center; justify-self: center; width: min(34vw,420px); aspect-ratio: 1; }
.enterprise-visual { display: grid; place-items: center; perspective: 800px; }
.system-ring { position: absolute; inset: 12%; border: 1px solid rgba(242,160,124,.45); border-radius: 50%; animation: ring 10s linear infinite; }
.ring-b { inset: 25%; transform: rotateX(68deg); animation-direction: reverse; }
.system-core { display: grid; width: 86px; height: 86px; place-items: center; border-radius: 24px; background: var(--accent); color: #180c07; font-weight: 900; transform: translateZ(55px); box-shadow: 0 25px 70px rgba(228,120,77,.22); }
@keyframes ring { to { transform: rotateY(360deg) rotateX(55deg); } }
.pos-visual { display: grid; place-items: center; transform: rotateY(-12deg) rotateX(7deg); perspective: 900px; }
.receipt { display: flex; width: 70%; min-height: 80%; flex-direction: column; gap: 16px; padding: 32px; border-radius: 8px; background: #ece7db; color: #242019; box-shadow: 30px 36px 70px rgba(0,0,0,.32); }
.receipt b { margin-bottom: 20px; font-size: 1.4rem; }.receipt span { padding-bottom: 8px; border-bottom: 1px solid #bcb5a6; }.receipt strong { margin-top: auto; color: #8a3f21; }
.vision-visual { display: grid; place-items: center; }
.vision-frame { position: relative; width: 78%; aspect-ratio: 1; border: 1px solid #6a8796; }
.vision-frame::before,.vision-frame::after,.vision-frame i::before,.vision-frame i::after { content:""; position:absolute; width:30px; height:30px; border-color:var(--accent); }
.vision-frame::before { top:-1px; left:-1px; border-top:3px solid var(--accent); border-left:3px solid var(--accent); }
.vision-frame::after { right:-1px; bottom:-1px; border-right:3px solid var(--accent); border-bottom:3px solid var(--accent); }
.vision-frame i::before { top:-1px; right:-1px; border-top:3px solid var(--accent); border-right:3px solid var(--accent); }
.vision-frame i::after { bottom:-1px; left:-1px; border-bottom:3px solid var(--accent); border-left:3px solid var(--accent); }
.vision-frame span { position:absolute; right:12px; bottom:10px; color:#8aa1ad; font-size:.62rem; font-weight:800; letter-spacing:.1em; }
.web-visual { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; align-items:end; }
.web-visual div { border:1px solid #5b4a5e; border-radius:16px; background:linear-gradient(160deg,#342838,#171317); transform:rotateY(-16deg); }
.web-visual div:nth-child(1){height:62%}.web-visual div:nth-child(2){height:88%;transform:translateY(-4%) rotateY(-16deg)}.web-visual div:nth-child(3){height:72%}
.slider-controls {
  position: absolute; right: max(24px,calc((100vw - var(--max))/2)); bottom: 24px; left: max(24px,calc((100vw - var(--max))/2));
  display: flex; z-index: 5; align-items: center; gap: 16px;
}
.slider-controls button,.principle-controls button {
  padding: 8px 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: .75rem; font-weight: 800; cursor: pointer;
}
.slider-progress { height: 2px; flex: 1; overflow: hidden; background: #323a35; }
.slider-progress i { display:block; width:100%; height:100%; background:var(--accent); transform:scaleX(0); transform-origin:left; }

.project-gallery { padding-top:clamp(7rem,12vw,12rem); }
.project-gallery .section-heading p:last-child { max-width:52rem; color:var(--muted); }
.project-gallery-grid {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1px;
  margin-top:clamp(2.5rem,5vw,5rem); border:1px solid var(--line); background:var(--line);
}
.project-screenshot {
  min-width:0; margin:0; padding:clamp(1rem,2vw,1.5rem);
  background:var(--surface); transform-style:preserve-3d;
}
.project-screenshot-frame {
  overflow:hidden; aspect-ratio:16 / 10;
  border:1px solid rgba(255,255,255,.08); background:#151a18;
}
.project-screenshot img {
  display:block; width:100%; height:100%; object-fit:cover; object-position:top center;
  transition:transform 700ms cubic-bezier(.2,.8,.2,1);
}
.project-screenshot:hover img { transform:scale(1.035); }
.project-screenshot figcaption {
  display:flex; justify-content:space-between; gap:1rem; padding-top:1.15rem;
}
.project-screenshot figcaption span {
  color:var(--muted); font-size:.72rem; letter-spacing:.12em; text-transform:uppercase;
}
.project-screenshot figcaption strong { color:var(--paper); font-weight:500; }

.statement { min-height: 110dvh; display: grid; place-items: center; }
.statement-copy { max-width: 1120px; margin: 0; color: #4b554e; font-size: clamp(2.8rem,6.1vw,6.8rem); font-weight: 690; letter-spacing: -.06em; line-height: .98; text-align: center; }
.statement-copy .word { display: inline-block; will-change: color; }

.experience { display: grid; grid-template-columns: .78fr 1.22fr; gap: clamp(50px,9vw,130px); align-items: start; }
.experience-sticky { position: sticky; top: 140px; }
.experience-sticky h2 { font-size: clamp(2.6rem,4.6vw,4.8rem); }
.experience-sticky > p:last-child { color:var(--muted); }
.role { min-height: 62vh; padding: 28px 0 80px; border-top: 1px solid var(--line); }
.role > p:first-child { color:var(--accent-soft); font-size:.72rem; font-weight:800; }
.role h3 { max-width:720px; margin:80px 0 10px; font-size:clamp(2rem,4vw,4.5rem); letter-spacing:-.055em; line-height:.95; }
.role h4 { margin:0; font-size:.95rem; }
.role > p:last-child { max-width:650px; margin-top:24px; color:var(--muted); }

.principles { padding-top: 60px; }
.principles-stage { position:relative; min-height:480px; overflow:hidden; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.principle { position:absolute; inset:0; display:grid; align-content:center; opacity:0; transform:translateY(40px); pointer-events:none; }
.principle.is-active { opacity:1; transform:none; pointer-events:auto; }
.principle span { color:var(--accent-soft); font-size:.72rem; font-weight:800; }
.principle h2 { max-width:1050px; margin-top:22px; }
.principle-controls { display:flex; justify-content:flex-end; gap:26px; margin-top:20px; }

.contact {
  display:grid; grid-template-columns:1.2fr .8fr; gap:70px; align-items:end;
  width:min(calc(100% - 40px),var(--max)); margin:80px auto 32px; padding:clamp(42px,7vw,90px);
  border-radius:var(--radius); background:var(--accent); color:#180c07;
}
.contact .eyebrow { color:#5b2410; }
.contact h2 { max-width:860px; }
.contact-actions { display:flex; flex-direction:column; align-items:stretch; gap:12px; }
.contact-actions > a:last-child { padding:12px; text-align:center; font-size:.82rem; font-weight:800; }
.site-footer {
  display:grid; grid-template-columns:.45fr 1fr auto; gap:30px; width:min(calc(100% - 40px),var(--max));
  margin:0 auto; padding:34px 0 48px; border-top:1px solid var(--line); color:var(--muted); font-size:.78rem;
}
.site-footer strong { color:var(--ink); }
:focus-visible { outline:3px solid var(--accent-soft); outline-offset:4px; }

@media (max-width: 900px) {
  .site-header { display:flex; justify-content:space-between; }
  .site-header nav { display:none; }
  .nav-contact { justify-self:end; }
  .hero { min-height: 920px; }
  .hero-foot { gap:16px; flex-wrap:wrap; }
  .bento-item,.bento-enterprise,.bento-ai { grid-column:span 12; min-height:320px; }
  .projects-pin { min-height:auto; padding:120px 0 40px; }
  .projects-intro { position:relative; top:auto; left:auto; width:calc(100% - 40px); margin:0 auto 50px; }
  .projects-viewport { min-height:auto; overflow-x:auto; padding-bottom:20px; scroll-snap-type:x mandatory; }
  .projects-track { padding:0 20px; }
  .project-slide { flex-basis:88vw; min-height:720px; grid-template-columns:1fr; scroll-snap-align:center; }
  .project-visual { width:min(72vw,380px); grid-row:1; }
  .slider-controls { position:relative; right:auto; bottom:auto; left:auto; width:calc(100% - 40px); margin:10px auto 0; }
  .experience { grid-template-columns:1fr; }
  .experience-sticky { position:relative; top:auto; }
  .role { min-height:auto; padding:70px 0; }
  .role h3 { margin-top:38px; }
  .contact { grid-template-columns:1fr; }
}

@media (max-width: 620px) {
  body { font-size:16px; }
  .project-gallery-grid { grid-template-columns:1fr; }
  .project-screenshot figcaption { align-items:flex-start; flex-direction:column; }
  .site-header { width:calc(100% - 24px); top:12px; min-height:56px; }
  .wordmark { width:38px; height:38px; }
  .hero { min-height:100dvh; padding:120px 14px 92px; }
  h1 { font-size:clamp(2.8rem,13vw,4.4rem); line-height:.92; }
  .hero-intro { max-width:340px; }
  .hero-actions { flex-direction:column; align-items:stretch; }
  .hero-foot { right:14px; left:14px; font-size:.58rem; }
  .hero-foot span:nth-child(2) { display:none; }
  .section,.contact,.site-footer { width:calc(100% - 28px); }
  .section { padding:110px 0; }
  .section-heading { margin-bottom:44px; }
  .bento { gap:10px; }
  .bento-item { padding:24px; border-radius:16px; }
  .project-slide { flex-basis:calc(100vw - 28px); min-height:670px; padding:24px; border-radius:16px; }
  .project-meta { top:20px; right:22px; left:22px; }
  .project-meta span:last-child { display:none; }
  .project-content h3 { font-size:clamp(2.3rem,11vw,3.7rem); }
  .project-visual { width:min(70vw,300px); }
  .statement { min-height:90dvh; }
  .statement-copy { font-size:clamp(2.6rem,12vw,4rem); text-align:left; }
  .principles-stage { min-height:540px; }
  .contact { margin-top:30px; padding:36px 24px; }
  .contact h2 { font-size:clamp(2.6rem,12vw,4rem); }
  .site-footer { grid-template-columns:1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior:auto; }
  *,*::before,*::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; scroll-behavior:auto !important; }
  #systems-canvas { display:none; }
}
