/* ==========================================================================
   NIKHIL SIMHA — hero
   The artwork itself (background, wordmark, the three people) is drawn on the
   WebGL canvas. Everything in this file is the furniture layered over it:
   header, welcome strip, chips, arrows, dot grids.
   ========================================================================== */

@font-face {
  font-family: 'Anton';
  src: url('../../public/fonts/anton-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: block;
}
@font-face {
  font-family: 'Oswald';
  src: url('../../public/fonts/oswald-300.woff2') format('woff2');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Oswald';
  src: url('../../public/fonts/oswald-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Oswald';
  src: url('../../public/fonts/oswald-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Oswald';
  src: url('../../public/fonts/oswald-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Oswald';
  src: url('../../public/fonts/oswald-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --ink:      #ff0055;
  --ink-hot:  #ff2a85;
  --cyan:     #00f0ff;
  --cyan-glow:rgba(0, 240, 255, 0.6);
  --yellow:   #fcee0a;
  --paper:    #ededed;
  --black:    #03050c;
  --dim:      #8ea0b8;
  --dimmer:   #4a5768;

  --ui:  'Oswald', 'Arial Narrow', system-ui, sans-serif;
  --disp:'Anton', 'Arial Narrow', Impact, sans-serif;
  --mono:'JetBrains Mono', 'SF Mono', 'Courier New', monospace;

  /* the header height also sets the hero's top breathing room */
  --hdr-h: clamp(56px, 7.4vh, 82px);
  --edge:  clamp(14px, 1.55vw, 26px);

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.76, 0, .24, 1);
}

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

html, body {
  margin: 0;
  min-height: 100%;
  background: #000;
  color: var(--paper);
  font-family: var(--ui);
  /* the document scrolls now that more scenes follow the hero; sideways
     overflow is CLIPPED, not hidden - overflow-x:hidden promotes body to a
     scroll container, which silently breaks every position:sticky pin in the
     scenes below (the canvas scrolls away and leaves bare background) */
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* nothing may paint before the sequence is ready to start on true black */
html.is-booting .furniture,
html.is-booting .hdr { opacity: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.stage-wrap {
  position: fixed; inset: 0;
  overflow: hidden;
  background: #000;
  z-index: 1;
}

#stage {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}

/* ==========================================================================
   NIKHIL SIMHA — hero
   ========================================================================== */

.hdr {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--hdr-h);
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.6vw, 26px);
  padding: 0 var(--edge);
  z-index: 1000;
  pointer-events: none;
  transition: background .35s ease, backdrop-filter .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.hdr > * { pointer-events: auto; }

.hdr.is-scrolled {
  background: rgba(3, 5, 12, 0.85);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.75), 0 0 15px rgba(0, 240, 255, 0.15);
  border-bottom: 1px solid rgba(0, 240, 255, 0.16);
}

.hdr__rule {
  position: absolute; left: 0; right: 0; top: 0;
  width: 100%; height: 100%;
  color: rgba(0, 240, 255, 0.45);
  filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.5));
  pointer-events: none;
  overflow: visible;
}
.hdr__rule polyline {
  stroke-dasharray: var(--len, 2000);
  stroke-dashoffset: var(--len, 2000);
}
.is-header .hdr__rule polyline {
  transition: stroke-dashoffset 1.15s var(--ease-out);
  stroke-dashoffset: 0;
}

.hdr__mark {
  text-decoration: none;
  line-height: 1;
  flex: 0 0 auto;
  position: relative;
}
.mark-word {
  display: block;
  font-family: var(--disp);
  font-size: clamp(20px, 2.05vw, 34px);
  letter-spacing: .025em;
  background-color: var(--ink);
  background-image: url('../../public/tex/grunge.png');
  background-size: 260px;
  background-blend-mode: multiply;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: saturate(1.4) contrast(1.2) brightness(1.2) drop-shadow(0 0 10px rgba(255, 0, 85, 0.6)) drop-shadow(0 0 20px rgba(0, 240, 255, 0.4));
  transition: filter .3s ease;
}
.hdr__mark:hover .mark-word {
  filter: saturate(1.6) contrast(1.3) brightness(1.3) drop-shadow(0 0 15px #ff0055) drop-shadow(0 0 25px #00f0ff);
}

.hdr__div {
  width: 1px; height: 42%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  flex: 0 0 auto;
}

.hdr__roles {
  margin: 0;
  display: grid;
  gap: 1px;
  font-size: clamp(7.5px, .61vw, 9.5px);
  font-weight: 500;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
  line-height: 1.42;
  flex: 0 0 auto;
}

.hdr__nav { margin-inline: auto; }
.hdr__nav ul {
  display: flex;
  gap: clamp(16px, 2.4vw, 44px);
  list-style: none;
  margin: 0; padding: 0;
}
.hdr__nav a {
  position: relative;
  display: block;
  padding: 6px 0;
  font-size: clamp(9px, .72vw, 11.5px);
  font-weight: 500;
  letter-spacing: .26em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--dim);
  transition: color .38s var(--ease-out), text-shadow .38s var(--ease-out);
}
.hdr__nav a::after {                       /* the cyan dot under the active item */
  content: '';
  position: absolute;
  left: 50%; bottom: -3px;
  width: 5px; height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  transform: scale(0);
  transition: transform .42s var(--ease-out);
}
.hdr__nav a:hover, .hdr__nav a:focus-visible {
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan);
}
.hdr__nav a.is-active {
  color: #fff;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.8);
}
.hdr__nav a.is-active::after,
.hdr__nav a:hover::after { transform: scale(1); }

.hdr__meta {
  display: grid;
  justify-items: end;
  gap: 5px;
  flex: 0 0 auto;
}
.hdr__metaLabel {
  font-family: var(--mono);
  font-size: clamp(7.5px, .6vw, 9.5px);
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.4);
  white-space: nowrap;
}
.hdr__pips { display: flex; gap: 5px; }
.hdr__pips i {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
  opacity: .9;
}
.hdr__pips i:nth-child(2) {
  background: var(--ink);
  box-shadow: 0 0 6px var(--ink);
}

.hdr__burger { display: none; }

/* staggered arrival ------------------------------------------------------ */
.hdr__mark, .hdr__div, .hdr__roles, .hdr__nav li, .hdr__meta, .hdr__burger {
  opacity: 0;
  transform: translateY(-9px);
}
.is-header .hdr__mark,
.is-header .hdr__div,
.is-header .hdr__roles,
.is-header .hdr__nav li,
.is-header .hdr__meta,
.is-header .hdr__burger {
  opacity: 1;
  transform: none;
  transition: opacity .7s var(--ease-out), transform .8s var(--ease-out);
}
.is-header .hdr__mark   { transition-delay: .18s; }
.is-header .hdr__div    { transition-delay: .26s; }
.is-header .hdr__roles  { transition-delay: .30s; }
.is-header .hdr__nav li { transition-delay: calc(.36s + var(--i) * .055s); }
.is-header .hdr__meta   { transition-delay: .62s; }

/* ==========================================================================
   Hero furniture
   ========================================================================== */

.furniture {
  position: absolute; inset: 0;
  z-index: 15;
  pointer-events: none;
}

/* --- WELCOME TO MY WORLD: drops in from above ---------------------------
   Sits ABOVE every other layer except the header, and carries its own soft
   dark halo, so it stays legible whatever passes behind it — the wordmark,
   the figure's head, or plain black.                                       */
.welcome {
  position: absolute;
  top: var(--welcome-y, 17.5%);
  left: 50%;
  z-index: 4;
  margin: 0;
  display: flex;
  align-items: center;
  gap: .75em;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: var(--welcome-size, 15px);
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(5, 10, 24, 0.82);
  border: 1px solid rgba(0, 240, 255, 0.4);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.25), inset 0 0 10px rgba(0, 240, 255, 0.1);
  padding: .35em 1.2em .32em;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  text-shadow:
    0 0 .15em var(--cyan),
    0 0 .6em rgba(0, 240, 255, .7);
  transform: translate(-50%, calc(-140% - 12px));
  opacity: 0;
  filter: blur(6px);
}
.welcome__dots {
  color: var(--ink);
  letter-spacing: .12em;
  font-size: .96em;
  text-shadow: 0 0 8px var(--ink);
}
.is-welcome .welcome {
  opacity: 1;
  filter: blur(0);
  transform: translate(-50%, -50%);
  /* fast, confident entrance that overshoots a touch, then settles */
  transition:
    transform .82s cubic-bezier(.14, .86, .22, 1.06),
    opacity .34s ease-out,
    filter .5s var(--ease-out);
}

/* --- cyberpunk inverted chips ------------------------------------------- */
.chip {
  position: absolute;
  z-index: 2;
  margin: 0;
  padding: .42em .8em .36em;
  background: rgba(5, 12, 26, 0.88);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-family: var(--mono);
  font-size: var(--chip-size, 11.5px);
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.35), inset 0 0 8px rgba(0, 240, 255, 0.15);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.8);
  opacity: 0;
}
.chip--artist {
  left: var(--artist-x, 1.5%);
  top: var(--artist-y, 68.8%);
  transform: translateX(-118%);
}
.chip--legend {
  left: var(--legend-x, calc(100vw - 310px));
  top: var(--legend-y, 26.8%);
  border-color: var(--ink);
  color: #fff;
  box-shadow: 0 0 12px rgba(255, 0, 85, 0.4), inset 0 0 8px rgba(255, 0, 85, 0.15);
  text-shadow: 0 0 8px rgba(255, 0, 85, 0.9);
  transform: translateX(118%);
}
.is-artist .chip--artist,
.is-legend .chip--legend {
  opacity: 1;
  transform: translateX(0);
  transition: transform .78s var(--ease-out), opacity .3s linear;
}

/* --- cyberpunk edge arrows ---------------------------------------------- */
.arrows {
  position: absolute;
  top: var(--arrow-top, 34.5%);
  height: var(--arrow-span, 28%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.arrows--l { left: var(--arrow-l, 1.8%); }
.arrows--r { left: var(--arrow-r, 97.5%); }
.arrows i {
  display: block;
  width: 0; height: 0;
  border-style: solid;
  border-width: var(--arrow-h, 7px) 0 var(--arrow-h, 7px) var(--arrow-w, 11px);
  border-color: transparent transparent transparent var(--cyan);
  filter: drop-shadow(0 0 6px var(--cyan));
  opacity: 0;
}
.arrows--r i {
  border-width: var(--arrow-h, 7px) var(--arrow-w, 11px) var(--arrow-h, 7px) 0;
  border-color: transparent var(--cyan) transparent transparent;
}
.arrows--l i { transform: translateX(-26px); }
.arrows--r i { transform: translateX(26px); }
.is-arrows .arrows i {
  opacity: .92;
  transform: none;
  transition: transform .62s var(--ease-out), opacity .4s linear;
  transition-delay: calc(var(--i) * .06s);
}
.is-arrows .arrows--r i { transition-delay: calc((4 - var(--i)) * .06s); }

/* --- corner dot grids --------------------------------------------------- */
.grid-dots {
  position: absolute;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: var(--dot-gap, 6px);
}
.grid-dots--br {
  left: var(--dots-br-x, 98.4%); top: var(--dots-br-y, 95%);
  transform: translate(-100%, -100%);
}
.grid-dots i {
  display: block;
  width: var(--dot-size, 9px);
  height: var(--dot-size, 9px);
  border-radius: 50%;
  background: var(--paper);
  opacity: 0;
  transform: scale(.2);
}
.is-dots .grid-dots i {
  opacity: .95;
  transform: none;
  transition: transform .5s var(--ease-out), opacity .34s linear;
  transition-delay: calc(var(--i) * .022s);
}

/* ==========================================================================
   Mobile menu — the burger opens a full-bleed sheet in the artwork's voice
   ========================================================================== */

.menu {
  position: fixed; inset: 0;
  z-index: 999;
  display: grid;
  place-content: center;
  gap: 8px;
  background: rgba(0, 0, 0, .93);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .45s ease, visibility .45s;
}
.is-menu .menu { opacity: 1; visibility: visible; }
.menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.menu a {
  display: block;
  text-align: center;
  text-decoration: none;
  font-family: var(--disp);
  font-size: clamp(38px, 11vw, 64px);
  line-height: 1.06;
  color: var(--ink);
  background-color: var(--ink);
  background-image: url('../../public/tex/grunge.png');
  background-size: 300px;
  background-blend-mode: multiply;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: saturate(1.3) contrast(1.12) brightness(1.15);
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .4s ease, transform .55s var(--ease-out);
}
.menu a.is-active, .menu a:hover { filter: saturate(1.5) contrast(1.2) brightness(1.4); }
.is-menu .menu a {
  opacity: 1;
  transform: none;
  transition-delay: calc(.06s + var(--i, 0) * .05s);
}
.menu__tag {
  margin: 26px 0 0;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--dim);
  opacity: 0;
  transition: opacity .5s ease .3s;
}
.is-menu .menu__tag { opacity: 1; }

/* ==========================================================================
   Boot / loading — deliberately almost invisible
   ========================================================================== */

.boot {
  position: absolute; inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: #000;
  transition: opacity .5s ease-out, visibility .5s;
}
.boot.is-done { opacity: 0; visibility: hidden; pointer-events: none; }

.boot__bar {
  width: min(148px, 26vw);
  height: 1px;
  background: rgba(255, 255, 255, .13);
  overflow: hidden;
  opacity: 0;
  animation: bootIn .5s ease-out .35s forwards;   /* only if loading is slow */
}
.boot__bar i {
  display: block; height: 100%; width: 0%;
  background: var(--paper);
  transition: width .3s ease-out;
}
@keyframes bootIn { to { opacity: 1; } }

.boot__enter {
  position: absolute;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, .28);
  background: transparent;
  color: var(--paper);
  font-family: var(--ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .32em;
  text-transform: uppercase;
  padding: 14px 30px 12px;
  cursor: pointer;
  transition: background .35s, border-color .35s, letter-spacing .35s;
}
.boot__enter:hover { background: var(--ink); border-color: var(--ink); letter-spacing: .4em; }

.fallback {
  position: absolute; inset: 0;
  display: grid; place-content: center; text-align: center; gap: 12px;
}
.fallback p {
  font-family: var(--disp); font-size: 16vw; color: var(--ink); margin: 0;
}
.fallback small { color: var(--dim); letter-spacing: .2em; text-transform: uppercase; }

/* ==========================================================================
   Small screens — the composition is landscape by nature, so on a phone the
   furniture thins out rather than piling up on top of the wordmark.
   ========================================================================== */

@media (max-width: 760px) {
  .hdr { gap: 10px; }
  .hdr__div, .hdr__roles, .hdr__meta { display: none; }
  .hdr__nav { display: none; }
  .hdr__burger {
    display: grid;
    gap: 5px;
    margin-left: auto;
    appearance: none; border: 0; background: none; padding: 6px 0;
    cursor: pointer;
  }
  .hdr__burger span {
    display: block; width: 26px; height: 1.5px; background: var(--paper);
    transition: transform .4s var(--ease-out);
  }
  .hdr__burger[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
  .hdr__burger[aria-expanded="true"] span:last-child  { transform: translateY(-3.25px) rotate(-45deg); }

  .arrows { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .welcome, .chip, .arrows i, .grid-dots i,
  .hdr__mark, .hdr__div, .hdr__roles, .hdr__nav li, .hdr__meta {
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
  }
}

/* ==========================================================================
   Quick Resume & Copy Email Enhancements
   ========================================================================== */

.hdr__resume-link {
  color: var(--yellow) !important;
  border: 1px solid rgba(246, 224, 94, 0.45);
  padding: 3px 10px !important;
  border-radius: 4px;
  background: rgba(246, 224, 94, 0.08);
  box-shadow: 0 0 10px rgba(246, 224, 94, 0.2);
  text-shadow: 0 0 8px rgba(246, 224, 94, 0.6);
  font-weight: 700 !important;
  transition: all 0.25s ease !important;
}
.hdr__resume-link:hover {
  background: var(--yellow) !important;
  color: #000 !important;
  box-shadow: 0 0 18px var(--yellow) !important;
  text-shadow: none !important;
  transform: translateY(-1px);
}
.hdr__resume-link::after { display: none !important; }

.menu__resume-item {
  margin-top: 10px;
}
.menu__resume-link {
  display: inline-block;
  padding: 10px 18px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #000 !important;
  background: linear-gradient(135deg, var(--yellow), #ff9900);
  border-radius: 6px;
  text-decoration: none;
  box-shadow: 0 0 20px rgba(246, 224, 94, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.menu__resume-link:active {
  transform: scale(0.96);
}

/* Footer Email Wrap & Copy Button */
.fin__email-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.fin__copy-email-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  appearance: none;
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.4);
  color: var(--cyan);
  padding: 4px 10px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: all 0.2s ease;
  touch-action: manipulation;
}

.fin__copy-email-btn:hover {
  background: var(--cyan);
  color: #000;
  box-shadow: 0 0 14px var(--cyan);
}

.fin__copy-email-btn:active {
  transform: scale(0.95);
}

/* Global Cyber Toast */
.cyber-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: rgba(6, 12, 22, 0.94);
  border: 1.5px solid #00f0ff;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8), 0 0 25px rgba(0, 240, 255, 0.5);
  backdrop-filter: blur(12px);
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cyber-toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.cyber-toast__icon {
  color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan);
}
