:root {
  --bg: #090b0d;
  --panel: #101418;
  --text: #f1eee7;
  --muted: #9da3a5;
  --rust: #d65c32;
  --cyan: #5fd8dc;
  --line: rgba(255,255,255,.13);
  --pad: clamp(22px, 5vw, 76px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Segoe UI", Arial, sans-serif;
  overflow-x: hidden;
}
body::selection { background: var(--rust); color: #fff; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.noise {
  position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: .035;
  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='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}
.scroll-progress { position: fixed; left: 0; top: 0; z-index: 100; width: 0; height: 2px; background: var(--rust); box-shadow: 0 0 14px var(--rust); }

.site-header {
  position: fixed; z-index: 40; top: 0; left: 0; right: 0; height: 78px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 var(--pad); border-bottom: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(to bottom, rgba(7,9,11,.82), transparent);
  transition: background .35s, backdrop-filter .35s;
}
.site-header.scrolled { background: rgba(9,11,13,.84); backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 12px; text-transform: uppercase; font: 700 12px/1 ui-monospace, Consolas, monospace; letter-spacing: .17em; }
.brand-mark { display: grid; place-items: center; width: 34px; aspect-ratio: 1; border: 1px solid var(--rust); color: var(--rust); letter-spacing: 0; }
nav { display: flex; gap: clamp(18px, 3vw, 46px); }
nav a, .header-cta { position: relative; font-size: 12px; text-transform: uppercase; letter-spacing: .13em; color: #d8d8d4; }
nav a::after { content: ""; position: absolute; left: 0; bottom: -8px; width: 100%; height: 1px; background: var(--rust); transform: scaleX(0); transform-origin: right; transition: transform .3s; }
nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.header-cta { justify-self: end; color: var(--cyan); }

.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; padding: 150px var(--pad) clamp(82px, 11vh, 130px); isolation: isolate; overflow: hidden; }
.hero-media, .hero-shade, .hero-grid { position: absolute; inset: 0; }
.hero-media { z-index: -4; transform: scale(1.06); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; animation: breathe 16s ease-in-out infinite alternate; }
.hero-shade { z-index: -3; background: linear-gradient(90deg, rgba(7,9,11,.96) 0%, rgba(7,9,11,.72) 42%, rgba(7,9,11,.12) 75%), linear-gradient(0deg, var(--bg) 0%, transparent 38%); }
.hero-grid { z-index: -2; opacity: .12; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 80px 80px; mask-image: linear-gradient(to right, black, transparent 70%); }
.hero-content { width: min(820px, 79vw); }
.eyebrow, .section-kicker, .project-meta { color: var(--rust); font: 700 11px/1.3 ui-monospace, Consolas, monospace; letter-spacing: .2em; text-transform: uppercase; }
.hero h1 { margin: 18px 0 24px; font-size: clamp(72px, 11.5vw, 176px); line-height: .72; letter-spacing: -.075em; text-transform: uppercase; font-weight: 800; }
.hero h1 span { color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.72); }
.hero-copy { max-width: 650px; margin: 0; color: #c9c9c4; font-size: clamp(16px, 1.5vw, 21px); line-height: 1.6; }
.hero-copy strong { color: var(--text); font-weight: 650; }
.hero-actions { display: flex; gap: 14px; margin-top: 34px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 25px; border: 1px solid var(--line); text-transform: uppercase; font: 700 11px/1 ui-monospace, Consolas, monospace; letter-spacing: .13em; transition: transform .25s, background .25s, border .25s; }
.button:hover { transform: translateY(-3px); }
.button-primary { background: var(--rust); border-color: var(--rust); color: white; }
.button-primary:hover { background: #ed6b3e; }
.button-ghost { backdrop-filter: blur(10px); }
.button-ghost:hover { border-color: var(--cyan); }
.hero-index { position: absolute; right: var(--pad); bottom: 105px; display: flex; align-items: center; gap: 10px; writing-mode: vertical-rl; color: #8b9294; font: 10px ui-monospace, monospace; }
.hero-index div { width: 1px; height: 70px; background: linear-gradient(var(--rust) 25%, var(--line) 25%); }
.scroll-cue { position: absolute; left: 50%; bottom: 22px; display: flex; flex-direction: column; align-items: center; gap: 12px; color: #919697; font: 9px ui-monospace, monospace; letter-spacing: .2em; text-transform: uppercase; }
.scroll-cue i { width: 1px; height: 28px; background: var(--rust); animation: scrollPulse 2s ease-in-out infinite; }

.section { padding: clamp(100px, 14vw, 190px) var(--pad); }
.about { position: relative; border-bottom: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(320px, .8fr); gap: 9vw; margin-top: 35px; }
.about h2, .section-heading h2 { margin: 0; font-size: clamp(48px, 7vw, 104px); line-height: .95; letter-spacing: -.055em; text-transform: uppercase; }
.about h2 em { color: var(--rust); font-weight: inherit; font-style: normal; }
.about-copy { align-self: end; color: #bbbdb9; font-size: clamp(17px, 1.45vw, 21px); line-height: 1.75; }
.about-copy p { margin: 0 0 1.3em; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 95px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats div { padding: 31px 22px; display: flex; align-items: baseline; gap: 16px; }
.stats div + div { border-left: 1px solid var(--line); }
.stats strong { font: 300 clamp(34px, 4vw, 64px)/1 ui-monospace, monospace; color: var(--cyan); }
.stats span { color: var(--muted); text-transform: uppercase; font: 10px ui-monospace, monospace; letter-spacing: .14em; }

.projects { padding-top: clamp(90px, 11vw, 150px); }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 56px; }
.section-heading h2 { margin-top: 20px; font-size: clamp(45px, 6vw, 86px); }
.section-heading > p { max-width: 320px; margin: 0 0 5px; color: var(--muted); line-height: 1.6; }
.project-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.project { --mx: 50%; --my: 50%; position: relative; min-height: min(680px, 67vw); overflow: hidden; background: var(--panel); border: 1px solid rgba(255,255,255,.09); isolation: isolate; transform-style: preserve-3d; }
.project-featured { grid-column: 1 / -1; min-height: min(760px, 72vw); }
.project img { position: absolute; z-index: -3; inset: -3%; width: 106%; height: 106%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.75,.2,1), filter .5s; }
.project:hover img { transform: scale(1.035); filter: saturate(1.1); }
.project::after { content: ""; position: absolute; z-index: -1; inset: 0; opacity: 0; background: radial-gradient(circle at var(--mx) var(--my), rgba(95,216,220,.15), transparent 32%); transition: opacity .35s; }
.project:hover::after { opacity: 1; }
.project-vignette { position: absolute; z-index: -2; inset: 0; background: linear-gradient(0deg, rgba(7,9,11,.98) 0%, rgba(7,9,11,.62) 46%, rgba(7,9,11,.08) 80%), linear-gradient(90deg, rgba(7,9,11,.45), transparent); }
.project-status { position: absolute; top: 25px; left: 25px; display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: rgba(9,11,13,.72); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(12px); font: 700 9px ui-monospace, monospace; letter-spacing: .14em; }
.project-status span { width: 6px; height: 6px; border-radius: 50%; background: #72f09a; box-shadow: 0 0 9px #72f09a; }
.project-status-dev span { background: #ef985f; box-shadow: 0 0 9px #ef985f; }
.project-number { position: absolute; right: 24px; top: 22px; color: rgba(255,255,255,.45); font: 300 15px ui-monospace, monospace; }
.project-content { position: absolute; left: clamp(24px, 4vw, 60px); right: clamp(24px, 4vw, 60px); bottom: clamp(26px, 4vw, 54px); transform: translateZ(24px); }
.project-content h3 { margin: 13px 0 18px; font-size: clamp(42px, 5vw, 78px); line-height: .87; letter-spacing: -.045em; text-transform: uppercase; }
.project:not(.project-featured) .project-content h3 { font-size: clamp(35px, 4vw, 61px); }
.project-content p { width: min(630px, 90%); margin: 0; color: #c2c4c0; line-height: 1.55; font-size: clamp(14px, 1.2vw, 17px); }
.project-content a, .project-note { display: inline-flex; margin-top: 22px; padding-bottom: 5px; border-bottom: 1px solid var(--rust); color: #fff; font: 700 10px ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; }
.project-content a span { margin-left: 10px; color: var(--rust); transition: transform .25s; }
.project-content a:hover span { transform: translate(3px,-3px); }
.project-note { color: #a9adab; border-color: rgba(255,255,255,.2); }

.universe { position: relative; min-height: 88vh; display: grid; place-items: center; overflow: hidden; border-top: 1px solid var(--line); text-align: center; }
.universe::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgba(30,87,91,.28), transparent 48%); }
.universe-content { position: relative; z-index: 2; max-width: 1100px; }
.universe-quote { margin: 30px 0; font-size: clamp(42px, 6.5vw, 98px); line-height: 1.02; letter-spacing: -.055em; text-transform: uppercase; font-weight: 750; }
.universe-quote em { color: var(--cyan); font-style: normal; }
.universe-copy { max-width: 650px; margin: 35px auto 0; color: var(--muted); line-height: 1.75; font-size: 17px; }
.lore-timeline { display: grid; grid-template-columns: repeat(4, 1fr); align-items: stretch; gap: 14px; width: min(1120px, 100%); margin: 58px auto 0; text-align: left; }
.timeline-item { position: relative; padding: 24px; border: 1px solid var(--line); background: rgba(9,11,13,.62); backdrop-filter: blur(12px); }
.timeline-item:not(:last-child)::after { content: ""; position: absolute; z-index: 2; top: 30px; right: -15px; width: 15px; height: 1px; background: linear-gradient(90deg, var(--cyan), transparent); }
.timeline-date { display: block; margin-bottom: 12px; color: var(--rust); font: 700 10px ui-monospace, Consolas, monospace; letter-spacing: .18em; }
.timeline-item strong { display: block; font-size: clamp(19px, 2vw, 28px); text-transform: uppercase; letter-spacing: -.02em; }
.timeline-item p { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.orbit { position: absolute; width: min(76vw, 930px); aspect-ratio: 1; border: 1px solid rgba(95,216,220,.13); border-radius: 50%; animation: spin 55s linear infinite; }
.orbit::before, .orbit::after { content: ""; position: absolute; border: 1px solid rgba(214,92,50,.13); border-radius: 50%; }
.orbit::before { inset: 13%; }
.orbit::after { inset: 30%; }
.orbit i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--rust); box-shadow: 0 0 16px var(--rust); }
.orbit i:nth-child(1) { left: 12%; top: 18%; }
.orbit i:nth-child(2) { right: 2%; top: 49%; background: var(--cyan); }
.orbit i:nth-child(3) { left: 28%; bottom: 4%; }

footer { min-height: 260px; padding: 55px var(--pad); display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 40px; border-top: 1px solid var(--line); background: #07090a; }
.footer-mark { font-size: clamp(70px, 9vw, 130px); line-height: .7; font-weight: 800; letter-spacing: -.08em; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.25); }
footer p { color: #858b8d; line-height: 1.55; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.footer-links { display: flex; gap: 30px; align-self: center; }
.footer-links a { color: #c6c7c2; text-transform: uppercase; font: 10px ui-monospace, monospace; letter-spacing: .13em; }
.footer-links a:hover { color: var(--rust); }
.copyright { grid-column: 1 / -1; margin: 0; padding-top: 25px; border-top: 1px solid var(--line); }

.reveal { opacity: 0; transform: translateY(42px); transition: opacity .85s ease, transform .85s cubic-bezier(.2,.75,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }
.hero-reveal { opacity: 0; transform: translateY(25px); animation: heroIn .8s cubic-bezier(.2,.75,.2,1) forwards; }
.hero-reveal:nth-child(2) { animation-delay: .12s; }
.hero-reveal:nth-child(3) { animation-delay: .24s; }
.hero-reveal:nth-child(4) { animation-delay: .36s; }

@keyframes heroIn { to { opacity: 1; transform: none; } }
@keyframes breathe { from { transform: scale(1.01); } to { transform: scale(1.075); } }
@keyframes scrollPulse { 0%,100% { transform: scaleY(.35); transform-origin: top; opacity: .4; } 50% { transform: scaleY(1); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 820px) {
  .site-header { grid-template-columns: 1fr auto; height: 66px; }
  nav { display: none; }
  .header-cta { display: block; }
  .hero { padding-top: 110px; }
  .hero-content { width: 100%; }
  .hero h1 { font-size: clamp(64px, 20vw, 104px); line-height: .78; }
  .hero-shade { background: linear-gradient(0deg, var(--bg) 0%, rgba(7,9,11,.45) 72%, rgba(7,9,11,.25)), linear-gradient(90deg, rgba(7,9,11,.7), transparent); }
  .hero-media img { object-position: 61% center; }
  .hero-index { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 45px; }
  .stats { grid-template-columns: 1fr; }
  .stats div + div { border-left: 0; border-top: 1px solid var(--line); }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .project-list { grid-template-columns: 1fr; }
  .project-featured { grid-column: auto; }
  .project, .project-featured { min-height: 690px; }
  .project-content p { width: 100%; }
  .lore-timeline { grid-template-columns: repeat(2, 1fr); }
  .timeline-item:nth-child(2)::after { display: none; }
  footer { grid-template-columns: 1fr; }
  .footer-links { align-self: auto; flex-wrap: wrap; }
  .copyright { grid-column: auto; }
}

@media (max-width: 520px) {
  .lore-timeline { grid-template-columns: 1fr; }
  .timeline-item::after { display: none; }
  .brand > span:last-child { display: none; }
  .hero-actions { align-items: stretch; flex-direction: column; width: min(100%, 330px); }
  .scroll-cue { display: none; }
  .project, .project-featured { min-height: 610px; }
  .project-content { left: 20px; right: 20px; bottom: 25px; }
  .project-content h3, .project:not(.project-featured) .project-content h3 { font-size: 38px; }
  .project-content p { font-size: 13px; }
}

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