/* ============================================================
   SAKET KUMAR — 3D MOTION PORTFOLIO
   Palette: sunset coral / warm sand / deep plum (ref: Lempens)
   ============================================================ */

:root {
  --coral: #ff6b4a;
  --coral-soft: #ff9a76;
  --sand: #ffd9a0;
  --plum: #2b1b3d;
  --plum-deep: #1a0f2e;
  --cream: #fff4e6;
  --ink: #241430;
  --glass: rgba(26, 15, 46, 0.55);
  --glass-border: rgba(255, 217, 160, 0.22);
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

html { scroll-behavior: auto; }

body {
  font-family: var(--font-body);
  background: linear-gradient(180deg, #3b1f5e 0%, #7a2d5e 30%, #d94f5c 62%, #ff8c5a 82%, #ffb36b 100%);
  color: var(--cream);
  overflow-x: hidden;
}

::selection { background: var(--coral); color: #fff; }

/* ---------- 3D canvas ---------- */
#scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  display: block;
}

#vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(20, 8, 35, 0.42) 100%);
}

/* ---------- progress bar ---------- */
#progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--coral), var(--sand));
  z-index: 60;
  box-shadow: 0 0 12px rgba(255, 107, 74, 0.8);
}

/* ---------- nav ---------- */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 42px;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
#nav.visible { opacity: 1; transform: translateY(0); }

.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--cream);
  text-decoration: none;
  letter-spacing: 1px;
}
.nav-logo span { color: var(--coral); }

.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: rgba(255, 244, 230, 0.85);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: color 0.25s;
  cursor: pointer;
}
.nav-links a:hover { color: var(--coral-soft); }

.nav-cta {
  background: var(--coral);
  color: #fff;
  padding: 9px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 1px;
  box-shadow: 0 4px 18px rgba(255, 107, 74, 0.45);
  transition: transform 0.25s, box-shadow 0.25s;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 26px rgba(255, 107, 74, 0.6); }

/* ---------- scroll hint ---------- */
#scroll-hint {
  position: fixed;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  text-align: center;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}
#scroll-hint.visible { opacity: 1; }
#scroll-hint span {
  font-size: 0.7rem;
  letter-spacing: 4px;
  color: rgba(255, 244, 230, 0.8);
}
.chevrons { margin-top: 8px; }
.chevrons i {
  display: block;
  width: 12px; height: 12px;
  margin: -4px auto 0;
  border-right: 2px solid var(--sand);
  border-bottom: 2px solid var(--sand);
  transform: rotate(45deg);
  animation: chev 1.8s infinite;
  opacity: 0;
}
.chevrons i:nth-child(2) { animation-delay: 0.2s; }
.chevrons i:nth-child(3) { animation-delay: 0.4s; }
@keyframes chev {
  0% { opacity: 0; transform: rotate(45deg) translate(-6px, -6px); }
  40% { opacity: 1; }
  80%, 100% { opacity: 0; transform: rotate(45deg) translate(6px, 6px); }
}

/* ---------- overlay panels ---------- */
#overlay { position: relative; z-index: 10; pointer-events: none; }

.panel {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 7vw;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s;
}
.panel.active { opacity: 1; visibility: visible; }
.panel.active .card, .panel.active .hero-title, .panel.active .kicker { pointer-events: auto; }

.panel.hero { flex-direction: column; justify-content: center; text-align: center; overflow-y: auto; }
.panel.side-right { justify-content: flex-end; }
.panel.side-left { justify-content: flex-start; }
.panel.center { justify-content: center; text-align: center; }

/* ---------- hero ---------- */
.hero-photo {
  width: 118px; height: 118px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--coral);
  box-shadow: 0 0 0 7px rgba(255, 107, 74, 0.2), 0 0 44px rgba(255, 107, 74, 0.55), 0 12px 34px rgba(0,0,0,0.45);
  margin-bottom: 20px;
  animation: photoGlow 3.2s ease-in-out infinite;
}
@keyframes photoGlow {
  0%, 100% { box-shadow: 0 0 0 7px rgba(255, 107, 74, 0.2), 0 0 34px rgba(255, 107, 74, 0.45), 0 12px 34px rgba(0,0,0,0.45); }
  50% { box-shadow: 0 0 0 7px rgba(255, 217, 160, 0.28), 0 0 60px rgba(255, 179, 107, 0.7), 0 12px 34px rgba(0,0,0,0.45); }
}
.kicker {
  font-size: 0.78rem;
  letter-spacing: 6px;
  color: var(--sand);
  margin-bottom: 18px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 11vw, 9rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 2px;
  text-shadow: 0 8px 40px rgba(30, 10, 50, 0.55);
}
.grad {
  background: linear-gradient(92deg, var(--sand), var(--coral));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  margin-top: 22px;
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: rgba(255, 244, 230, 0.92);
  text-shadow: 0 2px 14px rgba(0,0,0,0.45);
}
.hero-quote {
  margin-top: 12px;
  font-style: italic;
  color: rgba(255, 217, 160, 0.85);
  font-size: 0.95rem;
}
.hero-chips { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero-chips span {
  background: rgba(26, 15, 46, 0.5);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
}
.hero-stats {
  margin-top: 28px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-stats .stat {
  background: rgba(26, 15, 46, 0.55);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 12px 22px;
  min-width: 118px;
  text-align: center;
  transition: transform 0.25s, border-color 0.25s;
}
.hero-stats .stat:hover { transform: translateY(-4px); border-color: var(--coral); }
.hero-stats .stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  background: linear-gradient(92deg, var(--sand), var(--coral));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-stats .stat span { font-size: 0.72rem; letter-spacing: 1px; color: rgba(255, 244, 230, 0.75); }
.hero-actions { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ---------- hero speech bubble (talking-intro, video-style) ---------- */
.speech-bubble {
  position: relative;
  margin-top: 22px;
  max-width: 620px;
  min-height: 52px;
  background: rgba(26, 15, 46, 0.62);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 18px;
  padding: 14px 22px;
  font-size: clamp(0.88rem, 1.6vw, 1.02rem);
  line-height: 1.5;
  color: rgba(255, 244, 230, 0.95);
  text-align: left;
  box-shadow: 0 14px 40px rgba(15, 5, 30, 0.4);
  animation: bubbleFloat 4s ease-in-out infinite;
}
@keyframes bubbleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.bubble-tail {
  position: absolute;
  top: -9px;
  left: 50%;
  width: 16px; height: 16px;
  background: rgba(26, 15, 46, 0.62);
  border-left: 1px solid var(--glass-border);
  border-top: 1px solid var(--glass-border);
  transform: translateX(-50%) rotate(45deg);
}
.bubble-caret {
  display: inline-block;
  width: 2px; height: 1.05em;
  margin-left: 3px;
  vertical-align: text-bottom;
  background: var(--sand);
  animation: caretBlink 0.9s steps(1) infinite;
}
@keyframes caretBlink { 50% { opacity: 0; } }

/* ---------- contact icon buttons ---------- */
.btn.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.btn.icon-btn img {
  width: 20px; height: 20px;
  flex: 0 0 auto;
  filter: brightness(0) invert(1);
  opacity: 0.92;
  transition: transform 0.25s;
}
.btn.icon-btn:hover img { transform: scale(1.18) rotate(-6deg); }
.btn.icon-btn.primary img { filter: none; }

/* ---------- cards ---------- */
.card {
  pointer-events: auto;
  max-width: 560px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  padding: 34px 38px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(15, 5, 30, 0.45);
  max-height: 82vh;
  overflow-y: auto;
}
.card::-webkit-scrollbar { width: 6px; }
.card::-webkit-scrollbar-thumb { background: rgba(255,154,118,0.4); border-radius: 3px; }

.label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 4px;
  color: var(--coral-soft);
  margin-bottom: 10px;
}
.card h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  margin-bottom: 18px;
  line-height: 1.1;
}
.card p { line-height: 1.65; color: rgba(255, 244, 230, 0.88); font-size: 0.95rem; }
.card p + p { margin-top: 12px; }

/* about */
.about-photo-wrap { display: flex; justify-content: center; margin: 6px 0 18px; }
.about-photo {
  width: 132px; height: 132px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--coral);
  box-shadow: 0 0 0 6px rgba(255, 107, 74, 0.18), 0 10px 30px rgba(0,0,0,0.4);
}
.facts { list-style: none; margin-top: 18px; }
.facts li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(255, 217, 160, 0.18);
  font-size: 0.88rem;
}
.facts li b { color: var(--sand); font-weight: 600; white-space: nowrap; }
.facts li span { text-align: right; color: rgba(255,244,230,0.85); }

/* skills */
.skill-group { margin-top: 16px; }
.skill-group h3 { font-size: 0.95rem; margin-bottom: 9px; color: var(--sand); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span {
  background: rgba(255, 107, 74, 0.14);
  border: 1px solid rgba(255, 107, 74, 0.35);
  color: var(--cream);
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 0.78rem;
  transition: background 0.25s, transform 0.25s;
}
.chips span:hover { background: rgba(255, 107, 74, 0.35); transform: translateY(-2px); }

/* projects */
.proj-card { position: relative; max-width: 520px; }
.cat-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.cat-badge.llm    { background: rgba(123, 215, 255, 0.14); border: 1px solid rgba(123, 215, 255, 0.5); color: #7bd7ff; }
.cat-badge.cv     { background: rgba(157, 255, 176, 0.12); border: 1px solid rgba(157, 255, 176, 0.5); color: #9dffb0; }
.cat-badge.speech { background: rgba(201, 139, 255, 0.14); border: 1px solid rgba(201, 139, 255, 0.5); color: #c98bff; }
.cat-badge.full   { background: rgba(255, 217, 160, 0.14); border: 1px solid rgba(255, 217, 160, 0.5); color: var(--sand); }

/* category headers */
.cat-panel { pointer-events: none; }
.cat-head { text-align: center; max-width: 640px; }
.cat-icon { font-size: 3rem; display: block; margin-bottom: 10px; filter: drop-shadow(0 6px 18px rgba(0,0,0,0.4)); }
.cat-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 0 6px 30px rgba(25, 8, 45, 0.6);
}
.cat-tag { margin-top: 12px; color: rgba(255, 244, 230, 0.85); font-size: 1rem; text-shadow: 0 2px 12px rgba(0,0,0,0.45); }
.cat-count {
  display: inline-block;
  margin-top: 16px;
  background: rgba(26, 15, 46, 0.55);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
  padding: 6px 18px;
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 2px;
  color: var(--sand);
}

/* mini project grid */
.grid-card { max-width: 860px; }
.proj-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
  text-align: left;
}
.mini-card {
  background: rgba(255, 244, 230, 0.05);
  border: 1px solid rgba(255, 217, 160, 0.16);
  border-radius: 16px;
  padding: 18px 20px;
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
}
.mini-card:hover { transform: translateY(-4px); border-color: var(--coral); background: rgba(255, 107, 74, 0.08); }
.mini-card h4 { font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 8px; color: var(--cream); }
.mini-card p { font-size: 0.82rem; line-height: 1.55; color: rgba(255, 244, 230, 0.8); }
.mini-card .chips { margin: 10px 0 12px; }
.mini-card .chips span { font-size: 0.68rem; padding: 3px 10px; }
.mini-card .proj-link { font-size: 0.8rem; margin-right: 14px; }
@media (max-width: 700px) { .proj-grid { grid-template-columns: 1fr; } }
.proj-num {
  position: absolute;
  top: 18px; right: 26px;
  font-family: var(--font-display);
  font-size: 3.2rem;
  font-weight: 700;
  color: rgba(255, 154, 118, 0.16);
  line-height: 1;
}
.proj-card h3 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  margin-bottom: 10px;
}
.proj-card .chips { margin: 14px 0 16px; }
.proj-links { display: flex; gap: 18px; flex-wrap: wrap; }
.proj-link {
  display: inline-block;
  color: var(--coral-soft);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, color 0.25s;
}
.proj-link:hover { color: var(--sand); border-color: var(--sand); }

/* education */
.edu { text-align: left; }
.edu-time {
  display: inline-block;
  background: rgba(255, 107, 74, 0.18);
  border: 1px solid rgba(255, 107, 74, 0.4);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  margin-bottom: 14px;
  color: var(--sand);
}
.edu h3 { font-family: var(--font-display); font-size: 1.35rem; margin-bottom: 8px; }
.edu-place { color: var(--sand); font-weight: 600; margin-bottom: 12px; }
.edu-rows { margin-top: 18px; }
.edu-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(255, 217, 160, 0.18);
  font-size: 0.86rem;
}
.edu-row span { color: rgba(255, 244, 230, 0.85); text-align: left; }
.edu-row b { color: var(--sand); white-space: nowrap; }

/* contact */
.contact-card { max-width: 640px; }
.contact-btns { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 24px; }
.btn {
  padding: 12px 24px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--cream);
  background: rgba(255, 244, 230, 0.08);
  border: 1px solid var(--glass-border);
  transition: transform 0.25s, background 0.25s, box-shadow 0.25s;
}
.btn:hover { transform: translateY(-3px); background: rgba(255, 244, 230, 0.16); }
.btn.primary {
  background: var(--coral);
  border-color: var(--coral);
  box-shadow: 0 6px 22px rgba(255, 107, 74, 0.45);
}
.btn.primary:hover { box-shadow: 0 10px 30px rgba(255, 107, 74, 0.65); }
.footer { margin-top: 30px; font-size: 0.78rem; color: rgba(255, 244, 230, 0.55); }

/* ---------- loader ---------- */
#loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: radial-gradient(ellipse at 50% 120%, #7a2d5e 0%, #2b1b3d 55%, #160b26 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.9s ease, visibility 0.9s;
}
#loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { text-align: center; padding: 20px; }
.loader-mono {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 3px;
  color: var(--coral);
  margin-bottom: 14px;
}
.loader-name {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  font-weight: 700;
  letter-spacing: 6px;
  background: linear-gradient(92deg, var(--cream), var(--sand), var(--coral));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.loader-sub { margin-top: 10px; letter-spacing: 3px; font-size: 0.85rem; color: rgba(255,244,230,0.75); text-transform: uppercase; }
.loader-tag { margin-top: 8px; font-size: 0.85rem; color: rgba(255, 217, 160, 0.6); font-style: italic; }
#start-btn {
  margin-top: 34px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 4px;
  color: #fff;
  background: linear-gradient(92deg, var(--coral), #ff8c5a);
  border: none;
  padding: 16px 46px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(255, 107, 74, 0.5);
  transition: transform 0.3s, box-shadow 0.3s, opacity 0.4s;
  animation: pulse 2.2s infinite;
}
#start-btn:hover { transform: scale(1.06); box-shadow: 0 12px 40px rgba(255, 107, 74, 0.7); }
#start-btn:disabled { opacity: 0.4; cursor: wait; animation: none; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 8px 30px rgba(255, 107, 74, 0.5); }
  50% { box-shadow: 0 8px 44px rgba(255, 107, 74, 0.85); }
}
.loader-hint { margin-top: 18px; font-size: 0.72rem; letter-spacing: 2px; color: rgba(255,244,230,0.4); }
.loader-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(255,244,230,0.08);
}
.loader-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--coral), var(--sand));
  transition: width 0.3s ease;
}

/* ---------- fallback ---------- */
#fallback {
  position: fixed; inset: 0; z-index: 90;
  display: none; align-items: center; justify-content: center;
  background: var(--plum-deep);
  font-size: 1rem;
}
#fallback:not([hidden]) { display: flex; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  #nav { padding: 14px 18px; }
  .nav-links { display: none; }
  .panel { padding: 0 5vw; justify-content: center !important; }
  .card { max-width: 94vw; padding: 24px 22px; }
  .hero-title { letter-spacing: 0; }
  .hero-photo { width: 92px; height: 92px; margin-bottom: 14px; }
  .hero-quote { display: none; }
  .hero-stats .stat { min-width: 96px; padding: 10px 14px; }
  .facts li { flex-direction: column; gap: 2px; }
  .facts li span { text-align: left; }
}
