/* =========================================================
   Sriraj Rajkumar — Portfolio 2026
   Reproduced from Figma "Portfolio - 2026" (dark).
   ========================================================= */

:root {
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --rounded: "Bricolage Grotesque", "Helvetica Neue", sans-serif;
  --accent: #ff8d28;
  --container: 1200px;

  --bg: #020103;
  --bg-elev: #151515;
  --card: #171717;
  --card-border: rgba(255, 255, 255, 0.07);
  --text: #e6e6e6;
  --text-dim: #a3a3a3;
  --text-faint: #6b6b6b;
  --eyebrow: #7c7c7c;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

img { display: block; max-width: 100%; height: auto; }

/* ===================== NAV ===================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(24px, 5vw, 64px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
}
.brand {
  font-family: var(--rounded);
  font-size: 15px;
  letter-spacing: 0.22em;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.nav-links { display: flex; align-items: center; gap: clamp(20px, 3vw, 40px); }
.nav-links a {
  font-family: var(--rounded);
  font-weight: 400;
  font-size: 12.5px;
  letter-spacing: 0.16em;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* ===================== HERO + INTRO (one continuous section) ===================== */
.hero-intro-wrap {
  position: relative;
  background: #020103;
  overflow: hidden;
}
.hero-intro-wrap::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1700px;
  background:
    radial-gradient(circle at 50% 480px, rgba(136, 48, 224, 0.45) 0%, rgba(136, 48, 224, 0.22) 200px, rgba(90, 30, 150, 0.10) 460px, transparent 820px),
    radial-gradient(circle at 42% 430px, rgba(180, 90, 255, 0.14) 0%, transparent 380px),
    radial-gradient(circle at 58% 540px, rgba(90, 20, 160, 0.12) 0%, transparent 400px);
  pointer-events: none;
  z-index: 0;
}
.hero {
  position: relative;
  height: min(95vh, 1300px);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.hero-rects {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.hero-rect {
  position: absolute;
  display: block;
  border-radius: 6px;
  transform: translate3d(0, 0, 0);
  transition: transform 0.2s ease-out;
}
.hero-rect-lg { width: 29px; height: 29px; }
.hero-rect-sm { width: 13px; height: 13px; }
.hero-rect-purple { background: #8830E0; }
.hero-rect-gray   { background: #B1B1B1; }
.hero-rect-orange { background: #FF8D28; }
.hero-spline, .hero-fallback {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
/* Animated glass-cube-ish fallback until the Spline scene is wired in */
.hero-fallback {
  background:
    radial-gradient(2px 2px at 20% 30%, rgba(90,150,220,0.7), transparent 60%),
    radial-gradient(3px 3px at 65% 45%, rgba(70,130,210,0.6), transparent 60%),
    radial-gradient(2px 2px at 80% 25%, rgba(120,170,230,0.6), transparent 60%),
    radial-gradient(2px 2px at 40% 60%, rgba(80,140,215,0.55), transparent 60%),
    radial-gradient(3px 3px at 30% 75%, rgba(100,160,225,0.5), transparent 60%);
  filter: blur(0.3px);
  animation: drift 14s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-2%, -2%, 0) scale(1.06); }
}
.hero-title {
  position: relative;
  z-index: 2;
  font-family: "Doto", var(--sans);
  font-weight: 600;
  font-size: clamp(40px, 11vw, 150px);
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  mix-blend-mode: overlay;
  user-select: none;
}
.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;
}
.hero-particle-text {
  position: relative;
  z-index: 2;
  width: min(95vw, 1800px);
  height: clamp(440px, 64vw, 840px);
}
.hero-particle-text canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ===================== INTRO ===================== */
.intro {
  position: relative;
  z-index: 1;
  padding: clamp(40px, 8vw, 90px) 24px clamp(90px, 12vw, 150px);
  text-align: center;
  text-wrap: balance;
}
.intro-card {
  max-width: 830px;
  margin: 0 auto;
  padding: clamp(50px, 7vw, 76px) clamp(28px, 5vw, 60px);
  background: rgba(30, 14, 45, 0.35);
  border: 1px solid rgba(180, 120, 255, 0.16);
  border-radius: 32px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.intro-lead {
  font-family: var(--rounded);
  font-weight: 300;
  font-style: normal;
  font-size: 24px;
  color: #e6e6e6;
  margin-bottom: 2.6em;
  line-height: 32px;
}
.intro-line {
  font-family: var(--rounded);
  font-weight: 300;
  font-style: normal;
  font-size: 24px;
  color: #e6e6e6;
  margin-bottom: 2.4em;
  line-height: 32px;
}
.intro-sign {
  font-family: var(--rounded);
  font-weight: 700;
  font-style: normal;
  font-size: 25px;
  letter-spacing: 0.25px;
  color: var(--text);
  margin-top: 1em;
}

/* ===================== PROJECTS ===================== */
.project {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(48px, 7vw, 90px) clamp(24px, 5vw, 40px);
}
.project-year {
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--eyebrow);
  margin-bottom: 18px;
}
.project-title {
  font-family: var(--rounded);
  color: #CEA6FF;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 26px;
}
.project-body {
  max-width: 620px;
  font-size: clamp(17px, 1.6vw, 21px);
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 44px;
}

/* Stat cards */
.mini-cards {
  position: relative;
  padding: 40px;
  border-radius: 40px;
  overflow: hidden;
  margin-bottom: 56px;
}
.mini-cards::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('assets/section-bg-gradient.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  z-index: 0;
}
.mini-cards .stats {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 56px;
}
.stat {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 36px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 28px 28px 24px;
  min-height: 190px;
  display: flex;
  flex-direction: column;
}
.stat-num {
  font-family: var(--rounded);
  font-weight: 700;
  font-size: clamp(30px, 3.4vw, 40px);
  color: #CEA6FF;
  line-height: 1.05;
  margin-bottom: 12px;
}
.stat-label {
  font-family: var(--rounded);
  font-weight: 400;
  font-size: 20px;
  color: #ffffff;
  line-height: 1.25;
}
.stat-cap {
  margin-top: auto;
  padding-top: 22px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.4;
}

/* Gallery */
.gallery {
  border-radius: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.gallery img {
  width: 100%;
  min-width: 720px;
  border-radius: 14px;
}

/* ===================== FIGMA-STYLE HORIZONTAL CAROUSEL (project galleries) ===================== */
.fig-carousel-head {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
}
.fc-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}
.fc-arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.2s, opacity 0.2s, transform 0.15s;
}
.fc-arrow:hover:not(:disabled) { border-color: var(--accent); }
.fc-arrow:active:not(:disabled) { transform: scale(0.92); }
.fc-arrow:disabled { opacity: 0.3; cursor: not-allowed; }

.fc-divider {
  display: flex;
  align-items: center;
  gap: 4px;
}
.fc-divider span {
  width: 16px;
  height: 3px;
  border-radius: 2px;
  background: var(--card-border);
  transition: background 0.25s ease;
}
.fc-divider span.filled {
  background: #ffffff;
}

.fig-carousel-track {
  display: flex;
  align-items: stretch;
  gap: 40px;
  height: clamp(320px, 38vw, 560px);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.fig-carousel-track::-webkit-scrollbar { display: none; }

.fc-slide {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--card-border);
  scroll-snap-align: start;
}
.fc-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.fc-slide.fc-big {
  flex: 0 0 clamp(320px, 66%, 947px);
  border-radius: 46px;
}
.fc-slide.fc-tall {
  flex: 0 0 clamp(180px, 30%, 417px);
  border-radius: 46px;
}
.fc-pair {
  flex: 0 0 clamp(150px, 26%, 368px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  scroll-snap-align: start;
}
.fc-pair .fc-slide.fc-small { flex: 1 1 0; min-height: 0; }

.fc-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  margin: 0;
  padding: 34px 24px 18px;
  font-size: 14px;
  color: #fff;
  line-height: 1.4;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.72));
}
.fc-caption strong { font-weight: 700; }

@media (max-width: 900px) {
  .fig-carousel-track { height: clamp(260px, 60vw, 420px); gap: 16px; }
  .fc-slide.fc-big { flex-basis: 82%; border-radius: 28px; }
  .fc-slide.fc-tall { flex-basis: 50%; border-radius: 28px; }
  .fc-pair { flex-basis: 40%; }
}

/* ---- Captioned mockup carousel (Project 3): image sized to its own aspect
   ratio so nothing is cropped, caption sits below instead of overlaid. ---- */
.fc-track-captioned {
  height: auto;
  align-items: flex-start;
}
.fc-item {
  --h: 450px;
  flex: 0 0 auto;
  width: calc(var(--ar) * var(--h));
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 24px;
  scroll-snap-align: start;
}
.fc-item-media {
  height: var(--h);
  width: 100%;
  overflow: hidden;
}
.fc-item-media img {
  height: 100%;
  width: 100%;
  display: block;
  border-radius: 28px;
  object-fit: contain;
}
.fc-item.p3-home     { --ar: 0.4644; }
.fc-item.p3-ar       { --ar: 1.7244; }
.fc-item.p3-ue5      { --ar: 1.7244; }
.fc-item.p3-timeline { --ar: 1.7244; }

.fc-item-caption {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-dim);
  width: 100%;
}
.fc-item-caption strong { font-weight: 700; color: var(--text); }

@media (max-width: 900px) {
  .fc-item { --h: clamp(200px, 55vw, 340px); }
}

/* ===================== SHARED SECTION BITS ===================== */
.eyebrow {
  display: block;
  font-size: 12px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--eyebrow);
  margin-bottom: 18px;
}
.section-heading {
  font-size: clamp(30px, 4.5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 48px;
}
.section-heading.accent, .references .section-heading { color: #CEA6FF; }

/* ===================== REFERENCES ===================== */
.references {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(60px, 9vw, 110px) clamp(24px, 5vw, 40px);
}
.ref-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.ref-card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 40px 34px 34px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}
.ref-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #010002 0%, #361764 100%);
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.ref-card:hover {
  border-color: rgba(180, 120, 255, 0.32);
  box-shadow: 0 10px 37px 10px rgba(78, 0, 191, 0.41);
}
.ref-card:hover::before {
  opacity: 1;
}
.ref-quote, .ref-by {
  position: relative;
  z-index: 1;
}
.ref-quote {
  font-family: var(--rounded);
  font-weight: 400;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 42px;
}
.ref-by {
  font-style: normal;
  font-size: 14px;
  color: var(--text-faint);
  line-height: 1.5;
  margin-top: auto;
}

/* ===================== INTERESTS ===================== */
.interests {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 70px) clamp(24px, 5vw, 40px) clamp(80px, 10vw, 130px);
}
.interests::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 1284px);
  height: 380px;
  background-image: url('assets/section-bg-gradient.svg');
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: 100% 100%;
  pointer-events: none;
  z-index: 0;
}
.interests-copy, .interest-grid {
  position: relative;
  z-index: 1;
}
.interests-copy { max-width: 1040px; margin-bottom: 60px; }
.interests-copy p {
  font-size: clamp(19px, 2.1vw, 27px);
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 1.2em;
}
.interest-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.interest-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 266 / 399;
}
.interest-card img { width: 100%; height: 100%; object-fit: cover; }
.interest-card figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 40px 18px 16px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.72));
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.interest-card figcaption strong { font-size: 15px; font-weight: 700; }
.interest-card figcaption span { font-size: 13px; color: rgba(255,255,255,0.75); }

/* ===================== FOOTER ===================== */
.footer {
  background: #020103;
  color: #777;
  text-align: center;
  padding: clamp(90px, 14vw, 150px) 24px 60px;
}
.footer-eyebrow {
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 1.95px;
  color: #777;
  text-transform: uppercase;
  margin-bottom: 26px;
}
.footer-email {
  background: none; border: none; cursor: pointer;
  font-family: var(--rounded);
  font-size: clamp(24px, 4.4vw, 42px);
  font-weight: 500;
  letter-spacing: -0.48px;
  color: #CEA6FF;
  transition: color 0.2s;
}
.footer-email:hover { color: var(--accent); }
.footer-copy-hint {
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 1.95px;
  color: #777;
  text-transform: uppercase;
  margin-top: 24px;
}
.footer-resume {
  display: block;
  font-family: var(--rounded);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.48px;
  color: #CEA6FF;
  text-decoration: none;
  margin-top: clamp(60px, 9vw, 90px);
  transition: color 0.2s;
}
.footer-resume:hover { color: var(--accent); }
.footer-socials {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 26px;
  margin-top: clamp(90px, 13vw, 150px);
}
.footer-socials a {
  font-family: "Inter", var(--sans);
  font-size: 11.5px;
  letter-spacing: 1.2px;
  color: #777;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-socials a:hover { color: #fff; }
.footer-note {
  display: block;
  margin-top: 22px;
  font-family: "Inter", var(--sans);
  font-size: 12px;
  letter-spacing: 0.6px;
  color: #777;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  .stats { grid-template-columns: 1fr; }
  .ref-grid { grid-template-columns: 1fr; }
  .interest-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (max-width: 640px) {
  .nav { padding: 16px 18px; }
  .brand { font-size: 12px; letter-spacing: 0.14em; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 10.5px; letter-spacing: 0.1em; }
}
@media (max-width: 520px) {
  .interest-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery img { min-width: 560px; }
}
@media (max-width: 380px) {
  /* Very small screens only: drop the anchor links, keep just the brand */
  .nav-links a { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-fallback { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---- Placeholder image containers (Project 2: images not added yet) ---- */
.fc-item-media.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--card-border);
  background: var(--card);
  border-radius: 28px;
}
.placeholder-label {
  font-size: 13px;
  color: var(--text-faint);
  text-align: center;
  padding: 0 16px;
}
.placeholder-play {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  border: 1px solid var(--card-border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}
.fc-item-media.placeholder { position: relative; }
