/* Abhishek Senapati portfolio. Tokens first; scrollcraft.css derives from them. */
:root {
  --sc-canvas: #0D0F13;
  --sc-surface: #161920;
  --sc-ink: #ECEEF2;
  --sc-ink-soft: #A3AAB8;
  --sc-accent: #5C78FF;
  --sc-accent-ink: #090C22;
  --sc-font-display: "Archivo", system-ui, sans-serif;
  --sc-font-text: "Geist", system-ui, sans-serif;
  --sc-shadow-color: 228 45% 3%;
  --r-panel: 32px;
  --r-card: 20px;
  --r-shot: 14px;
}
body { background: var(--sc-canvas); color: var(--sc-ink); overflow-x: clip; }
img, video { display: block; }
a { color: inherit; }

.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 99; background: var(--sc-surface); padding: .5rem 1rem; border-radius: var(--sc-r-pill); }

/* ---------- nav: floating pill index ---------- */
.pill {
  position: fixed; z-index: var(--sc-z-chrome); top: 14px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 2px; padding: 5px;
  background: var(--sc-surface); border-radius: var(--sc-r-pill);
  box-shadow: 0 1px 2px hsl(var(--sc-shadow-color) / .12), 0 8px 24px -8px hsl(var(--sc-shadow-color) / .22);
  font-size: var(--sc-t-sm); font-weight: 500; white-space: nowrap;
}
.pill a { text-decoration: none; padding: .5rem .85rem; border-radius: var(--sc-r-pill); transition: background-color var(--sc-d-fast) var(--sc-ease-out), color var(--sc-d-fast) var(--sc-ease-out); }
.pill a:hover { background: color-mix(in oklab, var(--sc-ink) 6%, transparent); }
.pill a:active { transform: scale(.97); }
.pill__me { display: flex; align-items: center; gap: .5rem; padding-left: .35rem !important; font-weight: 600; }
.pill__me img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; object-position: 50% 18%; }
.pill a.pill__cta { background: var(--sc-accent); color: var(--sc-accent-ink); font-weight: 600; }
.pill a.pill__cta:hover { background: color-mix(in oklab, var(--sc-accent) 85%, white); }
.pill { outline: 1px solid color-mix(in oklab, var(--sc-ink) 9%, transparent); }
.pill a.is-here:not(.pill__cta) { background: color-mix(in oklab, var(--sc-accent) 10%, transparent); color: var(--sc-accent); }

/* ---------- shared type ---------- */
.sec-title {
  font-family: var(--sc-font-display); font-weight: 800; font-size: var(--sc-t-2xl);
  letter-spacing: var(--sc-track-tight); line-height: var(--sc-leading-tight); text-wrap: balance;
}
.case__tag { font-family: var(--sc-font-mono); font-size: var(--sc-t-xs); letter-spacing: .04em; text-transform: uppercase; opacity: .78; }
.case__title {
  font-family: var(--sc-font-display); font-weight: 800; font-size: var(--sc-t-xl);
  letter-spacing: var(--sc-track-snug); line-height: 1.08; text-wrap: balance; margin-top: var(--sc-3);
}

/* the label schema: identical on every object */
.label { margin-top: var(--sc-6); display: grid; }
.label > div { display: grid; grid-template-columns: 8.5rem 1fr; gap: var(--sc-4); padding: var(--sc-3) 0; border-top: 1px solid color-mix(in oklab, currentColor 16%, transparent); }
.label dt { font-family: var(--sc-font-mono); font-size: var(--sc-t-xs); text-transform: uppercase; letter-spacing: .05em; padding-top: .2em; opacity: .72; }
.label dd { font-size: var(--sc-t-sm); line-height: 1.55; text-wrap: pretty; }
.label--tight > div { padding: var(--sc-2) 0; }
.label--mini { margin-top: var(--sc-4); }
.label--mini > div { grid-template-columns: 4.6rem 1fr; gap: var(--sc-3); padding: var(--sc-2) 0; }

/* ---------- hero ---------- */
.hero { position: relative; padding-top: clamp(5.5rem, 11vh, 7.5rem); }
.hero__stage { position: relative; }
.hero__copy { position: relative; z-index: 3; text-align: center; padding-inline: var(--sc-gutter); }
.hero__title {
  font-family: var(--sc-font-display); font-weight: 800;
  font-size: clamp(2.2rem, 1rem + 3.6vw, 4.5rem); line-height: 1.0; letter-spacing: -0.04em;
  max-width: 21ch; margin-inline: auto; text-wrap: balance;
}
.hero__sub { margin: var(--sc-5) auto 0; max-width: 50ch; color: var(--sc-ink-soft); font-size: var(--sc-t-lg); line-height: 1.45; text-wrap: balance; }

.hero__scene {
  position: relative; z-index: 2; margin: clamp(1.5rem, 4vh, 3rem) auto 0;
  width: min(1240px, 100%); height: clamp(430px, 64vh, 720px);
}
.plane { position: absolute; margin: 0; will-change: transform; }
.plane img, .plane video { max-width: none; }
.plane--halo { left: 50%; bottom: 0; width: clamp(340px, 44vw, 600px); aspect-ratio: 1; translate: -50% 18%; z-index: 1; }
.plane--halo span { position: absolute; inset: 0; border-radius: 50%; background: #2A3C9E; box-shadow: inset 0 0 0 clamp(18px, 2.4vw, 34px) #33489F; }
.plane--far { z-index: 0; width: min(43%, 560px); border-radius: var(--r-shot); overflow: hidden; box-shadow: var(--sc-e3); outline: 1px solid color-mix(in oklab, var(--sc-ink) 10%, transparent); opacity: .82; }
.plane--far img { width: 100%; height: auto; }
.plane--left { left: 2%; top: 4%; rotate: -5deg; }
.plane--right { right: 2%; top: 12%; rotate: 4deg; }
.plane--me { z-index: 2; left: 50%; bottom: 0; height: 100%; width: auto; translate: -50% 0; transform-origin: 50% 100%; filter: drop-shadow(0 18px 30px hsl(var(--sc-shadow-color) / .5)); }
.plane--near { z-index: 4; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 30px -6px hsl(var(--sc-shadow-color) / .6), 0 2px 6px hsl(var(--sc-shadow-color) / .4); background: #fff; }
.plane--near img { width: 100%; height: auto; filter: brightness(.86); }
.plane--far img, .shot img, .obj--shot img { filter: brightness(.86) saturate(.95); }
.plane--chip-a { left: 5%; bottom: 13%; width: min(34%, 420px); }
.plane--chip-b { right: 5%; bottom: 40%; width: min(29%, 360px); }
.plane--phone { right: 19%; bottom: 3%; width: clamp(112px, 11vw, 160px); aspect-ratio: 9 / 16; border-radius: 22px; border: 5px solid #14161c; background: #14161c; }
.plane--phone video { width: 100%; height: 100%; object-fit: cover; border-radius: 17px; }
.hero__floor { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; height: 90px; background: linear-gradient(to bottom, transparent, var(--sc-canvas)); pointer-events: none; }
.hero__note { position: relative; z-index: 6; text-align: center; color: var(--sc-ink-soft); font-size: var(--sc-t-sm); padding: var(--sc-4) var(--sc-gutter) 0; }

/* ---------- highlights ---------- */
.highlights { padding-top: clamp(4rem, 8vw, 8rem); }
.hl { list-style: none; margin-top: var(--sc-6); display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sc-4); }
.hl__item { background: var(--sc-surface); border-radius: var(--r-card); padding: var(--sc-5); box-shadow: var(--sc-e1); min-height: 12rem; display: flex; flex-direction: column; justify-content: space-between; gap: var(--sc-5); }
.hl__item--wide { grid-column: span 2; }
.hl__k { font-family: var(--sc-font-display); font-weight: 800; font-size: var(--sc-t-xl); letter-spacing: var(--sc-track-snug); line-height: 1.05; text-wrap: balance; }
.hl__item p { color: var(--sc-ink-soft); font-size: var(--sc-t-sm); line-height: 1.55; text-wrap: pretty; }
.hl__item--ink { background: #18214D; color: #EEF1FF; }
.hl__item--ink p { color: #B6C0EE; }

/* ---------- work ---------- */
.work { padding-top: var(--sc-section); }
.work__head { margin-bottom: var(--sc-7); display: grid; gap: var(--sc-3); }
.work__head .sc-body { color: var(--sc-ink-soft); max-width: 56ch; }

.case {
  --case-ink: var(--sc-ink);
  margin: 0 auto var(--sc-5); width: calc(100% - 2 * clamp(.75rem, 2.4vw, 2rem)); max-width: 92rem;
  border-radius: var(--r-panel); padding: clamp(1.5rem, 4.4vw, 4.5rem);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 5rem); align-items: center;
  color: var(--case-ink); overflow: hidden;
}
.case__links { margin-top: var(--sc-5); display: flex; flex-wrap: wrap; gap: var(--sc-2) var(--sc-5); font-weight: 600; font-size: var(--sc-t-sm); }
.case__links a { text-underline-offset: .25em; text-decoration-thickness: 1px; }
.case__links a:hover { text-decoration-thickness: 2px; }
.case--teal   { background: #0F2A2E; --case-ink: #EEF5F3; }
.case--mint   { background: #11281E; --case-ink: #DDF1E4; }
.case--paper  { background: #221D17; --case-ink: #EEE6DA; }
.case--coral  { background: #2D1712; --case-ink: #FFDCD0; }
.case--forest { background: #173A31; --case-ink: #F0EBDD; }
.case > * { color: var(--case-ink); }

.shot { margin: 0; }
.shot img { width: 100%; height: auto; border-radius: var(--r-shot); box-shadow: 0 2px 6px hsl(var(--sc-shadow-color) / .18), 0 24px 48px -16px hsl(var(--sc-shadow-color) / .45); }
.shot figcaption, .ba figcaption { margin-top: var(--sc-2); font-size: var(--sc-t-xs); opacity: .72; }
.case__media--stack { position: relative; padding: 0 0 18% 0; }
.case__media--stack .shot--back { width: 86%; }
.case__media--stack .shot--front { position: absolute; width: 70%; right: 0; bottom: 0; }

.case__media--phones { display: flex; justify-content: center; gap: clamp(1rem, 3vw, 2.5rem); }
.phone { width: clamp(150px, 17vw, 250px); aspect-ratio: 9 / 16; border-radius: 28px; border: 6px solid #14161c; background: #14161c; overflow: hidden; box-shadow: 0 24px 48px -16px hsl(10 50% 20% / .5); }
.phone video { width: 100%; height: 100%; object-fit: cover; }
.phone--low { margin-top: 12%; }

.case__media--patra { display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--sc-5); align-items: end; }
.ba { display: grid; gap: var(--sc-4); }
.ba__item { margin: 0; }
.ba__item video { width: 100%; border-radius: var(--r-shot); background: #0d1f1a; filter: brightness(.92); }
.ba__item--tall video { aspect-ratio: 9 / 16; object-fit: cover; max-height: 380px; width: auto; }

/* ---------- Ananya: pinned call ---------- */
.call { --call-ink: #F1EEFA; }
.call__stage {
  height: 100svh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 5rem); align-items: center;
  margin-inline: clamp(.75rem, 2.4vw, 2rem); padding: clamp(5rem, 9vh, 6rem) clamp(1.5rem, 4.4vw, 4.5rem) clamp(1.5rem, 4vh, 3rem);
  background: #1D1634; color: var(--call-ink); border-radius: var(--r-panel);
}
.call__copy .case__title { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.3rem); }
.flow { display: grid; gap: var(--sc-4); }
.flow__rail { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sc-2); font-family: var(--sc-font-mono); font-size: var(--sc-t-xs); text-transform: uppercase; letter-spacing: .05em; }
.flow__rail li { padding-top: var(--sc-2); border-top: 2px solid color-mix(in oklab, var(--call-ink) 20%, transparent); opacity: .55; transition: opacity var(--sc-d-base) var(--sc-ease-out), border-color var(--sc-d-base) var(--sc-ease-out); }
.flow__rail li.is-on { opacity: 1; border-color: #9DB1FF; }
.flow__panel { position: relative; height: clamp(300px, 46vh, 420px); border-radius: var(--r-card); background: #120D24; box-shadow: inset 0 1px 0 rgb(255 255 255 / .06); overflow: hidden; }
.flow__step { position: absolute; inset: 0; padding: var(--sc-5); margin: 0; opacity: 0; transform: translateY(14px); transition: opacity 260ms var(--sc-ease-out), transform 260ms var(--sc-ease-out); }
.flow__step.is-on { opacity: 1; transform: none; }
.flow__step.is-past { opacity: 0; transform: translateY(-14px); }
.flow__step[data-step="0"] { display: flex; flex-direction: column; gap: var(--sc-3); justify-content: center; }
.bub { max-width: 80%; padding: .7rem 1rem; border-radius: 16px; font-size: var(--sc-t-sm); line-height: 1.45; opacity: 0; transform: translateY(8px); transition: opacity 220ms var(--sc-ease-out), transform 220ms var(--sc-ease-out); }
.bub.is-on { opacity: 1; transform: none; }
.bub--ai { background: #2A2148; border-bottom-left-radius: 4px; }
.bub--me { align-self: flex-end; background: #DCE3FF; color: #10133A; border-bottom-right-radius: 4px; }
.code { font-family: var(--sc-font-mono); font-size: clamp(.78rem, .7rem + .3vw, .92rem); line-height: 1.65; color: #E5E1F5; white-space: pre-wrap; overflow-wrap: anywhere; display: flex; align-items: center; }
.code .c { color: #9C93C2; }
.wa { display: flex; flex-direction: column; justify-content: center; background: #0B141A; }
.wa__from { font-weight: 600; font-size: var(--sc-t-sm); color: #8FE3B0; }
.wa__msg { margin-top: var(--sc-2); background: #005C4B; color: #E9FFF6; padding: .9rem 1.1rem; border-radius: 14px; border-top-left-radius: 4px; max-width: 34ch; font-size: var(--sc-t-sm); line-height: 1.5; }
.wa__meta { margin-top: var(--sc-2); font-size: var(--sc-t-xs); color: #8AA39A; }
.flow__note { font-size: var(--sc-t-xs); opacity: .7; }
.call__after { display: none; }

/* ---------- more: lateral rail ---------- */
.more { margin-top: var(--sc-section); }
.more__stage { height: 100svh; display: flex; align-items: center; }
.rail { display: flex; gap: var(--sc-5); padding-inline: var(--sc-gutter); align-items: stretch; width: max-content; }
.rail__lead { width: clamp(15rem, 24vw, 22rem); align-self: center; }
.rail__lead .sc-body { color: var(--sc-ink-soft); margin-top: var(--sc-3); }
.obj { width: clamp(17rem, 28vw, 25rem); background: var(--sc-surface); border-radius: var(--r-card); padding: var(--sc-5); box-shadow: var(--sc-e1); }
.obj__name { font-family: var(--sc-font-display); font-weight: 800; font-size: var(--sc-t-lg); letter-spacing: var(--sc-track-snug); }
.obj--shot img { margin-top: var(--sc-4); width: 100%; height: auto; border-radius: 10px; outline: 1px solid color-mix(in oklab, var(--sc-ink) 8%, transparent); }
.nodes { list-style: none; margin-top: var(--sc-4); display: grid; gap: 6px; font-family: var(--sc-font-mono); font-size: var(--sc-t-xs); }
.nodes li { position: relative; padding: .45rem .7rem; border-radius: 8px; background: color-mix(in oklab, var(--sc-accent) 8%, var(--sc-surface)); color: color-mix(in oklab, var(--sc-accent) 70%, var(--sc-ink)); }
.nodes li + li::before { content: ""; position: absolute; left: 1.1rem; top: -7px; width: 1px; height: 7px; background: color-mix(in oklab, var(--sc-accent) 40%, transparent); }
.rail__end { width: clamp(14rem, 20vw, 18rem); align-self: center; font-size: var(--sc-t-lg); line-height: 1.4; color: var(--sc-ink-soft); }
.rail__end a { color: var(--sc-accent); font-weight: 600; text-underline-offset: .2em; }

/* ---------- services ---------- */
.services__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.svc { list-style: none; }
.svc li { display: grid; grid-template-columns: minmax(10rem, 1fr) 2fr; gap: var(--sc-5); padding: var(--sc-5) 0; border-top: 1px solid var(--sc-hairline-strong); }
.svc li:last-child { border-bottom: 1px solid var(--sc-hairline-strong); }
.svc h3 { font-family: var(--sc-font-display); font-weight: 700; font-size: var(--sc-t-lg); letter-spacing: var(--sc-track-snug); }
.svc p { color: var(--sc-ink-soft); line-height: 1.55; }

/* ---------- about ---------- */
.about { padding-top: 0; }
.about__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.about__photo { margin: 0; }
.about__photo img { width: 100%; max-width: 360px; height: auto; border-radius: 24px; box-shadow: var(--sc-e2); }
.about__copy > * + * { margin-top: var(--sc-4); }
.about__copy .sc-lede { margin-top: var(--sc-5); font-size: var(--sc-t-lg); line-height: 1.45; }
.about__copy .sc-body { color: var(--sc-ink-soft); }

/* ---------- close ---------- */
.close { padding: var(--sc-section) clamp(.75rem, 2.4vw, 2rem) var(--sc-5); }
.plate { max-width: 92rem; margin-inline: auto; background: #141B3F; color: #EEF1FF; border-radius: var(--r-panel); padding: clamp(2rem, 6vw, 6rem); display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--sc-6) clamp(2rem, 6vw, 6rem); align-items: end; }
.plate__title { font-family: var(--sc-font-display); font-weight: 800; font-size: var(--sc-t-3xl); line-height: 1; letter-spacing: -0.04em; text-wrap: balance; }
.label--plate { margin: 0; }
.label--plate dd { font-size: var(--sc-t-base); }
.label--plate a { text-underline-offset: .22em; }
.copy { margin-left: .5rem; font: 500 var(--sc-t-xs) var(--sc-font-mono); padding: .2rem .55rem; border-radius: var(--sc-r-pill); border: 1px solid rgb(255 255 255 / .3); background: transparent; color: inherit; cursor: pointer; transition: background-color var(--sc-d-fast) var(--sc-ease-out); }
.copy:hover { background: rgb(255 255 255 / .1); }
.plate__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--sc-3); }
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 1.5rem; border-radius: var(--sc-r-pill); font-weight: 600; text-decoration: none; border: 1px solid rgb(255 255 255 / .35); transition: background-color var(--sc-d-fast) var(--sc-ease-out), transform 120ms var(--sc-ease-out); }
.btn:hover { background: rgb(255 255 255 / .08); }
.btn:active { transform: scale(.97); }
.btn--primary { background: #5C78FF; border-color: #5C78FF; color: #0A0D24; }
.btn--primary:hover { background: #7690FF; }
.btn:focus-visible, .copy:focus-visible { outline: 2px solid #9DB1FF; outline-offset: 3px; }
.foot { max-width: 92rem; margin: var(--sc-5) auto 0; display: flex; justify-content: space-between; gap: var(--sc-4); flex-wrap: wrap; font-size: var(--sc-t-xs); color: var(--sc-ink-soft); padding-inline: var(--sc-3); }

/* ---------- tablet / phone ---------- */
@media (max-width: 960px) {
  .case, .call__stage, .services__grid, .about__grid, .plate { grid-template-columns: 1fr; }
  .case__media { order: 2; }
  .hl { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .pill a:not(.pill__me):not(.pill__cta):not([href="#work"]) { display: none; }
  .hero__scene { height: clamp(360px, 52vh, 480px); }
  .plane--halo { width: 78vw; max-width: 380px; }
  .plane--far { width: 52%; }
  .plane--left { left: -6%; top: 2%; }
  .plane--right { right: -6%; top: 10%; }
  .plane--chip-a { left: 3%; bottom: 8%; width: 54%; }
  .plane--chip-b { display: none; }
  .plane--phone { right: 5%; bottom: 14%; width: 92px; border-width: 4px; border-radius: 16px; }
  .plane--phone video { border-radius: 12px; }
  .call__stage { align-content: center; gap: var(--sc-4); padding-top: 4.6rem; }
  .call__stage .label { display: none; }
  .call__after { display: block; margin: var(--sc-4) clamp(.75rem, 2.4vw, 2rem) 0; padding: var(--sc-5); border-radius: var(--r-card); background: #1D1634; color: #F1EEFA; }
  .call__after .label { margin-top: 0; }
  .flow__panel { height: clamp(260px, 40svh, 360px); }
  .label > div, .label--mini > div { grid-template-columns: 1fr; gap: var(--sc-1); }
  .flow__step { padding: var(--sc-4); }
  .flow__step[data-step="0"] { gap: var(--sc-2); }
  .bub { padding: .55rem .8rem; max-width: 88%; }
  .rail { gap: var(--sc-4); }
  .obj { width: 78vw; }
  .svc li { grid-template-columns: 1fr; gap: var(--sc-2); }
  .about__photo img { max-width: 240px; }
}
@media (max-width: 560px) {
  .hl { grid-template-columns: 1fr; }
  .hl__item--wide { grid-column: auto; }
  .hl__item { min-height: 0; }
  .case__media--patra { grid-template-columns: 1fr; }
  .ba { grid-template-columns: 1fr 1fr; align-items: end; }
  .ba__item--tall video { max-height: 300px; }
  .case__media--stack { padding-bottom: 26%; }
  .phone { width: 42vw; }
}

/* ---------- reduced motion: complete, static ---------- */
@media (prefers-reduced-motion: reduce) {
  .plane { transform: none !important; }
  .flow__panel { height: auto; }
  .flow__step { position: static; opacity: 1 !important; transform: none !important; }
  .flow__step + .flow__step { border-top: 1px solid rgb(255 255 255 / .08); }
  .bub { opacity: 1; transform: none; }
}
