/* =========================================================
   VISNES — iridescent horizontal-scroll personal site
   Palette derived from the logo orb.
   ========================================================= */

:root {
  /* Core palette (from logo) */
  --glaucous:  #6974C1;
  --orchid:    #C13DC8;
  --sky:       #73B7DB;
  --amethyst:  #220B45;
  --indigo:    #412B8B;

  /* Derived surfaces */
  --bg-0: #08030f;          /* deepest */
  --bg-1: #11052a;          /* panel-ish */
  --ink:  #f3ecff;          /* primary text */
  --ink-dim: #b9a9e0;       /* secondary text */
  --ink-faint: #7c6ba6;     /* tertiary */

  --glass: rgba(40, 18, 80, 0.32);
  --glass-strong: rgba(48, 22, 96, 0.55);
  --hairline: rgba(180, 150, 255, 0.18);
  --hairline-bright: rgba(193, 61, 200, 0.45);

  --iris: linear-gradient(115deg, var(--sky) 0%, var(--glaucous) 32%, var(--orchid) 68%, var(--sky) 100%);
  --iris-soft: linear-gradient(120deg, #8fd0f0, #8a8fe0, #d96fe0, #8fd0f0);

  --shadow-deep: 0 40px 90px -30px rgba(0,0,0,0.85);
  --glow-orchid: 0 0 60px -10px rgba(193,61,200,0.55);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --panel-pad: clamp(28px, 6vw, 120px);
}

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

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg-0);
  color: var(--ink);
  font-family: "Space Grotesk", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.no-scroll { touch-action: none; }

::selection { background: rgba(193,61,200,0.4); color: #fff; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* =========================================================
   BACKDROP — global iridescent layers
   ========================================================= */
.backdrop {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
}
.bg-mesh {
  position: absolute; inset: -20%;
  background:
    radial-gradient(42vw 42vw at 18% 28%, rgba(115,183,219,0.40), transparent 60%),
    radial-gradient(46vw 46vw at 72% 22%, rgba(193,61,200,0.42), transparent 62%),
    radial-gradient(50vw 50vw at 60% 82%, rgba(65,43,139,0.66), transparent 65%),
    radial-gradient(40vw 40vw at 30% 78%, rgba(105,116,193,0.40), transparent 60%),
    var(--bg-0);
  filter: saturate(1.25);
  transform: translate3d(var(--mesh-x, 0px), var(--mesh-y, 0px), 0) scale(1.08);
  transition: transform 0.6s var(--ease);
  animation: meshDrift 24s ease-in-out infinite alternate;
}
@keyframes meshDrift {
  0%   { filter: saturate(1.2) hue-rotate(0deg); }
  100% { filter: saturate(1.4) hue-rotate(26deg); }
}
.bg-grain {
  position: absolute; inset: 0; opacity: 0.05; mix-blend-mode: overlay;
  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.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
#particles { position: absolute; inset: 0; width: 100%; height: 100%; }

/* =========================================================
   TOP NAV
   ========================================================= */
.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px clamp(20px, 4vw, 56px);
  pointer-events: none;
}
.topnav > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 40px; height: 40px;
  filter: drop-shadow(0 4px 16px rgba(193,61,200,0.6));
  animation: bob 6s ease-in-out infinite;
}
@keyframes bob { 0%,100%{transform:translateY(0) rotate(0)} 50%{transform:translateY(-5px) rotate(-3deg)} }
.brand-word {
  font-family: "Unbounded", sans-serif; font-weight: 800;
  letter-spacing: 0.22em; font-size: 17px;
  background: var(--iris); -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% 100%; animation: irisShift 8s linear infinite;
}
@keyframes irisShift { to { background-position: 200% 0; } }

.nav-links { display: flex; gap: 4px; align-items: center;
  background: var(--glass); backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--hairline); border-radius: 999px; padding: 6px; }
.nav-links button {
  border: none; background: transparent; color: var(--ink-dim);
  font-size: 14px; font-weight: 500; letter-spacing: 0.02em;
  padding: 9px 16px; border-radius: 999px; transition: color .3s, background .3s;
  position: relative;
}
.nav-links button:hover { color: var(--ink); }
.nav-links button.active { color: #fff;
  background: linear-gradient(120deg, rgba(115,183,219,0.35), rgba(193,61,200,0.45));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 46px; height: 46px;
  align-items: center; justify-content: center; border-radius: 14px;
  background: var(--glass); border: 1px solid var(--hairline);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.nav-toggle span { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: .3s var(--ease); }
.nav-toggle.open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2){ opacity: 0; }
.nav-toggle.open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* progress bar */
.progress-track { position: fixed; left: 0; right: 0; bottom: 0; height: 3px; z-index: 41;
  background: rgba(255,255,255,0.06); }
.progress-bar { height: 100%; width: 0%; background: var(--iris); background-size: 200% 100%;
  animation: irisShift 6s linear infinite; box-shadow: 0 0 14px rgba(193,61,200,0.8); }

/* =========================================================
   VIEWPORT + PANEL TRACK (horizontal on desktop)
   ========================================================= */
.viewport {
  position: fixed; inset: 0; z-index: 10;
  overflow-x: scroll; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none; scrollbar-width: none;
}
.viewport::-webkit-scrollbar { display: none; }
.track { display: flex; height: 100%; }
.panel {
  position: relative;
  flex: 0 0 100vw; width: 100vw; height: 100%;
  scroll-snap-align: start;
  display: flex; align-items: center;
  padding: 96px var(--panel-pad) 80px;
  overflow: hidden;
}
.panel-inner { position: relative; z-index: 2; width: 100%; max-width: 1180px; margin: 0 auto; }

/* per-panel parallax blobs */
.blob { position: absolute; border-radius: 50%; filter: blur(50px); opacity: 0.5; z-index: 1;
  pointer-events: none; will-change: transform; animation: blobHue 13s ease-in-out infinite; }
@keyframes blobHue {
  0%   { filter: blur(50px) hue-rotate(-40deg); }
  50%  { filter: blur(50px) hue-rotate(55deg); }
  100% { filter: blur(50px) hue-rotate(-40deg); }
}
.blob.b1 { width: 38vmax; height: 38vmax; background: radial-gradient(circle, rgba(193,61,200,0.55), transparent 70%); top: -10%; right: -8%; animation-delay: 0s; }
.blob.b2 { width: 30vmax; height: 30vmax; background: radial-gradient(circle, rgba(115,183,219,0.5), transparent 70%); bottom: -12%; left: -6%; animation-delay: -4.4s; }
.blob.b3 { width: 22vmax; height: 22vmax; background: radial-gradient(circle, rgba(105,116,193,0.5), transparent 70%); top: 30%; left: 40%; animation-delay: -8.7s; }

/* =========================================================
   TYPOGRAPHY HELPERS
   ========================================================= */
.kicker { display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--sky); font-weight: 600; margin-bottom: 22px; }
.kicker::before { content: ""; width: 34px; height: 1px; background: linear-gradient(90deg, var(--orchid), transparent); }

.h-display { font-family: "Unbounded", sans-serif; font-weight: 800; line-height: 0.98;
  letter-spacing: -0.01em; }
.iris-text { background: var(--iris-soft); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: irisShift 9s linear infinite; }

/* =========================================================
   REVEAL ANIMATIONS
   ========================================================= */
.reveal { opacity: 0; transform: translateY(34px); filter: blur(6px);
  transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease);
  transition-delay: var(--d, 0ms); }
.panel.in-view .reveal { opacity: 1; transform: none; filter: none; }

.reveal-clip { clip-path: inset(0 100% 0 0); transition: clip-path 1s var(--ease); transition-delay: var(--d, 0ms); }
.panel.in-view .reveal-clip { clip-path: inset(0 0 0 0); }

/* =========================================================
   HERO
   ========================================================= */
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 40px; }
.hero-eyebrow { color: var(--ink-dim); letter-spacing: 0.2em; text-transform: uppercase;
  font-size: 13px; font-weight: 600; margin-bottom: 26px; }
.hero-title { font-size: clamp(56px, 9vw, 150px); margin-bottom: 14px; }
.hero-rotator { font-family: "Unbounded", sans-serif; font-weight: 600;
  font-size: clamp(20px, 2.6vw, 34px); min-height: 1.4em; color: var(--ink);
  display: flex; align-items: center; }
.hero-rotator .word { display: inline-block; }
.hero-sub { color: var(--ink-dim); font-size: clamp(16px, 1.4vw, 20px); line-height: 1.6;
  max-width: 36ch; margin: 26px 0 38px; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

.btn { display: inline-flex; align-items: center; gap: 10px; border: none;
  font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 15px;
  padding: 16px 28px; border-radius: 999px; transition: transform .3s var(--ease), box-shadow .3s; }
.btn:hover { transform: translateY(-3px); }
.btn-primary { color: #1a0833; background: var(--iris-soft); background-size: 200% 100%;
  box-shadow: var(--glow-orchid); animation: irisShift 8s linear infinite; }
.btn-primary:hover { box-shadow: 0 0 70px -6px rgba(193,61,200,0.8); }
.btn-ghost { color: var(--ink); background: var(--glass); border: 1px solid var(--hairline);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.btn-ghost:hover { border-color: var(--hairline-bright); }

.hero-orb-wrap { position: relative; display: grid; place-items: center; }
.hero-orb { width: min(46vh, 460px); aspect-ratio: 1; will-change: transform;
  filter: drop-shadow(0 30px 80px rgba(193,61,200,0.55)); animation: orbGlow 7s ease-in-out infinite; }
@keyframes orbGlow {
  0%,100% { filter: drop-shadow(0 30px 80px rgba(193,61,200,0.45)); }
  50%     { filter: drop-shadow(0 30px 110px rgba(115,183,219,0.75)); }
}
.hero-orb img { width: 100%; height: 100%; object-fit: contain; animation: orbFloat 7s ease-in-out infinite; }
@keyframes orbFloat {
  0%   { transform: translateY(0) scale(1); }
  50%  { transform: translateY(-22px) scale(1.06); }
  100% { transform: translateY(0) scale(1); }
}
.orb-ring { position: absolute; inset: -6%; border-radius: 50%;
  border: 1px solid rgba(180,150,255,0.25); animation: spin 26s linear infinite; }
.orb-ring.r2 { inset: -16%; border-style: dashed; border-color: rgba(193,61,200,0.22); animation-duration: 40s; animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

.scroll-hint { position: absolute; bottom: 6%; left: var(--panel-pad);
  color: var(--ink-faint); font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase;
  display: flex; align-items: center; gap: 12px; z-index: 3; }
.scroll-hint .line { width: 60px; height: 1px; background: linear-gradient(90deg, var(--sky), transparent);
  animation: hintPulse 2.4s ease-in-out infinite; transform-origin: left; }
@keyframes hintPulse { 0%,100%{ transform: scaleX(0.5); opacity:.5 } 50%{ transform: scaleX(1); opacity:1 } }

/* =========================================================
   GLASS CARD (shared)
   ========================================================= */
.glass { background: var(--glass); border: 1px solid var(--hairline);
  border-radius: 22px; backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  box-shadow: var(--shadow-deep); position: relative; overflow: hidden; }
.glass::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(140deg, rgba(255,255,255,0.5), transparent 40%, transparent 70%, rgba(193,61,200,0.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; opacity: .6; }

/* =========================================================
   ABOUT
   ========================================================= */
.about-grid { display: grid; grid-template-columns: 1fr 0.9fr; gap: clamp(30px,5vw,80px); align-items: center; }
.about-title { font-size: clamp(30px, 4vw, 60px); margin: 6px 0 28px; max-width: 16ch; }

/* section headlines shimmer like the hero name */
.sec-title, .about-title {
  background: var(--iris-soft); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: irisShift 9s linear infinite;
}
.about-copy p { color: var(--ink-dim); line-height: 1.7; font-size: clamp(15px,1.15vw,18px); margin-bottom: 16px; max-width: 56ch; }
.stats { display: grid; gap: 16px; }
.stat { padding: 26px 28px; }
.stat-value { font-family: "Unbounded", sans-serif; font-weight: 800; font-size: clamp(34px,3.4vw,52px); line-height: 1; }
.stat-label { color: var(--ink-dim); font-size: 14px; margin-top: 8px; }

/* =========================================================
   GENERIC SECTION HEAD
   ========================================================= */
.sec-head { margin-bottom: clamp(28px, 4vw, 52px); max-width: 760px; }
.sec-title { font-size: clamp(30px, 4.4vw, 64px); }
.sec-intro { color: var(--ink-dim); margin-top: 16px; font-size: clamp(15px,1.2vw,18px); line-height: 1.6; max-width: 56ch; }

/* card grids */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { padding: 30px; display: flex; flex-direction: column; gap: 14px;
  transition: transform .4s var(--ease); min-height: 250px; }
.card:hover { transform: translateY(-8px); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card-title { font-family: "Unbounded", sans-serif; font-weight: 700; font-size: 21px; line-height: 1.15; }
.card-period, .card-num { font-size: 12px; color: var(--ink-faint); letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }
.card-num { font-family: "Unbounded", sans-serif; font-weight: 700; font-size: 28px; color: rgba(193,61,200,0.6); }
.card-desc { color: var(--ink-dim); line-height: 1.6; font-size: 15px; flex: 1; }
.card-tagline { color: var(--sky); font-weight: 500; font-size: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: 12px; padding: 6px 12px; border-radius: 999px; color: var(--ink-dim);
  background: rgba(115,183,219,0.1); border: 1px solid var(--hairline); }

/* =========================================================
   WORK — paginated experience pager
   ========================================================= */
.work-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px;
  margin-bottom: clamp(22px, 3vw, 38px); flex-wrap: wrap; }
.work-head .sec-head { margin-bottom: 0; }
.work-nav { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.work-arrow { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  color: var(--ink); background: var(--glass); border: 1px solid var(--hairline);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: .3s var(--ease); }
.work-arrow:hover { border-color: var(--hairline-bright); box-shadow: var(--glow-orchid); transform: translateY(-2px); }
.work-arrow:disabled { opacity: 0.3; pointer-events: none; }
.work-count { font-family: "Unbounded", sans-serif; font-weight: 700; font-size: 17px; letter-spacing: .04em;
  min-width: 58px; text-align: center; color: var(--ink); }
.work-count-sep { color: var(--ink-faint); margin: 0 5px; }
#workPage { background: var(--iris-soft); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: irisShift 8s linear infinite; }

.work-pager { overflow: hidden; border-radius: 22px; }
.work-track { display: flex; transition: transform .6s var(--ease); will-change: transform; }
.work-page { flex: 0 0 100%; display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 22px; align-items: stretch; }

.work-card { padding: 28px; display: flex; flex-direction: column; gap: 12px; min-height: 290px;
  opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.work-page.active .work-card { opacity: 1; transform: none; transition-delay: calc(var(--ci) * 90ms + 120ms); }
.work-card .card-num { font-family: "Unbounded", sans-serif; font-weight: 700; font-size: 22px;
  color: rgba(193,61,200,0.5); line-height: 1; }
.work-card .card-title { font-family: "Unbounded", sans-serif; font-weight: 700; font-size: 20px; line-height: 1.15; }
.work-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: -4px; }
.work-company { color: var(--sky); font-weight: 600; font-size: 14px; }
.work-period { color: var(--ink-faint); font-size: 13px; letter-spacing: .04em; }
.work-card .card-desc { flex: 1; }
.work-card .card-tagline { margin-top: -2px; }
.project-card { min-height: 240px; }

.work-dots { display: flex; justify-content: center; gap: 12px; margin-top: 26px; }
.work-dot { width: 34px; height: 5px; border-radius: 999px; border: none; padding: 0;
  background: rgba(255,255,255,0.12); transition: .35s var(--ease); }
.work-dot.active { width: 52px; background: var(--iris-soft); background-size: 200% 100%;
  animation: irisShift 6s linear infinite; box-shadow: 0 0 12px rgba(193,61,200,0.7); }
.work-dot:hover { background: rgba(255,255,255,0.25); }

/* =========================================================
   SKILLS (rendered as pager cards)
   ========================================================= */
.skill-group { gap: 0; }
.skill-group-title { font-family: "Unbounded", sans-serif; font-weight: 700; font-size: 18px; margin-bottom: 22px;
  background: var(--iris-soft); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: irisShift 9s linear infinite; }
.skill-list { display: flex; flex-direction: column; }
.skill { margin-bottom: 18px; }
.skill:last-child { margin-bottom: 0; }
.skill-row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px; color: var(--ink); gap: 12px; }
.skill-row span:last-child { color: var(--ink-faint); flex-shrink: 0; }
.bar { height: 7px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.bar-fill { height: 100%; width: 0; border-radius: 999px; background: var(--iris-soft); background-size: 200% 100%;
  animation: irisShift 6s linear infinite; transition: width 1.2s var(--ease); }
.panel.in-view .bar-fill { width: var(--lvl); }
.skill-line { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--ink-dim);
  padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.skill-line:last-child { border-bottom: none; }
.skill-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  background: var(--iris-soft); background-size: 200% 100%; animation: irisShift 6s linear infinite;
  box-shadow: 0 0 8px rgba(193,61,200,0.7); }

/* =========================================================
   WRITING
   ========================================================= */
.post { cursor: pointer; }
.post-meta { display: flex; gap: 14px; font-size: 12px; color: var(--ink-faint); letter-spacing: .08em; text-transform: uppercase; }
.post-title { font-family: "Unbounded", sans-serif; font-weight: 600; font-size: 20px; line-height: 1.2; }
.post-excerpt { color: var(--ink-dim); line-height: 1.6; font-size: 15px; flex: 1; }
.post-more { color: var(--sky); font-weight: 600; font-size: 14px; display: inline-flex; gap: 8px; align-items: center; transition: gap .3s var(--ease); }
.post:hover .post-more { gap: 14px; }

/* =========================================================
   CONTACT
   ========================================================= */
.contact-grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: clamp(30px,5vw,70px); align-items: center; }
.contact-blurb { color: var(--ink-dim); line-height: 1.7; font-size: clamp(16px,1.3vw,19px); margin: 18px 0 30px; max-width: 44ch; }
.socials { display: flex; flex-direction: column; gap: 12px; }
.social { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-radius: 16px;
  transition: transform .3s var(--ease), border-color .3s; }
.social:hover { transform: translateX(6px); border-color: var(--hairline-bright); }
.social-label { font-weight: 600; }
.social-handle { color: var(--ink-dim); font-size: 14px; }

.form { padding: 34px; display: grid; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; color: var(--ink-dim); letter-spacing: .04em; }
.field input, .field textarea {
  background: rgba(10,4,24,0.5); border: 1px solid var(--hairline); border-radius: 14px;
  padding: 14px 16px; color: var(--ink); font-family: inherit; font-size: 15px;
  transition: border-color .3s, box-shadow .3s; resize: vertical; }
.field textarea { min-height: 110px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--orchid);
  box-shadow: 0 0 0 3px rgba(193,61,200,0.2); }
.form-status { font-size: 14px; color: var(--sky); min-height: 1.2em; }

/* =========================================================
   SIDE DOTS + ARROWS
   ========================================================= */
.dots { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 35;
  display: flex; flex-direction: row; gap: 14px; align-items: center;
  padding: 9px 16px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--hairline);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); }
.dots button { width: 11px; height: 11px; border-radius: 50%; border: 1px solid var(--hairline);
  background: transparent; padding: 0; transition: .3s var(--ease); position: relative; }
.dots button::after { content: attr(data-label); position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  font-size: 12px; color: var(--ink-dim); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .25s; }
.dots button:hover::after { opacity: 1; }
.dots button.active { background: var(--iris-soft); background-size: 200% 100%; border-color: transparent;
  box-shadow: 0 0 14px rgba(193,61,200,0.9); transform: scale(1.4); animation: irisShift 6s linear infinite; }

.arrow { position: fixed; top: 50%; transform: translateY(-50%); z-index: 35;
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  color: var(--ink); background: var(--glass); border: 1px solid var(--hairline);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: .3s var(--ease); }
.arrow:hover { border-color: var(--hairline-bright); box-shadow: var(--glow-orchid); }
.arrow:disabled { opacity: 0.25; pointer-events: none; }
.arrow-prev { left: 22px; } .arrow-next { right: 22px; }

/* =========================================================
   GLASS MODAL (iOS liquid-glass)
   ========================================================= */
.modal-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  padding: clamp(18px, 5vw, 60px);
  background: radial-gradient(120% 120% at 50% 0%, rgba(40,12,80,0.5), rgba(6,2,14,0.74));
  backdrop-filter: blur(7px) saturate(1.1); -webkit-backdrop-filter: blur(7px) saturate(1.1);
  opacity: 0; pointer-events: none; transition: opacity .4s var(--ease); }
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-glass { position: relative; width: min(640px, 100%); max-height: min(82vh, 760px);
  border-radius: 28px; overflow: hidden;
  background: linear-gradient(155deg, rgba(70,40,120,0.25), rgba(28,12,58,0.32));
  border: 1px solid rgba(190,165,255,0.28);
  backdrop-filter: blur(40px) saturate(1.7); -webkit-backdrop-filter: blur(40px) saturate(1.7);
  box-shadow: 0 50px 120px -30px rgba(0,0,0,0.85), inset 0 1px 0 rgba(255,255,255,0.28),
              inset 0 0 60px rgba(193,61,200,0.12);
  transform: translateY(26px) scale(0.97); opacity: 0; transition: transform .5s var(--ease), opacity .4s var(--ease); }
.modal-overlay.open .modal-glass { transform: none; opacity: 1; }
.modal-glass::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(150deg, rgba(255,255,255,0.5), transparent 32%, transparent 72%, rgba(115,183,219,0.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; padding: 1px; opacity: .55; }
.modal-glass::after { content: ""; position: absolute; top: -40%; left: -10%; width: 60%; height: 80%;
  background: radial-gradient(circle, rgba(255,255,255,0.16), transparent 70%); pointer-events: none; filter: blur(10px); }
.modal-close { position: absolute; top: 18px; right: 18px; z-index: 3; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink);
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: .3s var(--ease); }
.modal-close:hover { background: rgba(193,61,200,0.4); transform: rotate(90deg); }
.modal-scroll { position: relative; z-index: 2; max-height: min(82vh, 760px); overflow-y: auto;
  padding: clamp(30px, 4vw, 52px); -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.14) transparent; }
.modal-scroll::-webkit-scrollbar { width: 11px; }
.modal-scroll::-webkit-scrollbar-track { background: transparent; margin: 24px 0; }
.modal-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 999px;
  border: 3px solid transparent; background-clip: padding-box; }
.modal-scroll::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); background-clip: padding-box; border: 3px solid transparent; }
.modal-eyebrow { font-size: 12px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--sky); font-weight: 600; margin-bottom: 14px; }
.modal-title { font-size: clamp(26px, 3.4vw, 40px); font-weight: 800; line-height: 1.06; margin-bottom: 22px; padding-right: 44px; }
.modal-body p { color: var(--ink-dim); line-height: 1.75; font-size: clamp(15px, 1.2vw, 17px); margin-bottom: 16px; }
.modal-body p:first-child { color: var(--ink); }
.modal-body p:last-child { margin-bottom: 0; }

/* =========================================================
   LEGAL BAR (muted, bottom-left)
   ========================================================= */
.legal-bar { position: fixed; left: clamp(16px, 3vw, 30px); bottom: 16px; z-index: 36;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; max-width: 46vw; }
.legal-btn { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 999px;
  color: var(--ink-faint); background: rgba(20,8,42,0.35); border: 1px solid rgba(180,150,255,0.12);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: 12px; font-weight: 500; letter-spacing: .02em; transition: .3s var(--ease); }
.legal-btn:hover { color: var(--ink); border-color: var(--hairline-bright); background: rgba(40,18,80,0.5); }
.legal-btn svg { opacity: 0.85; }
.legal-copy { color: var(--ink-faint); font-size: 11.5px; letter-spacing: .02em; opacity: 0.6; margin-left: 6px; white-space: nowrap; }

/* =========================================================
   RESPONSIVE — MOBILE = vertical scroll
   ========================================================= */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 24px; text-align: left; }
  .hero-orb-wrap { order: -1; }
  .hero-orb { width: min(40vh, 300px); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .cards, .skills-grid, .posts, .work-page { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-links { position: fixed; top: 78px; right: clamp(12px,4vw,20px); left: clamp(12px,4vw,20px);
    flex-direction: column; padding: 14px; border-radius: 22px; gap: 4px;
    transform: translateY(-12px) scale(0.98); opacity: 0; pointer-events: none; transition: .3s var(--ease); }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links button { width: 100%; text-align: left; padding: 14px 18px; font-size: 16px; }
  .nav-toggle { display: flex; }
  .arrow { display: none; }
  .dots { bottom: 16px; gap: 10px; }
  .legal-bar { max-width: 42vw; gap: 5px; }
  .legal-label, .legal-copy { display: none; }
  .legal-btn { padding: 9px; }
  .modal-glass { max-height: 86vh; } .modal-scroll { max-height: 86vh; }

  /* switch to vertical scrolling */
  .viewport { overflow-x: hidden; overflow-y: scroll; scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch; }
  .track { flex-direction: column; height: auto; }
  .panel { flex: none; width: 100%; height: auto; min-height: 100svh;
    scroll-snap-align: start; padding: 110px clamp(20px,6vw,36px) 80px; align-items: center; }
  /* .scroll-hint { position: static; margin-top: 30px; } */
  .scroll-hint { position: fixed; left: 0; right: 0; bottom: 70px; margin: 0 auto; width: max-content; text-align: center; z-index: 50; }
  .hero-title { font-size: clamp(46px, 15vw, 90px); }
  .progress-track { top: 0; bottom: auto; }
  .card, .post, .skill-group { min-height: 0; }
  .cards, .posts, .skills-grid, .stats { gap: 16px; }
}

@media (max-width: 720px) and (min-width: 1px) {
  /* on mobile the per-panel blobs can be lighter */
  .blob { opacity: 0.4; filter: blur(40px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; }
  .viewport { scroll-behavior: auto; }
}
