/* ============================================================
   Harshit Pal Singh — Portfolio
   Direction: "Signal" — editorial dark, serif display, acid accent
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --ink:      #0B0B0C;
  --ink-2:    #121214;
  --ink-3:    #1A1A1E;
  --line:     #232327;
  --line-2:   #2E2E33;
  --fg:       #EDEDEA;
  --fg-dim:   #9A9AA1;
  --fg-mute:  #6E6E75;
  --acid:     #D6FF3E;

  --display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --ui:      "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --shell: 1180px;
  --pad: clamp(20px, 5vw, 40px);
  --gap-section: clamp(72px, 11vw, 150px);

  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  background: var(--ink);
  color: var(--fg);
  font-family: var(--ui);
  font-size: clamp(15px, 1.05vw, 16px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; padding: 0; }

:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--acid); color: var(--ink); }

/* ---------- layout ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section { padding-block: var(--gap-section); }
.section--line { border-top: 1px solid var(--line); }

/* two-column: sticky label + content */
.split {
  display: grid;
  gap: clamp(28px, 4vw, 56px);
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 200px minmax(0, 1fr); gap: 64px; }
  .split__aside { position: sticky; top: 112px; align-self: start; }
}

/* ---------- utility bits ---------- */
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--acid); color: var(--ink);
  padding: 10px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 700;
  transition: top .2s var(--ease);
}
.skip:focus { top: 12px; }

.tag {
  display: flex; align-items: center; gap: 12px;
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--fg-mute);
}
.tag i { font-family: var(--mono); font-style: normal; color: var(--acid); font-size: 11px; }

.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-size: clamp(10px, 1.1vw, 11px); letter-spacing: .22em; text-transform: uppercase;
  color: var(--acid);
  margin-bottom: clamp(16px, 2.2vw, 22px);
}
.eyebrow::before {
  content: ""; width: clamp(24px, 4vw, 40px); height: 1px; background: var(--acid); flex: none;
}

.lede {
  color: var(--fg-dim);
  font-size: clamp(14px, 1.25vw, 16.5px);
  line-height: 1.7;
  max-width: 46ch;
}
.lede--wide { max-width: 54ch; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 13px; font-weight: 600; letter-spacing: .01em;
  white-space: nowrap;
  transition: transform .3s var(--ease), background-color .25s, border-color .25s, color .25s;
}
.btn--sm { padding: 9px 18px; font-size: 12px; }

.btn--acid { background: var(--acid); color: var(--ink); font-weight: 700; }
.btn--acid:hover { transform: translateY(-2px); background: #E4FF6E; }

.btn--ghost { border: 1px solid var(--line-2); color: var(--fg-dim); }
.btn--ghost:hover { border-color: var(--fg-dim); color: var(--fg); transform: translateY(-2px); }

.btn:active { transform: translateY(0); }

/* key + value button: a labelled contact action that opens mail, phone or
   LinkedIn directly. Wrapping is allowed so a long email never overflows a
   narrow phone. */
.btn--kv {
  white-space: normal; text-align: left; max-width: 100%;
  overflow-wrap: anywhere;
  padding: 15px 24px;
  border: 1px solid var(--line-2);
  background: var(--ink-2);
  color: var(--fg);
}
.btn--kv i {
  font-style: normal; font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--fg-mute); transition: color .25s;
}
.btn--kv span {
  color: var(--fg-mute); font-size: 13px;
  transition: transform .3s var(--ease), color .25s;
}
.btn--kv:hover {
  background: var(--acid); border-color: var(--acid); color: var(--ink);
  transform: translateY(-2px);
}
.btn--kv:hover i,
.btn--kv:hover span { color: var(--ink); }
.btn--kv:hover span { transform: translate(2px, -2px); }

/* ---------- ambience ---------- */
.progress {
  position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 120;
  background: transparent; pointer-events: none;
}
.progress span {
  display: block; height: 100%; width: 0%;
  background: var(--acid);
  transition: width .12s linear;
}

/* cursor spotlight — desktop, fine pointer only */
.spotlight { display: none; }
@media (min-width: 1024px) and (pointer: fine) {
  .spotlight {
    display: block;
    position: fixed; z-index: 0; pointer-events: none;
    width: 620px; height: 620px; border-radius: 50%;
    left: 0; top: 0;
    margin: -310px 0 0 -310px;
    background: radial-gradient(circle, rgba(214,255,62,.055) 0%, rgba(214,255,62,0) 62%);
    opacity: 0;
    transition: opacity .5s var(--ease);
    will-change: transform;
  }
  .spotlight.on { opacity: 1; }
}

.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
}

main, .nav, .foot { position: relative; z-index: 2; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: transform .4s var(--ease), background-color .35s var(--ease), border-color .35s;
}
.nav.is-stuck {
  background: rgba(11, 11, 12, .72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav.is-hidden { transform: translateY(-100%); }

.nav__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding-block: clamp(14px, 2vw, 20px);
}

.nav__logo { font-family: var(--display); font-size: clamp(19px, 2vw, 22px); letter-spacing: .01em; }
.nav__logo span { color: var(--acid); }

.nav__links { display: none; gap: clamp(18px, 2.4vw, 32px); }
@media (min-width: 900px) { .nav__links { display: flex; } }
.nav__links a {
  position: relative;
  font-size: 12px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--fg-mute);
  transition: color .25s;
  padding-block: 4px;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--acid);
  transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease);
}
.nav__links a:hover { color: var(--fg); }
.nav__links a:hover::after,
.nav__links a.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav__links a.is-active { color: var(--acid); }

.nav__end { display: flex; align-items: center; gap: 12px; }
.nav__end .btn { display: none; }
@media (min-width: 560px) { .nav__end .btn { display: inline-flex; } }

/* burger */
.burger {
  display: grid; place-content: center; gap: 6px;
  width: 42px; height: 42px; border-radius: 999px;
  border: 1px solid var(--line-2);
}
@media (min-width: 900px) { .burger { display: none; } }
.burger span {
  display: block; width: 17px; height: 1.5px; background: var(--fg);
  transition: transform .35s var(--ease), opacity .25s;
}
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child  { transform: translateY(-3.75px) rotate(-45deg); }

/* drawer */
.drawer {
  position: fixed; inset: 0; z-index: 99;
  background: var(--ink);
  padding: 104px var(--pad) 40px;
  display: flex; flex-direction: column; justify-content: space-between;
  opacity: 0; visibility: hidden;
  transition: opacity .35s var(--ease), visibility .35s;
}
.drawer.is-open { opacity: 1; visibility: visible; }

.drawer__links { display: flex; flex-direction: column; gap: 4px; }
.drawer__links a {
  display: flex; align-items: baseline; gap: 16px;
  font-family: var(--display); font-size: clamp(30px, 9vw, 44px); line-height: 1.25;
  border-bottom: 1px solid var(--line);
  padding-block: 12px;
  opacity: 0; transform: translateY(14px);
  transition: opacity .5s var(--ease), transform .5s var(--ease), color .25s;
}
.drawer.is-open .drawer__links a { opacity: 1; transform: none; }
.drawer__links a:nth-child(1) { transition-delay: .06s; }
.drawer__links a:nth-child(2) { transition-delay: .10s; }
.drawer__links a:nth-child(3) { transition-delay: .14s; }
.drawer__links a:nth-child(4) { transition-delay: .18s; }
.drawer__links a:nth-child(5) { transition-delay: .22s; }
.drawer__links a:nth-child(6) { transition-delay: .26s; }
.drawer__links a:hover { color: var(--acid); }
.drawer__links i {
  font-family: var(--mono); font-style: normal; font-size: 11px; color: var(--acid);
}

.drawer__foot {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13px; color: var(--fg-dim);
}
.drawer__foot a:hover { color: var(--acid); }

body.is-locked { overflow: hidden; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  /* Tuned so the whole hero — including the CTA row — clears the fold on a
     typical ~700px laptop viewport rather than pushing the buttons below it. */
  padding-block: clamp(92px, 11vh, 132px) clamp(48px, 6vh, 80px);
}

.hero__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(44px, 10vw, 112px);
  line-height: .93;
  letter-spacing: -.022em;
}
.hero__title .line { display: block; }
.hero__title em { font-style: italic; color: var(--acid); }

.hero__body {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: clamp(16px, 3vw, 48px);
  margin-top: clamp(20px, 2.6vw, 30px);
}
.hero__loc {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12px; letter-spacing: .05em; color: var(--fg-mute);
  text-transform: uppercase;
}
.pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--acid); flex: none;
  box-shadow: 0 0 0 0 rgba(214,255,62,.55);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(214,255,62,.5); }
  70%  { box-shadow: 0 0 0 9px rgba(214,255,62,0); }
  100% { box-shadow: 0 0 0 0 rgba(214,255,62,0); }
}

/* toolkit row */
.toolkit {
  border-block: 1px solid var(--line);
  padding-block: clamp(16px, 2.2vw, 22px);
  margin-top: clamp(26px, 3.4vw, 40px);
}
.toolkit__label {
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--fg-mute);
  margin-bottom: 12px;
}
.toolkit__list {
  display: flex; flex-wrap: wrap; gap: 8px;
  list-style: none;
}
.toolkit__list li {
  font-family: var(--mono); font-size: clamp(11px, 1.2vw, 13px);
  color: var(--fg-dim);
  padding: 7px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.toolkit__list li:hover { color: var(--acid); border-color: var(--acid); }

.hero__cta {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: clamp(24px, 3vw, 34px);
}

.scrollcue {
  display: none;
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  align-items: center; gap: 10px;
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--fg-mute);
}
@media (min-height: 720px) and (min-width: 900px) { .scrollcue { display: flex; } }
.scrollcue span {
  width: 1px; height: 34px;
  background: linear-gradient(to bottom, var(--acid), transparent);
  animation: cue 2.2s var(--ease) infinite;
}
@keyframes cue { 0%,100% { opacity: .25; transform: scaleY(.55); } 50% { opacity: 1; transform: scaleY(1); } }

/* ---------- marquee ---------- */
.marquee {
  border-block: 1px solid var(--line);
  padding-block: clamp(14px, 2vw, 20px);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex; align-items: center; gap: clamp(20px, 3vw, 38px);
  white-space: nowrap; width: max-content;
  animation: marquee 15s linear infinite;
}
/* The type scales down with the viewport, so a fixed duration would drag the
   strip at roughly half speed on a phone. Shorten it in step to hold a
   near-constant ~82px/s at every width. */
@media (max-width: 900px) { .marquee__track { animation-duration: 11s; } }
@media (max-width: 640px) { .marquee__track { animation-duration: 8s; } }
.marquee__track span {
  font-family: var(--display);
  font-size: clamp(22px, 3.4vw, 40px);
  letter-spacing: -.01em;
}
.marquee__track i { color: var(--acid); font-style: normal; font-size: clamp(11px, 1.4vw, 15px); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee:hover .marquee__track { animation-play-state: paused; }

/* ---------- about ---------- */
.big {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(24px, 3.4vw, 40px); line-height: 1.25; letter-spacing: -.015em;
  max-width: 24ch;
}
.big em { font-style: italic; color: var(--acid); }

.prose {
  display: grid; gap: 16px;
  margin-top: clamp(26px, 3.4vw, 38px);
  max-width: 62ch;
  color: var(--fg-dim);
  font-size: clamp(14px, 1.15vw, 15.5px);
  line-height: 1.75;
}

.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 1px; background: var(--line);
  border: 1px solid var(--line);
  margin-top: clamp(30px, 4vw, 44px);
}
.facts li { background: var(--ink); padding: 16px 18px; font-size: 13.5px; }
.facts i {
  display: block; font-style: normal; margin-bottom: 6px;
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-mute);
}

/* ---------- timeline ---------- */
.timeline { display: grid; gap: clamp(34px, 4.5vw, 56px); }

.job {
  display: grid; gap: 14px;
  padding-top: clamp(24px, 3vw, 32px);
  border-top: 1px solid var(--line);
  transition: border-color .4s var(--ease);
}
.job:first-child { border-top: 0; padding-top: 0; }
.job:hover { border-top-color: var(--line-2); }

@media (min-width: 720px) {
  .job { grid-template-columns: 168px minmax(0, 1fr); gap: 28px; }
}

.job__meta { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
@media (min-width: 720px) { .job__meta { flex-direction: column; gap: 8px; } }
.job__num { font-family: var(--mono); font-size: 11px; color: var(--acid); }
.job__meta time { font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--fg-mute); }

.job__role {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(24px, 3vw, 34px); line-height: 1.15; letter-spacing: -.015em;
}
.job__org {
  margin-top: 5px;
  font-size: 13px; letter-spacing: .05em; color: var(--acid);
}

.job__points {
  display: grid; gap: 10px;
  margin-top: clamp(16px, 2vw, 22px);
  max-width: 62ch;
  color: var(--fg-dim); font-size: 14.5px; line-height: 1.65;
}
.job__points li { position: relative; padding-left: 20px; }
.job__points li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 7px; height: 1px; background: var(--line-2);
}

.pills { display: flex; flex-wrap: wrap; gap: 7px; margin-top: clamp(18px, 2.2vw, 24px); }
.pills li {
  border: 1px solid var(--line-2); border-radius: 999px;
  padding: 5px 13px; font-size: 11.5px; color: var(--fg-dim);
  transition: border-color .25s, color .25s;
}
.job:hover .pills li { border-color: #3A3A41; color: var(--fg); }

/* ---------- skills ---------- */
.skillset { padding-block: clamp(22px, 3vw, 30px); border-top: 1px solid var(--line); }
.skillset:first-child { border-top: 0; padding-top: 0; }

.skillset__title {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(20px, 2.3vw, 26px); letter-spacing: -.01em;
  margin-bottom: 16px;
}

.skillset__list { display: flex; flex-wrap: wrap; gap: 8px; }
.skillset__list li {
  border: 1px solid var(--line-2); border-radius: 999px;
  padding: 8px 16px; font-size: 13px; color: var(--fg-dim);
  transition: background-color .3s var(--ease), color .3s, border-color .3s, transform .3s var(--ease);
}
.skillset__list li:hover {
  background: var(--acid); border-color: var(--acid); color: var(--ink);
  transform: translateY(-2px);
}
.skillset__list--soft li:hover { background: transparent; border-color: var(--fg-dim); color: var(--fg); }

/* ---------- education ---------- */
.edu { padding-block: clamp(24px, 3vw, 32px); border-top: 1px solid var(--line); }
.edu:first-child { border-top: 0; padding-top: 0; }

.edu__head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px;
}
.edu__head h3 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(22px, 2.8vw, 31px); line-height: 1.2; letter-spacing: -.015em;
}
.edu__head time {
  font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--fg-mute);
  white-space: nowrap;
}
.edu__org { margin-top: 5px; font-size: 13px; letter-spacing: .05em; color: var(--acid); }

/* ---------- contact ---------- */
.contact { border-top: 1px solid var(--line); }
.contact__title {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(40px, 8.6vw, 96px); line-height: .98; letter-spacing: -.025em;
  margin-block: clamp(22px, 3vw, 32px) clamp(20px, 2.6vw, 28px);
}
.contact__title em { font-style: italic; color: var(--acid); }

.contact__actions {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: clamp(34px, 4.5vw, 52px);
}

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding-block: clamp(26px, 3.4vw, 38px); }
.foot__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px;
  font-size: 12px; color: var(--fg-mute);
}
.foot__mid { order: 3; width: 100%; }
@media (min-width: 720px) { .foot__mid { order: 0; width: auto; } }
.foot__top { transition: color .25s; }
.foot__top:hover { color: var(--acid); }

/* ---------- reveal animation ----------
   Scoped to .js (set by an inline script in <head>) so that with JavaScript
   disabled the content is simply visible instead of stuck at opacity 0. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity .8s var(--ease) calc(var(--d, 0) * 80ms),
    transform .8s var(--ease) calc(var(--d, 0) * 80ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .marquee__track { animation: none; }
  .spotlight { display: none; }
}

/* ---------- print ---------- */
@media print {
  .nav, .drawer, .progress, .spotlight, .grain, .marquee, .scrollcue { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding-block: 24px; page-break-inside: avoid; }
  a { color: #000; }
}
