:root {
  --bg: #eef3fa;
  --surface: #ffffff;
  --surface-2: #e4ebf5;
  --ink: #07101f;
  --muted: #5f6d82;
  --line: rgba(7, 16, 31, .14);
  --blue: #0636e8;
  --cyan: #00dce8;
  --night: #050914;
  --panel: #0b1424;
  --success: #41f3a4;
  --danger: #ff5577;
  --radius: 24px;
  --shadow: 0 28px 100px rgba(7, 16, 31, .16);
  --font: Tahoma, "Segoe UI", Arial, sans-serif;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

[data-theme="dark"] {
  --bg: #050914;
  --surface: #0a1322;
  --surface-2: #101c2e;
  --ink: #f7f9fc;
  --muted: #8f9db2;
  --line: rgba(148, 167, 197, .18);
  --shadow: 0 35px 120px rgba(0, 0, 0, .48);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; background: var(--bg); color: var(--ink); font-family: var(--font); transition: background .35s, color .35s; }
body::before { content: ""; position: fixed; inset: 0; z-index: -3; pointer-events: none; background: radial-gradient(circle at 18% 12%, rgba(6,54,232,.14), transparent 28%), radial-gradient(circle at 85% 38%, rgba(0,220,232,.09), transparent 25%); }
a { color: inherit; text-decoration: none; }
button, textarea, input { font: inherit; }
button { cursor: pointer; }
.skip { min-height:44px; position: fixed; z-index: 200; top: -80px; inset-inline-start: 18px; display:inline-flex; align-items:center; padding: 12px 18px; border-radius: 10px; background: var(--cyan); color: #04101c; }
.skip:focus { top: 18px; }
.section-shell { width: min(1280px, calc(100% - 52px)); margin-inline: auto; }

#codeRain { position: fixed; inset: 0; z-index: -2; width: 100%; height: 100%; opacity: .16; pointer-events: none; }
#pointerGlow { position: fixed; z-index: 90; width: 260px; height: 260px; border-radius: 50%; pointer-events: none; opacity: 0; transform: translate(-50%,-50%); background: radial-gradient(circle, rgba(0,220,232,.12), transparent 66%); transition: opacity .2s; mix-blend-mode: screen; }
.trail-dot { position: fixed; z-index: 89; width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); pointer-events: none; animation: trail .65s forwards; box-shadow: 0 0 12px var(--cyan); }

.nav-shell { position: fixed; z-index: 80; top: 16px; left: 50%; width: min(1280px, calc(100% - 30px)); height: 78px; transform: translateX(-50%); display: flex; align-items: center; justify-content: space-between; padding: 0 14px 0 18px; border: 1px solid var(--line); border-radius: 22px; background: color-mix(in srgb, var(--surface) 78%, transparent); backdrop-filter: blur(22px) saturate(140%); box-shadow: 0 15px 60px rgba(0,0,0,.14); }
.brand { height: 52px; display: flex; align-items: center; position: relative; }
.brand .site-title { display: flex; align-items: center; margin: 0; font: inherit; }
.brand img { width: 158px; height: 48px; object-fit: contain; }
[data-theme="light"] .brand .logo-dark, [data-theme="dark"] .brand .logo-light { display: none; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; margin-inline-start: 7px; background: var(--cyan); box-shadow: 0 0 10px rgba(0,220,232,.55); }
.motion-active .status-dot { animation: pulse 2s ease-in-out infinite; }
.nav-shell nav { display: flex; gap: 10px; }
.nav-shell nav a { min-height:44px; display: flex; align-items: center; gap: 8px; padding: 10px 13px; color: var(--muted); border-radius: 10px; transition: .2s; }
.nav-shell nav a:hover { color: var(--ink); background: color-mix(in srgb, var(--blue) 8%, transparent); }
.nav-shell nav span { font: 9px var(--mono); color: var(--blue); }
.nav-shell nav b { font-size: 13px; }
.nav-actions { display: flex; gap: 8px; }
.icon-button, .lang-button, .theme-button, .menu-button { height: 44px; min-width: 44px; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--ink); }
.lang-button { padding-inline: 14px; font: 800 12px var(--mono); }
.theme-button { width: 44px; padding: 0; display: grid; place-items: center; font-size: 18px; transition: color .2s, border-color .2s, background .2s, transform .2s; }
.theme-button:hover, .theme-button:focus-visible { color: var(--cyan); border-color: color-mix(in srgb, var(--cyan) 55%, transparent); background: color-mix(in srgb, var(--blue) 10%, transparent); transform: translateY(-1px); }
.menu-button { display: none; }

.game-hud { position: fixed; z-index: 70; left: 20px; bottom: 20px; width: 300px; min-height: 70px; display: grid; grid-template-columns: 54px 1fr 70px; align-items: center; gap: 12px; padding: 10px; border: 1px solid rgba(0,220,232,.25); border-radius: 16px; color: #eaf1ff; background: rgba(5,9,20,.86); backdrop-filter: blur(16px); box-shadow: 0 18px 60px rgba(0,0,0,.28); direction: ltr; }
.hud-level { height: 48px; display: grid; place-items: center; border: 1px solid #233550; border-radius: 10px; }
.hud-level span, .hud-progress span { font: 8px var(--mono); color: #7f91ad; letter-spacing: .08em; }
.hud-level b { font: 800 17px var(--mono); color: var(--cyan); }
.hud-progress > div { display: flex; justify-content: space-between; align-items: center; }
.hud-progress > div b { font: 9px var(--mono); color: #c5d3e8; }
.hud-progress > i { display: block; height: 4px; margin-top: 9px; overflow: hidden; background: #1c2940; }
.hud-progress em { display: block; width: 100%; height: 100%; transform: scaleX(0); transform-origin: left center; background: linear-gradient(90deg,var(--blue),var(--cyan)); transition: transform .45s; box-shadow: 0 0 12px var(--cyan); }
.game-hud > button { height: 48px; border: 1px solid #233550; border-radius: 10px; background: #101c30; color: #aebdd2; }
.game-hud kbd { display: block; color: var(--cyan); font: 16px var(--mono); }
.game-hud button span { font: 7px var(--mono); }

.achievement { position: fixed; z-index: 160; top: 112px; right: 22px; width: 320px; padding: 16px 18px; display: flex; gap: 15px; align-items: center; border: 1px solid rgba(0,220,232,.35); border-radius: 14px; background: #07101f; color: #fff; box-shadow: 0 22px 70px rgba(0,0,0,.4); opacity: 0; visibility: hidden; transform: translate3d(calc(100% + 44px),0,0); transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .22s ease, visibility 0s linear .45s; will-change: transform, opacity; }
.achievement.show { opacity: 1; visibility: visible; transform: translate3d(0,0,0); transition-delay: 0s; }
.achievement b { color: var(--cyan); font: 800 12px var(--mono); }
.achievement span { font-size: 13px; }

.hero { min-height: 1000px; position: relative; display: grid; grid-template-columns: 1.03fr .97fr; align-items: center; gap: 56px; padding-top: 150px; padding-bottom: 105px; }
.hero-grid { position: absolute; inset: 100px -30vw 0; z-index: -1; opacity: .24; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg,var(--line) 1px,transparent 1px); background-size: 58px 58px; mask-image: linear-gradient(to bottom, transparent, #000 18%, transparent 95%); }
.eyebrow, .kicker { font: 800 11px/1.4 var(--mono); letter-spacing: .13em; }
.eyebrow { display: flex; align-items: center; gap: 15px; color: var(--muted); }
.eyebrow span { padding: 7px 9px; color: #05101a; background: var(--cyan); clip-path: polygon(7px 0,100% 0,100% calc(100% - 7px),calc(100% - 7px) 100%,0 100%,0 7px); }
.hero h1 { margin: 24px 0 28px; display: flex; flex-direction: column; font-size: clamp(51px,6.2vw,96px); line-height: .94; letter-spacing: -.065em; text-transform: uppercase; }
.hero h1 span { font-size: .46em; margin-bottom: 12px; letter-spacing: .03em; color: var(--muted); }
.hero h1 strong { color: var(--ink); }
.hero h1 em { font-style: normal; color: transparent; -webkit-text-stroke: 1.5px var(--blue); text-shadow: 0 0 50px rgba(6,54,232,.2); }
.hero-text { max-width: 680px; color: var(--muted); font-size: clamp(17px,1.45vw,21px); line-height: 1.85; }
.hero-actions { display: flex; gap: 12px; margin-top: 36px; }
.button { min-height: 58px; display: inline-flex; align-items: center; justify-content: center; gap: 28px; padding: 0 23px; border: 1px solid var(--line); border-radius: 14px; font-weight: 800; transition: transform .22s, box-shadow .22s, background .22s; }
.button.primary { border-color: var(--blue); background: var(--blue); color: #fff; box-shadow: 0 18px 48px rgba(6,54,232,.32); }
.button.ghost { background: var(--surface); color: var(--ink); }
.button:hover { transform: translateY(-4px); }
.button b { font: 700 15px var(--mono); }
.quest-line { display: grid; grid-template-columns: repeat(4,1fr); max-width: 610px; margin-top: 55px; }
.quest-line div { position: relative; padding-top: 20px; color: var(--muted); font: 10px var(--mono); }
.quest-line div::before { content: ""; position: absolute; top: 4px; left: 0; right: 0; height: 1px; background: var(--line); }
.quest-line i { position: absolute; z-index: 1; top: 0; inset-inline-start: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--muted); }
.quest-line .active i { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 18px var(--cyan); }

.hero-machine { height: 720px; position: relative; display: grid; place-items: center; isolation: isolate; }
.machine-ring { position: absolute; border: 1px solid rgba(80,115,255,.34); border-radius: 50%; animation: spin 22s linear infinite; }
.machine-ring::before { content: ""; position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 22px var(--cyan); top: 12%; left: 18%; }
.ring-a { width: 610px; height: 610px; }
.ring-b { width: 480px; height: 480px; animation-direction: reverse; animation-duration: 16s; }
.ring-c { width: 345px; height: 345px; border-style: dashed; animation-duration: 28s; }
.core { position: absolute; z-index: 4; top: 72px; width: 134px; height: 134px; display: grid; place-items: center; border: 1px solid rgba(0,220,232,.5); border-radius: 50%; color: #fff; background: radial-gradient(circle,#0d3c79,#06101e 65%); box-shadow: 0 0 70px rgba(0,220,232,.25); cursor: pointer; transition: .3s; }
.core::before, .core::after { content: ""; position: absolute; inset: -12px; border: 1px dashed rgba(0,220,232,.4); border-radius: 50%; animation: spin 9s linear infinite; }
.core::after { inset: -24px; animation-direction: reverse; }
.core span { font: 900 17px var(--mono); color: var(--cyan); }
.core i { position: absolute; inset: 30%; border-radius: 50%; background: var(--blue); filter: blur(18px); z-index: -1; }
.core.active { transform: scale(1.16); box-shadow: 0 0 130px var(--cyan); }
.terminal-card { width: min(520px,92%); margin-top: 150px; direction: ltr; overflow: hidden; border: 1px solid #273955; border-radius: 22px; color: #f6f8ff; background: rgba(7,15,29,.94); box-shadow: 0 42px 130px rgba(0,0,0,.54); transform-style: preserve-3d; transition: transform .15s; }
.terminal-bar { height: 50px; display: flex; align-items: center; gap: 7px; padding: 0 18px; border-bottom: 1px solid #24324a; }
.terminal-bar i { width: 8px; height: 8px; border-radius: 50%; background: #ff5577; }
.terminal-bar i:nth-child(2) { background: #ffd257; }.terminal-bar i:nth-child(3) { background: #45efa5; }
.terminal-bar span { margin-left: auto; color: #718099; font: 11px var(--mono); }
.terminal-card pre { margin: 0; padding: 28px; overflow: auto; font: 13px/1.9 var(--mono); }
.terminal-card .muted { color: #526581; }.terminal-card .blue { color: #829cff; }.terminal-card .cyan { color: var(--cyan); }
.cursor { animation: blink .75s infinite; }
.terminal-run { width: 100%; height: 56px; display: flex; align-items: center; justify-content: center; gap: 12px; border: 0; border-top: 1px solid #24324a; color: #c7d2e3; background: #0b1729; font: 800 11px var(--mono); }
.terminal-run:hover { color: #041019; background: var(--cyan); }
.code-chip { position: absolute; z-index: 8; padding: 11px 15px; touch-action: none; user-select: none; border: 1px solid rgba(0,220,232,.55); border-radius: 10px; color: var(--ink); background: color-mix(in srgb,var(--surface) 78%,transparent); backdrop-filter: blur(14px); box-shadow: 0 16px 45px rgba(0,0,0,.18); font: 900 14px var(--mono); }
.chip-a { top: 16%; right: 1%; }.chip-b { bottom: 22%; left: 0; font-size: 20px; }.chip-c { bottom: 8%; right: 12%; }.chip-d { top: 29%; left: 2%; }
.drag-hint { position: absolute; bottom: 2px; display: flex; align-items: center; gap: 10px; color: var(--muted); font: 9px var(--mono); }
.drag-hint i { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 15px var(--cyan); }

.signal-strip { overflow: hidden; padding: 17px 0; color: #fff; background: var(--blue); transform: rotate(-1deg) scale(1.02); }
.signal-strip div { width: max-content; white-space: nowrap; animation: marquee 26s linear infinite; font: 900 13px var(--mono); word-spacing: 28px; }
.signal-strip b { color: var(--cyan); }

.work-section, .capability-section, .lab-section { padding-block: 145px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 50px; margin-bottom: 48px; }
.kicker { color: var(--blue); }.kicker span { color: var(--cyan); background: #07101f; padding: 6px 8px; }
.section-heading h2, .studio-copy h2 { max-width: 820px; margin: 15px 0 0; font-size: clamp(42px,5.2vw,76px); line-height: 1.03; letter-spacing: -.055em; }
.section-heading > p { max-width: 400px; margin: 0; color: var(--muted); line-height: 1.8; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.filters button { padding: 11px 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface); }
.filters button.active { color: #fff; border-color: var(--blue); background: var(--blue); box-shadow: 0 10px 30px rgba(6,54,232,.2); }
.project-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 28px; perspective: 1200px; }
.project-card { position: relative; outline: none; transform-style: preserve-3d; transition: opacity .3s, transform .18s; }
.project-card.hidden { display: none; }
.project-visual { height: 475px; position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,.15); border-radius: var(--radius); color: #fff; background: radial-gradient(circle at 75% 25%,rgba(0,220,232,.24),transparent 30%), linear-gradient(135deg,#0a1d5e,#07101f 60%); box-shadow: var(--shadow); }
.project-card:nth-child(3n+2) .project-visual { background: radial-gradient(circle at 25% 70%,rgba(0,220,232,.35),transparent 34%),linear-gradient(145deg,#062a36,#07101f 66%); }
.project-card:nth-child(3n+3) .project-visual { background: radial-gradient(circle at 70% 70%,rgba(129,80,255,.32),transparent 32%),linear-gradient(145deg,#1d0a4a,#07101f 65%); }
.project-visual > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .42; transition: .5s; }
.project-noise { position: absolute; inset: 0; opacity: .23; background-image: url('/assets/images/pattern.svg'); background-size: 420px; }
.scan-line { position: absolute; z-index: 3; left: 0; right: 0; top: -20%; height: 2px; opacity: 0; background: var(--cyan); box-shadow: 0 0 30px 8px rgba(0,220,232,.28); }
.project-card:hover .scan-line, .project-card:focus .scan-line { opacity: 1; animation: scan 1.8s linear infinite; }
.project-card:hover .project-visual > img { opacity: .62; transform: scale(1.05); }
.project-index { position: absolute; z-index: 4; top: 26px; left: 28px; display: flex; flex-direction: column; font-family: var(--mono); }
.project-index span { font-size: 8px; color: #9bb0cf; }.project-index b { font-size: 42px; color: var(--cyan); }
.project-sigil { position: absolute; z-index: 4; top: 26px; right: 28px; text-align: right; font-family: var(--mono); }
.project-sigil span { display: block; font-size: 9px; color: #aab9cd; }.project-sigil b { font-size: 28px; color: #fff; }
.scan-data { position: absolute; z-index: 4; left: 28px; bottom: 90px; display: grid; gap: 7px; transform: translateY(18px); opacity: 0; transition: .3s; font: 9px var(--mono); color: #b9c8dc; }
.project-card:hover .scan-data, .project-card:focus .scan-data { transform: none; opacity: 1; }
.inspect-button { position: absolute; z-index: 5; left: 22px; right: 22px; bottom: 20px; height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border: 1px solid rgba(255,255,255,.2); border-radius: 12px; color: #fff; background: rgba(5,9,20,.75); backdrop-filter: blur(10px); font: 800 10px var(--mono); }
.inspect-button:hover { border-color: var(--cyan); color: var(--cyan); }
.project-meta { display: flex; justify-content: space-between; gap: 25px; padding: 22px 4px; }
.project-meta h3 { margin: 0 0 8px; font-size: 25px; }.project-meta p { margin: 0; color: var(--muted); line-height: 1.65; }.project-meta small { padding-top: 8px; color: var(--muted); white-space: nowrap; font: 9px var(--mono); }

.studio-section { overflow: hidden; padding-block: 130px; color: #f8faff; background: #07101f; }
.studio-grid { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: 80px; }
.studio-copy .kicker { color: #b6c2d4; }.studio-copy > p:not(.kicker) { color: #93a2b8; font-size: 18px; line-height: 1.85; }
.skill-readout { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 15px; margin-top: 35px; font: 10px var(--mono); color: #8d9bb0; }
.skill-readout i { height: 6px; overflow: hidden; background: #17243a; }.skill-readout em { display: block; width: 84%; height: 100%; background: linear-gradient(90deg,var(--blue),var(--cyan)); transition: width .6s; box-shadow: 0 0 18px var(--cyan); }.skill-readout b { color: var(--cyan); }
.skill-orbit { position: relative; min-height: 640px; display: grid; place-items: center; }
.orbit-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(91,113,147,.12) 1px,transparent 1px),linear-gradient(90deg,rgba(91,113,147,.12) 1px,transparent 1px); background-size: 40px 40px; mask-image: radial-gradient(circle,#000,transparent 69%); }
.skill-orbit::before,.skill-orbit::after { content:""; position:absolute; width:430px; height:430px; border:1px dashed rgba(93,121,166,.32); border-radius:50%; animation:spin 38s linear infinite; }.skill-orbit::after { width:290px; height:290px; animation-direction:reverse; animation-duration:25s; }
.skill-core { z-index: 2; width: 165px; height: 165px; display: grid; place-items: center; border: 1px solid rgba(0,220,232,.4); border-radius: 50%; background: radial-gradient(circle,#123d72,#07101f 70%); box-shadow: 0 0 100px rgba(0,220,232,.2); }
.skill-core img { width: 82px; height: 82px; }.skill-core span { position: absolute; top: calc(50% + 50px); color: #8291a8; text-align: center; font: 8px/1.5 var(--mono); }
.skill-node { position: absolute; z-index: 4; width: 104px; height: 104px; display: grid; place-items: center; border: 1px solid #2c3e5a; border-radius: 22px; color: #dce6f4; background: #0d192b; box-shadow: 0 15px 40px rgba(0,0,0,.25); transition: .28s; }
.skill-node b { font: 800 25px var(--mono); color: var(--cyan); }.skill-node span { font: 8px var(--mono); color: #8291aa; }
.skill-node:hover, .skill-node.active { transform: scale(1.12); border-color: var(--cyan); box-shadow: 0 0 45px rgba(0,220,232,.25); }
.node-web { top: 7%; left: 42%; }.node-mobile { top: 42%; right: 1%; }.node-systems { bottom: 6%; left: 42%; }.node-design { top: 42%; left: 1%; }

.cap-stack { border-top: 1px solid var(--line); }
.cap-row { width: 100%; min-height: 120px; position: relative; display: grid; grid-template-columns: 60px 90px 1.05fr 1fr 40px; align-items: center; gap: 18px; padding: 22px 8px; overflow: hidden; text-align: start; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: transparent; transition: .3s; }
.cap-row::before { content: ""; position: absolute; inset: 0; z-index: -1; transform: scaleX(0); transform-origin: left; background: var(--blue); transition: transform .42s cubic-bezier(.2,.8,.2,1); }
.cap-row:hover, .cap-row.open { color: #fff; }.cap-row:hover::before, .cap-row.open::before { transform: scaleX(1); }
.cap-num { font: 10px var(--mono); color: var(--muted); }.cap-row > b { font: 800 30px var(--mono); color: var(--blue); }.cap-row:hover > b,.cap-row.open > b { color: var(--cyan); }
.cap-row h3 { margin: 0; font-size: 24px; }.cap-row > p { margin: 0; color: var(--muted); }.cap-row:hover > p,.cap-row.open > p { color: #c8d4ee; }.cap-row > i { font: normal 25px var(--mono); transition: transform .3s; }.cap-row.open > i { transform: rotate(45deg); }
.cap-detail { position: absolute; left: 168px; right: 58px; bottom: 14px; display: flex; gap: 8px; opacity: 0; transform: translateY(12px); transition: .3s; }
.cap-row.open { min-height: 170px; padding-bottom: 55px; }.cap-row.open .cap-detail { opacity: 1; transform: none; }
.cap-detail em { padding: 5px 8px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; font: normal 8px var(--mono); color: #fff; }

.builder-section { padding-block: 135px; overflow: hidden; background: color-mix(in srgb,var(--surface) 75%,var(--bg)); }
.builder-grid { display: grid; grid-template-columns: .88fr 1.12fr; align-items: center; gap: 70px; }
.builder-copy h2 { margin: 17px 0 24px; font-size: clamp(42px,5vw,72px); line-height: 1.04; letter-spacing: -.05em; }
.builder-copy > p:not(.kicker) { color: var(--muted); line-height: 1.85; }
.module-bank { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.module-bank button { padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface); font: 800 10px var(--mono); transition: .2s; }
.module-bank button:hover,.module-bank button.active { color: #041019; border-color: var(--cyan); background: var(--cyan); box-shadow: 0 0 28px rgba(0,220,232,.24); }
.builder-actions { display: flex; gap: 9px; margin-top: 18px; }
.builder-actions button { min-height: 45px; padding: 0 15px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: transparent; font: 800 9px var(--mono); }
.builder-actions button:last-child { color: #fff; border-color: var(--blue); background: var(--blue); }
.system-board { min-height: 570px; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: #07101f; color: #f7f9ff; box-shadow: var(--shadow); }
.board-head { height: 58px; flex: 0 0 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid #25344b; color: #8291a8; font: 9px var(--mono); }
.board-head b { color: var(--cyan); }
.system-nodes { flex: 1; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 32px; padding: 32px; background-image: linear-gradient(rgba(74,96,130,.12) 1px,transparent 1px),linear-gradient(90deg,rgba(74,96,130,.12) 1px,transparent 1px); background-size: 32px 32px; }
.system-nodes > p { color: #62738d; font: 9px var(--mono); }
.system-node { width: 112px; height: 88px; position: relative; display: grid; place-items: center; border: 1px solid #315070; border-radius: 14px; color: var(--cyan); background: #0d1a2d; box-shadow: 0 12px 30px rgba(0,0,0,.28); font: 900 12px var(--mono); animation: bugPop .28s both; }
.system-node:not(:last-child)::after { content: "→"; position: absolute; right: -27px; color: #52739a; font-size: 18px; }
[dir="rtl"] .system-node:not(:last-child)::after { right: auto; left: -27px; content: "←"; }
.system-metrics { padding: 18px 20px 22px; display: grid; gap: 12px; border-top: 1px solid #25344b; }
.system-metrics > div { display: grid; grid-template-columns: 90px 1fr 42px; align-items: center; gap: 10px; color: #8392a8; font: 8px var(--mono); }
.system-metrics i { height: 5px; overflow: hidden; background: #17243a; }.system-metrics em { display: block; width: 10%; height: 100%; background: linear-gradient(90deg,var(--blue),var(--cyan)); transition: width .45s; box-shadow: 0 0 12px var(--cyan); }.system-metrics b { color: var(--cyan); text-align: end; }

.arena-section { padding-block: 135px; color: #f7f9ff; background: radial-gradient(circle at 15% 20%,rgba(6,54,232,.28),transparent 30%),#050914; }
.arena-grid { display: grid; grid-template-columns: .85fr 1.15fr; align-items: center; gap: 70px; }
.arena-copy h2 { margin: 17px 0 24px; font-size: clamp(42px,5vw,72px); line-height: 1.04; letter-spacing: -.05em; }.arena-copy > p { color: #94a3b8; line-height: 1.8; }.arena-copy .button { margin-top: 30px; }
.arena-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 35px; }
.arena-stats div { padding: 15px; border: 1px solid #24324a; border-radius: 12px; background: rgba(11,23,42,.65); }.arena-stats span { display: block; color: #76869e; font: 8px var(--mono); }.arena-stats b { display: block; margin-top: 6px; color: var(--cyan); font: 800 22px var(--mono); }
.bug-field { min-height: 540px; position: relative; overflow: hidden; border: 1px solid #263650; border-radius: 24px; background: #081322; box-shadow: 0 35px 100px rgba(0,0,0,.4); touch-action: manipulation; }
.field-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(62,91,134,.18) 1px,transparent 1px),linear-gradient(90deg,rgba(62,91,134,.18) 1px,transparent 1px); background-size: 36px 36px; }.field-scan { position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--cyan); box-shadow: 0 0 30px var(--cyan); animation: fieldScan 4s linear infinite; opacity: .4; will-change: transform; }.field-label { position: absolute; top: 18px; left: 18px; color: #73839c; font: 9px var(--mono); }
.launch-core { position: absolute; left: 50%; top: 50%; width: 150px; height: 150px; transform: translate(-50%,-50%); display: grid; place-items: center; border: 1px dashed #354a68; border-radius: 50%; color: #62738d; }.launch-core::before { content: ""; position: absolute; inset: 18px; border: 1px solid #243752; border-radius: 50%; }.launch-core b { font: 800 15px var(--mono); }.launch-core span { position: absolute; bottom: 42px; font: 9px var(--mono); }
.bug-target { position: absolute; z-index: 6; width: 64px; height: 64px; display: grid; place-items: center; border: 1px solid var(--danger); border-radius: 18px; color: #fff; background: rgba(255,85,119,.17); box-shadow: 0 0 35px rgba(255,85,119,.3); font-size: 26px; animation: bugPop .25s both; }
.bug-target::after { content: "BUG"; position: absolute; bottom: -15px; color: var(--danger); font: 7px var(--mono); }
.bug-target.hit { animation: bugHit .25s forwards; }

.lab-top { height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; color: #8b9bb2; background: #07101f; font: 9px var(--mono); }
.lab-top > div { display: flex; align-items: center; gap: 7px; }.lab-top i { width: 8px; height: 8px; border-radius: 50%; background: #ff5577; }.lab-top i:nth-child(2){background:#ffd257}.lab-top i:nth-child(3){background:#45efa5}.lab-top span:not(#labStatusDot){margin-left:10px}.lab-top b { color: #9eb0c9; }.lab-top b span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 12px var(--success); }
.code-lab { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.lab-toolbar { height: 66px; direction: ltr; display: flex; align-items: center; justify-content: space-between; padding: 0 13px 0 20px; border-bottom: 1px solid var(--line); }
.lab-tabs { align-self: stretch; display: flex; }.lab-tabs button,.lab-action { border: 0; color: var(--muted); background: transparent; font: 800 10px var(--mono); }.lab-tabs button { padding: 0 18px; border-bottom: 2px solid transparent; }.lab-tabs button.active { color: var(--blue); border-color: var(--blue); }.lab-toolbar > div:last-child { display: flex; gap: 7px; }.lab-action { padding: 10px 14px; border: 1px solid var(--line); border-radius: 9px; }.lab-action.run { color: #fff; border-color: var(--blue); background: var(--blue); }
.lab-body { height: 560px; direction: ltr; display: grid; grid-template-columns: 1fr 1fr; }.editor-stack { position: relative; background: #050914; }.editor { position: absolute; inset: 0; display: none; }.editor.active { display: flex; flex-direction: column; }.editor > span { height: 42px; padding: 14px 20px; color: #74849d; background: #0a1424; font: 9px var(--mono); }.editor textarea { flex: 1; width: 100%; resize: none; outline: none; border: 0; padding: 20px; color: #d9e4f5; background: #050914; font: 13px/1.75 var(--mono); tab-size: 2; }.preview-panel { display: flex; flex-direction: column; border-left: 1px solid var(--line); background: #fff; }.preview-bar { height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 0 15px; color: #7b8799; background: #edf2f8; font: 9px var(--mono); }.preview-panel iframe { flex: 1; width: 100%; border: 0; }

.contact-section { position: relative; overflow: hidden; padding-block: 135px; color: #fff; background: var(--blue); }
.contact-noise { position: absolute; inset: 0; opacity: .18; background-image: url('/assets/images/pattern.svg'); background-size: 460px; }
.contact-inner { position: relative; }.contact-inner .kicker { color: #fff; }.contact-inner h2 { max-width: 1050px; margin: 18px 0 25px; font-size: clamp(48px,7vw,100px); line-height: .98; letter-spacing: -.06em; }.contact-inner > p:not(.kicker) { color: #ccd7ff; font-size: 18px; }
.contact-portal { position: relative; margin-top: 65px; display: grid; grid-template-columns: 1fr auto; align-items: center; border-top: 1px solid rgba(255,255,255,.35); border-bottom: 1px solid rgba(255,255,255,.35); }.contact-email { min-width: 0; display: flex; align-items: center; justify-content: space-between; padding: 28px 0; font: 800 clamp(22px,3.3vw,46px) var(--mono); }.contact-email span { overflow: hidden; text-overflow: ellipsis; }.contact-email b { color: var(--cyan); }.contact-portal button { margin-inline-start: 30px; padding: 12px 15px; border: 1px solid rgba(255,255,255,.4); border-radius: 10px; color: #fff; background: transparent; font: 9px var(--mono); }.contact-portal button:hover { color: #041019; background: var(--cyan); }
.portal-ring { position: absolute; right: 5%; width: 170px; height: 170px; border: 1px dashed rgba(255,255,255,.3); border-radius: 50%; animation: spin 18s linear infinite; pointer-events: none; }.contact-bottom { display: flex; justify-content: space-between; gap: 30px; margin-top: 38px; color: #c9d5ff; }.socials { display: flex; flex-wrap: wrap; gap: 20px; }.socials a { display: flex; gap: 7px; }.socials a:hover { color: var(--cyan); }

footer { padding: 35px 0; color: #96a5ba; background: #03070e; }.footer-brand { display: flex; align-items: center; gap: 12px; }.footer-brand img { width: 46px; height: 46px; }.footer-brand p { display: grid; margin: 0; }.footer-brand b { color: #fff; }.footer-brand span { font: 7px var(--mono); }.footer-brand + p { margin: 0 auto; }footer > div { display: flex; align-items: center; }footer > div > a { min-height:44px; display:inline-flex; align-items:center; font: 8px var(--mono); }

.module-bank button,
.lab-action,
.lab-back { min-height:44px; }
.lab-back { display:inline-flex; align-items:center; }

dialog { color: inherit; }.project-dialog, .command-console { width: min(650px,calc(100% - 28px)); border: 1px solid #2b3d58; border-radius: 22px; color: #f7f9ff; background: #081322; box-shadow: 0 40px 150px rgba(0,0,0,.75); }.project-dialog::backdrop,.command-console::backdrop { background: rgba(2,6,14,.78); backdrop-filter: blur(10px); }.project-dialog { padding: 42px; }.project-dialog h2 { margin: 18px 0; font-size: clamp(36px,6vw,64px); line-height: 1; }.project-dialog > p:not(.kicker) { color: #9aabc2; line-height: 1.8; }.project-dialog #dialogTech { margin: 25px 0; color: var(--cyan); font: 11px var(--mono); }.dialog-close { position: absolute; top: 15px; right: 15px; width: 40px; height: 40px; border: 1px solid #2a3d58; border-radius: 50%; color: #fff; background: transparent; font-size: 25px; }.dialog-actions { display: flex; gap: 10px; }.dialog-actions a { padding: 12px 15px; border: 1px solid #354966; border-radius: 10px; font: 10px var(--mono); }.dialog-actions a:hover { color: #041019; background: var(--cyan); }.dialog-actions a[hidden] { display: none; }
.command-console { padding: 0; direction: ltr; }.console-head { height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid #263650; color: var(--cyan); font: 10px var(--mono); }.console-head button { border: 0; color: #fff; background: transparent; font-size: 25px; }.console-log { min-height: 230px; max-height: 340px; overflow: auto; padding: 18px; color: #9cafc8; font: 12px/1.8 var(--mono); }.console-log b { color: var(--cyan); }.console-help { color: #657893; }.command-console form { display: flex; gap: 10px; padding: 14px 18px; border-top: 1px solid #263650; }.command-console label { flex: 1; display: flex; gap: 10px; color: var(--cyan); font: 14px var(--mono); }.command-console input { flex: 1; border: 0; outline: 0; color: #fff; background: transparent; font: 13px var(--mono); }.command-console form button { border: 0; color: #041019; background: var(--cyan); font: 800 9px var(--mono); }.console-shortcuts { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 18px; }.console-shortcuts button { padding: 8px; border: 1px solid #2a3d59; border-radius: 7px; color: #8fa1ba; background: #0c1829; font: 8px var(--mono); }

.reveal { opacity: 0; transform: translateY(30px); transition: opacity .75s, transform .75s; }.reveal.visible { opacity: 1; transform: none; }

@keyframes pulse { 50% { opacity: .42; transform: scale(.72); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes scan { from { top:-5%; } to { top:105%; } }
@keyframes fieldScan { from { transform: translate3d(0,0,0); } to { transform: translate3d(0,540px,0); } }
@keyframes bugPop { from { opacity:0; transform:scale(.4) rotate(-20deg); } }
@keyframes bugHit { to { opacity:0; transform:scale(1.8) rotate(30deg); filter:blur(8px); } }
@keyframes trail { to { transform: translate(var(--dx),var(--dy)) scale(0); opacity:0; } }

@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr; padding-top: 145px; }.hero-machine { height: 680px; }.studio-grid,.arena-grid,.builder-grid { grid-template-columns: 1fr; }.skill-orbit { min-height: 600px; }.project-grid { grid-template-columns: 1fr; }.cap-row { grid-template-columns: 45px 70px 1fr 1fr 30px; }.lab-body { height: 820px; grid-template-columns: 1fr; }.preview-panel { border-left: 0; border-top: 1px solid var(--line); }.nav-shell nav { position: absolute; top: 74px; left: 0; right: 0; display: none; max-height: calc(100vh - 96px); overflow: auto; flex-direction: column; padding: 15px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: var(--shadow); }.nav-shell.open nav { display: flex; }.menu-button { display: block; }
}

@media (max-width: 680px) {
  .section-shell { width: min(100% - 28px,1280px); }.nav-shell { top: 7px; height: 64px; }.brand img { width: 116px; }.icon-button { display:none; }.game-hud { left: 9px; right: 9px; bottom: 8px; width: auto; grid-template-columns: 48px 1fr 58px; }.hero { min-height:auto; padding-top: 115px; padding-bottom: 80px; }.hero h1 { font-size: 52px; }.hero-actions { flex-direction: column; }.quest-line { grid-template-columns:repeat(4,1fr); }.quest-line span { font-size:8px; }.hero-machine { height: 535px; }.ring-a { width: 430px;height:430px }.ring-b { width:340px;height:340px }.ring-c { width:250px;height:250px }.core { top:32px;width:105px;height:105px }.terminal-card { margin-top:110px }.terminal-card pre { padding:20px 15px;font-size:11px }.chip-b { left:-4px }.work-section,.capability-section,.lab-section { padding-block:95px }.section-heading { align-items:flex-start;flex-direction:column;gap:20px }.section-heading h2,.studio-copy h2 { font-size:45px }.project-visual { height:390px }.project-meta { flex-direction:column }.project-meta small { white-space:normal }.studio-section,.arena-section,.contact-section { padding-block:95px }.studio-grid,.arena-grid { gap:35px }.skill-orbit { min-height:470px;transform:scale(.82);margin-inline:-40px }.skill-node { width:92px;height:92px }.cap-row { min-height:150px;grid-template-columns:36px 52px 1fr 30px;gap:10px }.cap-row > p { grid-column:3/5 }.cap-row.open { min-height:220px;padding-bottom:72px }.cap-detail { left:98px;right:10px;flex-wrap:wrap }.arena-stats { gap:5px }.arena-stats div { padding:10px }.bug-field { min-height:440px }.lab-toolbar { padding-inline:6px }.lab-tabs button { padding-inline:10px }.lab-body { height:760px }.contact-inner h2 { font-size:51px }.contact-portal { grid-template-columns:1fr }.contact-portal button { margin:0 0 20px;justify-self:start }.contact-bottom { flex-direction:column }.footer-brand + p { display:none }footer > div { justify-content:space-between }.project-dialog { padding:34px 22px }.dialog-actions { flex-direction:column }
}

@media (pointer: coarse) { #pointerGlow { display:none; }.scan-data { opacity:1;transform:none; }.inspect-button { color:var(--cyan);border-color:rgba(0,220,232,.45); } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior:auto!important;animation-duration:.001ms!important;animation-iteration-count:1!important; }.reveal { opacity:1;transform:none; }#codeRain { display:none; } }

main,section,.hero-copy,.hero-machine,.studio-copy,.builder-copy,.arena-copy,.project-card,.code-lab { min-width: 0; }
img,video,canvas,iframe { max-width: 100%; }

@media (max-width: 680px) {
  body { padding-bottom: 78px; }
  .builder-section { padding-block: 95px; }.builder-grid { gap: 34px; }.builder-copy h2 { font-size: 44px; }.system-board { min-height: 500px; }.system-nodes { gap: 26px; padding: 22px 14px; }.system-node { width: 92px; height: 74px; }.system-metrics > div { grid-template-columns: 72px 1fr 38px; }
  .hero h1 { width: 100%; font-size: clamp(42px,13vw,54px); overflow-wrap: anywhere; }.hero h1 em,.hero h1 strong { max-width: 100%; }.hero-text { font-size: 16px; line-height: 1.75; }.hero-machine { width: 100%; overflow: clip; }.project-grid { grid-template-columns: minmax(0,1fr); }.project-visual { width: 100%; }.game-hud { z-index: 75; }.contact-email { font-size: clamp(17px,5.4vw,28px); }.contact-portal { overflow: hidden; }
}

@media (max-width: 460px) {
  .nav-shell { width: calc(100% - 14px); padding: 0 8px 0 10px; border-radius: 16px; }.brand { min-width: 0; }.brand img { width: 100px; }.status-dot { display: none; }.nav-actions { flex: 0 0 auto; gap: 5px; }.lang-button,.theme-button,.menu-button { min-width: 39px; width: 39px; height: 39px; padding: 0; }.hero { padding-top: 100px; }.hero-machine { height: 500px; }.ring-a { width: 355px; height: 355px; }.ring-b { width: 285px; height: 285px; }.ring-c { width: 215px; height: 215px; }.terminal-card { width: 100%; }.terminal-card pre { font-size: 10px; white-space: pre-wrap; }.code-chip { transform: scale(.86); }.chip-a { right: 1px; }.chip-d { left: 1px; }.quest-line span { display: none; }.quest-line div { min-height: 20px; }.project-visual { height: 350px; }.project-index { left: 18px; top: 18px; }.project-sigil { right: 18px; top: 18px; }.inspect-button { left: 12px; right: 12px; }.skill-orbit { transform: scale(.7); margin: -45px -74px; }.cap-row { grid-template-columns: 30px 42px 1fr 26px; padding-inline: 2px; }.cap-row h3 { font-size: 19px; }.cap-row > p { font-size: 13px; }.bug-field { min-height: 390px; }.arena-stats b { font-size: 17px; }.lab-body { height: 700px; }.editor textarea { font-size: 11px; padding: 14px; }.game-hud { grid-template-columns: 42px 1fr 48px; padding: 7px; }.hud-progress span { font-size: 6px; }.game-hud button span { display: none; }.contact-inner h2 { font-size: 43px; }.contact-email { padding-block: 23px; }.system-node { width: 82px; height: 68px; font-size: 10px; }footer > div { gap: 14px; }footer > div > a { text-align: end; }
}

@media (max-width: 350px) {
  .brand img { width: 88px; }.lang-button,.menu-button { min-width: 35px; width: 35px; }.hero h1 { font-size: 39px; }.section-heading h2,.studio-copy h2,.builder-copy h2,.arena-copy h2 { font-size: 38px; }.game-hud { left: 5px; right: 5px; }.hud-level { display: none; }.game-hud { grid-template-columns: 1fr 46px; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .game-hud { transform: scale(.8); transform-origin: bottom left; }.nav-shell { position: absolute; }.hero { padding-top: 95px; }.hero-machine { height: 520px; }
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body.modal-open { overflow: hidden; }

main,
header,
footer,
section,
.section-shell,
.nav-shell,
.hero-copy,
.hero-machine,
.project-grid,
.project-card,
.project-meta,
.studio-grid,
.builder-grid,
.arena-grid,
.code-lab {
  min-width: 0;
  max-width: 100%;
}

.project-dialog {
  width: min(1480px, calc(100vw - 32px));
  max-width: none;
  height: min(900px, calc(100dvh - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border-radius: 24px;
}

.project-dialog[open] {
  display: flex;
  flex-direction: column;
}

.project-dialog-head {
  min-height: 96px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  border-bottom: 1px solid #263650;
}

.project-dialog-head > div { min-width: 0; }
.project-dialog-head .kicker { margin: 0 0 8px; }
.project-dialog h2 { margin: 0; font-size: clamp(28px, 3.2vw, 52px); overflow-wrap: anywhere; }

.project-dialog .dialog-close {
  position: static;
  flex: 0 0 42px;
}

.project-experience {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  direction: ltr;
}

.project-story {
  min-width: 0;
  padding: 28px;
  overflow-y: auto;
  border-right: 1px solid #263650;
  direction: rtl;
}

[dir="ltr"] .project-story { direction: ltr; }
.project-story #dialogSummary { margin: 0 0 18px; color: #f7f9ff; font-size: 18px; font-weight: 800; line-height: 1.65; }
.project-story #dialogDetails { margin: 0; color: #9aabc2; line-height: 1.85; }
.project-story #dialogTech { margin: 28px 0; padding: 14px; border: 1px solid #263650; border-radius: 12px; color: var(--cyan); background: #07101f; overflow-wrap: anywhere; font: 11px/1.7 var(--mono); }
.project-story .dialog-actions { flex-direction: column; }
.project-story .dialog-actions a { display: flex; align-items: center; justify-content: center; min-height: 46px; text-align: center; }

.project-preview-shell {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #040914;
  direction: ltr;
}

.preview-controls {
  min-height: 52px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid #263650;
  color: #8698b2;
}

.preview-controls > span { display: flex; align-items: center; gap: 7px; font: 9px var(--mono); }
.preview-controls > span i { width: 8px; height: 8px; border-radius: 50%; background: #ff5577; }
.preview-controls > span i:nth-child(2) { background: #ffd257; }
.preview-controls > span i:nth-child(3) { background: #45efa5; }
.preview-controls > span b { margin-inline-start: 7px; }
.preview-controls > div { display: flex; gap: 5px; }
.preview-controls button { width: 36px; height: 34px; border: 1px solid #2b3d58; border-radius: 8px; color: #91a4bd; background: #0b1729; }
.preview-controls button.active { color: #041019; border-color: var(--cyan); background: var(--cyan); }

.project-preview-stage {
  min-width: 0;
  min-height: 0;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  overflow: hidden;
  background-image: linear-gradient(rgba(67, 91, 126, .13) 1px, transparent 1px), linear-gradient(90deg, rgba(67, 91, 126, .13) 1px, transparent 1px);
  background-size: 28px 28px;
}

.project-preview-stage iframe {
  width: 100%;
  height: 100%;
  max-width: 100%;
  border: 1px solid #30435e;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .48);
  transition: width .35s, border-radius .35s;
}

.project-preview-stage[data-size="tablet"] iframe { width: min(768px, 100%); }
.project-preview-stage[data-size="phone"] iframe { width: min(390px, 100%); border-radius: 28px; }
.preview-empty { width: min(680px, 100%); min-height: 320px; position: relative; display: grid; place-items: center; align-content: center; gap: 16px; overflow: hidden; padding: 32px; border: 1px dashed #36506f; border-radius: 18px; color: #8294ae; text-align: center; }
.preview-empty[hidden] { display: none; }
.preview-empty img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .18; }
.preview-empty b,.preview-empty span { position: relative; }
.preview-empty b { color: var(--cyan); font: 900 36px var(--mono); }
.preview-empty span { max-width: 440px; line-height: 1.8; }
.preview-note { min-height: 38px; flex: 0 0 auto; margin: 0; padding: 9px 14px; color: #70829c; border-top: 1px solid #263650; font: 8px/1.6 var(--mono); text-align: center; }

@media (max-width: 900px) {
  .project-experience { grid-template-columns: 1fr; overflow-y: auto; }
  .project-story { overflow: visible; border-right: 0; border-bottom: 1px solid #263650; }
  .project-story .dialog-actions { flex-flow: row wrap; }
  .project-preview-shell { min-height: 650px; }
}

@media (max-width: 680px) {
  html,
  body { overflow-x: clip; }

  .section-shell {
    width: auto;
    max-width: none;
    margin-inline: 14px;
  }

  .nav-shell {
    left: 7px;
    right: 7px;
    width: auto;
    max-width: none;
    transform: none;
  }

  .nav-shell nav { left: 0; right: 0; width: auto; }
  .hero { display: block; width: auto; max-width: none; }
  .hero-grid { inset-inline: -14px; }
  .hero-copy { width: 100%; }
  .hero .eyebrow { min-width: 0; flex-wrap: wrap; }
  .hero .eyebrow b { min-width: 0; overflow-wrap: anywhere; }
  .hero h1 { letter-spacing: -.035em; }
  [dir="rtl"] .hero h1 { letter-spacing: 0; }
  [dir="rtl"] .hero h1 em { line-height: 1.16; }
  .hero-text { max-width: 100%; }
  .hero-actions,
  .hero-actions .button { width: 100%; }
  .hero-machine { contain: layout paint; overflow: hidden; }
  .ring-a { width: min(88vw, 355px); height: min(88vw, 355px); }
  .ring-b { width: min(71vw, 285px); height: min(71vw, 285px); }
  .ring-c { width: min(54vw, 215px); height: min(54vw, 215px); }
  .signal-strip { width: 100%; max-width: 100%; transform: none; }
  .filters { width: 100%; }
  .filters button { flex: 1 1 auto; }
  .project-grid { width: 100%; }
  .project-card { width: 100%; overflow: hidden; }
  .project-meta { width: 100%; }
  .project-meta > div { min-width: 0; }
  .project-meta p { overflow-wrap: anywhere; }
  .skill-orbit { width: 100%; margin-inline: 0; transform: none; overflow: hidden; }
  .skill-orbit::before { width: min(78vw, 310px); height: min(78vw, 310px); }
  .skill-orbit::after { width: min(56vw, 224px); height: min(56vw, 224px); }
  .skill-node { width: 82px; height: 82px; }
  .node-web,.node-systems { left: calc(50% - 41px); }
  .node-mobile { right: 3px; }
  .node-design { left: 3px; }
  .cap-row { width: 100%; min-width: 0; }
  .cap-row > * { min-width: 0; }
  .cap-row h3,.cap-row p { overflow-wrap: anywhere; }
  .module-bank button { flex: 1 1 calc(33% - 8px); }
  .system-board,.bug-field,.code-lab { width: 100%; }
  .lab-toolbar { height: auto; min-height: 66px; flex-wrap: wrap; gap: 6px; padding-block: 8px; }
  .contact-inner,.contact-email,.contact-bottom,footer > div { min-width: 0; max-width: 100%; }
  .achievement { right: 14px; width: calc(100% - 28px); transform: translate3d(calc(100% + 28px), 0, 0); }
  .achievement.show { transform: translate3d(0, 0, 0); }

  .project-dialog {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .project-dialog-head { min-height: 82px; padding: 14px; }
  .project-dialog h2 { font-size: clamp(25px, 8vw, 36px); }
  .project-story { padding: 20px 16px; }
  .project-story #dialogSummary { font-size: 16px; }
  .project-story .dialog-actions { flex-direction: column; }
  .project-preview-shell { min-height: 76dvh; }
  .project-preview-stage { min-height: 58dvh; padding: 8px; }
  .project-preview-stage[data-size="phone"] iframe { width: min(390px, 100%); }
  .preview-controls > span b { display: none; }
  .preview-empty { min-height: 280px; padding: 24px 18px; }
}

@media (max-width: 390px) {
  .section-shell { margin-inline: 10px; }
  .nav-shell { left: 5px; right: 5px; }
  .brand img { width: 86px; }
  .lang-button,.menu-button { width: 34px; min-width: 34px; height: 36px; }
  .hero { padding-top: 92px; }
  .hero h1 { font-size: clamp(36px, 11.5vw, 45px); }
  .hero-text { font-size: 15px; }
  .button { min-height: 54px; padding-inline: 16px; }
  .project-visual { height: 330px; }
  .project-dialog-head .kicker { font-size: 8px; }
  .project-story { padding-inline: 13px; }
  .preview-controls { padding-inline: 8px; }
  .preview-controls button { width: 32px; }
}

@supports not (overflow: clip) {
  html,
  body { overflow-x: hidden; }
}

.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px; }
.whatsapp-inline { border-color: rgba(72, 225, 255, .45); color: #eefbff; background: linear-gradient(135deg, rgba(6,54,232,.25), rgba(0,220,232,.12)); }
.whatsapp-inline .whatsapp-icon { width: 22px; height: 22px; flex: 0 0 auto; }
.whatsapp-float {
  position: fixed;
  z-index: 110;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 15px 8px 9px;
  border: 1px solid rgba(77, 226, 255, .5);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, rgba(6, 54, 232, .96), rgba(0, 176, 212, .96));
  box-shadow: 0 16px 42px rgba(0, 54, 190, .28), 0 0 0 1px rgba(255,255,255,.1) inset;
  backdrop-filter: blur(14px);
  font-size: 12px;
  transition: transform .2s ease, background .2s ease;
}
.whatsapp-float:hover { color: #fff; background: linear-gradient(135deg, #1649ff, #00cfe2); transform: translateY(-3px); }
.whatsapp-icon { fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.whatsapp-float .whatsapp-icon { width: 35px; height: 35px; padding: 7px; display: block; flex: 0 0 auto; border-radius: 50%; background: rgba(255,255,255,.16); }
.whatsapp-float b { white-space: nowrap; }
[dir="rtl"] .whatsapp-float { right: auto; left: max(16px, env(safe-area-inset-left)); padding: 8px 9px 8px 15px; }

@media (max-width: 680px) {
  .whatsapp-float { right: max(10px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom)); min-height: 48px; padding: 6px; }
  [dir="rtl"] .whatsapp-float { right: auto; left: max(10px, env(safe-area-inset-left)); padding: 6px; }
  .whatsapp-float .whatsapp-icon { width: 36px; height: 36px; }
  .whatsapp-float b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .contact-actions { flex-direction: column; align-items: stretch; }
  .contact-actions > * { width: 100%; }
}

:root {
  --am-bg: #02050c;
  --am-panel: rgba(6, 14, 29, .72);
  --am-line: rgba(127, 172, 255, .18);
  --am-blue: #2f63ff;
  --am-cyan: #5df6ff;
  --am-white: #f2f8ff;
  --am-muted: #91a0b8;
}

html { background: var(--am-bg); }
body.home-v2 {
  overflow-x: clip;
  color: var(--am-white);
  background: var(--am-bg);
}

.home-v2 .nav-shell {
  position: fixed;
  top: 16px;
  z-index: 100;
  height: 70px;
  border-color: rgba(117, 160, 233, .18);
  background: rgba(3, 9, 20, .72);
  box-shadow: 0 18px 70px rgba(0, 0, 0, .28);
  backdrop-filter: blur(22px) saturate(130%);
}

.home-v2 .nav-shell nav { direction: rtl; }
.home-v2 .nav-shell nav a { color: #9aaac1; }
.home-v2 .nav-shell nav a:hover { color: #fff; background: rgba(255, 255, 255, .045); }
.home-v2 .nav-shell .brand img { width: 138px; }
.home-v2 .lang-button,
.home-v2 .theme-button,
.home-v2 .menu-button { color: #dfeaff; background: rgba(255, 255, 255, .035); }

.am-story {
  position: relative;
  height: 430svh;
  min-height: 2800px;
  background:
    radial-gradient(circle at 50% 12%, rgba(37, 91, 255, .18), transparent 25%),
    linear-gradient(#02050c, #030814 65%, #02050c);
}

.am-story-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  isolation: isolate;
}

.am-story-sticky::before,
.am-story-sticky::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.am-story-sticky::before {
  z-index: 0;
  inset: 0;
  opacity: .24;
  background-image:
    linear-gradient(rgba(86, 134, 215, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(86, 134, 215, .12) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 52%, #000, transparent 69%);
}

.am-story-sticky::after {
  z-index: 3;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 5, 12, .76), transparent 32%, transparent 68%, rgba(2, 5, 12, .72)),
    linear-gradient(0deg, rgba(2, 5, 12, .72), transparent 25%, transparent 78%, rgba(2, 5, 12, .48));
}

#amSceneCanvas {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.no-webgl #amSceneCanvas { display: none; }
.no-webgl .am-story-sticky { background: radial-gradient(circle at center, rgba(45, 105, 255, .34), transparent 32%), #02050c; }

.am-ambient {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
}

.am-ambient i {
  position: absolute;
  top: 51%;
  left: 50%;
  width: min(66vw, 760px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(79, 238, 255, .09);
  border-radius: 50%;
  box-shadow: inset 0 0 90px rgba(31, 95, 255, .035), 0 0 100px rgba(20, 89, 255, .04);
}
.am-ambient i:nth-child(2) { width: min(52vw, 590px); border-style: dashed; }
.am-ambient i:nth-child(3) { width: min(36vw, 420px); }

.story-panel {
  position: absolute;
  z-index: 5;
  top: 50%;
  inset-inline-start: max(5vw, calc((100vw - 1380px) / 2));
  width: min(37vw, 560px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(calc(-46% + 35px));
  transition: opacity .65s ease, transform .8s cubic-bezier(.2, .8, .2, 1), visibility .65s;
  pointer-events: none;
}

.story-panel.align-end {
  inset-inline-start: auto;
  inset-inline-end: max(5vw, calc((100vw - 1380px) / 2));
}

.story-panel.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(-46%);
  pointer-events: auto;
}

.story-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  color: var(--am-cyan);
  font: 800 10px var(--mono);
  letter-spacing: .15em;
}
.story-kicker::before { content: ""; width: 34px; height: 1px; background: currentColor; box-shadow: 0 0 12px currentColor; }

.story-panel h1,
.story-panel h2 {
  margin: 0;
  color: #f5f8ff;
  font-size: clamp(54px, 6.3vw, 102px);
  line-height: .92;
  letter-spacing: -.055em;
  text-wrap: balance;
}

[dir="rtl"] .story-panel h1,
[dir="rtl"] .story-panel h2 { letter-spacing: -.02em; line-height: 1.04; }
.story-panel h1 em,
.story-panel h2 em { display: block; color: transparent; font-style: normal; -webkit-text-stroke: 1px #4c78ff; text-shadow: 0 0 45px rgba(51, 104, 255, .15); }

.story-panel > p:not(.story-kicker) {
  max-width: 530px;
  margin: 25px 0 0;
  color: #a5b3c8;
  font-size: clamp(15px, 1.2vw, 19px);
  line-height: 1.85;
}

.story-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 28px; }
.story-button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 0 21px;
  border: 1px solid rgba(107, 151, 255, .25);
  border-radius: 999px;
  color: #dbe8ff;
  background: rgba(9, 21, 43, .64);
  backdrop-filter: blur(14px);
  font-weight: 800;
  transition: transform .25s, color .25s, background .25s, border-color .25s;
}
.story-button.primary { color: #021018; border-color: var(--am-cyan); background: var(--am-cyan); }
.story-button:hover { transform: translateY(-3px); border-color: var(--am-cyan); }

.story-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 26px; }
.story-tags span {
  padding: 8px 11px;
  border: 1px solid rgba(99, 149, 242, .18);
  border-radius: 8px;
  color: #8ea5c5;
  background: rgba(8, 18, 36, .55);
  font: 700 9px var(--mono);
}

.am-story-ui {
  position: absolute;
  z-index: 6;
  left: 5vw;
  right: 5vw;
  bottom: 28px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  color: #7587a2;
  font: 800 9px var(--mono);
  letter-spacing: .12em;
}
.am-story-ui b { color: var(--am-cyan); font-size: 16px; }
.am-story-ui i { height: 1px; overflow: hidden; background: rgba(113, 158, 235, .18); }
.am-story-ui em { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, var(--am-blue), var(--am-cyan)); box-shadow: 0 0 12px var(--am-cyan); transform: scaleX(0); transform-origin: left; }
[dir="rtl"] .am-story-ui em { transform-origin: right; }

.scene-orbits {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
}
.scene-orbits span {
  position: absolute;
  padding: 10px 14px;
  border: 1px solid rgba(90, 230, 255, .26);
  border-radius: 999px;
  color: rgba(195, 240, 255, .66);
  background: rgba(3, 12, 26, .62);
  backdrop-filter: blur(10px);
  font: 800 8px var(--mono);
  opacity: 0;
  transform: scale(.82);
  transition: opacity .6s, transform .6s;
}
.scene-orbits span:nth-child(1) { top: 24%; left: 34%; }
.scene-orbits span:nth-child(2) { top: 29%; right: 31%; }
.scene-orbits span:nth-child(3) { bottom: 24%; left: 32%; }
.scene-orbits span:nth-child(4) { right: 33%; bottom: 21%; }
.am-story[data-active-scene="1"] .scene-orbits span,
.am-story[data-active-scene="2"] .scene-orbits span { opacity: 1; transform: scale(1); }

.content-shell { width: min(100% - 40px, 1380px); margin-inline: auto; }
.home-section { position: relative; padding: clamp(100px, 12vw, 180px) 0; }
.home-heading { display: grid; grid-template-columns: 1fr minmax(250px, .42fr); gap: 50px; align-items: end; margin-bottom: 58px; }
.home-heading .story-kicker { margin-bottom: 13px; }
.home-heading h2 { max-width: 900px; margin: 0; font-size: clamp(45px, 6vw, 84px); line-height: .98; letter-spacing: -.045em; }
[dir="rtl"] .home-heading h2 { letter-spacing: -.015em; }
.home-heading > p { margin: 0; color: var(--am-muted); line-height: 1.8; }

.showcase-section { background: linear-gradient(180deg, #02050c, #050a14 45%, #02050c); }
.showcase-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.showcase-card {
  position: relative;
  grid-column: span 4;
  min-height: 590px;
  overflow: hidden;
  border: 1px solid var(--am-line);
  border-radius: 26px;
  background: #07101e;
  isolation: isolate;
  transition: transform .45s cubic-bezier(.2,.8,.2,1), border-color .35s, box-shadow .45s;
}
.showcase-card:nth-child(2) { margin-top: 55px; }
.showcase-card:hover { transform: translateY(-10px); border-color: rgba(93, 246, 255, .48); box-shadow: 0 35px 90px rgba(0, 0, 0, .36); }
.showcase-card img { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.showcase-card:hover img { transform: scale(1.035); }
.showcase-card::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, rgba(2,6,14,.03) 20%, rgba(2,6,14,.96) 85%); }
.showcase-index { position: absolute; top: 20px; inset-inline-start: 20px; color: var(--am-cyan); font: 900 11px var(--mono); }
.showcase-type { position: absolute; top: 20px; inset-inline-end: 20px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; color: #fff; background: rgba(2,8,18,.48); backdrop-filter: blur(12px); font: 700 8px var(--mono); }
.showcase-copy { position: absolute; left: 24px; right: 24px; bottom: 24px; }
.showcase-copy h3 { margin: 0 0 10px; color: #fff; font-size: clamp(28px, 3vw, 43px); line-height: 1.02; }
.showcase-copy p { min-height: 54px; margin: 0 0 18px; color: #aebbd0; line-height: 1.65; }
.showcase-meta { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 17px; border-top: 1px solid rgba(255,255,255,.12); }
.showcase-meta small { color: #7f93b0; font: 700 9px var(--mono); }
.showcase-meta button { border: 0; color: var(--am-cyan); background: none; font-weight: 900; cursor: pointer; }

.capability-home { background: #02050c; }
.capability-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--am-line); border-inline-start: 1px solid var(--am-line); }
.capability-card { min-height: 350px; display: flex; flex-direction: column; padding: 28px; border: 0; border-inline-end: 1px solid var(--am-line); border-bottom: 1px solid var(--am-line); color: inherit; background: rgba(7, 14, 27, .35); text-align: inherit; transition: background .35s, transform .35s; }
.capability-card:hover { background: rgba(18, 42, 78, .42); transform: translateY(-6px); }
.capability-card > span { color: var(--am-cyan); font: 800 10px var(--mono); }
.capability-card b { width: 62px; height: 62px; display: grid; place-items: center; margin: 55px 0 30px; border: 1px solid rgba(87, 235, 255, .24); border-radius: 18px; color: var(--am-cyan); background: rgba(11, 31, 61, .54); font: 900 18px var(--mono); }
.capability-card h2 { margin: 0 0 14px; font-size: 25px; }
.capability-card p { margin: 0; color: var(--am-muted); line-height: 1.75; }
.capability-card small { margin-top: auto; padding-top: 28px; color: #617590; font: 700 8px var(--mono); letter-spacing: .08em; }

.studio-band { overflow: hidden; background: linear-gradient(135deg, #0a1c43, #04101f 55%, #06262c); }
.studio-band::before { content: ""; position: absolute; inset: -20%; background: radial-gradient(circle, rgba(67, 118, 255, .23), transparent 40%); transform: translateX(28%); }
.studio-layout { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 90px; align-items: center; }
.studio-layout h2 { margin: 0; font-size: clamp(48px, 6vw, 86px); line-height: .98; }
.studio-layout p { color: #a9bad1; line-height: 1.9; }
.studio-proof { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.studio-proof div { min-height: 155px; padding: 24px; border: 1px solid rgba(140, 181, 255, .16); border-radius: 18px; background: rgba(2, 8, 18, .3); backdrop-filter: blur(12px); }
.studio-proof b { display: block; color: var(--am-cyan); font-size: 33px; }
.studio-proof span { color: #8ea1bb; font-size: 12px; }

.lab-teaser { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-top: 50px; padding: 24px 28px; border: 1px solid rgba(93, 246, 255, .2); border-radius: 22px; background: rgba(4, 14, 27, .48); }
.lab-teaser p { margin: 0; }
.lab-teaser a { flex: 0 0 auto; }

.home-contact { min-height: 90svh; display: grid; place-items: center; text-align: center; background: radial-gradient(circle at center, rgba(40, 102, 255, .22), transparent 38%), #02050c; }
.home-contact h2 { max-width: 1050px; margin: 0 auto; font-size: clamp(58px, 9vw, 126px); line-height: .9; letter-spacing: -.06em; }
[dir="rtl"] .home-contact h2 { letter-spacing: -.02em; line-height: 1; }
.home-contact p { color: var(--am-muted); }
.home-contact .contact-email { margin: 32px auto 0; }

.home-v2 footer { color: #8495ae; background: #02050c; border-color: var(--am-line); }
.home-v2 .project-dialog { color: var(--ink); }

@media (max-width: 1080px) {
  .story-panel { width: min(43vw, 500px); }
  .story-panel h1, .story-panel h2 { font-size: clamp(48px, 6.6vw, 72px); }
  .showcase-card { grid-column: span 6; }
  .showcase-card:nth-child(2) { margin-top: 0; }
  .showcase-card:last-child { grid-column: 4 / span 6; }
  .capability-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .home-v2 .nav-shell { top: 8px; height: 62px; }
  .home-v2 .nav-shell .brand img { width: 112px; }
  .am-story { height: 400svh; min-height: 2400px; }
  .am-story-sticky { min-height: 560px; }
  .am-story-sticky::after { background: linear-gradient(0deg, rgba(2,5,12,.98) 0, rgba(2,5,12,.78) 38%, transparent 68%, rgba(2,5,12,.28)); }
  .am-ambient i { top: 38%; width: 88vw; }
  .am-ambient i:nth-child(2) { width: 70vw; }
  .am-ambient i:nth-child(3) { width: 50vw; }
  .story-panel,
  .story-panel.align-end {
    top: auto;
    bottom: 72px;
    left: 20px;
    right: 20px;
    width: auto;
    transform: translateY(28px);
  }
  .story-panel.active { transform: translateY(0); }
  .story-panel h1, .story-panel h2 { font-size: clamp(42px, 12.5vw, 62px); }
  .story-panel > p:not(.story-kicker) { max-width: 560px; margin-top: 16px; font-size: 14px; line-height: 1.65; }
  .story-kicker { margin-bottom: 10px; font-size: 8px; }
  .story-actions { margin-top: 17px; }
  .story-button { min-height: 46px; padding-inline: 17px; font-size: 12px; }
  .story-tags { display: none; }
  .am-story-ui { left: 20px; right: 20px; bottom: 20px; font-size: 7px; }
  .scene-orbits span { font-size: 6px; padding: 7px 9px; }
  .scene-orbits span:nth-child(1) { top: 19%; left: 8%; }
  .scene-orbits span:nth-child(2) { top: 23%; right: 8%; }
  .scene-orbits span:nth-child(3) { bottom: 45%; left: 7%; }
  .scene-orbits span:nth-child(4) { right: 7%; bottom: 42%; }
  .content-shell { width: min(100% - 28px, 1380px); }
  .home-heading { grid-template-columns: 1fr; gap: 20px; margin-bottom: 35px; }
  .home-heading h2 { font-size: 44px; }
  .showcase-grid { display: block; }
  .showcase-card { min-height: 510px; margin-bottom: 16px; }
  .capability-grid { grid-template-columns: 1fr; }
  .capability-card { min-height: 280px; }
  .capability-card b { margin: 35px 0 24px; }
  .studio-layout { grid-template-columns: 1fr; gap: 45px; }
  .studio-proof { gap: 8px; }
  .studio-proof div { min-height: 125px; padding: 18px; }
  .lab-teaser { align-items: flex-start; flex-direction: column; }
  .home-contact { min-height: 75svh; }
  .home-contact h2 { font-size: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  .story-panel,
  .showcase-card,
  .showcase-card img,
  .capability-card { transition: none; }
}

:root {
  --cinema-cyan: #65f5ff;
  --cinema-blue: #3868ff;
  --cinema-night: #02050c;
}

body.cinema-v3 { background: var(--cinema-night); }

.cinema-v3 .am-story {
  height: 570svh;
  min-height: 3600px;
  background: #02050c;
}

.cinema-v3 .am-story-sticky { perspective: 1500px; touch-action: pan-y; }

.cinema-v3 .cinema-poster {
  position: absolute;
  z-index: 1;
  inset: -4%;
  width: 108%;
  height: 108%;
  opacity: .34;
  pointer-events: none;
  filter: saturate(.82) contrast(1.04) brightness(.45);
}
.cinema-v3 .cinema-poster img { width: 100%; height: 100%; display: block; object-fit: cover; }
.cinema-v3 .cinema-ready .cinema-poster { opacity: 0; }

.cinema-v3 #cinemaCanvas {
  position: absolute;
  z-index: 1;
  inset: -4%;
  width: 108%;
  height: 108%;
  max-width: none;
  display: block;
  opacity: 0;
  filter: saturate(.82) contrast(1.04) brightness(.45);
  transform:
    translate3d(var(--pointer-px-x, 0px), var(--pointer-px-y, 0px), 0)
    rotateX(var(--pointer-rx, 0deg))
    rotateY(var(--pointer-ry, 0deg))
    scale(1.045);
  transition: none;
  transform-origin: center;
  will-change: transform;
}

.cinema-v3 .cinema-ready #cinemaCanvas { opacity: .34; }

.cinema-v3 #amGeometryCanvas {
  position: absolute;
  z-index: 4;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 0 28px rgba(49, 125, 255, .18));
}
.no-webgl .cinema-v3 #amGeometryCanvas { display: none; }

.cinema-v3 .am-story-sticky::before {
  z-index: 2;
  inset: 0;
  opacity: .18;
  background-size: 9vw 9vw;
  mix-blend-mode: screen;
}

.cinema-v3 .am-story-sticky::after {
  z-index: 3;
  background:
    radial-gradient(circle at var(--pointer-light-x, 50%) var(--pointer-light-y, 45%), rgba(66, 234, 255, .08), transparent 22%),
    linear-gradient(90deg, rgba(2,5,12,.84), rgba(2,5,12,.15) 42%, rgba(2,5,12,.14) 60%, rgba(2,5,12,.8)),
    linear-gradient(0deg, rgba(2,5,12,.84), transparent 31%, transparent 73%, rgba(2,5,12,.55));
}

.cinema-v3 .am-ambient { z-index: 2; }
.cinema-v3 .am-ambient i {
  transform: translate(calc(-50% + var(--pointer-opposite-x, 0px)), calc(-50% + var(--pointer-opposite-y, 0px)));
  transition: none;
}
.cinema-v3 .am-ambient i:nth-child(2) { transform: translate(calc(-50% + var(--pointer-px-x, 0px)), calc(-50% + var(--pointer-px-y, 0px))); }
.cinema-v3 .am-ambient i:nth-child(3) { transform: translate(calc(-50% + var(--pointer-opposite-x, 0px)), calc(-50% + var(--pointer-opposite-y, 0px))); }

.cinema-v3 .story-panel {
  z-index: 7;
  width: min(35vw, 540px);
  padding: clamp(20px, 2.2vw, 34px);
  border: 1px solid rgba(104, 151, 233, .13);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(2, 7, 17, .92), rgba(4, 12, 27, .74));
  box-shadow: 0 28px 90px rgba(0, 0, 0, .24);
  backdrop-filter: blur(13px);
  visibility: hidden;
  opacity: 0;
  transition: none;
  will-change: transform, opacity, filter;
}
.cinema-v3 .story-panel > * { transition: none; will-change: transform, opacity; }
.cinema-v3 .story-panel[data-scene="0"] { visibility: visible; opacity: 1; }
.cinema-v3 .story-panel[data-scene="0"] > * { visibility: visible; opacity: 1; }
.cinema-v3 .story-panel h1,
.cinema-v3 .story-panel h2 { font-size: clamp(52px, 5.9vw, 96px); }
.cinema-v3 .story-panel h1 em,
.cinema-v3 .story-panel h2 em { -webkit-text-stroke-color: #6f8fff; }

.cinema-frame-readout {
  position: absolute;
  z-index: 6;
  top: 112px;
  left: 5vw;
  display: flex;
  gap: 7px;
  align-items: center;
  direction: ltr;
  color: rgba(210, 230, 255, .55);
  font: 700 8px var(--mono);
  letter-spacing: .16em;
}
.cinema-frame-readout::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cinema-cyan); box-shadow: 0 0 18px var(--cinema-cyan); }

/* A separate scroll film for the real projects. */
.worlds-section {
  --world-height: 470svh;
  position: relative;
  height: var(--world-height);
  min-height: 3000px;
  padding: 0;
  overflow: visible;
  color: #f4f8ff;
  background:
    radial-gradient(circle at 50% 28%, rgba(44, 93, 255, .18), transparent 30%),
    linear-gradient(180deg, #02050c, #040a16 52%, #02050c);
}

.worlds-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  isolation: isolate;
  perspective: 1250px;
  touch-action: pan-y;
  background:
    radial-gradient(circle at center, rgba(18, 66, 154, .2), transparent 43%),
    linear-gradient(rgba(73, 121, 209, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(73, 121, 209, .055) 1px, transparent 1px);
  background-size: auto, 72px 72px, 72px 72px;
}

.worlds-stage::before,
.worlds-stage::after { content: ""; position: absolute; pointer-events: none; }
.worlds-stage::before {
  z-index: 0;
  inset: 0;
  background: radial-gradient(circle at var(--pointer-light-x, 50%) var(--pointer-light-y, 45%), rgba(77, 240, 255, .11), transparent 24%);
}
.worlds-stage::after {
  z-index: 4;
  inset: 0;
  border: 1px solid rgba(97, 146, 230, .12);
  background: linear-gradient(90deg, rgba(2,5,12,.72), transparent 23%, transparent 77%, rgba(2,5,12,.72));
}

.worlds-intro {
  position: absolute;
  z-index: 7;
  inset: 0;
  width: min(100% - 40px, 1180px);
  margin: auto;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
  will-change: transform, opacity;
}
.worlds-intro h2 { max-width: 1050px; margin: 0 auto; font-size: clamp(58px, 8.8vw, 132px); line-height: .9; letter-spacing: -.06em; }
[dir="rtl"] .worlds-intro h2 { line-height: 1; letter-spacing: -.025em; }
.worlds-intro > p:last-child { max-width: 650px; margin: 24px auto 0; color: #91a2ba; line-height: 1.8; }

.worlds-exit {
  position: absolute;
  z-index: 9;
  inset: 0;
  width: min(100% - 36px, 920px);
  margin: auto;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  will-change: transform, opacity;
}
.worlds-exit h2 { max-width: 850px; margin: 0; font-size: clamp(50px, 7vw, 104px); line-height: .94; letter-spacing: -.045em; text-wrap: balance; }
[dir="rtl"] .worlds-exit h2 { line-height: 1.04; letter-spacing: -.018em; }
.worlds-exit > p:not(.story-kicker) { max-width: 610px; margin: 22px auto 28px; color: #9babc1; line-height: 1.8; }
.worlds-exit .story-button { width: fit-content; }

.project-world {
  --world-z: -1250px;
  --world-x: 0px;
  --world-y: 100px;
  --world-scale: .18;
  --world-rotate: -28deg;
  --world-opacity: 0;
  --world-blur: 10px;
  --copy-opacity: 0;
  position: absolute;
  z-index: 2;
  inset: 0;
  opacity: var(--world-opacity);
  filter: none;
  transform: translate3d(var(--world-x), var(--world-y), var(--world-z)) scale(var(--world-scale));
  transform-style: preserve-3d;
  will-change: transform, opacity, filter;
}

.world-system {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(330px, 44vw, 690px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%) rotateX(var(--mouse-rx, 0deg)) rotateY(var(--mouse-ry, 0deg)) rotateZ(var(--world-rotate));
  transform-style: preserve-3d;
  transition: none;
  backface-visibility: hidden;
}

.world-orbit {
  position: absolute;
  inset: 4%;
  border: 1px solid rgba(105, 231, 255, .27);
  border-radius: 50%;
  transform: rotateX(68deg) rotateZ(22deg);
  box-shadow: 0 0 40px rgba(65, 117, 255, .08), inset 0 0 40px rgba(65, 117, 255, .05);
  animation: world-orbit 12s linear infinite;
}
.world-orbit.second { inset: -7%; border-style: dashed; border-color: rgba(93, 124, 255, .22); transform: rotateY(64deg) rotateZ(-30deg); animation-duration: 17s; animation-direction: reverse; }
.world-orbit.third { inset: 14%; border-color: rgba(255, 255, 255, .13); transform: rotateX(76deg) rotateZ(75deg); animation-duration: 8s; }
.world-orbit::after { content: ""; position: absolute; top: 48%; left: -5px; width: 10px; height: 10px; border-radius: 50%; background: var(--cinema-cyan); box-shadow: 0 0 24px var(--cinema-cyan); }
.project-world:not(.is-active-world) .world-orbit { animation-play-state: paused; }

.world-core {
  position: absolute;
  inset: 15%;
  display: block;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(124, 213, 255, .46);
  border-radius: 47% 53% 52% 48% / 48% 44% 56% 52%;
  color: inherit;
  background: #081426;
  box-shadow: 0 0 0 18px rgba(42, 97, 255, .035), 0 0 100px rgba(30, 97, 255, .36), inset 0 0 80px rgba(0, 0, 0, .55);
  cursor: pointer;
  transform: translateZ(55px);
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.world-core-action { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; border-radius: inherit; color: inherit; background: transparent; cursor: pointer; }
.world-core-action[hidden], .world-copy .story-button[hidden] { display: none !important; }
.world-core-action:focus-visible { outline: 3px solid var(--cinema-cyan); outline-offset: 5px; }
.world-core:hover { border-color: var(--cinema-cyan); box-shadow: 0 0 0 22px rgba(63, 232, 255, .045), 0 0 130px rgba(43, 109, 255, .55); transform: translateZ(78px) scale(1.025); }
.world-core img { width: 100%; height: 100%; object-fit: cover; opacity: .9; filter: saturate(.92) contrast(1.08); transition: transform .7s cubic-bezier(.2,.8,.2,1); }
.world-core img { backface-visibility: hidden; transform: translateZ(0); }
.world-core:hover img { transform: scale(1.07); }
.world-core::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(circle at 32% 25%, rgba(255,255,255,.19), transparent 24%), linear-gradient(135deg, transparent 45%, rgba(5,13,28,.72)); box-shadow: inset -35px -42px 70px rgba(0,0,0,.48); pointer-events: none; }

.world-satellite { position: absolute; width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid rgba(101,245,255,.35); border-radius: 50%; color: var(--cinema-cyan); background: rgba(3,12,25,.82); box-shadow: 0 0 30px rgba(54, 166, 255, .2); font: 800 8px var(--mono); transform: translateZ(100px); }
.world-satellite.one { top: 7%; right: 14%; }
.world-satellite.two { bottom: 10%; left: 9%; width: 34px; height: 34px; }

.world-copy {
  position: absolute;
  z-index: 6;
  top: 50%;
  inset-inline-start: max(4vw, calc((100vw - 1400px) / 2));
  width: min(29vw, 420px);
  opacity: var(--copy-opacity);
  transform: translate3d(0, -50%, 150px);
  will-change: transform, opacity;
}
.project-world:nth-of-type(even) .world-copy { inset-inline-start: auto; inset-inline-end: max(4vw, calc((100vw - 1400px) / 2)); }
.world-copy h2 { margin: 0 0 16px; font-size: clamp(38px, 4.5vw, 70px); line-height: .95; }
.world-copy > p:not(.story-kicker) { color: #9babc1; line-height: 1.8; }
.world-copy small { display: block; margin: 18px 0 24px; color: #67809f; font: 700 9px var(--mono); letter-spacing: .08em; }
.world-copy .story-button { width: fit-content; }

.worlds-ui {
  position: absolute;
  z-index: 8;
  left: 5vw;
  right: 5vw;
  bottom: 28px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  color: #7487a4;
  font: 800 9px var(--mono);
  letter-spacing: .12em;
}
.worlds-ui b { color: var(--cinema-cyan); }
.worlds-ui b { direction: ltr; unicode-bidi: isolate; }
.worlds-ui i { height: 1px; overflow: hidden; background: rgba(124, 162, 225, .18); }
.worlds-ui em { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, var(--cinema-blue), var(--cinema-cyan)); transform: scaleX(0); transform-origin: left; }
[dir="rtl"] .worlds-ui em { transform-origin: right; }

@keyframes world-orbit { to { rotate: 360deg; } }

@media (max-width: 980px) {
  .cinema-v3 .story-panel { width: min(44vw, 500px); }
  .world-system { width: clamp(320px, 52vw, 560px); }
  .world-copy { width: min(31vw, 350px); }
}

@media (max-width: 760px) {
  .cinema-v3 .am-story { height: 520svh; min-height: 3000px; }
  .cinema-v3 #cinemaCanvas { inset: 0; width: 100%; height: 100%; filter: none; }
  .cinema-v3 .cinema-ready #cinemaCanvas { opacity: .22; }
  .cinema-v3 #amGeometryCanvas { top: 72px; right: 0; bottom: auto; left: 0; width: 100%; height: min(48svh, 430px); clip-path: none; filter: none; }
  .cinema-v3 .am-story-sticky::after { background: linear-gradient(0deg, rgba(2,5,12,.96), rgba(2,5,12,.7) 44%, transparent 72%, rgba(2,5,12,.46)); }
  .cinema-v3 .story-panel,
  .cinema-v3 .story-panel.align-end { width: auto; }
  .cinema-v3 .story-panel,
  .cinema-v3 .story-panel.align-end {
    bottom: 46px;
    padding: 14px 16px;
    border-radius: 19px;
    background: linear-gradient(180deg, rgba(2, 7, 17, .78), rgba(2, 7, 17, .96));
    backdrop-filter: none;
  }
  .cinema-v3 .story-panel h1,
  .cinema-v3 .story-panel h2 { font-size: clamp(30px, 7.6vw, 38px); line-height: 1; }
  .cinema-v3 .story-panel > p:not(.story-kicker) { margin-top: 11px; font-size: 12.5px; line-height: 1.5; }
  .cinema-v3 .story-actions { margin-top: 12px; }
  .cinema-v3 .story-button { min-height: 41px; padding-inline: 14px; font-size: 10px; }
  .cinema-frame-readout { top: 84px; left: 20px; }
  .worlds-section { min-height: 3600px; }
  .worlds-stage { min-height: 560px; }
  .worlds-stage::after { background: linear-gradient(0deg, rgba(2,5,12,.92), transparent 34%, transparent 72%, rgba(2,5,12,.52)); }
  .worlds-intro h2 { font-size: clamp(48px, 14vw, 70px); }
  .worlds-intro > p:last-child { font-size: 14px; }
  .world-system { top: 37%; width: min(82vw, 460px); }
  .world-copy,
  .project-world:nth-of-type(even) .world-copy {
    top: auto;
    right: 20px;
    bottom: 68px;
    left: 20px;
    width: auto;
    transform: translate3d(0, 0, 150px);
    text-align: start;
  }
  .world-copy h2 { margin-bottom: 8px; font-size: clamp(34px, 10vw, 48px); }
  .world-copy > p:not(.story-kicker) { display: -webkit-box; margin: 0; overflow: hidden; font-size: 13px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .world-copy small { margin: 9px 0 12px; font-size: 7px; }
  .world-copy .story-button { min-height: 42px; }
  .worlds-ui { left: 20px; right: 20px; bottom: 20px; font-size: 7px; }
  .world-satellite { width: 38px; height: 38px; }
  .world-orbit.third { display: none; }
  .worlds-exit h2 { font-size: clamp(42px, 12vw, 62px); }
  .worlds-exit > p:not(.story-kicker) { margin-block: 16px 22px; font-size: 14px; }
}

@media (min-width: 761px) and (max-height: 820px) {
  .cinema-v3 .story-panel { padding: 17px 20px; }
  .cinema-v3 .story-panel h1,
  .cinema-v3 .story-panel h2 { font-size: clamp(38px, 4.3vw, 64px); line-height: .92; }
  [dir="rtl"] .cinema-v3 .story-panel h1,
  [dir="rtl"] .cinema-v3 .story-panel h2 { line-height: 1; }
  .cinema-v3 .story-panel > p:not(.story-kicker) { margin-top: 13px; font-size: 13px; line-height: 1.55; }
  .cinema-v3 .story-actions { margin-top: 13px; }
  .cinema-v3 .story-tags { margin-top: 12px; }
  .cinema-v3 .story-button { min-height: 40px; }
}

@media (max-width: 380px) {
  .cinema-v3 #amGeometryCanvas { top: 70px; height: min(45svh, 330px); clip-path: none; }
  .cinema-v3 .story-panel,
  .cinema-v3 .story-panel.align-end { right: 10px; bottom: 38px; left: 10px; padding: 12px 13px; }
  .cinema-v3 .story-panel h1,
  .cinema-v3 .story-panel h2 { font-size: clamp(27px, 8.5vw, 34px); }
  .cinema-v3 .story-tags { gap: 5px; }
  .cinema-v3 .story-tags span { padding: 5px 7px; font-size: 6px; }
  .world-system { top: 34%; width: min(78vw, 330px); }
  .world-copy,
  .project-world:nth-of-type(even) .world-copy { right: 12px; bottom: 58px; left: 12px; }
}

@media (max-width: 760px) and (max-height: 740px) {
  .cinema-v3 .story-panel,
  .cinema-v3 .story-panel.align-end { bottom: 36px; padding: 11px 13px; }
  .cinema-v3 .story-panel h1,
  .cinema-v3 .story-panel h2 { font-size: clamp(26px, 7.4vw, 33px); }
  .cinema-v3 .story-panel > p:not(.story-kicker) { margin-top: 8px; font-size: 11.5px; line-height: 1.42; }
  .cinema-v3 .story-actions { margin-top: 9px; }
  .cinema-v3 .story-button { min-height: 38px; }
  .cinema-v3 .story-tags { margin-top: 8px; }
}

@media (max-width: 760px) and (max-height: 600px) {
  .cinema-v3 #amGeometryCanvas { height: 32svh; }
}

@media (prefers-reduced-motion: reduce) {
  .cinema-v3 #cinemaCanvas { transform: scale(1.02); }
  .world-orbit { animation: none; }
}

/* Shared daylight system. Loaded after each page stylesheet so every hard-coded dark surface has a visible light equivalent. */
html[data-theme="light"] { color-scheme: light; background: #edf3fb; }
html[data-theme="dark"] { color-scheme: dark; }

html[data-theme="light"] body,
html[data-theme="light"] body.home-v2,
html[data-theme="light"] body.work-archive,
html[data-theme="light"] body.lab-v2 { color: #071426; background: #edf3fb; }

html[data-theme="light"] .nav-shell,
html[data-theme="light"] .home-v2 .nav-shell,
html[data-theme="light"] .work-archive .nav-shell,
html[data-theme="light"] .lab-v2 .nav-shell {
  border-color: rgba(18, 52, 98, .14);
  color: #071426;
  background: rgba(248, 251, 255, .92);
  box-shadow: 0 15px 50px rgba(24, 55, 96, .1);
}
html[data-theme="light"] .nav-shell nav a,
html[data-theme="light"] .home-v2 .nav-shell nav a,
html[data-theme="light"] .lab-v2 .nav-shell nav a { color: #52647d; }
html[data-theme="light"] .nav-shell nav a:hover,
html[data-theme="light"] .nav-shell nav a[aria-current="page"] { color: #071426; background: rgba(6, 54, 232, .08); }
html[data-theme="light"] .home-v2 .lang-button,
html[data-theme="light"] .home-v2 .theme-button,
html[data-theme="light"] .home-v2 .menu-button,
html[data-theme="light"] .lab-v2 .lang-button,
html[data-theme="light"] .lab-v2 .theme-button,
html[data-theme="light"] .lab-v2 .menu-button { color: #10233e; background: rgba(255,255,255,.8); }

html[data-theme="light"] #pointerGlow { mix-blend-mode: multiply; }
html[data-theme="light"] .project-dialog { color: #071426; background: #f8fbff; }
html[data-theme="light"] .project-dialog-head,
html[data-theme="light"] .project-story { border-color: rgba(23, 55, 101, .14); }
html[data-theme="light"] .whatsapp-inline { color: #07385b; background: linear-gradient(135deg, rgba(6,54,232,.1), rgba(0,220,232,.12)); }
html[data-theme="light"] .whatsapp-float { color: #fff; box-shadow: 0 16px 40px rgba(0, 76, 175, .22); }

/* Home and scroll film */
html[data-theme="light"] .home-v2 {
  --am-bg: #edf3fb;
  --am-panel: rgba(255,255,255,.9);
  --am-line: rgba(25, 58, 106, .15);
  --am-blue: #0636e8;
  --am-cyan: #008da8;
  --am-white: #071426;
  --am-muted: #55677f;
}
html[data-theme="light"] .cinema-v3 .am-story,
html[data-theme="light"] .capability-home,
html[data-theme="light"] .home-contact { background: #edf3fb; }
html[data-theme="light"] .cinema-v3 .am-story-sticky::before { opacity: .09; mix-blend-mode: multiply; }
html[data-theme="light"] .cinema-v3 .am-story-sticky::after {
  background: radial-gradient(circle at var(--pointer-light-x,50%) var(--pointer-light-y,45%), rgba(0,155,193,.09), transparent 24%), linear-gradient(90deg, rgba(237,243,251,.88), rgba(237,243,251,.08) 43%, rgba(237,243,251,.08) 60%, rgba(237,243,251,.84));
}
html[data-theme="light"] .cinema-v3 #cinemaCanvas { opacity: .12; mix-blend-mode: multiply; }
html[data-theme="light"] .cinema-v3 .cinema-ready #cinemaCanvas { opacity: .15; }
html[data-theme="light"] .cinema-v3 #amGeometryCanvas { filter: saturate(.9) contrast(1.12); }
html[data-theme="light"] .cinema-v3 .story-panel {
  border-color: rgba(38, 83, 150, .16);
  color: #071426;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(238,246,255,.9));
  box-shadow: 0 28px 80px rgba(35, 69, 113, .14);
}
html[data-theme="light"] .story-panel h1,
html[data-theme="light"] .story-panel h2 { color: #071426; }
html[data-theme="light"] .story-panel > p:not(.story-kicker),
html[data-theme="light"] .worlds-intro > p:last-child,
html[data-theme="light"] .worlds-exit > p:not(.story-kicker),
html[data-theme="light"] .world-copy > p:not(.story-kicker) { color: #4f627c; }
html[data-theme="light"] .story-tags span { color: #24415f; background: rgba(255,255,255,.8); }
html[data-theme="light"] .story-button { color: #10233e; background: rgba(255,255,255,.75); }
html[data-theme="light"] .story-button.primary { color: #fff; background: #0636e8; border-color: #0636e8; }
html[data-theme="light"] .cinema-frame-readout,
html[data-theme="light"] .am-story-ui { color: #4d607b; }

html[data-theme="light"] .worlds-section { color: #071426; background: radial-gradient(circle at 50% 28%, rgba(42, 92, 255, .12), transparent 31%), linear-gradient(180deg, #edf3fb, #f8fbff 52%, #edf3fb); }
html[data-theme="light"] .worlds-stage { background: radial-gradient(circle at center, rgba(52, 105, 228, .13), transparent 43%), linear-gradient(rgba(41,83,145,.07) 1px,transparent 1px), linear-gradient(90deg,rgba(41,83,145,.07) 1px,transparent 1px); background-size:auto,72px 72px,72px 72px; }
html[data-theme="light"] .worlds-stage::after { background: linear-gradient(90deg, rgba(237,243,251,.72), transparent 23%, transparent 77%, rgba(237,243,251,.72)); }
html[data-theme="light"] .world-copy h2,
html[data-theme="light"] .worlds-intro h2,
html[data-theme="light"] .worlds-exit h2 { color: #071426; }
html[data-theme="light"] .world-copy small { color: #516681; }
html[data-theme="light"] .world-core { background: #061225; box-shadow: 0 28px 70px rgba(23, 58, 105, .2); }
html[data-theme="light"] .worlds-ui { color: #536780; }

html[data-theme="light"] .showcase-section,
html[data-theme="light"] .capability-home { background: #edf3fb; }
html[data-theme="light"] .capability-card { color: #071426; background: rgba(255,255,255,.58); }
html[data-theme="light"] .capability-card:hover { background: #fff; }
html[data-theme="light"] .capability-card b { background: #e7f3ff; }
html[data-theme="light"] .capability-card p,
html[data-theme="light"] .home-heading > p { color: #566a82; }
html[data-theme="light"] .studio-band { color: #071426; background: linear-gradient(135deg, #dce9ff, #f8fbff 55%, #dff7f8); }
html[data-theme="light"] .studio-layout p,
html[data-theme="light"] .studio-proof span { color: #50657e; }
html[data-theme="light"] .studio-proof div,
html[data-theme="light"] .lab-teaser { border-color: rgba(29,81,154,.15); background: rgba(255,255,255,.7); }
html[data-theme="light"] .home-contact { background: radial-gradient(circle at center, rgba(40,102,255,.12), transparent 40%), #edf3fb; }
html[data-theme="light"] .home-contact h2,
html[data-theme="light"] .contact-email { color: #071426; }
html[data-theme="light"] .home-v2 footer { color: #53657d; background: #e5edf7; }
html[data-theme="light"] .home-v2 footer img { filter: brightness(.25) saturate(1.4); }

/* Work archive */
html[data-theme="light"] .work-archive { --archive-bg:#edf3fb; --archive-cyan:#007f9a; }
html[data-theme="light"] .archive-hero { color:#071426; background:#edf3fb; }
html[data-theme="light"] .archive-grid::after { background:linear-gradient(90deg,#edf3fb 4%,transparent 44%,rgba(237,243,251,.18) 70%,#edf3fb); }
html[data-theme="light"] .archive-orbit span { color:#006f88; background:#f8fbff; }
html[data-theme="light"] .archive-hero-copy>p:not(.archive-kicker),
html[data-theme="light"] .archive-heading>p,
html[data-theme="light"] .archive-card-copy>div,
html[data-theme="light"] .archive-contact>div>p:not(.archive-kicker) { color:#52657e; }
html[data-theme="light"] .archive-down,
html[data-theme="light"] .archive-contact a { color:#10233e; background:rgba(255,255,255,.8); }
html[data-theme="light"] .archive-section { color:#071426; background:linear-gradient(180deg,#edf3fb,#f8fbff); }
html[data-theme="light"] .archive-filters { border-color:rgba(24,67,130,.14); background:rgba(248,251,255,.92); box-shadow:0 18px 50px rgba(34,65,107,.1); }
html[data-theme="light"] .archive-filters button { color:#53667e; }
html[data-theme="light"] .archive-filters button.active { color:#071426; background:rgba(6,54,232,.08); }
html[data-theme="light"] .archive-card { color:#071426; border-color:rgba(27,70,133,.14); background:#fff; box-shadow:0 28px 70px rgba(31,61,103,.12); }
html[data-theme="light"] .archive-card-copy small { color:#61748d; }
html[data-theme="light"] .archive-open { color:#073f5b; background:#eef8ff; }
html[data-theme="light"] .archive-contact { color:#071426; background:radial-gradient(circle at center,rgba(47,96,255,.1),transparent 40%),#edf3fb; }

/* Lab */
html[data-theme="light"] .lab-hero { color:#071426; background:radial-gradient(circle at 62% 42%,rgba(43,95,255,.15),transparent 32%),linear-gradient(145deg,#edf3fb,#f8fbff); }
html[data-theme="light"] .lab-hero p { color:#536780; }
html[data-theme="light"] .lab-index a { color:#10233e; border-color:rgba(24,71,141,.15); background:rgba(255,255,255,.75); }
html[data-theme="light"] .lab-v2 .builder-section,
html[data-theme="light"] .lab-v2 .arena-section,
html[data-theme="light"] .lab-v2 .lab-section { color:#071426; background:#edf3fb; }
html[data-theme="light"] .lab-v2 footer { color:#52657d; background:#e5edf7; }

/* Final light-theme contrast pass. */
html[data-theme="light"] footer .footer-brand b { color:#243b56; }
html[data-theme="light"] .capability-card > span,
html[data-theme="light"] .capability-card b { color:#006477; }
html[data-theme="light"] .capability-card small { color:#435874; }
html[data-theme="light"] .archive-orbit span { color:#315c70; }
html[data-theme="light"] .archive-orbit { opacity:1; }
html[data-theme="light"] .work-archive footer { color:#52657d; background:#e5edf7; }
html[data-theme="light"] .lab-v2 .arena-copy > p { color:#3f536d; }
html[data-theme="light"] .lab-v2 .arena-stats div { border-color:#c5d2e2; background:#fff; }
html[data-theme="light"] .lab-v2 .arena-stats span { color:#3f536d; }
html[data-theme="light"] .lab-v2 .arena-stats b { color:#006477; }

@media (max-width:760px) {
  html[data-theme="light"] .cinema-v3 .am-story-sticky::after { background:linear-gradient(0deg,rgba(237,243,251,.98),rgba(237,243,251,.84) 44%,transparent 72%,rgba(237,243,251,.38)); }
  html[data-theme="light"] .cinema-v3 .story-panel { background:linear-gradient(180deg,rgba(255,255,255,.9),rgba(248,251,255,.98)); }
  html[data-theme="light"] .worlds-stage::after { background:linear-gradient(0deg,rgba(237,243,251,.94),transparent 34%,transparent 72%,rgba(237,243,251,.5)); }
}

/* WCAG 2.2 contrast and touch-target hardening. */
.capability-card small { color: #7c91ae; }
[data-theme="dark"] .nav-shell nav a span { color: #7f9dff; }
.home-heading.reveal { opacity: 1; transition-property: transform; }
html[data-theme="light"] .home-heading .story-kicker { color: #006477; }
html[data-theme="light"] .home-heading > p { color: #3f536d; }

@media (max-width: 680px) {
  .nav-shell .lang-button,
  .nav-shell .theme-button,
  .nav-shell .menu-button { width: 44px; min-width: 44px; height: 44px; }
  .story-button,
  .archive-down,
  .archive-open,
  .lab-action,
  .module-bank button,
  .builder-actions button,
  .lab-back,
  footer > div > a { min-height: 44px; }
  .lab-back,
  footer > div > a { display: inline-flex; align-items: center; }
  .skip { min-height: 44px; display: inline-flex; align-items: center; }
  .home-v2 .story-button { min-height: 48px; }
}

@supports (content-visibility: auto) {
  .worlds-section,
  .home-section,
  .studio-band,
  .home-v2 footer { content-visibility: auto; contain-intrinsic-size: auto 900px; }
}

/* Keep cinematic copy fully readable at normal browser zoom on short laptop screens. */
.cinema-v3 .am-story-sticky { min-height: 0; }
.cinema-v3 .story-panel {
  box-sizing: border-box;
  max-height: calc(100svh - 130px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.cinema-v3 .story-panel h1,
.cinema-v3 .story-panel h2 { overflow-wrap: anywhere; }

@media (min-width: 761px) {
  .cinema-v3 .story-panel { width: min(42vw, 620px); }
  .cinema-v3 .story-panel h1,
  .cinema-v3 .story-panel h2 {
    font-size: clamp(30px, min(4vw, 6.3svh), 68px);
    line-height: 1;
  }
  [dir="rtl"] .cinema-v3 .story-panel h1,
  [dir="rtl"] .cinema-v3 .story-panel h2 { line-height: 1.12; }
}

@media (max-width: 760px) {
  .cinema-v3 .story-panel,
  .cinema-v3 .story-panel.align-end {
    bottom: 56px;
    max-height: calc(100svh - 138px);
    transform: none;
  }
}

.capability-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--am-line);
  border-radius: 22px;
  background: var(--am-panel);
}
.capability-cta p { max-width: 650px; margin: 0; color: var(--am-muted); line-height: 1.7; }
.capability-cta .story-button { flex: 0 0 auto; color: #fff; }
@media (max-width: 680px) {
  .capability-cta { align-items: stretch; flex-direction: column; }
  .capability-cta .story-button { width: 100%; }
}
