/* ============================================================
   Rahul Jha — Portfolio
   ============================================================ */

:root {
  --bg: #0A0A0B;
  --bg-elevated: #141416;
  --bg-elevated-2: #1F1F22;
  --text: #F5F5F4;
  --text-muted: #6B6B68;
  --text-dim: #3A3A38;
  --crimson: #C5223A;
  --crimson-deep: #7A1A24;
  --crimson-faded: #2A1A1C;
  --cream: #D9D2A6;
  --cream-light: #F5EFDF;
  --warm: #E8B86C;
  --warm-light: #F5D58E;
  --status-green: #22C55E;

  --maxw: 1200px;
  --pad: 40px;

  --font-display: 'Anton', 'Bebas Neue', sans-serif;
  --display-ls: -.04em;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

::selection { background: var(--crimson); color: var(--text); }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: min(760px, calc(100vw - 32px));
  height: 64px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 8px 0 16px;
  background: rgba(15, 15, 17, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 18px 50px rgba(0,0,0,0.55);
  transition: box-shadow .3s ease, border-color .3s ease;
}
.nav:hover {
  border-color: rgba(232,184,108,0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 18px 50px rgba(0,0,0,0.6), 0 0 0 1px rgba(232,184,108,0.10);
}
.nav__monogram {
  width: 36px; height: 36px; flex: 0 0 36px;
  border-radius: 50%;
  background: var(--crimson);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--text);
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 4px 12px rgba(197,34,58,0.35);
}
.nav__sep { width: 1px; height: 22px; background: rgba(255,255,255,0.12); flex: 0 0 1px; }
.nav__status {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; color: var(--text); white-space: nowrap;
}
.nav__dot {
  position: relative;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--status-green);
  animation: dotPulse 1.5s ease-in-out infinite;
  will-change: transform;
}
.nav__dot::after {
  content: ""; position: absolute; inset: 0;
  border-radius: 50%; background: var(--status-green);
  animation: dotHalo 1.5s ease-out infinite;
}
@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}
@keyframes dotHalo {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(2.4); opacity: 0; }
}
.nav__links {
  display: flex; align-items: center; gap: 22px;
  margin-left: auto;
  font-size: 14.5px;
}
.nav__links a { color: var(--text); opacity: .9; transition: opacity .2s, color .2s; }
.nav__links a:hover { opacity: 1; }
.nav__links a.is-active {
  color: var(--text);
  text-decoration: underline wavy var(--warm);
  text-underline-offset: 6px;
  text-decoration-thickness: 1.5px;
}
.nav__cta {
  display: inline-flex; align-items: center; gap: 7px;
  height: 44px; padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--warm-light), var(--warm));
  color: #2a1a08;
  font-weight: 600; font-size: 14px;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), 0 6px 18px rgba(232,184,108,0.20);
  transition: transform .2s ease, box-shadow .2s ease;
}
.nav__cta:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 10px 24px rgba(232,184,108,0.3); }

.nav__burger { display: none; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 140px var(--pad) 80px;
  overflow: hidden;
}
.hero__bgword {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -54%);
  font-family: var(--font-display);
  font-size: clamp(120px, 23vw, 360px);
  line-height: .8;
  letter-spacing: -.02em;
  color: var(--crimson-faded);
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}
.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 920px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}

/* terminal card */
.terminal {
  width: min(480px, 100%);
  background: #141416;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0,0,0,0.6);
}
.terminal__stripe { height: 3px; background: var(--crimson); }
.terminal__bar {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.terminal__bar .dot { width: 11px; height: 11px; border-radius: 50%; }
.terminal__bar .dot.r { background: #ff5f56; }
.terminal__bar .dot.y { background: #ffbd2e; }
.terminal__bar .dot.g { background: #27c93f; }
.terminal__bar .label {
  margin-left: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--text-muted);
}
.terminal__body {
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.9;
  padding: 18px 20px 22px;
  min-height: 170px;
}
.terminal__body .ln { white-space: pre-wrap; word-break: break-word; }
.terminal__body .prompt { color: var(--warm); }
.terminal__body .arrow { color: var(--crimson); }
.terminal__body .key { color: var(--text-muted); }
.terminal__body .val { color: var(--text); }
.caret {
  display: inline-block;
  width: 9px; height: 16px;
  background: var(--warm);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* hero statement */
.hero__statement {
  text-align: center;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.25;
  font-weight: 400;
  letter-spacing: -.01em;
  max-width: 880px;
  text-wrap: balance;
}
.hero__statement .em { font-weight: 700; color: var(--text); }
.hero__statement .dim { font-weight: 400; color: var(--text-muted); }
.hero__statement .period { color: var(--crimson); }
.hero__statement .word {
  display: inline-block;
  opacity: 0;
  transform: translateX(-8px);
}
.hero__statement.is-in .word {
  animation: wordIn .5s cubic-bezier(.2,.7,.3,1) forwards;
}
@keyframes wordIn { to { opacity: 1; transform: none; } }

/* ============================================================
   SECTION HEADINGS (oversized words)
   ============================================================ */
.bigword {
  font-family: var(--font-display);
  color: var(--crimson);
  text-align: center;
  letter-spacing: var(--display-ls, -.04em);
  line-height: .9;
  font-size: clamp(72px, 14vw, 224px);
  user-select: none;
  transform-origin: center center;
  will-change: transform, opacity;
}
/* scroll-driven cinematic words */
[data-scrollword] { will-change: transform, opacity; transform-origin: center center; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ============================================================
   WORK SECTION
   ============================================================ */
.work { padding: 0 0 60px; }
.work__stage {
  height: 150vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  pointer-events: none;
}
.work__stage .bigword {
  position: sticky;
  top: 34vh;
  margin: 0;
}
.work__cards {
  position: relative;
  z-index: 2;
  margin-top: -62vh;
}
@media (max-width: 1023px) {
  .work__stage { height: 90vh; }
  .work__stage .bigword { top: 30vh; }
  .work__cards { margin-top: -38vh; }
}

.project {
  position: relative;
  display: grid;
  grid-template-columns: 38% 62%;
  align-items: center;
  gap: 24px;
  max-width: 1080px;
  margin: 0 auto 110px;
  padding: 0 var(--pad);
}
/* ============================================================
   ENTRANCE REVEALS — pure CSS, JS only toggles .is-in.
   Independent of GSAP/ScrollTrigger so they can never desync
   or freeze. .is-in is added by the scroll-spy in portfolio.js.
   ============================================================ */
.project {
  opacity: 0;
  transition: opacity .6s ease;
}
.no-gsap .project, .project.is-in { opacity: 1; }

[data-scrollword], [data-workword] {
  opacity: 0;
  transform: perspective(900px) translateY(42px) rotateX(16deg) scale(.82);
  transform-origin: 50% 50%;
  transition: opacity .7s ease, transform .85s cubic-bezier(.2,.7,.3,1);
  will-change: transform, opacity;
}
[data-scrollword].is-in, [data-workword].is-in {
  opacity: 1;
  transform: perspective(900px) translateY(0) rotateX(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .project, [data-scrollword], [data-workword], .reveal {
    opacity: 1 !important; transform: none !important; transition: none !important;
  }
}
.project__media {
  position: relative;
  aspect-ratio: 1 / 1.08;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 28px 60px rgba(0,0,0,0.55);
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 13px;
}
/* fitted screenshot frame (no crop) */
.project__shot {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #0c0b0c;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}
.project__shot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.project__shot .slot-stripes { z-index: 0; }
/* diagonal stripe placeholder bg (global) */
.slot-stripes {
  position: absolute; inset: 0; z-index: 0;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.045) 0 14px, transparent 14px 28px);
}
.project__shot .slot-label {
  position: relative; z-index: 1;
  font-family: var(--font-mono);
  font-size: 11.5px; letter-spacing: .04em;
  color: rgba(255,255,255,0.6);
  background: rgba(0,0,0,0.3);
  padding: 7px 11px; border-radius: 7px;
}
/* CLI mock for code-only projects */
.project__cli {
  position: relative; z-index: 1;
  width: 100%; height: 100%;
  font-family: var(--font-mono);
  font-size: 11px; line-height: 1.9;
  padding: 18px 18px;
  color: #c9c9c4;
  display: flex; flex-direction: column; justify-content: center;
  gap: 4px;
  text-align: left;
}
.project__cli .c-prompt { color: var(--warm); }
.project__cli .c-dim { color: #7f7f7a; }
.cli-row { display: flex; align-items: center; gap: 10px; }
.cli-row .c-key { color: #8f8f8a; width: 38px; flex: 0 0 38px; }
.cli-track {
  flex: 1 1 auto; height: 8px; border-radius: 4px;
  background: rgba(255,255,255,0.07); overflow: hidden;
  display: block;
}
.cli-fill { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--crimson), var(--warm)); box-shadow: 0 0 8px rgba(232,184,108,0.35); }
.project__cli .c-amt { color: #8f8f8a; width: 30px; flex: 0 0 30px; text-align: right; }
/* caption under the shot, inside the box */
.project__cap {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px; line-height: 1.35;
  letter-spacing: .01em;
}
.project__cap::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; flex: 0 0 6px; opacity: .8;
}

.project__panel {
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 28px 60px rgba(0,0,0,0.4);
}
.project__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600;
  letter-spacing: .06em;
  padding: 5px 12px;
  border-radius: 999px;
  text-transform: uppercase;
}
.project__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.02;
  letter-spacing: -.01em;
  margin-bottom: 16px;
}
.project__desc { font-size: 15.5px; line-height: 1.6; margin-bottom: 24px; }
.project__divider { height: 1px; margin-bottom: 24px; }
.project__metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 26px; }
.metric {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
}
.metric__num {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.metric__label { font-size: 13px; line-height: 1.3; }
.project__footer { display: flex; justify-content: flex-end; }

.btn-red {
  display: inline-flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 22px;
  border-radius: 999px;
  background: var(--crimson);
  color: var(--text);
  font-weight: 600; font-size: 14.5px;
  box-shadow: 0 8px 22px rgba(197,34,58,0.32);
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn-red:hover { transform: translateY(-2px); background: #d6293f; box-shadow: 0 12px 28px rgba(197,34,58,0.42); }

.btn-warm {
  display: inline-flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--warm-light), var(--warm));
  color: #2a1a08; font-weight: 600; font-size: 14.5px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 8px 22px rgba(232,184,108,0.28);
  transition: transform .2s, box-shadow .2s;
}
.btn-warm:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 12px 28px rgba(232,184,108,0.4); }

.btn-dark {
  display: inline-flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 22px;
  border-radius: 999px;
  background: var(--bg-elevated-2);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text); font-weight: 600; font-size: 14.5px;
  transition: transform .2s, border-color .2s, background .2s;
}
.btn-dark:hover { transform: translateY(-2px); border-color: rgba(232,184,108,0.3); background: #26262a; }

/* card color variants */
.t-cream { background: var(--cream); color: #1a1a18; }
.t-cream .chip { background: rgba(0,0,0,0.10); color: #4a3f24; }
.t-cream .project__title { color: #141413; }
.t-cream .project__desc { color: rgba(20,20,18,0.78); }
.t-cream .project__divider { background: rgba(0,0,0,0.18); }
.t-cream .metric { background: var(--cream-light); }
.t-cream .metric__num { color: #141413; }
.t-cream .metric__label { color: rgba(20,20,18,0.7); }
.media-cream { background: #b7b08a; }
.media-cream .slot-label { background: rgba(0,0,0,0.22); color: #2a2718; }
.media-cream .project__cap { color: #2a2718; }

.t-crimson { background: var(--crimson-deep); color: var(--text); }
.t-crimson .chip { background: rgba(0,0,0,0.22); color: var(--warm-light); }
.t-crimson .project__title { color: var(--text); }
.t-crimson .project__desc { color: rgba(245,245,244,0.82); }
.t-crimson .project__divider { background: rgba(255,255,255,0.16); }
.t-crimson .metric { background: rgba(0,0,0,0.22); }
.t-crimson .metric__num { color: var(--warm-light); }
.t-crimson .metric__label { color: rgba(245,245,244,0.78); }
.media-crimson { background: #5e131c; }
.media-crimson .slot-label { background: rgba(0,0,0,0.35); color: var(--warm-light); }
.media-crimson .project__cap { color: var(--warm-light); }

/* rotation per card + cinematic entrance settle (CSS-only, reliable).
   The media/panel ease from an amplified rotation + vertical offset to
   their resting tilt when the parent .project gains .is-in (added by the
   scroll-spy). Independent of GSAP so it can never freeze. */
.project__media, .project__panel {
  transition: transform .9s cubic-bezier(.19,.84,.31,1), opacity .7s ease;
}
.project:nth-child(1) .project__media { transform: rotate(-2deg); }
.project:nth-child(1) .project__panel { transform: rotate(0.6deg); }
.project:nth-child(2) .project__media { transform: rotate(1.5deg); }
.project:nth-child(2) .project__panel { transform: rotate(-0.6deg); }
.project:nth-child(3) .project__media { transform: rotate(-1deg); }
.project:nth-child(3) .project__panel { transform: rotate(0.5deg); }

/* pre-reveal: amplified rotation + offset (media and panel lean apart) */
.project:not(.is-in) .project__media { opacity: 0; }
.project:not(.is-in) .project__panel { opacity: 0; }
.project:nth-child(1):not(.is-in) .project__media { transform: rotate(-8deg) translateY(60px); }
.project:nth-child(1):not(.is-in) .project__panel { transform: rotate(5deg) translateY(80px); }
.project:nth-child(2):not(.is-in) .project__media { transform: rotate(7deg) translateY(60px); }
.project:nth-child(2):not(.is-in) .project__panel { transform: rotate(-5deg) translateY(80px); }
.project:nth-child(3):not(.is-in) .project__media { transform: rotate(-7deg) translateY(60px); }
.project:nth-child(3):not(.is-in) .project__panel { transform: rotate(5deg) translateY(80px); }

/* view all card */
.viewall {
  position: relative;
  display: grid; place-items: center;
  padding: 60px 0 40px;
}
.viewall__bgword {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: clamp(90px, 16vw, 220px);
  color: rgba(197,34,58,0.22);
  letter-spacing: -.04em;
  user-select: none; pointer-events: none;
}
.viewall__card {
  position: relative;
  z-index: 1;
  background: linear-gradient(160deg, var(--cream-light), var(--cream));
  border-radius: 26px;
  padding: 46px 56px;
  text-align: center;
  transform: rotate(-3deg);
  box-shadow: 0 30px 70px rgba(0,0,0,0.5);
}
.viewall__card h3 {
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 62px);
  line-height: .92;
  color: #141413;
  letter-spacing: -.02em;
  margin-bottom: 26px;
}

/* ============================================================
   WHAT I ACTUALLY BUILD
   ============================================================ */
.build {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 90px 0;
}
.build__left { min-width: 0; }
.section-label {
  font-family: var(--font-display);
  color: var(--crimson);
  letter-spacing: -.02em;
  line-height: .95;
  font-size: clamp(40px, 5.2vw, 80px);
  margin-bottom: 18px;
}
.build__sub { color: var(--text-muted); font-size: 16px; max-width: 440px; margin-bottom: 28px; }
.accordion { border-top: 1px solid rgba(255,255,255,0.08); }
.acc {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.acc__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  cursor: pointer;
  user-select: none;
}
.acc__title {
  font-size: 19px; font-weight: 600;
  transition: color .3s ease;
}
.acc__chev {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  color: var(--text-muted);
  transition: transform .3s ease, color .3s ease;
}
.acc.is-open .acc__title { color: var(--warm); }
.acc.is-open .acc__chev { transform: rotate(180deg); color: var(--warm); }
.acc__body {
  max-height: 0; overflow: hidden;
  transition: max-height .35s ease-out, opacity .3s ease;
  opacity: 0;
}
.acc.is-open .acc__body { opacity: 1; }
.acc__body p { color: var(--text-muted); font-size: 15px; padding-bottom: 22px; max-width: 460px; }

.build__media {
  aspect-ratio: 1 / 1.08;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--warm), var(--crimson));
  transform: rotate(-3deg);
  display: grid; place-items: center;
  padding: 30px; text-align: center;
  box-shadow: 0 30px 70px rgba(0,0,0,0.5);
}
.build__media .slot-label {
  font-family: var(--font-mono);
  font-size: 13px; color: #2a1a08;
  background: rgba(255,255,255,0.28);
  padding: 9px 14px; border-radius: 9px;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 64px;
  align-items: center;
  padding: 90px 0;
}
.about__body { color: var(--text-muted); font-size: 17px; line-height: 1.65; max-width: 480px; margin-bottom: 36px; }
.about__body strong { color: var(--text); font-weight: 600; }
.about__stats { display: flex; flex-wrap: wrap; gap: 36px; margin-bottom: 36px; }
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1; color: var(--warm);
  letter-spacing: -.02em;
}
.stat__label {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 8px; max-width: 150px;
}
.about__media {
  position: relative;
  aspect-ratio: 3 / 3.7;
  border-radius: 24px;
  overflow: hidden;
  transform: rotate(3deg);
  box-shadow: 0 30px 70px rgba(0,0,0,0.55);
  background: #1a1414;
  display: grid; place-items: center;
}
.about__media .tint {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(232,184,108,0.55), rgba(197,34,58,0.55));
  mix-blend-mode: multiply;
}
.about__media .slot-stripes { opacity: .6; }
.about__media.has-img { background: #0d0b0b; }
.about__img {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 20%;
}
.about__media.has-img::after {
  content: ""; position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(180deg, transparent 55%, rgba(10,10,11,0.45));
  pointer-events: none;
}
.about__media .slot-label {
  position: relative; z-index: 2;
  font-family: var(--font-mono);
  font-size: 13px; color: #fff;
  background: rgba(0,0,0,0.35);
  padding: 9px 14px; border-radius: 9px;
}

/* ============================================================
   EXPERIENCE
   ============================================================ */
.exp { padding: 40px 0 80px; }
.exp__label {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.4vw, 44px);
  letter-spacing: -.02em;
  margin-bottom: 28px;
}
.exp__card {
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  padding: 32px;
}
.exp__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.exp__role { font-size: 19px; }
.exp__role strong { font-weight: 700; }
.exp__role .co { color: var(--text-muted); }
.exp__date {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--bg-elevated-2);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-muted);
  white-space: nowrap;
}
.exp__desc { color: var(--text-muted); font-size: 15.5px; line-height: 1.6; margin-bottom: 22px; max-width: 820px; }
.exp__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-family: var(--font-mono);
  font-size: 12px; padding: 6px 12px; border-radius: 8px;
  background: var(--bg-elevated-2);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text);
}

/* ============================================================
   ACHIEVEMENTS MARQUEE
   ============================================================ */
.ach { padding: 30px 0 90px; overflow: hidden; }
.ach__mask {
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee { display: flex; width: max-content; gap: 20px; animation: scroll 40s linear infinite; }
.ach__mask:hover .marquee { animation-play-state: paused; }
@keyframes scroll { to { transform: translateX(-50%); } }
.ach__card {
  width: 360px; flex: 0 0 360px;
  background: var(--bg-elevated);
  border: 1px solid rgba(232,184,108,0.30);
  border-radius: 18px;
  padding: 24px 26px;
}
.ach__icon { font-size: 22px; margin-bottom: 14px; }
.ach__head { font-family: var(--font-display); font-size: 22px; letter-spacing: -.01em; margin-bottom: 8px; }
.ach__sub { color: var(--text-muted); font-size: 14px; line-height: 1.45; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  position: relative;
  padding: 120px 0 110px;
  display: grid; place-items: center;
  overflow: hidden;
}
.contact::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(ellipse 70% 80% at 50% 50%, rgba(58,14,19,0.85), transparent 72%);
}
.contact__bgword {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: clamp(90px, 17vw, 280px);
  color: rgba(197,34,58,0.12);
  letter-spacing: -.04em;
  white-space: nowrap; user-select: none; pointer-events: none;
  z-index: 0;
}
.contact__card {
  position: relative; z-index: 2;
  width: min(640px, 100%);
}
.contact__term {
  background: #0F0F11;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.contact__term .terminal__body { font-size: 14px; line-height: 2.1; min-height: 0; }
.contact__buttons { display: flex; gap: 12px; margin-top: 22px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 28px 0;
}
.footer__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
}
.footer__mono {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--crimson);
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 18px;
}
.footer__txt { color: var(--text-muted); font-size: 13.5px; }
.footer__src { color: var(--text-muted); font-size: 13.5px; transition: color .2s; }
.footer__src:hover { color: var(--warm); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1023px) {
  .project { grid-template-columns: 1fr; gap: 18px; }
  .project__media { aspect-ratio: 16/10; transform: none !important; }
  .project__panel { transform: none !important; }
  .build, .about { grid-template-columns: 1fr; gap: 40px; }
  .build__media { max-width: 420px; aspect-ratio: 16/11; }
  .about__media { max-width: 380px; aspect-ratio: 4/4.4; }
}

@media (max-width: 640px) {
  :root { --pad: 20px; }
  .nav { height: 58px; gap: 10px; }
  .nav__sep, .nav__status, .nav__links { display: none; }
  .nav__burger {
    display: grid; place-items: center;
    margin-left: auto;
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--bg-elevated-2);
    color: var(--text);
  }
  .nav__cta { height: 40px; padding: 0 14px; font-size: 13px; }
  .project__panel { padding: 28px 22px; }
  .project__metrics { grid-template-columns: 1fr; }
  .viewall__card { padding: 34px 28px; transform: rotate(-2deg); }
  .contact__buttons { gap: 10px; }
}

/* ============================================================
   PROJECT MODAL
   ============================================================ */
.modal {
  position: fixed; inset: 0; z-index: 1000;
  display: none;
}
.modal.is-open { display: block; }
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(5,5,6,0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn .25s ease;
}
.modal__panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(720px, 100%);
  background: var(--bg-elevated);
  border-left: 1px solid rgba(255,255,255,0.08);
  box-shadow: -30px 0 80px rgba(0,0,0,0.6);
  overflow-y: auto;
  animation: slideIn .35s cubic-bezier(.2,.7,.3,1);
}
@keyframes fadeIn { from { opacity: 0; } }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } }
.modal__close {
  position: sticky; top: 18px; left: 100%;
  margin: 18px 18px -40px auto;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-elevated-2);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text); font-size: 16px; cursor: pointer;
  display: grid; place-items: center;
  z-index: 3;
  transition: background .2s, transform .2s;
}
.modal__close:hover { background: var(--crimson); transform: rotate(90deg); }
.modal__content { padding: 56px clamp(28px, 5vw, 56px) 64px; }

.md__eyebrow {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--warm); margin-bottom: 12px;
}
.md__title {
  font-family: var(--font-display);
  font-size: clamp(38px, 6vw, 64px);
  line-height: .92; letter-spacing: -.02em;
  margin-bottom: 10px;
}
.md__tagline { color: var(--text-muted); font-size: 16px; margin-bottom: 22px; max-width: 540px; }
.md__links { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
.md__hero {
  position: relative;
  height: 200px; border-radius: 18px; overflow: hidden;
  display: grid; place-items: center; margin-bottom: 40px;
}
.md__hero .slot-label {
  position: relative; z-index: 1;
  font-family: var(--font-mono); font-size: 12.5px;
  color: rgba(255,255,255,0.7); background: rgba(0,0,0,0.3);
  padding: 8px 12px; border-radius: 8px;
}
.md__hero.has-img { height: 240px; background: #0c0b0c; padding: 14px; }
.md__hero-img { position: relative; inset: auto; width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.md h4 {
  font-family: var(--font-display);
  font-size: 22px; letter-spacing: -.01em;
  margin: 34px 0 14px; color: var(--text);
}
.md p { color: rgba(245,245,244,0.78); font-size: 15.5px; line-height: 1.7; margin-bottom: 14px; }
.md strong { color: var(--text); font-weight: 600; }
.md ul { list-style: none; display: flex; flex-direction: column; gap: 12px; margin: 6px 0 14px; }
.md li {
  position: relative; padding-left: 22px;
  color: rgba(245,245,244,0.78); font-size: 15px; line-height: 1.6;
}
.md li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 7px; height: 7px; border-radius: 2px;
  background: var(--crimson); transform: rotate(45deg);
}
.md li b { color: var(--text); font-weight: 600; }
.md__stack { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 8px; }
.md__ascii {
  font-family: var(--font-mono);
  font-size: 11px; line-height: 1.45;
  background: var(--bg); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px; padding: 18px;
  overflow-x: auto; white-space: pre;
  color: var(--text-muted);
  margin: 8px 0 14px;
}
.md__metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 12px; margin: 14px 0; }
.md__metric { background: var(--bg-elevated-2); border-radius: 14px; padding: 18px; }
.md__metric .n { font-family: var(--font-display); font-size: 28px; color: var(--warm); letter-spacing: -.02em; }
.md__metric .l { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.md__divider { height: 1px; background: rgba(255,255,255,0.08); margin: 34px 0; }

@media (prefers-reduced-motion: reduce) {
  .hero__statement .word { animation: none !important; opacity: 1 !important; transform: none !important; }
  .marquee { animation: none; }
  .caret, .nav__dot, .nav__dot::after { animation: none; }
  .nav__dot::after { opacity: 0; }
  .reveal { transition: none; opacity: 1; transform: none; }
}
