/* Shared look for every section. Sections add their own CSS on top. */
:root {
  --paper: #fcfcfa;                                  /* barely off-white: a soft fabric white, not cream */
  --ink: #050505;
  --soft: #f1f0ee;
  --yellow: #e9b729; --red: #e0614f; --blue: #4f86d9; --green: #5fae7a; --orange: #ec8a3a; --plum: #b07cc6;
  --font: "Doto", ui-monospace, monospace;          /* display: big words only */
  --text: "IBM Plex Mono", ui-monospace, monospace;  /* everything small: readable */
}

html, body { margin: 0; height: 100%; background: var(--paper); color: var(--ink); font-family: var(--font); }
html, body { overflow: hidden; scrollbar-width: none; }               /* no scrollbars, ever */
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; }
body { display: grid; grid-template-rows: auto 1fr; height: 100dvh; }

/* top bar (from the references): name left · numbered sections centre. Plain text on white;
   left and right columns stay equal (right one empty) so the menu sits exactly on the page's centre line. */
.top {
  position: relative; z-index: 10;                   /* above every section's layers (keeps the phone button visible) */
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 3.2vh 4vw 2.4vh;                          /* space below, so the button never touches the line/page under the bar */
  font-weight: 900; letter-spacing: .12em; font-size: clamp(13px, 1.2vw, 18px); text-transform: uppercase;
}
.brand { justify-self: start; color: var(--ink); text-decoration: none; font-size: clamp(16px, 1.6vw, 24px); }   /* name: bigger than the menu */

/* "Let's collaborate": black pill on the right of the top bar (opens an email to Bhargav for now) */
.collab {
  justify-self: end; color: #fff; background: var(--ink); text-decoration: none; white-space: nowrap;
  padding: .75em 1.4em; border-radius: 999px; transition: transform .2s, opacity .2s;
}
.collab span { display: inline-block; transition: transform .2s; }
.collab:hover span { transform: translateX(.3em); }
.collab:active { transform: scale(.96); }
.top a.collab:focus-visible { outline: 2px solid var(--ink); outline-offset: .25em; border-radius: 999px; }

.menu { display: flex; gap: clamp(1rem, 3vw, 3rem); }
.menu a { position: relative; color: #6f6b64; text-decoration: none; padding: .5em 0; transition: color .2s; }
.menu a sup { font-size: .62em; margin-right: .45em; vertical-align: .55em; color: #c2beb6; }   /* index number */
.menu a::after {                                   /* underline draws in from the centre on hover */
  content: ""; position: absolute; left: 50%; right: 50%; bottom: 0; height: 1.5px; background: currentColor;
  transition: left .25s ease, right .25s ease;
}
.menu a:hover { color: var(--ink); }
.menu a:hover::after { left: 0; right: 0; }
.menu a[aria-current="page"] { color: var(--ink); }
.menu a[aria-current="page"]::before {             /* current page: small yellow dot above it */
  content: ""; position: absolute; left: 50%; top: -.35em; width: .42em; height: .42em; margin-left: -.21em;
  border-radius: 50%; background: var(--yellow);
}
.top a:focus-visible { outline: 2px solid var(--ink); outline-offset: .3em; border-radius: .2em; }

@media (max-width: 45em) {                        /* phones: just the sections, centred */
  .top { grid-template-columns: 1fr; justify-items: center; padding-top: 2.4vh; }
  .brand, .menu a sup { display: none; }
  .collab { justify-self: center; margin-top: 1.4vh; font-size: 11px; padding: .6em 1.2em; }   /* phones: small pill under the menu, never covers the page */
  .menu { gap: 4vw; }
}

/* stage: the current section fills the rest of the screen */
.stage { position: relative; min-height: 0; isolation: isolate; }   /* a section's own z-indexes stay inside it */
.section { position: absolute; inset: 0; display: grid; place-items: center; animation: enter .45s ease; }
@keyframes enter { from { opacity: 0; transform: translateY(1.5vh); } }


/* live wave beside MUSIC while a song plays (body.music-on is set by the turntable) */
.menu .eq { position: absolute; left: calc(100% + .45em); top: 50%; translate: 0 -55%;   /* beside the word, takes no space → menu stays centred */
            display: inline-flex; align-items: flex-end; gap: .14em; height: .8em; width: 0; opacity: 0; overflow: hidden;
            transition: width .3s ease, opacity .3s ease; }
.music-on .menu .eq { width: 1.05em; opacity: 1; }
.menu .eq i { width: .16em; height: 100%; border-radius: 999px; background: var(--yellow); transform-origin: bottom; transform: scaleY(.3); }
.music-on .menu .eq i { animation: eqbar .9s ease-in-out infinite; }
.menu .eq i:nth-child(2) { animation-duration: .7s; animation-delay: -.2s; }
.menu .eq i:nth-child(3) { animation-duration: 1.1s; animation-delay: -.5s; }
.menu .eq i:nth-child(4) { animation-duration: .8s; animation-delay: -.35s; }
@keyframes eqbar { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
