/* =========================
   Base / Tokens
========================= */
:root{
  --bg: #0b0f1a;
  --text: #ffffff;
  --muted: #c9d4ff;
  --accent: #0f6fff;

  /* gradient presets */
  --grad-blue: linear-gradient(180deg, #ffffff, #b8c6ff);
  --grad-brand: linear-gradient(90deg, #79a8ff, #4bdeff, #b8ffcb);
  --grad-metric: linear-gradient(90deg, #9cffd0, #6ddcff, #a6b1ff);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Utility: gradient text */
.g {
  background: var(--grad-blue);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand {
  font-weight: 800;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}
.metric {
  font-weight: 800;
  background: var(--grad-metric);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

/* =========================
   HERO
========================= */
.hero {
  position: relative;
  height: 100svh;           /* full screen incl. mobile dynamic bars */
  min-height: 480px;
  overflow: hidden;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 0 2rem;
}
.vanta {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.75rem;
}
.hero__title {
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
}
.hero__subtitle {
  margin: 0;
  font-weight: 600;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--muted);
}

/* Scroll cue at bottom center */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: clamp(16px, 3vh, 36px);
  transform: translateX(-50%);
  z-index: 1;
  background: transparent;
  border: none;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.9;
  animation: bob 1.8s ease-in-out infinite;
}
.scroll-cue:hover { opacity: 1; }
.scroll-cue svg { display: block; fill: currentColor; }
@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 6px); }
}

/* =========================
   ROLES (Pinned)
========================= */
.roles {
  background: var(--bg);
  color: var(--text);
}
.roles__inner {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(16px, 4vw, 48px);
  align-items: center;
  padding: clamp(48px, 8vw, 120px) clamp(20px, 6vw, 80px);
}
@media (max-width: 860px) {
  .roles__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}
.roles__fixed {
  margin: 0;
  font-weight: 800;
  font-size: clamp(2rem, 7vw, 5rem);
  letter-spacing: -0.02em;
  line-height: 1;
  color: #ffffff;
  opacity: 0.95;
}
.roles__right {
  position: relative;
  min-height: clamp(40vh, 48vh, 56vh);
  display: grid;
  place-items: center;
  border-left: 1px solid rgba(255,255,255,0.08);
  padding-left: clamp(12px, 1.8vw, 24px);
}
@media (max-width: 860px) {
  .roles__right {
    border-left: none;
    padding-left: 0;
    min-height: 40vh;
  }
}
.role {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.role__text {
  font-weight: 800;
  font-size: clamp(1.8rem, 6vw, 4rem);
  letter-spacing: -0.015em;
  text-align: center;
  will-change: transform, opacity;
  filter: drop-shadow(0 6px 20px rgba(0,0,0,0.25));
  background: var(--grad-blue);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* =========================
   STICKY CASE SECTIONS
========================= */
.case {
  background: var(--bg);
  color: var(--text);
}
.case__inner {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.25fr 1.75fr; /* left text / right mock */
  gap: clamp(18px, 4vw, 48px);
  align-items: center;
  padding: clamp(48px, 8vw, 120px) clamp(20px, 6vw, 80px);
}
@media (max-width: 980px) {
  .case__inner {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

/* Left = copy panels (stacked, GSAP reveals) */
.case__left {
  position: relative;
  display: grid;
  grid-template-rows: 1fr;
}
.case__panel {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center start;
}
.case__text {
  max-width: 40ch; /* punchy line length */
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  line-height: 1.4;
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

/* Right = media (sticky visual) */
.case__right {
  position: relative;
}

/* Clickable shot (wrap your <img> in an <a>) */
.case__shot {
  position: relative;
  margin: 0;
  width: min(100%, 820px);
  aspect-ratio: 16 / 10;
  display: block;
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 8px 24px rgba(0,0,0,0.25),
    0 24px 64px rgba(0,0,0,0.35);
  background: rgba(255,255,255,0.04);
}
.case__shot a {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  border-radius: inherit;
  cursor: pointer;
}
.case__shot img,
.case__shot a img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 400ms ease;
}
.case__shot:hover img,
.case__shot a:hover img { transform: scale(1.02); }
.case__shot a:focus-visible {
  box-shadow: 0 0 0 3px rgba(255,255,255,0.9), 0 0 0 6px rgba(15,111,255,0.6);
}

/* Flip layout (image left, text right) */
.case--flip .case__inner {
  grid-template-columns: 1.75fr 1.25fr;
}
.case--flip .case__right { order: 1; }
.case--flip .case__left  { order: 2; }

/* Section-specific tweaks (optional) */
#case-gradr .case__text {
  max-width: 42ch;
  line-height: 1.45;
}

/* Tiny note under lines that need it */
.case__note {
  display: block;
  margin-top: 8px;
  font-size: 0.75rem;
  line-height: 1.2;
  color: rgba(255,255,255,0.6);
}

/* a11y helper */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* =========================
   CONTACT (Fullscreen, sleek)
========================= */
.contact.contact--hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  background: var(--bg);
  overflow: clip;
  isolation: isolate;
  padding: clamp(56px, 8vw, 96px) clamp(20px, 6vw, 64px);
}
/* top hairline */
.contact.contact--hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  opacity: 0.6;
}
/* soft spotlight */
.contact.contact--hero::after {
  content: "";
  position: absolute; inset: -20% -10% auto -10%;
  height: 70%;
  background:
    radial-gradient(60% 60% at 50% 10%, rgba(15,111,255,0.24) 0%, transparent 60%);
  filter: blur(40px);
  z-index: -1;
}
.contact__wrap {
  max-width: 1100px;
  width: 100%;
  text-align: center;
}
.contact__eyebrow {
  margin: 0 0 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}
.contact__title {
  margin: 0;
  font-weight: 800;
  font-size: clamp(2.5rem, 7vw, 4rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: #fff;
}
.contact__sub {
  margin: 10px auto clamp(28px, 4vw, 40px);
  max-width: 54ch;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.45;
}
.contact__actions {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 14px;
}
@media (max-width: 640px) {
  .contact__actions { grid-auto-flow: row; }
}
.contact__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  will-change: transform;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.04);
}
.contact__btn:hover { transform: translateY(-1px); background: rgba(255,255,255,0.07); }
.contact__btn:active { transform: translateY(0); }
.contact__btn--primary {
  color: #0b0f1a; /* dark text on light pill */
  background: #fff;
  border-color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.8) inset, 0 6px 24px rgba(0,0,0,0.24);
}
.contact__btn--primary:hover { box-shadow: 0 1px 0 rgba(255,255,255,0.9) inset, 0 10px 32px rgba(0,0,0,0.32); }
.contact__btn svg { display: block; }
.contact__btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(15,111,255,0.6);
}
.contact__meta {
  margin-top: clamp(16px, 2vw, 22px);
  color: rgba(255,255,255,0.65);
  font-size: 0.95rem;
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.contact__meta a {
  color: inherit;
  text-decoration: none;
}
.contact__meta a:hover { text-decoration: underline; }

/* =========================
   Motion prefs
========================= */
@media (prefers-reduced-motion: reduce) {
  .contact__btn,
  .contact__title,
  .contact__sub,
  .case__shot img,
  .scroll-cue { transition: none !important; animation: none !important; }
}

/* Reuse your existing gradient tokens */
.grad-accent,
.brand {
  font-weight: 800;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent; /* Safari */
  white-space: nowrap;
}

.grad-number,
.metric {
  font-weight: 800;
  background: var(--grad-metric);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent; /* Safari */
  white-space: nowrap;
}

/* Also add the Safari fix to any other gradient text */
.role__text,
.g {
  -webkit-text-fill-color: transparent;
}

/* ===== HACKER WALL (fullscreen) ===== */
.hacker {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  background: var(--bg);
  overflow: hidden;
}
.hacker #hacker-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.hacker__title {
  position: relative;
  z-index: 1;
  margin: 0;
  text-align: center;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: clamp(2.5rem, 8vw, 5rem); /* unchanged size */
  color: #fff;
  /* bigger, stronger shadow/halo */
  text-shadow:
    0 0 12px  rgba(0,0,0,0.96),
    0 12px 36px rgba(0,0,0,0.95),
    0 28px 90px rgba(0,0,0,0.93),
    0 60px 180px rgba(0,0,0,0.92),
    0 0 260px rgba(0,0,0,0.9);
  /* optional: tiny stroke for extra crisp edges */
  -webkit-text-stroke: 0.4px rgba(0,0,0,0.5);
}

/* ===== PLANET SECTION ===== */
.planet {
  position: relative;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

.planet__pin {
  position: relative;
  min-height: 100svh; /* pin height controlled via JS */
}

/* Fullscreen image that we transform into a card */
.planet__bg {
  position: absolute;
  left: 0; top: 0; width: 100%; height: 100%;
  background-image: var(--planet-img, url('assets/indaproj.png'));
  background-size: cover;         /* no stretching */
  background-position: center;
  border-radius: 0px;
  box-shadow: none;
  will-change: left, top, width, height, border-radius, box-shadow;
}

/* Final layout once image has shrunk */
.planet__inner {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.25fr 1.75fr; /* text / card */
  gap: clamp(18px, 4vw, 48px);
  align-items: center;
  padding: clamp(48px, 8vw, 120px) clamp(20px, 6vw, 80px);
}

@media (max-width: 980px) {
  .planet__inner {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

/* Text block: starts hidden, then fades in; lines always visible */
.planet__left {
  opacity: 0;
  transform: translateY(16px);
}

.planet__copy {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.planet__line {
  margin: 0;
  font-weight: 700;
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  line-height: 1.4;
  color: var(--muted); /* default muted */
}

/* Right: invisible sizing target (the bg animates to match this box) */
.planet__right { position: relative; }
.planet__card {
  width: min(100%, 820px);
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  box-shadow:
    0 8px 24px rgba(0,0,0,0.25),
    0 24px 64px rgba(0,0,0,0.35);
  visibility: hidden; /* only used as a geometry target */
}

/* Planet section: black background + local muted color */
#planet {
  background: #000;                /* pure black */
  --planet-muted: #6e6e73;         /* dark grey (Apple-ish) */
}

/* Use the local muted color for non-highlighted lines */
#planet .planet__line {
  color: var(--planet-muted);
}

/* Stack multiple images inside the existing case card */
.case__shot--stack { position: relative; overflow: hidden; }
.case__shot--stack .case__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0; /* GSAP will control */
  transition: opacity .2s linear; /* nice on refresh */
}

/* Respect reduced motion: just show the first image */
@media (prefers-reduced-motion: reduce) {
  .case__shot--stack .case__img { opacity: 0 !important; }
  .case__shot--stack .case__img:first-child { opacity: 1 !important; }
}

/* === MORE (parallax cloud) === */
.more {
  position: relative;
  height: 100vh;
  background: var(--bg, #0b0f1a);
  color: #fff;
}

.more__pin {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;                 /* contain the cloud */
  perspective: 900px;               /* 3D depth */
  perspective-origin: 50% 50%;
}

.more__title {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%) scale(0.96);
  margin: 0;
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.02em;
  opacity: 0;
  /* size matches your hero vibe */
  font-size: clamp(28px, 6vw, 70px);
  z-index: 5;                       /* some cards will float above this */
  filter: drop-shadow(0 8px 22px rgba(0,0,0,.45));
}

.more__cloud {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.more__card {
  position: absolute;
  width: clamp(140px, 18vw, 260px);
  aspect-ratio: 4/3;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  box-shadow: 0 6px 18px rgba(0,0,0,.25), 0 20px 50px rgba(0,0,0,.35);
  display: grid;
  align-content: end;
  z-index: 3;                       /* default; will be adjusted by depth in JS */
  transform: translate3d(0,0,0);
  will-change: transform, filter, opacity;
}

.more__card img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .9;
}

.more__card span {
  position: relative;
  z-index: 1;
  font-size: 12px;
  letter-spacing: .04em;
  padding: 6px 10px;
  margin: 10px;
  background: rgba(0,0,0,.35);
  border-radius: 10px;
  backdrop-filter: blur(3px);
}

/* Reduced motion: no pin, minimal blur, static layout */
@media (prefers-reduced-motion: reduce) {
  .more__pin { perspective: none; }
  .more__title { opacity: 1; transform: translate(-50%,-50%); }
  .more__card { filter: none !important; }
}

.mono {
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
}

.whoami-badge {
  display: inline-flex;
  align-items: center;
  margin-top: 1rem;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px dashed rgba(255,255,255,.25);
  background: rgba(255,255,255,.05);
  backdrop-filter: blur(8px);
  color: #e6edf3;
  box-shadow: 0 0 24px rgba(0, 209, 255, 0.2);
}

.whoami-prefix {
  flex-shrink: 0;
  margin-right: 6px;
}

.whoami-dynamic {
  display: inline-block;
  text-align: left;       /* anchor left */
  min-width: 18ch;        /* set to length of longest role */
  white-space: nowrap;    /* prevents breaking */
}

.cursor {
  display: inline-block;
  margin-left: 2px;
  animation: blink 1s step-start infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}