:root {
  color-scheme: dark;
  --ink: #06070b;
  --surface: #0c111c;
  --line: #262e42;
  --white: #f1f4ff;
  --muted: #a8b4cc;
  --ice: #a5c3ff;
  --blue: #6295ff;
  --serif: 'Times New Roman', Times, serif;
  --content: 1152px;
  font: 16px/1.55 system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--white); }
section[id] { scroll-margin-top: 92px; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
img, video { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1; }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 4px; }
::selection { color: #080d1a; background: var(--ice); }

.wrap { width: min(var(--content), calc(100% - 96px)); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: fixed; z-index: 10; top: 12px; left: 12px; padding: 10px 14px; border-radius: 8px; transform: translateY(-150%); background: var(--white); color: var(--ink); }
.skip:focus { transform: none; }
.header { position: sticky; z-index: 5; top: 0; background: #070910ed; backdrop-filter: blur(16px); border-bottom: 1px solid #303b541f; }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; }
.brand, .nav { display: flex; align-items: center; gap: 13px; }
.brand-symbol { padding: 2px 8px 4px; border: 1px solid #5372ac; border-radius: 5px; color: var(--ice); font: 1.08rem/1.2 var(--serif); letter-spacing: -.065em; }
.brand-name { font-size: .88rem; }
.nav { gap: clamp(12px, 3vw, 36px); color: var(--muted); font-size: .88rem; }
.nav a:hover, .footer a:hover { color: var(--ice); }
.nav-contact { padding: 7px 12px; border: 1px solid var(--line); border-radius: 6px; }

.hero { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid #24314f; background: radial-gradient(ellipse at 72% 41%, #0d2143 0, #080f20 42%, var(--ink) 80%); }
.hero::before { content: ''; position: absolute; z-index: -4; inset: -10%; background: url('assets/galaxy-blue.jpg') center 56% / cover; filter: saturate(.75); opacity: .42; mask-image: linear-gradient(90deg, transparent 4%, #000 65%); animation: galaxy-travel 22s ease-in-out infinite alternate; }
.hero::after { content: ''; position: absolute; z-index: -1; inset: 0; pointer-events: none; background: linear-gradient(90deg, #05070bea, #05070ba1 28%, transparent 66%), linear-gradient(0deg, #05070b88, transparent 30%); }
#cave { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; pointer-events: none; }
.hero-inner { position: relative; display: grid; grid-template-columns: .96fr 1.04fr; align-items: center; min-height: clamp(525px, 75svh, 670px); }
.hero-copy { position: relative; z-index: 1; grid-area: 1 / 1; padding-block: 52px 78px; animation: rise .7s .18s both; }
.eyebrow { color: var(--ice); font-size: .73rem; text-transform: uppercase; letter-spacing: .17em; font-weight: 670; }
h1 { margin: 17px 0 16px; font-size: clamp(4.9rem, 10vw, 9.1rem); line-height: .78; letter-spacing: -.075em; }
h1 span { display: block; margin-top: .13em; padding-bottom: .13em; color: var(--ice); }
.hero-description { max-width: 25rem; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.16rem); animation: rise .65s .38s both; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 26px; animation: rise .65s .49s both; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 15px; min-height: 44px; padding: 10px 15px; border: 1px solid #354361; border-radius: 8px; background: #0c1322; font-size: .88rem; font-weight: 650; }
.button:hover { background: #1a2c4e; }
.button-primary { border-color: #c1d6ff; background: #bed3ff; color: #0c162e; }
.button-primary:hover { background: #e3ecff; }

.portal { position: relative; grid-area: 1 / 2; width: min(127%, 720px); height: 100%; min-height: 448px; margin-left: -13%; pointer-events: none; isolation: isolate; }
.portal-field, .portal-halo { position: absolute; z-index: -1; inset: -7% -17%; }
.portal-field { opacity: .64; background:
  radial-gradient(ellipse 30% 18% at 53% 51%, #83baff32, #4e7bff26 47%, transparent 92%),
  radial-gradient(ellipse 51% 36% at 50% 50%, transparent 31%, #3f72ff14 52%, transparent 68%),
  radial-gradient(ellipse 54% 41% at 50% 50%, transparent 43%, #77a9ff27 56%, #345cff38 61%, #17378a00 75%); }
.portal-halo { inset: -11% -15%; border-radius: 50%; opacity: .47; background:
  radial-gradient(ellipse 56% 37% at 54% 52%, transparent 39%, #234fc450 48%, #568dff80 54%, #97d0ff6b 58%, #294ace48 63%, transparent 71%),
  radial-gradient(ellipse 63% 46% at 47% 46%, transparent 47%, #2960d045 58%, #527cf74f 65%, transparent 76%);
  transform: rotate(-17deg); filter: blur(9px); animation: orbit-drift 13s ease-in-out infinite alternate; }
.portal::after { content: ''; position: absolute; z-index: -1; inset: 14% -13%; background:
  radial-gradient(ellipse 1px 1px at 15% 23%, #b1cfffaa 90%, transparent),
  radial-gradient(ellipse 1px 1px at 72% 19%, #b1cfffaa 90%, transparent),
  radial-gradient(ellipse 1px 1px at 91% 42%, #b1cfff90 90%, transparent),
  radial-gradient(ellipse 1px 1px at 34% 77%, #b1cfff80 90%, transparent),
  radial-gradient(ellipse 1px 1px at 79% 84%, #b1cfff96 90%, transparent); }
.portal-intro .portal-field { animation: portal-enter 1.28s ease-out both; }
#eye { position: absolute; inset: 0; width: 100%; height: 100%; }
.motion-controls { position: absolute; z-index: 2; right: 0; bottom: 17px; display: flex; gap: 7px; }
.motion-controls button { border: 1px solid #465a8270; border-radius: 6px; background: #080e20b5; padding: 5px 9px; color: #c6d7f9; font-size: .75rem; cursor: pointer; }
.motion-controls button:hover { border-color: var(--blue); }
.motion-controls button:disabled { color: #9dacc4; opacity: .65; cursor: default; }
.motion-controls [data-skip-intro] { border-color: #83a8e5; color: #e3efff; }

@keyframes portal-enter { from { transform: scale(.52); opacity: 0; } 72% { opacity: .77; } to { transform: scale(1); opacity: .64; } }
@keyframes galaxy-travel { from { transform: translate3d(-3%, 1%, 0) scale(1.015); } to { transform: translate3d(4%, -3%, 0) scale(1.16); } }
@keyframes orbit-drift { from { transform: translate(-3%, 4%) rotate(-21deg) scale(.92); } to { transform: translate(2%, -3%) rotate(-9deg) scale(1.06); } }
@keyframes rise { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
.motion-paused .hero::before, .motion-paused .portal-halo { animation-play-state: paused; }
.motion-paused .portal-field, .motion-paused .hero-copy, .motion-paused .hero-description, .motion-paused .actions { animation: none; }
.intro-skipped :is(.portal-field, .hero-copy, .hero-description, .actions) { animation: none; }
.motion-paused :is(.viewer, .work-card, .work-media img) { animation: none; transition: none; }

.section { padding-block: clamp(48px, 7vw, 86px); }
.section-head { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 9px 24px; margin-bottom: clamp(20px, 3vw, 32px); }
.section h2 { font-size: clamp(2.8rem, 6vw, 5.15rem); letter-spacing: -.055em; }
.section-intro { color: var(--muted); }
.viral-section { border-bottom: 1px solid var(--line); }
.ranked-work { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2vw, 24px); padding: 0; margin: 0; list-style: none; }
.ranked-work > li { min-width: 0; }
.rank-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 7px; margin: 0 2px 5px; }
.roman { color: var(--ice); font: clamp(2rem, 4vw, 3rem)/1 var(--serif); letter-spacing: -.07em; }
.view-count { color: var(--muted); font-size: clamp(.7rem, 1.7vw, .9rem); white-space: nowrap; }
.measurement-date { display: block; font-size: .85em; text-align: right; }
.ranked-work .work-media { aspect-ratio: 4/5; }

.category-nav { display: flex; flex-wrap: wrap; gap: 6px 13px; }
.category-nav a { color: var(--muted); font: clamp(1rem, 2.2vw, 1.12rem)/1.35 var(--serif); padding: 4px 0; }
.category-nav a:hover { color: var(--ice); text-decoration: underline; text-underline-offset: 5px; }
.work-category { padding: 23px 0 24px; border-top: 1px solid var(--line); }
.work-category h3 { margin-bottom: 13px; font-size: clamp(2rem, 3.8vw, 3rem); letter-spacing: -.04em; }
.work-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 1.8vw, 16px); }
.work-card { min-width: 0; min-height: 0; border: 1px solid #29334c; border-radius: 13px; overflow: hidden; background: var(--surface); transition: border-color .22s, box-shadow .22s; }
.work-card:hover, .work-card:focus-within { border-color: #789eff; box-shadow: 0 5px 24px #335ed235; }
.work-media { position: relative; overflow: hidden; aspect-ratio: 4/5; background: #141d33; }
.work-media img, .work-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.work-media img { transition: transform .55s cubic-bezier(.22,.61,.36,1); }
.work-card:hover img, .work-card:focus-within img { transform: scale(1.055); }
.work-media video { background: #030409; }
#showreel .work-card { grid-column: span 2; }
#showreel .work-media { aspect-ratio: 16/9; }
#showreel video { object-fit: contain; }
.work-media :is(button, a) { position: absolute; inset: 0; display: grid; place-items: center; width: 100%; padding: 0; border: 0; cursor: pointer; background: linear-gradient(135deg, #090e2730, transparent 42%, #121c4651); }
.work-media :is(button, a):focus-visible { outline-offset: -5px; }
.poster-symbol { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ice); padding-bottom: 18%; font-size: clamp(3rem, 7vw, 5rem); background: radial-gradient(ellipse at 48% 38%, #254583, #101b34 60%, #080c18); }
.poster-art { position: absolute; inset: 0; background: radial-gradient(ellipse at 16% 22%, #7fbdff80, transparent 44%), radial-gradient(ellipse 58% 80% at 70% 73%, #233e7c, #0e142f 61%, #070a11); }
.poster-art::after { content: ''; position: absolute; inset: 14% -25%; background: radial-gradient(ellipse 43% 35% at 53% 45%, transparent 32%, #3867e65c 58%, #85b2ff8c 65%, transparent 74%); transform: rotate(-32deg); filter: blur(6px); }
.work-card[data-category="tech"] .poster-art { transform: rotate(180deg); }
.play { position: absolute; bottom: 10px; right: 10px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid #adc9ff91; background: #080e1edb; color: var(--white); transition: background .22s, color .22s; }
.play::before { content: ''; margin-left: 2px; border-block: 5px solid transparent; border-left: 8px solid currentColor; }
.work-media :is(button, a):hover .play { color: var(--ink); background: var(--ice); }
.external-platform { position: absolute; left: 8px; bottom: 11px; border-radius: 5px; padding: 3px 6px; background: #080e1edb; font-size: .72rem; }

.viewer { width: min(calc(100% - 26px), 560px); max-height: calc(100dvh - 20px); color: var(--white); background: #0b1120; border: 1px solid #4d6caa; border-radius: 16px; padding: 12px; }
.viewer[open] { animation: viewer-enter .38s cubic-bezier(.22,.65,.37,1); }
.viewer::backdrop { background: #030613dc; backdrop-filter: blur(8px); }
@keyframes viewer-enter { from { opacity: .15; transform: translateY(12px) scale(.93); clip-path: inset(0 0 0 8%); } to { opacity: 1; transform: none; clip-path: inset(0); } }
.viewer-head { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.viewer-close { color: var(--white); background: var(--surface); border: 1px solid #526383; border-radius: 7px; padding: 6px 10px; cursor: pointer; }
.viewer-player { width: 100%; height: min(70dvh, 620px); background: #020305; border-radius: 9px; }
.viewer-original { display: inline-block; margin-top: 8px; color: var(--ice); text-underline-offset: 4px; text-decoration: underline; font-size: .9rem; }

.campaigns, .contact { border-block: 1px solid var(--line); background: radial-gradient(ellipse at 90% 16%, #14234a62, transparent 56%), #0a0d15; }
.campaign-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(15px, 3vw, 30px); }
.campaign { min-width: 0; border-top: 1px solid var(--line); padding-block: 15px 17px; }
.campaign .eyebrow { margin-bottom: 7px; }
.campaign h3 { margin-bottom: 8px; font-size: clamp(1.5rem, 2.7vw, 2.35rem); letter-spacing: -.035em; overflow-wrap: anywhere; }
.campaign p:not(.eyebrow), .campaign-pipeline p, .about-text { color: var(--muted); }
.campaign-pipeline { padding-top: 17px; border-top: 1px solid var(--line); margin-top: 14px; }
.campaign-pipeline h3 { font-size: 1.5rem; margin-bottom: 7px; }

.about-grid, .contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(20px, 5vw, 64px); align-items: center; }
.about .portrait { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; border: 1px solid var(--line); border-radius: 13px; margin-top: 18px; }
.about-text { margin: 0 0 18px; max-width: 45ch; }
.contact .section-intro { margin-top: 13px; }
.social-links { display: flex; flex-wrap: wrap; gap: 5px 15px; color: var(--ice); margin-top: 13px; }
.social-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.email-list { display: grid; gap: 8px; }
.email-card { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #080d19; overflow-wrap: anywhere; }
.email-card:hover { border-color: var(--blue); }
.email-card span { display: block; color: var(--ice); font-size: .78rem; }
.email-card strong { font-weight: 620; }
.footer { color: var(--muted); font-size: .83rem; }

@media (max-width: 840px) {
  .wrap { width: calc(100% - 52px); }
  .hero-inner { min-height: 535px; }
  .portal { min-height: 395px; }
}
@media (max-width: 620px) {
  section[id] { scroll-margin-top: 70px; }
  .wrap { width: calc(100% - 32px); }
  .header-inner { min-height: 55px; gap: 9px; }
  .brand { gap: 7px; }
  .brand-name { font-size: .75rem; }
  .nav { font-size: .76rem; gap: 9px; }
  .nav-contact { padding: 5px 8px; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero::before { mask-image: linear-gradient(#000 0%, #000 35%, transparent 80%); }
  .hero::after { background: linear-gradient(0deg, #05070bf5 14%, #05070b8f 52%, transparent 79%); }
  .portal { grid-area: 1 / 1; width: calc(100% + 22px); height: clamp(205px, 59vw, 320px); min-height: 0; margin: -2px -11px -14px; }
  .hero-copy { grid-area: 2 / 1; padding-block: 0 55px; }
  h1 { font-size: clamp(3.4rem, 13vw, 5.6rem); margin-block: 10px 8px; }
  h1 span { display: inline-block; margin-top: 0; }
  .actions { margin-top: 17px; }
  .motion-controls { right: 0; bottom: 10px; }
  .ranked-work { grid-auto-flow: column; grid-auto-columns: min(70%, 270px); grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: #36538e #0a0f1a; padding: 5px 4px 9px; margin-inline: -4px; }
  .ranked-work li { scroll-snap-align: start; scroll-margin-inline: 4px; }
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .campaign-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 345px) {
  .brand-name { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
