/* ============================================================
   Naitik Gupta — portfolio 2026
   Design language: tonik SR005 × Defined VC
   Black/white inverted sections · grotesk + mono micro-labels ·
   electric blue accent · serif italic flourishes · hairline grids
   ============================================================ */

:root {
  --black: #080808;
  --white: #efefef;
  --paper: #efefef;
  --ink: #111111;
  --blue: #0099ff;
  --grey: #9ba1a5;
  --line-dark: rgba(239, 239, 239, 0.14);
  --line-light: rgba(17, 17, 17, 0.16);
  --sans: "Switzer", "Inter", -apple-system, sans-serif;
  --mono: "IBM Plex Mono", monospace;
  --serif: "Instrument Serif", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  font-weight: 400;
  letter-spacing: -0.01em;
  overflow-x: hidden;
  cursor: none;
}

@media (hover: none), (pointer: coarse) {
  body { cursor: auto; }
  .cursor { display: none !important; }
}

::selection { background: var(--blue); color: var(--black); }

a { color: inherit; text-decoration: none; }

.mono {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.serif { font-family: var(--serif); font-weight: 400; }
.hide-sm { display: inline; }

/* ============ PRELOADER ============ */
.preloader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--black);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 28px;
  transition: clip-path 0.9s cubic-bezier(0.76, 0, 0.24, 1);
  clip-path: inset(0 0 0% 0);
}
.preloader.done { clip-path: inset(0 0 100% 0); }
.preloader-name { font-size: 12px; color: var(--white); letter-spacing: 0.3em; }
.preloader-bar {
  width: min(420px, 70vw); height: 1px;
  background: var(--line-dark);
  position: relative; overflow: hidden;
}
.preloader-bar i {
  position: absolute; inset: 0;
  background: var(--blue);
  transform: scaleX(0); transform-origin: left;
  display: block;
}
.preloader-pct { color: var(--grey); }

/* ============ CURSOR ============ */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 999;
  width: 12px; height: 12px;
  background: var(--blue);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: width 0.25s, height 0.25s;
}
.cursor.big { width: 56px; height: 56px; }

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  mix-blend-mode: difference;
  color: #fff;
}
.nav a { color: #fff; }
.nav-name { font-weight: 500; }
.nav-mid { color: rgba(255, 255, 255, 0.55); }
.nav-links { display: flex; gap: 28px; }
.nav-links a { position: relative; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -4px;
  width: 100%; height: 1px; background: #fff;
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.35s cubic-bezier(0.76, 0, 0.24, 1);
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ============ HERO ============ */
.hero {
  min-height: 100vh; min-height: 100svh;
  padding: 84px 24px 24px;
  display: flex;
}
.hero-frame {
  flex: 1;
  border: 1px solid var(--line-dark);
  display: flex; flex-direction: column;
  justify-content: space-between;
  padding: 22px 26px;
  position: relative;
  overflow: hidden;
}
.hero-toprow {
  display: flex; justify-content: space-between; gap: 16px;
  color: var(--grey);
}
.hero-toprow span { white-space: nowrap; }
.hero-center { text-align: left; }
.hero-name {
  font-size: clamp(70px, 16.5vw, 230px);
  font-weight: 500;
  line-height: 0.88;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}
.hero-row { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero-row-2 { color: transparent; -webkit-text-stroke: 1.5px var(--white); position: relative; }
.hero-sup {
  -webkit-text-stroke: 0;
  color: var(--blue);
  font-size: clamp(12px, 1.4vw, 18px);
  vertical-align: super;
  margin-left: 0.3em;
  letter-spacing: 0.1em;
}
.hero-name .ch {
  display: inline-block;
  transform: translateY(115%);
  will-change: transform;
}
.hero-tag {
  margin-top: 26px;
  font-size: clamp(24px, 3.4vw, 44px);
  color: var(--grey);
  font-style: normal;
}
.hero-tag em { color: var(--white); font-style: italic; }
.hero-botrow {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 24px;
}
.hero-roles {
  display: flex; flex-direction: column; gap: 8px;
  color: var(--grey);
}
.hero-roles span { position: relative; padding-left: 16px; }
.hero-roles span::before {
  content: "●"; position: absolute; left: 0;
  color: var(--blue); font-size: 7px; top: 4px;
}
.hero-scroll { text-align: right; color: var(--grey); line-height: 1.8; }

/* ============ MANIFESTO ============ */
.manifesto {
  padding: 22vh 6vw;
  max-width: 1200px;
  margin: 0 auto;
}
.manifesto-line {
  font-size: clamp(28px, 4.6vw, 64px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.18;
}
.manifesto-line .word { display: inline-block; opacity: 0.12; }
.manifesto-foot { margin-top: 48px; color: var(--grey); }

/* ============ SPACED TITLES ============ */
.spaced-title, .spaced-title-dark {
  font-size: clamp(13px, 1.6vw, 18px);
  letter-spacing: 0.55em;
  font-weight: 500;
  text-transform: none;
}
.spaced-title { color: var(--white); }
.spaced-title-dark { color: var(--ink); }
.index-label { display: block; color: var(--grey); margin-bottom: 18px; }

/* ============ STATS ============ */
.stats { padding: 80px 24px 110px; }
.stats > .spaced-title { display: block; margin: 0 2px 42px; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line-dark);
  border-left: 1px solid var(--line-dark);
}
.stat {
  border-right: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  padding: 44px 32px 36px;
  transition: background 0.4s;
  position: relative;
}
.stat:hover { background: rgba(0, 153, 255, 0.07); }
.stat-num {
  display: block;
  font-size: clamp(56px, 7vw, 110px);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 18px;
}
.stat:hover .stat-num { color: var(--blue); }
.stat-label { color: var(--grey); }

/* ============ MARQUEE ============ */
.marquee {
  overflow: hidden; white-space: nowrap;
  border-top: 1px solid var(--line-dark);
  padding: 18px 0;
  background: var(--black);
}
.marquee-track {
  display: inline-flex; align-items: center; gap: 42px;
  will-change: transform;
}
.marquee-track span { font-size: 12px; color: var(--grey); letter-spacing: 0.2em; }
.marquee-track i { color: var(--blue); font-style: normal; font-size: 7px; }

/* ============ WORK (WHITE SECTION) ============ */
.work {
  background: var(--paper);
  color: var(--ink);
  padding: 110px 24px 90px;
}
.work-head { margin-bottom: 56px; }
.work .index-label { color: rgba(17, 17, 17, 0.5); }
.work-head .spaced-title-dark { display: block; margin-bottom: 14px; }
.work-note { color: rgba(17, 17, 17, 0.45); }

.work-table { border-top: 1px solid var(--line-light); }
.work-row {
  display: grid;
  grid-template-columns: 70px 1.1fr 1.6fr 0.9fr 50px;
  gap: 28px; align-items: center;
  padding: 30px 18px;
  border-bottom: 1px solid var(--line-light);
  position: relative;
  isolation: isolate;
  transition: color 0.35s;
}
.work-row::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: var(--ink);
  transform: scaleY(0); transform-origin: top;
  transition: transform 0.4s cubic-bezier(0.76, 0, 0.24, 1);
}
.work-row:hover::before { transform: scaleY(1); transform-origin: bottom; }
.work-row:hover { color: var(--paper); }
.work-idx { color: inherit; opacity: 0.5; }
.work-name {
  font-size: clamp(26px, 3vw, 44px);
  font-weight: 500;
  letter-spacing: -0.03em;
}
.work-row:hover .work-name { color: var(--blue); }
.work-desc { font-size: 14px; line-height: 1.55; opacity: 0.72; }
.work-tags { opacity: 0.55; }
.work-arrow {
  font-size: 24px;
  transform: translate(-8px, 8px); opacity: 0;
  transition: transform 0.35s, opacity 0.35s;
}
.work-row:hover .work-arrow { transform: translate(0, 0); opacity: 1; }
.work-all {
  display: inline-block; margin-top: 40px;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 5px;
}
.work-all:hover { color: var(--blue); border-color: var(--blue); }

/* ============ EXPERIENCE ============ */
.experience { padding: 120px 24px; }
.exp-head { margin-bottom: 56px; }
.exp-head .spaced-title { display: block; margin-top: 4px; }
.exp-table { border-top: 1px solid var(--line-dark); }
.exp-row {
  display: grid;
  grid-template-columns: 200px 1fr 1.6fr 110px;
  gap: 28px; align-items: baseline;
  padding: 34px 18px;
  border-bottom: 1px solid var(--line-dark);
  transition: background 0.35s, padding-left 0.35s;
}
.exp-row:hover { background: rgba(239, 239, 239, 0.04); padding-left: 30px; }
.exp-date { color: var(--grey); }
.exp-co {
  font-size: clamp(22px, 2.6vw, 36px);
  font-weight: 500; letter-spacing: -0.02em;
}
.exp-row:hover .exp-co { color: var(--blue); }
.exp-role { font-size: 14px; line-height: 1.6; color: var(--grey); }
.exp-tag { text-align: right; color: var(--grey); }

/* ============ RESEARCH (WHITE) ============ */
.research {
  background: var(--paper);
  color: var(--ink);
  padding: 120px 24px;
}
.research .index-label { color: rgba(17, 17, 17, 0.5); }
.research-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 72px;
}
.research-title {
  font-size: clamp(30px, 3.8vw, 54px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin-bottom: 28px;
}
.research-title em { font-style: italic; }
.research-sub {
  font-size: 16px; line-height: 1.7;
  color: rgba(17, 17, 17, 0.65);
  max-width: 520px;
  margin-bottom: 36px;
}
.research-sub strong { color: var(--ink); font-weight: 500; }
.btn-line {
  display: inline-block;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 5px;
  color: var(--ink);
}
.btn-line:hover { color: var(--blue); border-color: var(--blue); }
.research-right { border-top: 1px solid var(--line-light); }
.honor-row {
  display: flex; gap: 22px; align-items: baseline;
  padding: 18px 6px;
  border-bottom: 1px solid var(--line-light);
  font-size: 15px;
  transition: background 0.3s, padding-left 0.3s;
}
.honor-row:hover { background: rgba(0, 153, 255, 0.08); padding-left: 16px; }
.honor-idx { color: var(--blue); flex-shrink: 0; }

/* ============ CONTACT ============ */
.contact {
  padding: 140px 24px 90px;
  text-align: left;
}
.contact-big {
  display: block;
  font-size: clamp(80px, 17vw, 260px);
  font-weight: 500;
  line-height: 0.88;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  margin: 24px 0 40px;
}
.contact-row { display: block; overflow: hidden; padding-bottom: 0.06em; }
.contact-big .ch {
  display: inline-block;
  transform: translateY(115%);
  will-change: transform;
}
.contact-arrow {
  display: inline-block;
  color: var(--blue);
  margin-left: 0.1em;
  transition: transform 0.4s cubic-bezier(0.76, 0, 0.24, 1);
}
.contact-big:hover .contact-arrow { transform: translate(0.08em, -0.08em); }
.contact-big:hover .ch { color: var(--blue); }
.contact-big .ch { transition: color 0.3s; }
.contact-email { color: var(--grey); margin-bottom: 44px; }
.contact-links { display: flex; gap: 36px; flex-wrap: wrap; }
.contact-links a { color: var(--grey); transition: color 0.25s; }
.contact-links a:hover { color: var(--blue); }

/* ============ FOOTER ============ */
.footer {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
  padding: 22px 24px;
  border-top: 1px solid var(--line-dark);
  color: var(--grey);
}
#clock { color: var(--blue); }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .work-row { grid-template-columns: 50px 1fr 40px; row-gap: 12px; }
  .work-idx { grid-column: 1; grid-row: 1; }
  .work-name { grid-column: 2; grid-row: 1; }
  .work-desc { grid-column: 2; grid-row: 2; }
  .work-tags { grid-column: 2; grid-row: 3; }
  .work-arrow { grid-column: 3; grid-row: 1; }
  .exp-row { grid-template-columns: 1fr; gap: 10px; }
  .exp-tag { text-align: left; }
  .research-grid { grid-template-columns: 1fr; gap: 48px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .nav-mid, .nav-links a:not(:last-child) { display: none; }
  .hide-sm { display: none; }
  .hero-toprow { font-size: 10px; letter-spacing: 0.08em; }
  .stats-grid { grid-template-columns: 1fr; }
  .hero-botrow { flex-direction: column; align-items: flex-start; }
  .hero-scroll { text-align: left; }
  .work-row { gap: 14px; padding: 26px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
