/* ============================================================
   Muhammad Asif — AI Video Portfolio
   Dark cinematic system based on the cosmic-hero reference.
   ============================================================ */

:root {
  --bg: #030305;
  --shell: #07070c;
  --panel: #0d0d15;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f2f3f7;
  --muted: #9aa0ae;
  --accent: #7fa8ff;
  --accent-soft: rgba(110, 155, 255, 0.14);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --radius: 26px;
  --shell-gap: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #04050a; }

/* ---------- cosmic background ---------- */

#cosmos {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.halo {
  position: fixed;
  top: -42vh;
  left: 50%;
  transform: translateX(-50%);
  width: 130vw;
  height: 90vh;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse 55% 48% at 50% 45%,
      rgba(140, 185, 255, 0.5) 0%,
      rgba(70, 110, 200, 0.25) 32%,
      rgba(25, 40, 90, 0.12) 55%,
      transparent 75%);
  filter: blur(6px);
  animation: haloPulse 9s ease-in-out infinite alternate;
}

@keyframes haloPulse {
  from { opacity: 0.75; transform: translateX(-50%) scale(1); }
  to   { opacity: 1;    transform: translateX(-50%) scale(1.06); }
}

/* aurora: giant blurred color fields drifting behind the translucent shell */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.aurora span {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}

.aurora .a1 {
  width: 70vw; height: 54vh; left: -16vw; top: 12vh;
  background: radial-gradient(ellipse, rgba(88, 130, 225, 0.38) 0%, rgba(60, 95, 190, 0.14) 50%, transparent 72%);
  animation: auroraA 30s ease-in-out infinite alternate;
}

.aurora .a2 {
  width: 62vw; height: 50vh; right: -18vw; top: 44vh;
  background: radial-gradient(ellipse, rgba(127, 168, 255, 0.28) 0%, rgba(90, 125, 220, 0.10) 52%, transparent 72%);
  animation: auroraB 38s ease-in-out infinite alternate;
}

.aurora .a3 {
  width: 54vw; height: 46vh; left: 22vw; top: 70vh;
  background: radial-gradient(ellipse, rgba(64, 100, 205, 0.32) 0%, rgba(50, 80, 170, 0.12) 50%, transparent 72%);
  animation: auroraC 34s ease-in-out infinite alternate;
}

.aurora .a4 {
  width: 40vw; height: 34vh; left: 42vw; top: 26vh;
  background: radial-gradient(ellipse, rgba(150, 185, 255, 0.16) 0%, transparent 70%);
  animation: auroraD 26s ease-in-out infinite alternate;
}

@keyframes auroraA {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(14vw, -9vh) scale(1.22); }
}

@keyframes auroraB {
  from { transform: translate(0, 0) scale(1.08); }
  to   { transform: translate(-13vw, 8vh) scale(0.88); }
}

@keyframes auroraC {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(10vw, -12vh) scale(1.18); }
}

@keyframes auroraD {
  from { transform: translate(0, 0) scale(0.9); }
  to   { transform: translate(-9vw, 10vh) scale(1.15); }
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

/* ---------- shell (rounded screen inset, cosmic reference) ---------- */

.shell {
  position: relative;
  z-index: 2;
  margin: var(--shell-gap);
  margin-top: 70px;
  /* translucent: the starfield and aurora drift through clearly */
  background:
    radial-gradient(ellipse 70% 34% at 50% 0%, rgba(90, 130, 220, 0.16) 0%, transparent 60%),
    rgba(7, 7, 12, 0.62);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: clip;
}

/* ---------- pill nav ---------- */

.pill-nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(10, 10, 16, 0.72);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.pill-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 15px;
  border-radius: 999px;
  transition: color 0.25s, background 0.25s;
  white-space: nowrap;
}

.pill-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }

.pill-nav .nav-logo {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  padding: 7px 13px;
}

.pill-nav .nav-cta {
  color: #05060a;
  background: var(--text);
  font-weight: 600;
}

.pill-nav .nav-cta:hover { background: #fff; color: #05060a; }

.arrow { font-size: 0.85em; display: inline-block; }

/* ---------- shared type ---------- */

.eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}

h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 5.4vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 18px 0 14px;
}

h2 em, h3 em, .hero-sub em {
  font-style: italic;
  color: var(--accent);
}

.section {
  position: relative;
  padding: clamp(90px, 12vh, 150px) clamp(22px, 6vw, 90px);
}

.section--full { padding-left: 0; padding-right: 0; }

.section--full .section-head { padding: 0 clamp(22px, 6vw, 90px); }

.section-head { position: relative; max-width: 720px; margin-bottom: clamp(40px, 6vh, 70px); }

.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }

.section-lede { color: var(--muted); max-width: 54ch; }

.head-btn { position: absolute; right: 0; top: 50%; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.25s, background 0.25s, color 0.25s, border-color 0.25s;
}

.btn:hover { transform: translateY(-2px); }

.btn-solid { background: var(--text); color: #05060a; }
.btn-solid:hover { background: #fff; }

.btn-ghost {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.03);
}

.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-lg { padding: 16px 34px; font-size: 16px; }

/* ---------- hero ---------- */

.hero {
  min-height: calc(100vh - 70px - var(--shell-gap));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
}

.hero-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(56px, 11vw, 148px);
  line-height: 1;
  letter-spacing: -0.015em;
  margin: 26px 0 18px;
  /* glow via drop-shadow so it works with the background-clip shimmer */
  filter: drop-shadow(0 0 32px rgba(120, 160, 255, 0.28));
}

.hero-sub {
  font-family: var(--serif);
  font-size: clamp(22px, 2.6vw, 32px);
  color: var(--text);
}

.hero-lede {
  color: var(--muted);
  max-width: 56ch;
  margin: 22px auto 34px;
  font-size: 15.5px;
}

.cta-row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

.hero-reel {
  position: relative;
  width: min(760px, 92%);
  margin-top: 64px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 60px rgba(90, 130, 230, 0.12);
  aspect-ratio: 16 / 9;
  background: #000;
}

.hero-reel video, .hero-reel iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 0;
}

.sound-toggle {
  position: absolute;
  right: 14px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(5, 6, 10, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: border-color 0.25s, color 0.25s, transform 0.25s;
}

.sound-toggle:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

.sound-toggle.on { border-color: var(--accent); color: var(--accent); }

.reel-tag {
  position: absolute;
  left: 14px;
  bottom: 12px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(5, 6, 10, 0.55);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.scroll-cue {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  letter-spacing: 0.4em;
  color: var(--muted);
}

.scroll-line {
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--text), transparent);
  animation: scrollPulse 1.8s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { transform: scaleY(0.4); opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ---------- proof bar ---------- */

.proof {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}

.proof-item {
  padding: 42px 26px;
  text-align: center;
  border-right: 1px solid var(--line);
}

.proof-item:last-child { border-right: 0; }

.proof-num {
  display: block;
  font-family: var(--serif);
  font-size: clamp(38px, 4vw, 56px);
  line-height: 1;
  color: var(--text);
}

.proof-label {
  display: block;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
}

/* ---------- projects ---------- */

.project {
  border-top: 1px solid var(--line);
  padding: clamp(40px, 6vh, 60px) 0;
}

.project-head {
  display: flex;
  align-items: baseline;
  gap: 22px;
  margin-bottom: 16px;
}

.project-num { font-family: var(--serif); font-size: 18px; color: var(--accent); }

.project-head h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.1;
}

.project-role {
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-desc { color: var(--muted); font-size: 15px; max-width: 78ch; }

.project-media {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 24px 0 20px;
}

.media-tile {
  display: block;
  height: 230px;
  border-radius: 14px;
  background-color: #0a0a12;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s, box-shadow 0.3s;
}

.media-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(140, 175, 255, 0.4);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 34px rgba(90, 130, 230, 0.1);
}

.t169 { aspect-ratio: 16 / 9; }
.t916 { aspect-ratio: 9 / 16; height: 320px; } /* verticals run taller so a full row reads like a phone-screen strip */
.t45  { aspect-ratio: 4 / 5; }
.t43  { aspect-ratio: 4 / 3; }

.media-tile[data-drive]::after,
.media-tile[data-yt]::after,
.media-tile[data-yt-short]::after {
  content: "\25B6";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 18px;
  color: #fff;
  background: rgba(3, 4, 8, 0.25);
  transition: background 0.3s;
}

.media-tile[data-drive]:hover::after,
.media-tile[data-yt]:hover::after,
.media-tile[data-yt-short]:hover::after { background: rgba(3, 4, 8, 0.05); }

.tile-pdf::after {
  content: "PDF \2197";
  position: absolute;
  right: 10px;
  bottom: 10px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #fff;
  background: rgba(5, 6, 10, 0.65);
  border: 1px solid var(--line);
  padding: 5px 10px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.project-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--text);
  border-left: 2px solid var(--accent);
  padding-left: 18px;
  margin: 0 0 18px;
  max-width: 60ch;
}

.project-quote cite {
  display: block;
  margin-top: 6px;
  font-family: var(--sans);
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
}

.project-tags li {
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 999px;
}

.more-projects[hidden] { display: none; }

.view-more-wrap {
  text-align: center;
  padding-top: 42px;
  border-top: 1px solid var(--line);
}

/* ---------- certifications ---------- */

.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.cert-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.3s, border-color 0.3s;
}

.cert-card:hover { transform: translateY(-5px); border-color: rgba(140, 175, 255, 0.4); }

.cert-issuer {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
}

.cert-card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 21px;
  line-height: 1.25;
}

.cert-id { font-size: 12px; color: var(--muted); letter-spacing: 0.06em; }

.cert-link { margin-top: auto; padding-top: 10px; font-size: 13.5px; font-weight: 600; color: var(--text); }

.cert-card:hover .cert-link { color: var(--accent); }

/* ---------- case studies ---------- */

.case {
  border-top: 1px solid var(--line);
  padding: clamp(40px, 6vh, 64px) 0;
}

.case:last-child { border-bottom: 1px solid var(--line); }

.case-index {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--accent);
}

.case h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3.6vw, 44px);
  margin: 10px 0 6px;
}

.case-tagline { color: var(--muted); margin-bottom: 28px; }

.star {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px 34px;
  margin-bottom: 28px;
}

.star dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.star dd { color: var(--muted); font-size: 14.5px; }

.case blockquote {
  font-family: var(--serif);
  font-size: clamp(18px, 2vw, 22px);
  font-style: italic;
  color: var(--text);
  border-left: 2px solid var(--accent);
  padding-left: 20px;
  max-width: 62ch;
}

.case cite {
  display: block;
  margin-top: 10px;
  font-family: var(--sans);
  font-style: normal;
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- testimonials marquee ---------- */

.marquee { overflow: hidden; padding: 10px 0 6px; }

.marquee-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: marquee 55s linear infinite;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.t-card {
  width: 380px;
  flex-shrink: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  font-size: 15px;
  color: var(--text);
  line-height: 1.65;
}

.t-card cite {
  display: block;
  margin-top: 16px;
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.t-card cite::before { content: "\2605\2605\2605\2605\2605  "; color: var(--accent); letter-spacing: 0.1em; }

/* ---------- services ---------- */

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 56px;
}

.service-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px 28px;
  transition: transform 0.35s, border-color 0.35s;
}

.service-card:hover { transform: translateY(-6px); border-color: rgba(140, 175, 255, 0.35); }

.service-num { font-family: var(--serif); color: var(--accent); font-size: 17px; }

.service-card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  margin: 12px 0 12px;
}

.service-card p { color: var(--muted); font-size: 14.5px; }

.pipeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.015);
}

.pipe-step {
  padding: 26px 22px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pipe-step:last-child { border-right: 0; }

.pipe-step span { font-family: var(--serif); color: var(--accent); font-size: 15px; }

.pipe-step strong { font-size: 15.5px; font-weight: 600; }

.pipe-step em { font-style: normal; font-size: 12.5px; color: var(--muted); }

.tags-marquee { overflow: hidden; border-top: 1px solid var(--line); margin-top: 40px; padding-top: 26px; }

.marquee-track--tags { animation-duration: 40s; gap: 12px; }

.marquee-track--tags span {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 8px 18px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- connect / orbit (vortex reference) ---------- */

.connect {
  text-align: center;
  overflow: hidden;
  padding-top: 20px;   /* the orbit stage provides its own breathing room */
  padding-bottom: 0;
}

.orbit-stage {
  position: relative;
  height: min(94vh, 860px);
  min-height: 620px;
  display: grid;
  place-items: center;
  perspective: 1100px;
}

.orbit-center { position: relative; z-index: 10; max-width: 640px; padding: 0 22px; }

.orbit-center h2 { font-size: clamp(42px, 6.5vw, 76px); margin-bottom: 30px; }

.orbit-card {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  background-color: #0a0a12;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  will-change: transform, opacity;
}

/* card shapes match the real media so nothing is cropped */
.oc-l { width: 200px; aspect-ratio: 16 / 10; }
.oc-v { width: 120px; aspect-ratio: 9 / 16; }
.oc-p { width: 146px; aspect-ratio: 4 / 5; }

.connect-paths {
  display: grid;
  grid-template-columns: minmax(0, 560px);
  gap: 18px;
  justify-content: center;
  margin-top: clamp(48px, 8vh, 90px); /* clear separation from the orbit above */
  padding: 0 clamp(22px, 6vw, 90px) 90px;
  text-align: left;
}

.path-card--single { text-align: center; }

.path-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 30px 28px;
}

.path-card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  margin-bottom: 10px;
}

.path-card p { color: var(--muted); font-size: 14.5px; margin-bottom: 20px; }

.path-card .btn { font-size: 13.5px; padding: 11px 20px; }

/* ---------- footer ---------- */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 30px clamp(22px, 6vw, 90px);
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.footer nav { display: flex; gap: 22px; }

.footer a { color: var(--muted); text-decoration: none; transition: color 0.25s; }

.footer a:hover { color: var(--text); }

/* ---------- lightbox ---------- */

.lightbox[hidden] { display: none; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(2, 3, 6, 0.9);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
}

.lightbox-frame {
  width: min(960px, 92vw);
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
}

.lightbox-frame.tall {
  width: auto;
  height: min(84vh, 780px);
  aspect-ratio: 9 / 16;
}

.lightbox-frame.image {
  width: auto;
  height: min(84vh, 900px);
  aspect-ratio: 4 / 5;
}

.lightbox-frame iframe { width: 100%; height: 100%; border: 0; }

.lightbox-frame img { width: 100%; height: 100%; object-fit: contain; display: block; }

.lightbox-close {
  position: absolute;
  top: 26px;
  right: 34px;
  font-size: 34px;
  line-height: 1;
  color: var(--text);
  background: none;
  border: 0;
  cursor: pointer;
}

/* ---------- hub doors (three specialty sites) ---------- */

.door-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(22px, 5vw, 60px);
}

.door {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 40px 34px 34px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  transition: transform 0.35s ease, border-color 0.35s, box-shadow 0.35s;
}

.door::before {
  content: "";
  position: absolute;
  top: -60%;
  left: 50%;
  transform: translateX(-50%);
  width: 130%;
  height: 90%;
  border-radius: 50%;
  filter: blur(60px);
  background: radial-gradient(ellipse, rgba(127, 168, 255, 0.14) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
}

.door:hover {
  transform: translateY(-8px);
  border-color: rgba(140, 175, 255, 0.45);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5), 0 0 50px rgba(90, 130, 230, 0.12);
}

.door:hover::before { opacity: 1; }

.door-num { font-family: var(--serif); font-size: 17px; color: var(--accent); }

.door h2 {
  font-size: clamp(28px, 2.6vw, 36px);
  margin: 0;
  line-height: 1.1;
}

.door p { color: var(--muted); font-size: 14.5px; }

.door ul { list-style: none; margin-top: 4px; display: flex; flex-direction: column; gap: 8px; }

.door li {
  font-size: 13px;
  color: var(--muted);
  padding-left: 18px;
  position: relative;
}

.door li::before { content: "\2192"; position: absolute; left: 0; color: var(--accent); font-size: 12px; }

.door-cta {
  margin-top: auto;
  padding-top: 22px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.door:hover .door-cta { color: var(--accent); }

.hub-all {
  text-align: center;
  margin-top: 40px;
  font-size: 14px;
  color: var(--muted);
}

.hub-all a { color: var(--text); text-decoration: underline; text-underline-offset: 4px; transition: color 0.25s; }

.hub-all a:hover { color: var(--accent); }

/* ---------- specs strip (turnaround, formats) ---------- */

.spec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.spec-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
}

.spec-card h3 { font-family: var(--serif); font-weight: 400; font-size: 23px; margin-bottom: 16px; }

.spec-card dl div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }

.spec-card dl div:last-child { border-bottom: 0; }

.spec-card dt { font-size: 13px; color: var(--muted); }

.spec-card dd { font-size: 13.5px; font-weight: 600; text-align: right; }

@media (max-width: 1024px) {
  .door-grid, .spec-grid { grid-template-columns: 1fr; }
}

/* ---------- mystical layer: card glow + headline shimmer ---------- */

.glow-card { position: relative; }

.glow-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%),
    rgba(127, 168, 255, 0.065) 0%, rgba(127, 168, 255, 0.02) 45%, transparent 68%);
  opacity: 0;
  transition: opacity 0.35s;
}

.glow-card:hover::after { opacity: 1; }

/* shine sweep across buttons on hover */
.btn { position: relative; overflow: hidden; }

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -85%;
  width: 55%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(160, 190, 255, 0.38), transparent);
  transform: skewX(-20deg);
  transition: left 0.55s ease;
  pointer-events: none;
}

.btn:hover::before { left: 130%; }

/* scroll progress: a thread of starlight along the top edge */
#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 70;
  pointer-events: none;
  background: linear-gradient(90deg, #7fa8ff, #bcd0ff);
  box-shadow: 0 0 12px rgba(127, 168, 255, 0.65);
  transform-origin: 0 0;
  transform: scaleX(0);
}

.hero-name {
  background: linear-gradient(110deg,
    var(--text) 0%, var(--text) 42%,
    #bcd0ff 50%,
    var(--text) 58%, var(--text) 100%);
  background-size: 250% 100%;
  background-position: 120% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: nameShimmer 4s ease-in-out infinite;
}

@keyframes nameShimmer {
  0%, 55% { background-position: 120% 0; }
  85%, 100% { background-position: -130% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-name { animation: none; }
  .glow-card::after { display: none; }
}

/* ---------- conversion components ---------- */

.spec-badge {
  display: inline-block;
  margin: 8px 0 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffce7a;
  border: 1px solid rgba(255, 206, 122, 0.35);
  background: rgba(255, 206, 122, 0.08);
  padding: 5px 12px;
  border-radius: 999px;
}

.tile-placeholder {
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.2);
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.02) 0 12px, transparent 12px 24px);
  cursor: default;
}

.evidence-row { display: flex; flex-wrap: wrap; gap: 14px; margin: 4px 0 18px; }

.evidence-slot {
  width: 220px;
  aspect-ratio: 16 / 10;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  display: grid;
  place-items: end center;
  background: rgba(255, 255, 255, 0.015);
  margin: 0;
}

.evidence-slot figcaption {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px;
  text-align: center;
}

.t-outcome {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.case-evidence { margin-top: 18px; }

.evidence-inline {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 9px 18px;
}

.cert-strip {
  margin-top: 44px;
  text-align: center;
  font-size: 13.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.cert-strip a { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }

.cert-strip a:hover { color: var(--accent); }

.contact-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 38px 32px;
  text-align: center;
}

.contact-block h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.3;
  margin-bottom: 26px;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 8px 6px 20px;
  margin-bottom: 24px;
  max-width: 100%;
}

.contact-email code { font-size: 15px; color: var(--text); user-select: all; overflow-wrap: anywhere; }

.copy-email {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s;
}

.copy-email:hover { border-color: var(--accent); color: var(--accent); }

.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.cert-more[hidden] { display: none; }

.cert-toggle-wrap { text-align: center; margin-top: 22px; }

/* ---------- liquid layer: morphing aurora blobs ---------- */

.aurora span { filter: blur(84px); }

@keyframes blobMorph {
  0%   { border-radius: 46% 54% 58% 42% / 52% 44% 56% 48%; }
  50%  { border-radius: 58% 42% 44% 56% / 42% 58% 46% 54%; }
  100% { border-radius: 42% 58% 52% 48% / 56% 46% 58% 42%; }
}

.aurora .a1 { animation: auroraA 30s ease-in-out infinite alternate, blobMorph 16s ease-in-out infinite alternate; }
.aurora .a2 { animation: auroraB 38s ease-in-out infinite alternate, blobMorph 21s ease-in-out infinite alternate-reverse; }
.aurora .a3 { animation: auroraC 34s ease-in-out infinite alternate, blobMorph 18s ease-in-out infinite alternate; }
.aurora .a4 { animation: auroraD 26s ease-in-out infinite alternate, blobMorph 13s ease-in-out infinite alternate-reverse; }

/* ---------- tap targets ---------- */

.pill-nav a { padding: 11px 16px; }

.sound-toggle { min-height: 44px; }

/* ---------- reveal defaults (animated by GSAP) ---------- */

.reveal { opacity: 0; transform: translateY(28px); }

.no-js .reveal, .reduced-motion .reveal { opacity: 1; transform: none; }

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
  .proof { grid-template-columns: repeat(3, 1fr); }
  .proof-item:nth-child(n + 4) { border-top: 1px solid var(--line); }
  .proof-item:nth-child(3n) { border-right: 0; }
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
  .service-grid { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: 1fr; }
  .pipe-step { border-right: 0; border-bottom: 1px solid var(--line); }
  .pipe-step:last-child { border-bottom: 0; }
  .head-btn { position: static; margin-top: 18px; }
  .media-tile { height: 190px; }
  .t916 { height: 260px; }
}

@media (max-width: 720px) {
  .pill-nav a:not(.nav-logo):not(.nav-cta) { display: none; }
  .proof { grid-template-columns: repeat(2, 1fr); }
  .proof-item { border-right: 0; border-top: 1px solid var(--line); }
  .proof-item:nth-child(-n + 2) { border-top: 0; }
  .proof-item:nth-child(odd) { border-right: 1px solid var(--line); }
  .cert-grid { grid-template-columns: 1fr; }
  .connect-paths { grid-template-columns: 1fr; }
  .oc-l { width: 130px; }
  .oc-v { width: 80px; }
  .oc-p { width: 96px; }
  .star { grid-template-columns: 1fr; }
  .media-tile { height: 150px; }
  .t916 { height: 210px; }
  .project-head { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; }
  .halo { animation: none; }
  .aurora span { animation: none; }
  .scroll-line { animation: none; }
  .reveal { opacity: 1; transform: none; }
}
