/* closedloops — shared styles */

@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../assets/fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@property --sweep {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

:root {
  --bg: #f7f8fa;
  --ink: #0b1526;
  --ink-2: #48536a;
  --ink-3: #647084;
  --line: #dde2e9;
  --brand: #9333df;
  --accent: var(--brand);

  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  --max: 1160px;
  --gutter: clamp(20px, 5vw, 56px);
  --radius: 6px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

::selection {
  background: rgba(147, 51, 223, 0.18);
  color: inherit;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background:
    radial-gradient(90% 50% at 50% -4%, rgba(147, 51, 223, 0.1), transparent 62%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg, video, canvas { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.text-center {
  text-align: center;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: var(--radius);
  z-index: 100;
}
.skip:focus { top: 12px; }

/* ---------- Motion primitives ---------- */

/* page-load rise: used on hero and portfolio head */
.rise {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.9s var(--ease) calc(var(--i, 0) * 90ms + 120ms) forwards;
}
@keyframes rise { to { opacity: 1; transform: none; } }

/* scroll reveal (only when JS is running) */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}
html.js [data-reveal].in { opacity: 1; transform: none; }

/* page-to-page transition (Chrome, Safari) */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.35s; }
::view-transition-group(*) {
  animation-duration: 0.55s;
  animation-timing-function: var(--ease-io);
}
.site-header { view-transition-name: site-header; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.brand-o {
  background: linear-gradient(180deg, #9333df 0%, #a855f7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand:hover .brand-o {
  text-shadow: 8px 0 24px rgba(147, 51, 223, 0.35);
}

.nav { display: flex; gap: 32px; }
.nav a {
  position: relative;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink-2);
  transition: color 0.15s;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 24px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}
.btn:hover { transform: scale(1.04); }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.inline-links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.inline-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color 0.15s, border-color 0.15s;
}
.inline-links a svg { width: 17px; height: 17px; }
.inline-links a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Avatar (photo circle with a loop that closes around it) ---------- */

.avatar {
  position: relative;
  display: block;
  flex: none;
  width: var(--size, 88px);
  height: var(--size, 88px);
  border-radius: 50%;
  background: var(--brand);
}
.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.avatar::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  padding: 2px;
  background: conic-gradient(var(--brand) var(--sweep), transparent 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  transition: --sweep 0.9s var(--ease-io);
  pointer-events: none;
}
.avatar-lg { --size: 128px; }
.avatar-lg::after {
  inset: -10px;
  animation: sweep 1.4s var(--ease-io) 0.4s forwards;
}
@keyframes sweep { to { --sweep: 360deg; } }

/* ---------- Home: hero ---------- */

.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(64px, 10vw, 128px); }
.hero-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}

/* ---------- Home: hero dark card ---------- */

.hero-card {
  width: 100%;
  background: linear-gradient(160deg, #1a0a2e 0%, #0f0520 40%, #170b28 100%);
  border-radius: clamp(16px, 3vw, 28px);
  padding: clamp(40px, 7vw, 80px) clamp(28px, 5vw, 72px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(147, 51, 223, 0.2), transparent 70%),
    radial-gradient(ellipse 40% 60% at 80% 100%, rgba(168, 85, 247, 0.08), transparent 60%);
  pointer-events: none;
}

.hero-card .lede {
  max-width: 52ch;
  margin: 24px auto 0;
  color: rgba(255, 255, 255, 0.6);
}

.hero-card .actions {
  justify-content: center;
  margin-top: 36px;
}

/* ---------- Home: hero headline ---------- */

.hero h1 {
  max-width: 18ch;
  margin: 0 auto;
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: #fff;
}
.hero h1 .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.04em;
}
.hero h1 .w span {
  display: inline-block;
  animation: word 650ms var(--ease-io) calc(0.35s + var(--i, 0) * 90ms) both;
}
.grad-light {
  background: linear-gradient(90deg, #c084fc 0%, #a855f7 50%, #e9d5ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.grad {
  background: linear-gradient(90deg, var(--brand) 0%, #9333df 55%, #a855f7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@keyframes word {
  from { opacity: 0; transform: translateY(1.12em); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Home: hero buttons (light on dark) ---------- */

.btn-accent {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.btn-accent:hover {
  background: #a855f7;
  border-color: #a855f7;
}
.btn-ghost-light {
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.85);
}
.btn-ghost-light:hover {
  border-color: #c084fc;
  color: #c084fc;
}

/* ---------- Home: hero logo wordmark ---------- */

.hlogo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.hlogo-row {
  display: flex;
  align-items: baseline;
  font-size: clamp(2rem, 5.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--ink-2);
}

.hlogo-row .ltr {
  display: inline-block;
  line-height: 1;
  transform-origin: 50% 85%;
}
html.js .hlogo-row .ltr { opacity: 0; }

.hlogo-row .o {
  display: inline-block;
  width: 0.6em;
  height: 0.6em;
  margin: 0 0.02em;
  position: relative;
  top: 0.055em;
  vertical-align: baseline;
  transform-origin: 50% 50%;
}
.hlogo-row .o svg { width: 100%; height: 100%; display: block; }
.hlogo-row .o circle {
  fill: none;
  stroke: var(--brand);
  stroke-width: 20;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50px 50px;
  stroke-dasharray: 213.6;
}

.hlogo-row .typo {
  display: none;
  width: 0.6em;
  text-align: center;
  overflow: hidden;
  color: #e5484d;
}
html.js .hlogo-row .typo { display: inline-block; }

.hlogo-row .cursor {
  display: inline-block;
  width: 6px;
  height: 0.62em;
  margin-left: 6px;
  background: var(--brand);
  border-radius: 2px;
  opacity: 0;
}

.hlogo-tag {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  opacity: 0;
}

@keyframes popIn {
  0% { opacity: 0; transform: translateY(16px) scale(0.55) rotate(-8deg); }
  55% { opacity: 1; transform: translateY(-5px) scale(1.14) rotate(2deg); }
  76% { transform: translateY(2px) scale(0.95) rotate(-1deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); }
}
@keyframes oPop {
  0% { opacity: 0; transform: scale(0.4); }
  60% { opacity: 1; transform: scale(1.12); }
  80% { transform: scale(0.94); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes drawLoop {
  from { stroke-dashoffset: 213.6; }
  to { stroke-dashoffset: 0; }
}
@keyframes squishO {
  0% { transform: scale(1, 1); }
  14% { transform: scale(0.62, 1.38); }
  30% { transform: scale(1.3, 0.75); }
  46% { transform: scale(0.88, 1.14); }
  62% { transform: scale(1.07, 0.94); }
  78% { transform: scale(0.97, 1.04); }
  90% { transform: scale(1.015, 0.99); }
  100% { transform: scale(1, 1); }
}
@keyframes typoDelete {
  0% { opacity: 1; transform: scale(1) translateY(0); width: 0.6em; }
  25% { opacity: 1; transform: scale(1.08) translateY(-3px); width: 0.6em; }
  60% { opacity: 0; transform: scale(0.35) translateY(5px); width: 0.6em; }
  100% { opacity: 0; transform: scale(0.35) translateY(5px); width: 0; margin: 0; }
}
@keyframes blink {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Home: sections ---------- */

.section { padding: clamp(48px, 8vw, 96px) 0; border-top: 1px solid var(--line); }
.split { display: grid; gap: 28px; }
.section h2 {
  font-size: clamp(2.25rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.section h2::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #9333df, #c084fc);
  vertical-align: middle;
}
[data-reveal].in h2::before,
.section h2::before {
  animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(147, 51, 223, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(147, 51, 223, 0); }
}

@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 64px; }
}

.roster {
  max-width: 900px;
  margin: 48px auto 0;
  border-top: 1px solid var(--line);
}
.member {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 28px 16px;
  margin: 0 -16px;
  border-bottom: 1px solid var(--line);
  border-radius: 12px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s;
}
.member:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(147, 51, 223, 0.10), 0 2px 8px rgba(0,0,0,0.04);
  background: rgba(147, 51, 223, 0.03);
}
.member-main { display: flex; align-items: center; gap: 28px; min-width: 0; }
.member .avatar { --size: 96px; margin: 8px; }
.member-name {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  transition: transform 0.4s var(--ease);
}
.member-role { margin-top: 2px; color: var(--ink-2); transition: transform 0.4s var(--ease) 0.03s; }
.member-cta {
  font-weight: 500;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: color 0.15s;
}
.member:hover .avatar::after,
.member:focus-visible .avatar::after { --sweep: 360deg; }
.member:hover .member-name,
.member:hover .member-role { transform: translateX(6px); }
.member:hover .member-cta { color: var(--accent); }

.contact-copy { max-width: 44ch; color: var(--ink-2); }
.mail {
  display: inline-block;
  margin-top: 20px;
  padding-bottom: 6px;
  font-size: clamp(1.5rem, 4.4vw, 2.75rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  border-bottom: 2px solid var(--ink);
  overflow-wrap: anywhere;
  transition: color 0.2s, border-color 0.2s;
}
.mail:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-shadow: 0 0 24px rgba(147, 51, 223, 0.35), 0 0 56px rgba(147, 51, 223, 0.15);
}
.contact .inline-links { margin-top: 32px; }

/* ---------- Footer ---------- */

.site-footer {
  padding: 36px 0 48px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent 0%, rgba(147, 51, 223, 0.03) 100%);
}
.site-footer .wrap {
  color: var(--ink-3);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ---------- Portfolio ---------- */

.profile {
  padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 9vw, 112px);
  overflow-x: clip; /* lets the video glow bleed without causing sideways scroll */
}

.profile .wrap {
  display: grid;
  gap: 40px;
  grid-template-areas: "head" "media" "details";
}

.p-head { grid-area: head; }
.p-media { grid-area: media; }
.p-details { grid-area: details; }

.p-head .avatar { margin: 10px 0 30px 10px; }
.p-head h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -0.04em;
}
.p-role { margin-top: 12px; font-size: 1.1875rem; color: var(--ink-2); }
.p-bio { max-width: 52ch; margin-top: 28px; font-size: 1.0625rem; color: var(--ink-2); }

.block { margin-top: 44px; padding-top: 32px; border-top: 1px solid var(--line); }
.block:first-child { margin-top: 0; }
.block h2 {
  margin-bottom: 24px;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.meta { display: grid; grid-template-columns: minmax(72px, 120px) 1fr; gap: 14px 24px; }
.meta dt { color: var(--ink-3); }

/* ---------- Timeline ---------- */

.timeline {
  position: relative;
  margin: 64px 0;
  padding: 32px 0;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--line);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 80px;
  margin-bottom: 96px;
}
.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 0.9375rem;
  z-index: 2;
  box-shadow: 0 0 0 6px var(--bg);
}

.timeline-content {
  padding: 0 24px;
}
.timeline-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.timeline-content p {
  color: var(--ink-2);
  margin-bottom: 24px;
  font-size: 1.0625rem;
  line-height: 1.7;
}
.timeline-content .res {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--ink);
}

.timeline-media {
  background: linear-gradient(160deg, #1a0a2e 0%, #0f0520 40%, #170b28 100%);
  border-radius: 20px;
  aspect-ratio: 4/3;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(0,0,0,0.06);
  overflow: hidden;
  position: relative;
}
.timeline-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(147, 51, 223, 0.2), transparent 70%),
    radial-gradient(ellipse 40% 60% at 80% 100%, rgba(168, 85, 247, 0.08), transparent 60%);
  pointer-events: none;
}

/* Alternating logic */
.timeline-item .timeline-content {
  order: 2;
}
.timeline-item .timeline-media {
  order: 1;
}

.timeline-item:nth-child(even) .timeline-content {
  order: 1;
}
.timeline-item:nth-child(even) .timeline-media {
  order: 2;
}

.expand-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  border-radius: 50%;
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s, transform 0.2s;
}
.timeline-media:hover .expand-btn,
.media-scroller > *:hover .expand-btn {
  opacity: 1;
}
.expand-btn:hover {
  background: rgba(147, 51, 223, 0.9);
  transform: scale(1.05);
}

.media-scroller {
  display: flex !important;
  flex-direction: column;
  gap: 14px;
  aspect-ratio: auto;
  background: transparent;
  box-shadow: none;
  padding: 6px 6px 14px 0;
  height: 460px;
  max-height: 56vh;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.18) transparent;
  /* fade top/bottom to hint there is more to scroll */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, black 18px, black calc(100% - 28px), transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, black 18px, black calc(100% - 28px), transparent 100%);
}
.media-scroller::before { display: none; }
.media-scroller::-webkit-scrollbar { width: 5px; }
.media-scroller::-webkit-scrollbar-track { background: transparent; }
.media-scroller::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.18); border-radius: 999px; }
.media-scroller > * {
  position: relative;
  width: 100%;
  flex: 0 0 auto;
  height: auto;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  z-index: 1;
  background: #111;
  box-shadow: 0 12px 32px rgba(0,0,0,0.10);
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), opacity 0.3s;
}
.media-scroller > *:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.14);
}
.media-scroller > * img,
.media-scroller > * video {
  border-radius: 16px;
}
.media-scroller > * img { cursor: zoom-in; }
.media-scroller > * img:fullscreen {
  object-fit: contain;
  background: #000;
  border-radius: 0;
  cursor: zoom-out;
}

/* VFX reel — isolated scroll, no page scroll bleed, professional snap — light fade */
.vfx-scroller{
  height: 500px;
  max-height: 58vh;
  gap: 12px;
  padding: 8px 6px 16px 0;
  scroll-padding-top: 8px;
  overscroll-behavior: contain;
  -webkit-mask-image: linear-gradient(to bottom, black 0, black calc(100% - 72px), transparent 100%);
          mask-image: linear-gradient(to bottom, black 0, black calc(100% - 72px), transparent 100%);
}
.vfx-scroller > *{
  aspect-ratio: 16 / 9;
  background: #0a0e16;
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 14px 36px rgba(0,0,0,.18);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), opacity .45s var(--ease), filter .45s var(--ease);
  will-change: transform, opacity;
}
.vfx-scroller > * video{
  transition: filter .45s var(--ease);
}
.vfx-scroller:focus-within{
  outline: none;
}
/* subtle progress hint — bottom fade + scroll indicator */
.vfx-scroller::after{
  content:"";
  position: sticky;
  bottom: 0;
  height: 1px;
  background: transparent;
  pointer-events: none;
}

.timeline-more{
  text-align:center;
  padding:28px 16px 4px;
  color:var(--ink-3);
  font-size:0.9375rem;
  font-style:italic;
  letter-spacing:0.01em;
}
.timeline-more span{
  display:inline-block;
  padding:8px 16px;
  border:1px dashed var(--line);
  border-radius:999px;
  background:rgba(255,255,255,0.6);
}

@media (max-width: 900px) {
  .timeline::before {
    left: 22px;
  }
  .timeline-marker {
    left: 22px;
    top: 40px;
    transform: translate(-50%, -50%);
  }
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 64px;
  }
  .timeline-item:nth-child(even) .timeline-content,
  .timeline-item:nth-child(odd) .timeline-content {
    order: 1;
    padding: 0 0 0 72px;
  }
  .timeline-item:nth-child(even) .timeline-media,
  .timeline-item:nth-child(odd) .timeline-media {
    order: 2;
    margin: 12px 0 0 72px;
  }
}

/* ---------- Video: 9:16, part of the page ---------- */

.p-media {
  justify-self: center;
  width: 360px;
  max-width: 100%;
  width: min(100%, 360px, calc((100svh - 128px) * 9 / 16));
}

.stage { position: relative; }

/* soft light from the video spilling onto the page */
.ambient {
  position: absolute;
  left: -14%;
  top: 5%;
  width: 128%;
  height: 92%;
  max-width: none;
  border-radius: 40px;
  filter: blur(34px) saturate(1.4);
  opacity: 0;
  transition: opacity 1.4s ease;
  pointer-events: none;
}
.ambient.on { opacity: 0.5; }

.frame {
  position: relative;
  z-index: 1;
  aspect-ratio: 9 / 16;
  background: #150a24;
  border-radius: 18px;
  overflow: hidden;
  isolation: isolate;
  transform: translateZ(0);
}
.frame video,
.frame .poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.frame video { opacity: 0; transition: opacity 0.7s ease; }
.frame.is-ready video { opacity: 1; }

.play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: background 0.3s;
}
.is-paused .play { background: rgba(11, 21, 38, 0.28); }
.play span {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.3s, transform 0.4s var(--ease), background 0.2s, color 0.2s;
}
.play svg { width: 26px; height: 26px; margin-left: 3px; }
.is-paused .play span { opacity: 1; transform: none; }
.is-paused .play:hover span { background: var(--accent); color: #fff; }

.snd {
  position: absolute;
  z-index: 3;
  right: 12px;
  bottom: 24px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(11, 21, 38, 0.55);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s var(--ease);
}
.snd:hover { background: var(--accent); }
.snd:active { transform: scale(0.92); }
.snd svg { width: 20px; height: 20px; }
.snd .on { display: none; }
.is-unmuted .snd .on { display: block; }
.is-unmuted .snd .off { display: none; }

.seek {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 22px;
  margin: 0;
  padding: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  --p: 0%;
  --h: 3px;
}
.frame:hover .seek,
.seek:focus-visible { --h: 5px; }
.seek::-webkit-slider-runnable-track {
  height: 22px;
  background:
    linear-gradient(to right, #fff var(--p), transparent var(--p)) left bottom / 100% var(--h) no-repeat,
    linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.3)) left bottom / 100% var(--h) no-repeat;
}
.seek::-moz-range-track {
  height: 22px;
  background:
    linear-gradient(to right, #fff var(--p), transparent var(--p)) left bottom / 100% var(--h) no-repeat,
    linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.3)) left bottom / 100% var(--h) no-repeat;
}
.seek::-webkit-slider-thumb { -webkit-appearance: none; width: 0; height: 0; }
.seek::-moz-range-thumb { width: 0; height: 0; border: 0; }
.seek:focus-visible { outline-offset: -2px; }

.empty {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: none;
  place-items: center;
  padding: 24px;
  text-align: center;
  font-size: 0.9375rem;
  color: #d6c9e6;
  background: #150a24;
}
.is-empty .empty { display: grid; }
.is-empty .play, .is-empty .snd, .is-empty .seek { display: none; }

.p-media figcaption { margin-top: 14px; font-size: 0.875rem; color: var(--ink-3); }

@media (min-width: 900px) {
  .profile .wrap {
    grid-template-columns: minmax(0, 1fr) 360px;
    grid-template-rows: auto 1fr;
    grid-template-areas: "head media" "details media";
    column-gap: 88px;
    row-gap: 56px;
  }
  .p-media { justify-self: end; align-self: start; position: sticky; top: 92px; }
}

/* member page without a video */
.profile.no-media .wrap {
  grid-template-areas: "head" "details";
  grid-template-columns: minmax(0, 760px);
  grid-template-rows: auto;
}

@media (max-width: 480px) {
  .meta { grid-template-columns: 84px 1fr; gap: 12px 16px; }
  .work li { grid-template-columns: 44px minmax(0, 1fr); gap: 4px 16px; }
  .nav { gap: 24px; }
  .member-main { gap: 20px; }
}

/* ---------- Image viewer (replaces native fullscreen) ---------- */
.img-viewer{
  position:fixed; inset:0; z-index:100;
  display:none; align-items:center; justify-content:center;
}
.img-viewer.open{display:flex}
.img-viewer[aria-hidden="false"]{display:flex}
.iv-backdrop{
  position:absolute; inset:0;
  background:rgba(8,12,20,0.78);
  backdrop-filter:blur(10px) saturate(1.15);
  -webkit-backdrop-filter:blur(10px) saturate(1.15);
}
.iv-stage{
  position:relative; z-index:1;
  width:min(96vw, 1320px); height:min(92vh, 860px);
  display:flex; flex-direction:column;
  animation:ivIn .28s var(--ease);
}
@keyframes ivIn{from{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:none}}
.iv-frame{
  flex:1; position:relative; overflow:hidden;
  background:#0a0e16; border-radius:16px;
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 24px 64px rgba(0,0,0,.45), 0 2px 12px rgba(0,0,0,.3);
  display:flex; align-items:center; justify-content:center;
  touch-action:none; user-select:none;
}
.iv-frame img{
  max-width:100%; max-height:100%;
  width:auto; height:auto;
  object-fit:contain; display:block;
  image-rendering:-webkit-optimize-contrast;
  transform:translate(var(--tx,0px), var(--ty,0px)) scale(var(--s,1));
  transform-origin:center center;
  transition:transform .18s var(--ease);
  will-change:transform; cursor:zoom-in;
}
.iv-frame img.grabbing{cursor:grabbing; transition:none}
.iv-frame img.zoomed{cursor:grab}
.iv-loader{
  position:absolute; inset:0; display:grid; place-items:center;
  background:rgba(10,14,22,.6); opacity:0; pointer-events:none; transition:opacity .2s;
}
.iv-loader.on{opacity:1; pointer-events:auto}
.iv-loader::after{
  content:""; width:28px; height:28px; border-radius:50%;
  border:2px solid rgba(255,255,255,.2); border-top-color:#fff;
  animation:ivSpin .7s linear infinite;
}
@keyframes ivSpin{to{transform:rotate(360deg)}}
.iv-close, .iv-prev, .iv-next, .iv-zoom button{
  appearance:none; border:0; cursor:pointer; color:#fff;
  background:rgba(255,255,255,.08); backdrop-filter:blur(6px);
  border:1px solid rgba(255,255,255,.12);
  transition:background .15s, transform .15s, opacity .15s;
}
.iv-close:hover, .iv-prev:hover, .iv-next:hover, .iv-zoom button:hover{background:rgba(255,255,255,.14)}
.iv-close:active, .iv-prev:active, .iv-next:active, .iv-zoom button:active{transform:scale(.96)}
.iv-close{
  position:absolute; top:14px; right:14px; z-index:4;
  width:40px; height:40px; border-radius:50%; display:grid; place-items:center;
}
.iv-prev, .iv-next{
  position:absolute; top:50%; z-index:4; width:44px; height:44px; border-radius:50%;
  display:grid; place-items:center; transform:translateY(-50%);
  box-shadow:0 4px 16px rgba(0,0,0,.35);
}
.iv-prev{left:14px} .iv-next{right:14px}
.iv-prev:disabled, .iv-next:disabled{opacity:.35; pointer-events:none}
.iv-bar{
  margin-top:12px; display:flex; align-items:center; justify-content:space-between; gap:12px;
  color:rgba(255,255,255,.88); font-size:.9375rem;
}
.iv-counter{font-variant-numeric:tabular-nums; color:rgba(255,255,255,.72); font-weight:600}
.iv-caption{flex:1; text-align:center; color:rgba(255,255,255,.82); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.iv-zoom{display:flex; align-items:center; gap:6px}
.iv-zoom button{width:32px; height:32px; border-radius:8px; display:grid; place-items:center; font-weight:700}
.iv-zoom-val{min-width:52px; text-align:center; font-variant-numeric:tabular-nums; color:rgba(255,255,255,.78); font-size:.875rem}
@media(max-width:640px){
  .iv-stage{width:100vw; height:100dvh; height:100vh; padding:8px}
  .iv-frame{border-radius:12px}
  .iv-prev, .iv-next{width:38px; height:38px}
  .iv-bar{font-size:.875rem}
  .iv-caption{display:none}
}

/* ---------- Video viewer ---------- */
.vid-viewer{position:fixed;inset:0;z-index:101;display:none;align-items:center;justify-content:center}
.vid-viewer.open{display:flex}
.vid-viewer[aria-hidden="false"]{display:flex}
.vv-backdrop{position:absolute;inset:0;background:rgba(8,12,20,0.82);backdrop-filter:blur(12px) saturate(1.15);-webkit-backdrop-filter:blur(12px) saturate(1.15)}
.vv-stage{position:relative;z-index:1;width:min(96vw, 1280px);height:min(92vh, 820px);display:flex;flex-direction:column;animation:ivIn .28s var(--ease)}
.vv-frame{flex:1;position:relative;overflow:hidden;background:#0a0e16;border-radius:16px;border:1px solid rgba(255,255,255,.08);box-shadow:0 24px 64px rgba(0,0,0,.45);display:flex;align-items:center;justify-content:center}
.vv-frame video{width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;background:#000;display:block}
.vv-close,.vv-prev,.vv-next{appearance:none;border:0;cursor:pointer;color:#fff;background:rgba(255,255,255,.08);backdrop-filter:blur(6px);border:1px solid rgba(255,255,255,.12);transition:background .15s,transform .15s,opacity .15s}
.vv-close:hover,.vv-prev:hover,.vv-next:hover{background:rgba(255,255,255,.14)}
.vv-close:active,.vv-prev:active,.vv-next:active{transform:scale(.96)}
.vv-close{position:absolute;top:14px;right:14px;z-index:4;width:40px;height:40px;border-radius:50%;display:grid;place-items:center}
.vv-prev,.vv-next{position:absolute;top:50%;z-index:4;width:44px;height:44px;border-radius:50%;display:grid;place-items:center;transform:translateY(-50%);box-shadow:0 4px 16px rgba(0,0,0,.35)}
.vv-prev{left:14px}.vv-next{right:14px}
.vv-prev:disabled,.vv-next:disabled{opacity:.35;pointer-events:none}
.vv-bar{margin-top:12px;display:flex;align-items:center;justify-content:space-between;gap:12px;color:rgba(255,255,255,.88);font-size:.9375rem}
.vv-counter{font-variant-numeric:tabular-nums;color:rgba(255,255,255,.72);font-weight:600}
.vv-caption{flex:1;text-align:center;color:rgba(255,255,255,.82);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:640px){.vv-stage{width:100vw;height:100dvh;padding:8px}.vv-frame{border-radius:12px}.vv-prev,.vv-next{width:38px;height:38px}}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { animation: none; opacity: 1; transform: none; }
  .hero h1 .w span { animation: none; opacity: 1; transform: none; }
  html.js [data-reveal] { opacity: 1; transform: none; transition: none; }
  html.js .hlogo-row .ltr { opacity: 1; }
  .hlogo-row .ltr, .hlogo-row .o circle, .hlogo-row .cursor { animation: none !important; opacity: 1 !important; }
  .hlogo-row .o circle { stroke-dashoffset: 0 !important; }
  .hlogo-row .typo { display: none !important; }
  .hlogo-tag { animation: none !important; opacity: 1 !important; }
  .brand-o { text-shadow: none; }
  .avatar-lg::after { animation: none; --sweep: 360deg; }
  .avatar::after, .member-name, .member-role { transition: none; }
  .frame video, .ambient { transition: none; }
}
