/* ==========================================================================
   Ravi Arts · portfolio
   Colours and type are set here once; change a token and it updates everywhere.
   ========================================================================== */
:root {
  --bg: #000;
  --panel: #0c0c0e;
  --ink: #fff;
  --muted: #8a8a8a;
  --dim: #575757;
  --accent: #dad1ff;           /* lavender */
  --accent-soft: rgba(218, 209, 255, 0.17);
  --line: rgba(255, 255, 255, 0.1);
  --pill: rgba(255, 255, 255, 0.08);
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1120px;
  --display: "Switzer", "Inter", "Helvetica Neue", Arial, sans-serif;   /* headings */
  --sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;          /* body text */
  --mono: "Roboto Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
/* Film grain over the whole page */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: 100;
  pointer-events: none;
  opacity: 0.06;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-3%, 2%); }
  50% { transform: translate(2%, -3%); }
  75% { transform: translate(-2%, -1%); }
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--accent); color: #000; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.label { font: 400 12px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
/* Text still waiting for real content */
.ph { display: none; }   /* hidden on the live site (main.js removes it) */
.show-drafts .ph { display: revert; color: var(--accent); background: var(--accent-soft); border-radius: 4px; padding: 0 4px; }

/* ---------- Pills ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 10px 16px;
  border-radius: 999px;
  background: var(--pill);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font: 500 13px/1 var(--sans);
  transition: background 0.25s, color 0.25s, transform 0.25s var(--ease);
}
.pill:hover { background: rgba(255, 255, 255, 0.16); }
.pill--cta { text-transform: uppercase; letter-spacing: 0.02em; padding-inline: 18px; }
.pill--cta:hover { background: var(--accent); color: #000; }
.pill--cta:hover .dot { background: #000; }
.pill svg { width: 18px; height: 18px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(218, 209, 255, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(218, 209, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(218, 209, 255, 0); }
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  max-width: var(--max); margin-inline: auto;
  padding: 16px var(--gutter);
}
.nav .pill { background: rgba(22, 22, 24, 0.8); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.pill--brand { font-family: var(--display); font-weight: 700; letter-spacing: -0.01em; color: var(--accent); padding-inline: 18px; }
/* Expanding menu: one icon that opens into Projects / About */
.nav { display: grid; grid-template-columns: 1fr auto 1fr; }
.nav > :last-child { justify-self: end; }
.nav > :first-child { justify-self: start; transition: opacity 0.3s; }
.menu { display: flex; align-items: center; }
.menu__links {
  display: grid; grid-template-columns: 0fr;
  transition: grid-template-columns 0.55s var(--ease);
}
.menu__links > * { min-width: 0; }
.menu__links { overflow: hidden; }
.menu__links-inner { display: flex; }
.menu__link {
  margin-right: 8px; color: var(--ink); white-space: nowrap;
  opacity: 0; transform: translateX(60px) scale(0.85);
  transition: opacity 0.3s, transform 0.55s var(--ease), background 0.25s;
}
.menu__link[aria-current="page"] { background: rgba(60, 58, 72, 0.85); }
.menu__toggle { width: 76px; color: var(--accent); }
.menu__toggle svg { width: 16px; height: 16px; }
.menu__toggle path { transition: opacity 0.25s, transform 0.4s var(--ease); transform-origin: 12px 12px; }
.menu__icon-close { opacity: 0; transform: rotate(-90deg) scale(0.6); }
.menu.is-open .menu__links { grid-template-columns: 1fr; }
.menu.is-open .menu__link { opacity: 1; transform: none; }
.menu.is-open .menu__link:nth-child(2) { transition-delay: 0.05s; }
.menu.is-open .menu__icon-open { opacity: 0; transform: rotate(90deg) scale(0.6); }
.menu.is-open .menu__icon-close { opacity: 1; transform: none; }
.menu__toggle:hover { background: rgba(40, 40, 46, 0.9); }
.pill--icon { width: 48px; padding: 0; }

/* Logo button and right side of the nav */
.pill--logo { width: 64px; padding: 0; }
.pill--logo img { width: 28px; height: auto; transition: transform 0.5s var(--ease); }
.pill--logo:hover img { transform: rotate(-8deg) scale(1.08); }
.nav__end { display: flex; align-items: center; gap: 18px; }
.nav__status { font-size: 14px; color: var(--muted); white-space: nowrap; }

/* ---------- Home hero ---------- */
.hero { padding-top: clamp(120px, 18vh, 170px); }
.hero__title {
  display: flex; flex-direction: column;
  font: 800 clamp(76px, 15vw, 196px)/0.84 var(--display);
  letter-spacing: -0.045em; color: var(--accent);
}
.hero__line { display: flex; align-items: flex-end; overflow: hidden; padding-bottom: 0.04em; }
.hero__tag {
  margin: 0 0 0.35em 0.5em;
  font: 400 clamp(13px, 1.5vw, 17px)/1.2 var(--sans);
  letter-spacing: 0; color: var(--ink); white-space: nowrap;
}
.hero__sub {
  display: flex; flex-direction: column; margin-top: 32px;
  font: 300 clamp(15px, 1.5vw, 18px)/1.25 var(--sans); letter-spacing: 0.01em;
}
.hero__cta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: clamp(48px, 9vh, 88px); }
.rise { display: inline-block; animation: rise 1.1s var(--ease) both; }
.hero__line:nth-child(2) .rise { animation-delay: 0.12s; }
.hero__tag { animation-delay: 0.35s !important; }
.hero__sub.rise { display: flex; animation-delay: 0.45s; }
.hero__cta.rise { display: flex; animation-delay: 0.6s; }
.hero + .hero__cta + .scrolly .scrolly__sticky { align-items: flex-start; padding-top: 18vh; }

/* ---------- Page heading ("projects", "about") ---------- */
.page-head { padding-top: clamp(130px, 20vh, 190px); padding-bottom: clamp(48px, 8vh, 72px); text-align: center; }
.page-head h1 {
  font: 500 clamp(60px, 8vw, 96px)/1 var(--display); letter-spacing: -0.035em;
  background: linear-gradient(100deg, #b9acff 0%, #ece8ff 45%, #b9acff 90%) 0 0 / 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: 0.18em; margin-bottom: -0.18em;   /* room for the tails of j, p, g, y */
  animation: rise 1s var(--ease) both, sheen 8s linear infinite;
}
.page-head p { margin-top: 22px; font: 300 clamp(17px, 1.8vw, 21px)/1.4 var(--sans); color: var(--muted); animation: rise 1s 0.15s var(--ease) both; }
@keyframes sheen { to { background-position: -200% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ---------- Project groups and cards ---------- */
.group { padding-bottom: clamp(56px, 10vh, 96px); }
.group__title { text-align: center; font: 300 clamp(18px, 1.8vw, 21px)/1.3 var(--sans); color: var(--muted); margin-bottom: 28px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 18px; }
.grid--tall { grid-template-columns: repeat(4, 1fr); }
.card__text { margin-top: 14px; font-size: 17px; line-height: 1.25; }
.card__client { color: var(--muted); font-weight: 300; }
.card__desc { color: var(--ink); font-weight: 400; }
.grid > .reveal:nth-child(3n + 2) { transition-delay: 0.08s; }
.grid > .reveal:nth-child(3n + 3) { transition-delay: 0.16s; }
.grid--tall > .reveal:nth-child(4n + 4) { transition-delay: 0.24s; }

/* ---------- Video frames ---------- */
.frame {
  position: relative; overflow: hidden; border-radius: 6px;
  background: var(--panel); border: 1px solid var(--line);
  aspect-ratio: 16 / 9; cursor: pointer;
  transition: transform 0.5s var(--ease), border-color 0.3s;
}
.frame--tall { aspect-ratio: 9 / 16; }
.frame:hover { transform: translateY(-4px); border-color: rgba(218, 209, 255, 0.35); }
.frame img, .frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.frame:hover img, .frame:hover video { transform: scale(1.04); }
.frame video { opacity: 0; transition: opacity 0.4s; }
.frame.is-playing video { opacity: 1; }
.frame__glow {
  position: absolute; inset: -30%;
  background: radial-gradient(40% 40% at 30% 40%, rgba(218, 209, 255, 0.32), transparent 70%),
              radial-gradient(35% 35% at 70% 65%, rgba(120, 100, 255, 0.22), transparent 70%);
  filter: blur(20px); animation: drift 12s ease-in-out infinite alternate;
}
.frame:nth-child(odd) .frame__glow, .card:nth-child(even) .frame__glow { animation-delay: -6s; }
@keyframes drift { to { transform: translate(8%, -6%) rotate(12deg); } }

/* Cards that open a project page */
a.card { display: block; color: inherit; }
a.card:hover .card__desc { color: var(--accent); }
.card__desc { transition: color 0.3s; }

/* ---------- Project page ---------- */
.project-intro {
  display: grid; grid-template-columns: 1fr 2fr 1fr; gap: clamp(24px, 4vw, 56px);
  padding-top: clamp(130px, 20vh, 200px); padding-bottom: clamp(40px, 7vh, 64px);
}
.project-intro__title p, .project-intro__title h1 { font: 400 clamp(19px, 1.8vw, 22px)/1.25 var(--sans); }
.project-intro__story { display: flex; flex-direction: column; gap: 16px; font-size: 16px; line-height: 1.55; color: #cfcfcf; font-weight: 300; }
.project-intro__credits { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.project-intro__credits dt { font: 400 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.project-intro__credits dd { margin: 2px 0 0; font-size: 15px; }
.project-video.rise { display: block; animation-delay: 0.2s; }
.project-video .frame { width: 100%; }
.frame.is-inline { cursor: default; transform: none; }
.frame.is-inline video { opacity: 1; }
.frame.is-inline:hover video { transform: none; }
.frame.is-inline iframe, .frame.is-inline video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.project-row {
  display: grid; grid-template-columns: 1fr 2fr 1fr; gap: clamp(24px, 4vw, 56px);
  margin-top: clamp(64px, 12vh, 112px);
}
.project-row__label { font: 400 13px/1.5 var(--mono); color: var(--accent); }
.project-row__text { font-size: 16px; line-height: 1.55; color: #cfcfcf; font-weight: 300; }
.project-row__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.project-row__list li::before { content: "✦"; color: var(--accent); font-size: 9px; margin-right: 8px; vertical-align: 2px; }
.project-row__note { font-size: 13px; line-height: 1.5; }
.process { margin-top: 32px; }
.process__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.frame--loop { cursor: default; }
.frame--loop:hover { transform: none; }
.project-next {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
  margin-top: clamp(80px, 14vh, 128px); padding-top: 28px; border-top: 1px solid var(--line);
}
.project-next a { transition: color 0.25s; }
.project-next a:hover { color: var(--accent); }
.project-next__link { font: 500 clamp(20px, 2.4vw, 28px)/1.2 var(--display); letter-spacing: -0.02em; }
.project-next__link .muted { font: 400 13px/1 var(--sans); margin-right: 10px; letter-spacing: 0; }

/* ---------- Scroll-driven list (Why me, on the About page)
   Desktop: the list sticks on the left and the right side shows the active item.
   Phones: everything stacks. ---------- */
.scrolly { position: relative; height: calc(var(--count) * 75vh + 25vh); }
.scrolly__sticky { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; }
.scrolly__list { width: 38%; }
.scrolly__heading { font: 400 clamp(28px, 3vw, 38px)/1.1 var(--display); letter-spacing: -0.02em; color: var(--accent); margin-bottom: 28px; }
.scrolly__heading sup { font-size: 0.4em; margin-left: 4px; vertical-align: super; color: var(--ink); }

.item { border-top: 1px solid var(--line); }
.item:last-child { border-bottom: 1px solid var(--line); }
.item__title {
  display: block; width: 100%; text-align: left; padding: 14px 0;
  font: 500 17px/1.2 var(--sans); color: var(--dim); transition: color 0.35s;
}
.item__title:hover { color: var(--muted); }
.item.is-active .item__title { color: var(--ink); }
.item__body {
  display: grid; grid-template-rows: 0fr; opacity: 0;
  color: var(--muted); font-size: 15px; line-height: 1.5;
  transition: grid-template-rows 0.5s var(--ease), opacity 0.4s;
}
.item__inner { overflow: hidden; min-height: 0; }
.item__inner > :last-child { margin-bottom: 18px; }
.item.is-active .item__body { grid-template-rows: 1fr; opacity: 1; }

.media {
  position: absolute; top: 14vh; bottom: 10vh;
  left: calc(var(--gutter) + 44%); right: var(--gutter);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(24px) scale(0.97); pointer-events: none;
  transition: opacity 0.6s var(--ease), transform 0.8s var(--ease);
}
.item.is-active .media { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- Strength visuals ---------- */
.viz {
  position: relative; width: 100%; max-height: 100%; aspect-ratio: 4 / 3;
  border-radius: 14px; background: var(--panel); border: 1px solid var(--line); overflow: hidden;
}
.item:not(.is-active) .viz, .item:not(.is-active) .viz *, .item:not(.is-active) .viz *::before { animation-play-state: paused !important; }

/* Editing: a timeline with a moving playhead */
.viz--timeline { display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 32px 24px; }
.tl__ruler { height: 18px; margin-bottom: 6px; background: repeating-linear-gradient(90deg, var(--dim) 0 1px, transparent 1px 24px) bottom / 100% 8px no-repeat; border-bottom: 1px solid var(--line); }
.tl__track { position: relative; height: 46px; border-radius: 6px; background: rgba(255, 255, 255, 0.03); }
.tl__track i {
  position: absolute; top: 4px; bottom: 4px; left: var(--x); width: var(--w); border-radius: 5px;
  background: linear-gradient(180deg, #b9acff, #8e7cf0); opacity: 0.9;
  animation: nudge 4s var(--ease) infinite alternate;
}
.tl__track i:nth-child(2) { animation-delay: -1s; }
.tl__track i:nth-child(3) { animation-delay: -2s; }
.tl__track--b i { background: linear-gradient(180deg, #e9e4ff, #c9beff); animation-duration: 5s; }
.tl__track--a { height: 30px; }
.tl__track--a i { background: repeating-linear-gradient(90deg, #6fd3a8 0 2px, #2f6d55 2px 5px); opacity: 0.7; animation: none; }
@keyframes nudge { to { transform: translateX(6px); } }
.tl__playhead { position: absolute; top: 24px; bottom: 24px; left: 24px; width: 2px; background: #ff5a5a; box-shadow: 0 0 12px #ff5a5a; animation: playhead 6s linear infinite; }
.tl__playhead::before { content: ""; position: absolute; top: -6px; left: -5px; border: 6px solid transparent; border-top: 8px solid #ff5a5a; }
@keyframes playhead { to { left: calc(100% - 26px); } }

/* Motion: a graph-editor curve with a ball easing along it */
.viz--graph svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.graph__grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.graph__curve { fill: none; stroke: var(--accent); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.graph__handle { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.graph__key { fill: var(--ink); }
.graph__ball { position: absolute; top: 0; bottom: 0; left: 5%; width: 0; animation: gx 3s linear infinite alternate; }
.graph__ball::before {
  content: ""; position: absolute; left: -9px; top: 87.5%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 24px var(--accent);
  animation: gy 3s cubic-bezier(0.42, 0, 0.36, 1) infinite alternate;
}
@keyframes gx { to { left: 95%; } }
@keyframes gy { to { top: 12.5%; } }

/* Sound: waveform bars (built in main.js) */
.viz--wave { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 0 24px; }
.viz--wave span {
  flex: 1; max-width: 8px; height: var(--h); border-radius: 4px;
  background: linear-gradient(180deg, var(--accent), #8e7cf0);
  animation: bar 1.2s ease-in-out infinite alternate; animation-delay: var(--d);
}
@keyframes bar { from { transform: scaleY(0.25); } to { transform: scaleY(1); } }

/* Speed: an export bar that fills and finishes */
.viz--render { display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: 40px; font-family: var(--mono); }
.render__name { font-size: 13px; color: var(--ink); }
.render__bar { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.render__bar span { display: block; height: 100%; width: 100%; transform-origin: left; background: var(--accent); animation: fill 4s var(--ease) infinite; }
@keyframes fill { 0% { transform: scaleX(0); } 70%, 100% { transform: scaleX(1); } }
.render__status { position: relative; height: 1.4em; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.render__status span { position: absolute; left: 0; }
.render__pct { color: var(--muted); animation: swapOut 4s infinite; }
.render__done { color: var(--accent); opacity: 0; animation: swapIn 4s infinite; }
@keyframes swapOut { 0%, 68% { opacity: 1; } 72%, 100% { opacity: 0; } }
@keyframes swapIn { 0%, 68% { opacity: 0; } 72%, 100% { opacity: 1; } }

/* Direct: a chat that plays out */
.viz--chat { display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 40px; }
.bubble { max-width: 75%; padding: 12px 16px; border-radius: 18px; font-size: 15px; animation: pop 6s var(--ease) infinite both; }
.bubble--them { align-self: flex-start; background: rgba(255, 255, 255, 0.1); border-bottom-left-radius: 4px; }
.bubble--me { align-self: flex-end; background: var(--accent); color: #000; border-bottom-right-radius: 4px; animation-name: pop2; }
.bubble:nth-child(3) { animation-name: pop3; }
@keyframes pop  { 0%, 4% { opacity: 0; transform: translateY(10px) scale(0.9); } 10%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes pop2 { 0%, 25% { opacity: 0; transform: translateY(10px) scale(0.9); } 32%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes pop3 { 0%, 48% { opacity: 0; transform: translateY(10px) scale(0.9); } 54%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* ---------- Clients marquee ---------- */
.clients { padding: clamp(48px, 10vh, 96px) 0; border-block: 1px solid var(--line); }
.clients .group__title { margin-bottom: 24px; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee__track { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span {
  display: inline-flex; align-items: center; white-space: nowrap;
  font: 700 clamp(28px, 4.5vw, 56px)/1.1 var(--display); letter-spacing: -0.03em; text-transform: uppercase;
  color: var(--dim); transition: color 0.3s;
}
.marquee__track span:hover { color: var(--accent); }
.marquee__track span::after { content: "✦"; font-size: 0.4em; color: var(--accent); margin: 0 0.9em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 6vw, 88px); align-items: center; padding-bottom: clamp(80px, 14vh, 140px); }
.photo-ph {
  aspect-ratio: 4 / 5; border-radius: 14px; background: var(--panel); border: 1px dashed rgba(218, 209, 255, 0.35);
  display: grid; place-items: center; text-align: center; font: 400 12px/1.5 var(--mono); text-transform: uppercase; color: var(--accent);
}
.about__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 14px; }
.about__text { display: flex; flex-direction: column; gap: 18px; font-size: 19px; line-height: 1.55; font-weight: 300; }
.about__text strong { font-weight: 500; color: var(--accent); }

/* ---------- About page: heading, intro and expandable panels ---------- */
.about-head { max-width: 860px; padding-top: clamp(130px, 20vh, 190px); }
.about-head h1 {
  text-align: center; font: 500 clamp(48px, 6.5vw, 76px)/1.05 var(--display); letter-spacing: -0.035em;
}
.about-head h1 span { color: var(--accent); }
.about-intro { margin-top: clamp(32px, 6vh, 56px); font: 300 clamp(18px, 1.9vw, 22px)/1.5 var(--sans); color: #d6d6d6; }
.about-head .rise { display: block; }
.about-intro.rise { animation-delay: 0.15s; }
.panels { max-width: 860px; margin-top: clamp(48px, 9vh, 88px); display: flex; flex-direction: column; gap: 12px; }
.panel { background: #121214; border: 1px solid var(--line); border-radius: 18px; transition: border-color 0.3s, background 0.3s; }
.panel.is-open { background: #161619; border-color: rgba(218, 209, 255, 0.18); }
.panel__head {
  display: flex; justify-content: space-between; align-items: center; width: 100%;
  padding: 20px 26px; text-align: left; font: 500 17px/1.3 var(--sans);
}
.panel__head:hover { color: var(--accent); }
.panel__icon { position: relative; width: 14px; height: 14px; flex: none; transition: transform 0.45s var(--ease); }
.panel__icon::before, .panel__icon::after { content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 1.6px; background: currentColor; border-radius: 2px; }
.panel__icon::after { transform: rotate(90deg); }
.panel.is-open .panel__icon { transform: rotate(45deg); }
.panel__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.5s var(--ease); }
.panel.is-open .panel__body { grid-template-rows: 1fr; }
.panel__inner { overflow: hidden; min-height: 0; padding: 0 26px; font-size: 16px; line-height: 1.55; color: #cfcfcf; font-weight: 300; }
.panel__inner > :last-child { margin-bottom: 24px; }
.panel__inner > p + p { margin-top: 6px; }
.panel__lead { color: var(--ink); font-weight: 500; }
.panel__label { margin-top: 18px !important; color: var(--muted); font-size: 14px; }
.panel__clients { color: var(--accent); }
.panel__inner a { color: var(--ink); border-bottom: 1px solid var(--accent); }
.panel__inner a:hover { color: var(--accent); }

/* ---------- Contact ---------- */
.contact { padding-block: clamp(72px, 14vh, 140px); text-align: center; }
.contact__title {
  font: 500 clamp(44px, 6vw, 76px)/1.02 var(--display); letter-spacing: -0.035em; color: var(--accent);
}
.contact__cta { display: flex; justify-content: center; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 36px; }
.contact__row { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.contact__row [data-copy] { min-width: 0; }

/* ---------- Footer ---------- */
.footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 28px 40px; border-top: 1px solid var(--line); font-size: 13px; }
.footer a:hover { color: var(--accent); }
.footer__brand { display: inline-flex; align-items: center; gap: 10px; }
.footer__brand img { width: 22px; height: auto; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Lightbox ---------- */
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: var(--gutter); border: 0; background: rgba(0, 0, 0, 0.92); color: var(--ink); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: transparent; }
.lightbox__stage { width: min(100%, calc((100vh - 120px) * 16 / 9)); aspect-ratio: 16 / 9; }
.lightbox__stage.is-tall { width: auto; height: calc(100vh - 120px); aspect-ratio: 9 / 16; max-width: 100%; }
.lightbox__stage iframe, .lightbox__stage video { width: 100%; height: 100%; border: 0; border-radius: 12px; background: #000; }
.lightbox__close { position: absolute; top: 16px; right: 20px; width: 44px; height: 44px; border-radius: 50%; background: var(--pill); font-size: 26px; line-height: 1; }
.lightbox__close:hover { background: var(--accent); color: #000; }

/* ---------- Tablet ---------- */
@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .grid--tall { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .project-intro, .project-row { grid-template-columns: 1fr; gap: 20px; }
  .process__grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .nav__status { display: none; }
  .scrolly { height: auto; padding-block: 56px; }
  .scrolly__sticky { position: static; height: auto; display: block; }
  .scrolly__list { width: 100%; }
  .item__title, .item .item__title { color: var(--ink); font-size: 20px; padding-top: 20px; cursor: default; }
  .item__body { grid-template-rows: 1fr; opacity: 1; }
  .media { position: static; opacity: 1; transform: none; pointer-events: auto; padding-bottom: 28px; }
  .item:not(.is-active) .viz, .item:not(.is-active) .viz *, .item:not(.is-active) .viz *::before { animation-play-state: running !important; }
  .about { grid-template-columns: 1fr; }
  .about__photo { max-width: 360px; }
}
/* ---------- Phone ---------- */
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; gap: 28px; }
  .grid--tall { grid-template-columns: repeat(2, 1fr); gap: 24px 12px; }
  .grid--tall .card__text { font-size: 15px; }
  .menu__toggle { width: 60px; }
  .nav__status { display: none; }
  .pill--logo { width: 56px; }
  .menu__link { padding-inline: 14px; }
  .nav.menu-open > :first-child { opacity: 0; pointer-events: none; }
  .viz--render, .viz--chat { padding: 24px; }
  .bubble { font-size: 14px; }
}

/* ---------- Reduced motion: keep everything still ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .render__done { opacity: 1; } .render__pct { opacity: 0; }
}
