/* ═══════════════════════════════════════════════════════════════════
   AMEYA BORKAR — PORTFOLIO
   Design tokens, reset, navbar, video scroll section, phases 0 & 1
   ═══════════════════════════════════════════════════════════════════ */

/* ── Design Tokens ─────────────────────────────────────────────── */
:root {
  /* Palette — sourced from the cinematic video */
  --void: #000000;
  --charcoal-deep: #0a0a0a;
  --charcoal: #141414;
  --graphite: #272726;
  --mid-gray: #424242;
  --stone: #6b6b6a;
  --steel: #8a8a89;
  --highlight: #c8c8c7;
  --white: #f0f0ef;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Spacing */
  --section-pad-x: clamp(1.5rem, 6vw, 8rem);

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ══════════════════════════════════════════════════════════════════
   LOADING SCREEN
   Minimal overlay: centred AB monogram + thin animated progress bar.
   Covers entire viewport, fades out once Tier 1 frames are loaded.
   ══════════════════════════════════════════════════════════════════ */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--void);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s var(--ease-in-out);
}

#loader.loaded {
  opacity: 0;
  pointer-events: none;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.8rem;
}

.loader-text {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  color: var(--steel);
  animation: loaderPulse 1.6s ease-in-out infinite;
}

@keyframes loaderPulse {

  0%,
  100% {
    opacity: 0.4;
  }

  50% {
    opacity: 1;
  }
}

.loader-bar {
  width: 120px;
  height: 1px;
  background: var(--graphite);
  overflow: hidden;
}

.loader-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--steel);
  transition: width 0.15s linear;
}

/* ══════════════════════════════════════════════════════════════════
   CUSTOM + CROSSHAIR CURSOR
   A single "+" character that smoothly follows the mouse.
   Hidden on touch devices via JS.
   ══════════════════════════════════════════════════════════════════ */
#cursor-plus {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
  color: var(--steel);
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.25s ease;
  mix-blend-mode: difference;
  will-change: transform;
}

#cursor-plus.visible {
  opacity: 0.8;
}

/* Hide default cursor on desktop when custom cursor is active */
body.custom-cursor,
body.custom-cursor * {
  cursor: none !important;
}

/* ── Reset ─────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--void);
  color: var(--highlight);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img,
video {
  display: block;
  max-width: 100%;
}

/* ── Navbar ─────────────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.75rem var(--section-pad-x);

  /* Starts transparent; .nav-scrolled class added by JS */
  background: transparent;
  transition:
    background 0.5s var(--ease-in-out),
    backdrop-filter 0.5s var(--ease-in-out),
    padding 0.4s var(--ease-in-out);
}

#navbar.nav-scrolled {
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--graphite);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--white);
  position: relative;
}

.nav-logo::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--steel);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out-expo);
}

.nav-logo:hover::after {
  transform: scaleX(1);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.8rem;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--steel);
  position: relative;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out-expo);
}

.nav-link:hover {
  color: var(--white);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

/* ── Video Scroll Section ───────────────────────────────────────── */
/*
  600vh tall container. The sticky child stays at 100vh
  while the user scrolls through 6 screen-heights.
  JS drives video.currentTime from scroll progress (0→1).
*/
#video-scroll-section {
  position: relative;
  height: 500vh;
}

#video-sticky {
  position: fixed;
  /* was: sticky — fixed never leaves the viewport */
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: var(--void);
  z-index: 1;
  /* video layer — canvas (z:2) draws on top when ready */
}

/* ── Hero Canvas (image-sequence scrubbing) ────────────────────── */
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* Canvas draw handles object-fit-like "cover" behaviour programmatically */
  filter: saturate(0.85) contrast(1.05);
}

/* ── Video Vignette ─────────────────────────────────────────────── */
/*
  Radial falloff for side/bottom edge darkening only.
  The top is intentionally left fully transparent so the navbar
  area is clean. Bottom is darkened for text legibility.
*/
.video-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 75% at 50% 65%,
      transparent 25%,
      rgba(0, 0, 0, 0.5) 100%),
    linear-gradient(to bottom,
      transparent 0%,
      transparent 70%,
      rgba(0, 0, 0, 0.65) 100%);
}

/* ── Phase Overlays (shared) ────────────────────────────────────── */
/*
  Each .phase-overlay fills the sticky viewport.
  Opacity and transform are driven entirely by JS — no CSS transitions
  here, because we want frame-perfect sync with scroll position.
*/
.phase-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  /* Hardware-accelerate the transform updates */
  will-change: opacity, transform;
}

/* ── Phase 0 — Opening Line ─────────────────────────────────────── */
/*
  "Thorough, from the start."
  The only element. Dead center. Playfair italic.
  Appears over the empty cracked ground.
*/
.opening-line {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--highlight);
  letter-spacing: 0.04em;
  text-align: center;
  /* Subtle text glow matching center spotlight of the video */
  text-shadow: 0 0 60px rgba(200, 200, 199, 0.15);
  will-change: opacity, transform;
}

/* ── Phase 1 — Identity Block ───────────────────────────────────── */
/*
  Three stacked elements:
    [ PORTFOLIO — 2026 ]  ← mono label, --stone
    AMEYA BORKAR          ← display, --white, large
    AI/ML Engineer …      ← body, --steel
  Each element has its own will-change for individual stagger via JS.
*/
.identity-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  text-align: center;
}

.identity-label {
  font-family: var(--font-mono);
  font-size: clamp(0.6rem, 1vw, 0.75rem);
  font-weight: 400;
  letter-spacing: 0.35em;
  color: var(--stone);
  will-change: opacity, transform;
  display: block;
  /* small decorative bars either side */
  position: relative;
}

.identity-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 8vw, 5.75rem);
  color: var(--white);
  letter-spacing: 0.08em;
  line-height: 1;
  will-change: opacity, transform;
  /*
    Subtle metallic text treatment — a thin top-light gradient
    matching the key light on the rock.
  */
  background: linear-gradient(170deg,
      var(--white) 0%,
      var(--highlight) 55%,
      var(--steel) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* .identity-tagline removed per design update */

/* ── Scroll Cue ─────────────────────────────────────────────────── */
/*
  A thin vertical line + chevron at the bottom center.
  Blinks into existence after 2s, fades away once user starts scrolling.
*/
.scroll-cue {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  opacity: 0;
  animation: scrollCueFadeIn 1s var(--ease-out-expo) 2.2s forwards;
  transition: opacity 0.4s ease;
}

.scroll-cue.hidden {
  opacity: 0 !important;
  transition: opacity 0.3s ease;
}

.scroll-cue-line {
  width: 1px;
  height: 3rem;
  background: linear-gradient(to bottom, transparent, var(--mid-gray));
  animation: scrollCuePulse 2s ease-in-out 3s infinite;
}

.scroll-cue-chevron {
  font-size: 1rem;
  color: var(--mid-gray);
  line-height: 1;
  animation: scrollCueBounce 2s ease-in-out 3s infinite;
}

@keyframes scrollCueFadeIn {
  to {
    opacity: 1;
  }
}

@keyframes scrollCuePulse {

  0%,
  100% {
    opacity: 0.4;
  }

  50% {
    opacity: 1;
  }
}

@keyframes scrollCueBounce {

  0%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }

  50% {
    transform: translateY(5px);
    opacity: 1;
  }
}

/* ── Main Content Placeholder ───────────────────────────────────── */
#content-placeholder {
  height: 100vh;
  background: var(--charcoal-deep);
  /* Will be replaced by real sections in subsequent builds */
}

/* ══════════════════════════════════════════════════════════════════
   PHASE 2 — ABOUT / CHARACTER CARDS
   Two columns flanking the rock. Center stays clear.
   Left column slides in from the left; right from the right.
   Cards are pure text blocks — no heavy borders, no boxes.
   ══════════════════════════════════════════════════════════════════ */

/* ── Column layout ───────────────────────────────────────────────── */
.about-col {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: clamp(150px, 16vw, 210px);
}

.about-col--left {
  left: clamp(1.5rem, 3.5vw, 4rem);
}

.about-col--right {
  right: clamp(1.5rem, 3.5vw, 4rem);
  /* Right column has 3 cards — align top slightly higher */
  top: 45%;
}

/* ── Individual card ─────────────────────────────────────────────── */
.about-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  border-top: 1px solid var(--graphite);
  padding-top: 0.6rem;
  will-change: opacity, transform;
}

/* ── Heading — mono, all-caps, steel ────────────────────────────── */
.about-card-heading {
  font-family: var(--font-mono);
  font-size: clamp(0.55rem, 0.8vw, 0.68rem);
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--steel);
  line-height: 1.3;
}

/* ── Body — Inter, highlight, small ─────────────────────────────── */
.about-card-body {
  font-family: var(--font-body);
  font-size: clamp(0.68rem, 0.9vw, 0.78rem);
  font-weight: 300;
  color: var(--highlight);
  line-height: 1.6;
  opacity: 0.9;
}

/* ══════════════════════════════════════════════════════════════════
   PHASE 3 — PROJECT CARDS
   4 cards scattered at unique absolute positions.
   Each card's X-entry is driven by JS (same getSideCardState).
   Vertical placement comes from CSS — gives the "scattered debris" feel.
   ══════════════════════════════════════════════════════════════════ */

/* Shared card shell */
.proj-card {
  position: absolute;
  width: clamp(170px, 17vw, 225px);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--graphite);
  will-change: opacity, transform;
}

/* Card positions — scattered, nothing in the center column */
#pc-1 {
  top: 18%;
  left: clamp(1.5rem, 3vw, 3.5rem);
}

/* upper-left  */
#pc-2 {
  top: 14%;
  right: clamp(1.5rem, 3vw, 3.5rem);
}

/* upper-right */
#pc-3 {
  bottom: 22%;
  left: clamp(1.5rem, 3vw, 3.5rem);
}

/* lower-left  */
#pc-4 {
  bottom: 18%;
  right: clamp(1.5rem, 3vw, 3.5rem);
}

/* lower-right */

/* Index — tiny mono number */
.proj-index {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--stone);
  line-height: 1;
}

/* Project name */
.proj-name {
  font-family: var(--font-mono);
  font-size: clamp(0.7rem, 1vw, 0.85rem);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--white);
  line-height: 1.2;
}

/* One-line description */
.proj-desc {
  font-family: var(--font-body);
  font-size: clamp(0.63rem, 0.85vw, 0.72rem);
  font-weight: 300;
  color: var(--highlight);
  line-height: 1.55;
  opacity: 0.85;
}

/* Tech tags — same style as about section */
.proj-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin-top: 0.15rem;
}

.proj-tags span {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.05em;
  color: var(--stone);
  border: 1px solid var(--graphite);
  padding: 0.08rem 0.38rem;
}

/* View link */
.proj-link {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--steel);
  margin-top: 0.2rem;
  display: inline-block;
  position: relative;
  transition: color 0.2s ease;
}

.proj-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--steel);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease-out-expo);
}

.proj-link:hover {
  color: var(--white);
}

.proj-link:hover::after {
  transform: scaleX(1);
}

/* ══════════════════════════════════════════════════════════════════
   BELOW-FOLD SECTIONS — SHARED
   ══════════════════════════════════════════════════════════════════ */

/* Content sections scroll over the fixed video + blurred canvas */
main>section {
  background: rgba(0, 0, 0, 0.45);
  border-top: 1px solid var(--graphite);
  position: relative;
  z-index: 3;
  /* above canvas (z:2) */
}

.section-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 5rem var(--section-pad-x);
}

/* Wide variant — used for side-by-side split sections */
.section-inner--wide {
  max-width: 1100px;
}

.section-inner--contact {
  padding-bottom: 4rem;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 1.4rem;
  margin-bottom: 3.5rem;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: var(--stone);
  flex-shrink: 0;
}

.section-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--white);
  line-height: 1;
}

/* ══════════════════════════════════════════════════════════════════
   WORK / EXPERIENCE SECTION
   ══════════════════════════════════════════════════════════════════ */

.exp-list {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.exp-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0 2.5rem;
  border-top: 1px solid var(--graphite);
  padding-top: 2rem;
}

.exp-item-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-top: 0.1rem;
}

.exp-item-date {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--stone);
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.exp-item-loc {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--mid-gray);
  letter-spacing: 0.04em;
}

.exp-item-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 1rem;
  margin-bottom: 1rem;
}

.exp-item-role {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  font-weight: 500;
  color: var(--white);
}

.exp-item-company {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--steel);
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.exp-item-badge {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  color: var(--charcoal-deep);
  background: var(--steel);
  padding: 0.12rem 0.45rem;
  vertical-align: middle;
}

.exp-item-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 1.1rem;
}

.exp-item-bullets li {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--highlight);
  line-height: 1.6;
  padding-left: 1rem;
  position: relative;
}

.exp-item-bullets li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--graphite);
  font-size: 0.75rem;
}

.exp-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.exp-item-tags span {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: var(--stone);
  border: 1px solid var(--graphite);
  padding: 0.1rem 0.5rem;
}

/* ── Publication callout ────────────────────────────────────────── */
.exp-publication {
  border-left: 2px solid var(--mid-gray);
  padding: 1rem 1.4rem;
  margin-top: 2.5rem;
}

.exp-publication-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  color: var(--stone);
  margin-bottom: 0.55rem;
}

.exp-publication-title {
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 1.6vw, 1.05rem);
  font-style: italic;
  color: var(--white);
  margin-bottom: 0.35rem;
  line-height: 1.45;
}

.exp-publication-meta {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--stone);
  letter-spacing: 0.04em;
}

/* ══════════════════════════════════════════════════════════════════
   RÉSUMÉ SECTION
   ══════════════════════════════════════════════════════════════════ */

.section-inner--resume {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2.5rem;
}

.resume-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  font-style: italic;
  color: var(--steel);
  font-weight: 300;
}

.resume-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.resume-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--highlight);
  border: 1px solid var(--mid-gray);
  padding: 0.8rem 1.8rem;
  text-decoration: none;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  cursor: pointer;
}

.resume-btn:hover {
  background: var(--highlight);
  border-color: var(--highlight);
  color: var(--void);
}

.resume-btn--download {
  color: var(--stone);
  border-color: var(--graphite);
}

.resume-btn--download:hover {
  background: var(--stone);
  border-color: var(--stone);
  color: var(--void);
}

.resume-btn-arrow {
  font-size: 0.9rem;
  transition: transform 0.2s ease;
}

.resume-btn:hover .resume-btn-arrow {
  transform: translate(2px, -2px);
}

.resume-btn--download:hover .resume-btn-arrow {
  transform: translateY(3px);
}

/* ══════════════════════════════════════════════════════════════════
   PROJECTS SECTION (numbered list)
   ══════════════════════════════════════════════════════════════════ */

.proj-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.proj-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 0 1.5rem;
  border-top: 1px solid var(--graphite);
  padding: 1.6rem 0;
  transition: background 0.2s ease;
}

.proj-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.proj-item-num {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  color: var(--graphite);
  padding-top: 0.35rem;
}

.proj-item-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.proj-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.proj-item-name {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  font-weight: 500;
  color: var(--white);
}

.proj-item-link {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--stone);
  flex-shrink: 0;
  position: relative;
  transition: color 0.2s ease;
}

.proj-item-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--steel);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease-out-expo);
}

.proj-item-link:hover {
  color: var(--white);
}

.proj-item-link:hover::after {
  transform: scaleX(1);
}

.proj-item-private {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--mid-gray);
  flex-shrink: 0;
  cursor: default;
}

.proj-item-desc {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--highlight);
  line-height: 1.6;
  opacity: 0.8;
}

.proj-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.proj-item-tags span {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.05em;
  color: var(--stone);
  border: 1px solid var(--graphite);
  padding: 0.08rem 0.42rem;
}

/* ══════════════════════════════════════════════════════════════════
   SKILLS SECTION
   ══════════════════════════════════════════════════════════════════ */

.skills-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.skills-group {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0 2rem;
  align-items: start;
}

.skills-group-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--stone);
  padding-top: 0.3rem;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.skills-tags span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--highlight);
  border: 1px solid var(--graphite);
  padding: 0.2rem 0.6rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.skills-tags span:hover {
  border-color: var(--steel);
  color: var(--white);
}

.skills-edu {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.skills-edu-name {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--white);
}

.skills-edu-detail {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--steel);
  letter-spacing: 0.04em;
}

.skills-edu-cgpa {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--stone);
  letter-spacing: 0.04em;
}

/* ══════════════════════════════════════════════════════════════════
   SKILLS + OUTSIDE — SIDE-BY-SIDE SPLIT SECTION
   ══════════════════════════════════════════════════════════════════ */

/*
  The Skills and Outside sections share one <section> row on wide screens.
  Each is a flex child. On ≤900px they stack vertically.
*/
.split-section {
  display: flex;
  gap: 0;
  align-items: stretch;
  border-top: 1px solid var(--graphite);
  position: relative;
  z-index: 3;
  background: rgba(0, 0, 0, 0.45);
}

.split-section>section {
  flex: 1 1 0;
  /* override the shared rule that adds border-top to main>section */
  border-top: none;
  background: transparent;
}

.split-section>section+section {
  border-left: 1px solid var(--graphite);
}

/* Isolate inner padding for split panes */
.split-section .section-inner {
  max-width: none;
  padding: 5rem clamp(1.5rem, 4vw, 4rem);
}

@media (max-width: 900px) {
  .split-section {
    flex-direction: column;
  }

  .split-section>section+section {
    border-left: none;
    border-top: 1px solid var(--graphite);
  }
}

/* ══════════════════════════════════════════════════════════════════
   OUTSIDE THE TERMINAL SECTION
   ══════════════════════════════════════════════════════════════════ */

.outside-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(0.85rem, 1.4vw, 1rem);
  color: var(--steel);
  font-weight: 400;
  margin-bottom: 2.5rem;
  line-height: 1.5;
}

.outside-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.outside-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 0 1.2rem;
  border-top: 1px solid var(--graphite);
  padding: 1.2rem 0;
  align-items: start;
  transition: background 0.2s ease;
}

.outside-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.outside-num {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  color: var(--graphite);
  padding-top: 0.25rem;
  display: block;
}

.outside-item-content {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.outside-name {
  font-family: var(--font-body);
  font-size: clamp(0.88rem, 1.2vw, 0.97rem);
  font-weight: 500;
  color: var(--white);
  margin: 0;
  line-height: 1.3;
}

.outside-desc {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--highlight);
  line-height: 1.6;
  opacity: 0.78;
  margin: 0;
}

/* ══════════════════════════════════════════════════════════════════
   CONTACT SECTION
   ══════════════════════════════════════════════════════════════════ */

.contact-line {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: var(--steel);
  margin-bottom: 3rem;
  font-weight: 400;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  border: 1px solid var(--graphite);
  margin-bottom: 4rem;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.5rem 1.8rem;
  border: none;
  background: transparent;
  transition: background 0.2s ease;
  position: relative;
}

.contact-item:not(.contact-item--plain):hover {
  background: rgba(255, 255, 255, 0.03);
}

.contact-item+.contact-item {
  border-left: 1px solid var(--graphite);
}

.contact-item:nth-child(3),
.contact-item:nth-child(4) {
  border-top: 1px solid var(--graphite);
}

.contact-item:nth-child(3) {
  border-left: none;
}

.contact-item-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  color: var(--stone);
}

.contact-item-value {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--highlight);
  transition: color 0.2s ease;
}

.contact-item:not(.contact-item--plain):hover .contact-item-value {
  color: var(--white);
}

/* Site footer */
.site-footer {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--mid-gray);
  padding-top: 2rem;
  border-top: 1px solid var(--graphite);
}

.site-footer-sep {
  color: var(--graphite);
}

/* ══════════════════════════════════════════════════════════════════
   SECTION ENTRANCE ANIMATIONS — differentiated per section
   JS assigns the right variant class. IntersectionObserver adds
   .revealed. --delay is set inline for sibling stagger.
   ══════════════════════════════════════════════════════════════════ */

/* ── A: Clip-path curtain — section headers ─────────────────────── */
/* Mask opens upward — editorial / magazine feel.                    */
.reveal-clip {
  opacity: 0;
  clip-path: inset(0 0 100% 0);
  transition:
    clip-path 0.65s cubic-bezier(0.22, 1, 0.36, 1) var(--delay, 0ms),
    opacity 0.25s ease var(--delay, 0ms);
}

.reveal-clip.revealed {
  opacity: 1;
  clip-path: inset(0 0 0% 0);
}

/* ── B: Blur → sharp — skills groups & publication ──────────────── */
/* No positional shift — purely a cinematic focus pull.              */
.reveal-blur {
  opacity: 0;
  filter: blur(7px);
  transition:
    filter 0.7s cubic-bezier(0.22, 1, 0.36, 1) var(--delay, 0ms),
    opacity 0.6s ease var(--delay, 0ms);
}

.reveal-blur.revealed {
  opacity: 1;
  filter: blur(0);
}

/* ── C: Scale materialise — project items ───────────────────────── */
/* Barely-perceptible zoom; reads like a breath, not a slide.        */
.reveal-scale {
  opacity: 0;
  transform: scale(0.97);
  transition:
    opacity 0.55s ease var(--delay, 0ms),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1) var(--delay, 0ms);
}

.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* ── D: Slide from left — outside items ─────────────────────────── */
/* Matches their left-aligned side-panel layout.                     */
.reveal-left {
  opacity: 0;
  transform: translateX(-18px);
  transition:
    opacity 0.55s ease var(--delay, 0ms),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1) var(--delay, 0ms);
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* ── E: Y-lift — resume blocks ──────────────────────────────────── */
/* Classic upward drift — clean, unobtrusive.                        */
.reveal-up {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.55s ease var(--delay, 0ms),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1) var(--delay, 0ms);
}

.reveal-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── F: Pure fade — experience rows, contact ────────────────────── */
/* No motion at all — preserves reading flow in dense text sections. */
.reveal-fade {
  opacity: 0;
  transition: opacity 0.65s ease var(--delay, 0ms);
}

.reveal-fade.revealed {
  opacity: 1;
}

/* Respect reduced-motion — all variants snap immediately */
@media (prefers-reduced-motion: reduce) {

  .reveal-clip,
  .reveal-blur,
  .reveal-scale,
  .reveal-left,
  .reveal-up,
  .reveal-fade {
    transition: none !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    clip-path: none !important;
  }
}


/* ══════════════════════════════════════════════════════════════════
   CURSOR TRAIL
   ══════════════════════════════════════════════════════════════════ */

/*
  N small dots positioned fixed. JS lerps each one toward the cursor
  with increasing lag. Opacity + scale decay toward the tail.
  pointer-events: none ensures they never block clicks.
*/
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  /* transform set entirely by JS — translateX/Y + scale */
  will-change: transform, opacity;
  background: var(--white);
  mix-blend-mode: difference;
}

/* ── Accessibility ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links {
    gap: 1.6rem;
  }

  .nav-link {
    font-size: 0.65rem;
    letter-spacing: 0.18em;
  }
}

@media (max-width: 480px) {
  .nav-links {
    gap: 1.1rem;
  }
}

/* ══════════════════════════════════════════════════════════════════
   MOBILE — SCROLL SECTION LAYOUT
   Switch from fixed to sticky layout for mobile compatibility.
   Image-sequence canvas scrubbing works on all devices — no video
   fallback needed.
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── Shorten the scroll height so it doesn't take forever ── */
  #video-scroll-section {
    height: 300vh;
  }

  /* ── Switch from fixed to sticky — fixes the iOS blank bug ── */
  #video-sticky {
    position: sticky;
    top: 0;
  }

  /* ── Shrink side columns — they're too wide for narrow screens ── */
  .about-col {
    width: clamp(100px, 28vw, 150px);
    gap: 1.2rem;
  }

  .about-col--left {
    left: clamp(0.6rem, 2vw, 1.5rem);
  }

  .about-col--right {
    right: clamp(0.6rem, 2vw, 1.5rem);
    top: 45%;
  }

  .about-card-heading {
    font-size: 0.52rem;
  }

  .about-card-body {
    font-size: 0.6rem;
  }

  /* ── Project cards — tighten to screen edges ── */
  .proj-card {
    width: clamp(120px, 30vw, 165px);
  }

  #pc-1,
  #pc-3 {
    left: clamp(0.6rem, 2vw, 1.5rem);
  }

  #pc-2,
  #pc-4 {
    right: clamp(0.6rem, 2vw, 1.5rem);
  }

  .proj-name {
    font-size: 0.68rem;
  }

  .proj-desc {
    font-size: 0.58rem;
  }

  /* ── Experience: stack meta above content on narrow screens ── */
  .exp-item {
    grid-template-columns: 1fr;
    gap: 0.75rem 0;
  }

  .exp-item-meta {
    flex-direction: row;
    gap: 1rem;
  }

  /* ── Contact grid drops to 1 column ── */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-item+.contact-item {
    border-left: none;
    border-top: 1px solid var(--graphite);
  }

  .contact-item:nth-child(3) {
    border-left: none;
  }
}