/**
 * Premium Portfolio Layer — Shivam Kumar
 * Advanced UI, animations, and employer-focused layout
 */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

:root {
  --premium-bg: #030712;
  --premium-surface: rgba(15, 23, 42, 0.55);
  --premium-border: rgba(99, 102, 241, 0.18);
  --premium-accent: #6366f1;
  --premium-accent-2: #06b6d4;
  --premium-accent-3: #a855f7;
  --premium-glow: rgba(99, 102, 241, 0.45);
  --premium-text: #e2e8f0;
  --premium-muted: rgba(226, 232, 240, 0.65);
  --premium-font-display: "Syne", sans-serif;
  --premium-font-body: "DM Sans", sans-serif;
  --premium-radius: 20px;
  --premium-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body.index-page {
  font-family: var(--premium-font-body);
  background: var(--premium-bg);
  overflow-x: hidden;
}

body.index-page h1,
body.index-page h2,
body.index-page h3,
body.index-page h4,
body.index-page h5,
body.index-page h6 {
  font-family: var(--premium-font-display);
}

/* ── Ambient background ── */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambient-bg .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: orbFloat 18s ease-in-out infinite;
}

.ambient-bg .orb-1 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, #6366f1, transparent 70%);
  top: -120px;
  right: -80px;
}

.ambient-bg .orb-2 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, #06b6d4, transparent 70%);
  bottom: 10%;
  left: -100px;
  animation-delay: -6s;
}

.ambient-bg .orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #a855f7, transparent 70%);
  top: 45%;
  right: 20%;
  animation-delay: -12s;
}

.ambient-bg .grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black, transparent);
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.05); }
  66% { transform: translate(-20px, 30px) scale(0.95); }
}

/* ── Preloader ── */
#preloader {
  background: var(--premium-bg) !important;
}

#preloader::before {
  content: "";
  position: absolute;
  width: 48px;
  height: 48px;
  border: 3px solid rgba(99, 102, 241, 0.2);
  border-top-color: var(--premium-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Main layout ── */
body.index-page .main {
  position: relative;
  z-index: 1;
}

/* ── Section utilities ── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--premium-accent-2);
  margin-bottom: 12px;
}

.section-label::before {
  content: "";
  width: 24px;
  height: 2px;
  background: linear-gradient(90deg, var(--premium-accent), var(--premium-accent-2));
  border-radius: 2px;
}

.gradient-heading {
  background: linear-gradient(135deg, #fff 0%, #c7d2fe 45%, #67e8f9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-card {
  background: var(--premium-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--premium-border);
  border-radius: var(--premium-radius);
  transition: transform 0.5s var(--premium-ease), border-color 0.4s ease, box-shadow 0.4s ease;
}

.glass-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 24px 60px rgba(99, 102, 241, 0.12);
}

/* ── Hero premium ── */
.hero-premium {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 100px 0 60px;
}

.hero-premium #hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.6;
}

.hero-premium .hero-inner {
  position: relative;
  z-index: 2;
}

.hero-premium .status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.25);
  font-size: 0.88rem;
  font-weight: 500;
  color: #67e8f9;
  margin-bottom: 24px;
}

.hero-premium .status-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 12px #22d3ee;
  animation: pulseDot 2s ease infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.hero-premium .hero-title {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.hero-premium .hero-name {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 600;
  color: var(--premium-muted);
  margin-bottom: 20px;
}

.hero-premium .hero-role {
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  margin-bottom: 24px;
  color: var(--premium-text);
}

.hero-premium .hero-role .typed {
  color: var(--premium-accent-2);
  font-weight: 600;
  border-bottom: 2px solid rgba(6, 182, 212, 0.4);
}

.hero-premium .hero-desc {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--premium-muted);
  max-width: 540px;
  margin-bottom: 32px;
}

.hero-premium .hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 36px;
}

.btn-premium {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.4s var(--premium-ease);
  text-decoration: none;
}

.btn-premium-primary {
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  color: #fff;
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.35);
}

.btn-premium-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(99, 102, 241, 0.5);
  color: #fff;
}

.btn-premium-ghost {
  background: rgba(99, 102, 241, 0.08);
  color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, 0.35);
}

.btn-premium-ghost:hover {
  background: rgba(99, 102, 241, 0.18);
  transform: translateY(-3px);
  color: #fff;
}

.btn-premium.btn-sm {
  padding: 10px 20px;
  font-size: 0.85rem;
}

.hero-premium .hero-visual-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-premium .profile-ring {
  position: relative;
  width: min(380px, 85vw);
  aspect-ratio: 1;
}

.hero-premium .profile-ring::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 28px;
  background: conic-gradient(from 0deg, #6366f1, #06b6d4, #a855f7, #6366f1);
  animation: ringRotate 6s linear infinite;
  z-index: 0;
}

.hero-premium .profile-ring::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 26px;
  background: var(--premium-bg);
  z-index: 1;
}

@keyframes ringRotate {
  to { transform: rotate(360deg); }
}

.hero-premium .profile-ring img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
  padding: 8px;
}

.hero-premium .floating-badge {
  position: absolute;
  z-index: 3;
  padding: 10px 16px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--premium-border);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  animation: floatBadge 4s ease-in-out infinite;
}

.hero-premium .floating-badge.badge-1 {
  top: 8%;
  left: -8%;
  animation-delay: 0s;
}

.hero-premium .floating-badge.badge-2 {
  bottom: 12%;
  right: -6%;
  animation-delay: -2s;
}

.hero-premium .floating-badge i {
  color: var(--premium-accent-2);
  margin-right: 6px;
}

@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ── Tech marquee ── */
.tech-marquee {
  padding: 28px 0;
  border-block: 1px solid rgba(99, 102, 241, 0.12);
  background: rgba(15, 23, 42, 0.4);
  overflow: hidden;
}

.tech-marquee .marquee-track {
  display: flex;
  gap: 48px;
  animation: marqueeScroll 35s linear infinite;
  width: max-content;
}

.tech-marquee .marquee-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--premium-muted);
  white-space: nowrap;
}

.tech-marquee .marquee-item i {
  font-size: 1.2rem;
  color: var(--premium-accent);
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Stats band ── */
.stats-band {
  padding: 60px 0;
}

.stats-band .stat-card {
  text-align: center;
  padding: 32px 20px;
}

.stats-band .stat-number {
  font-family: var(--premium-font-display);
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 800;
  background: linear-gradient(135deg, #fff, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 8px;
}

.stats-band .stat-label {
  font-size: 0.9rem;
  color: var(--premium-muted);
  font-weight: 500;
}

/* ── Expertise / What I Do ── */
.expertise .role-card {
  padding: 32px;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.expertise .role-card .role-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(6, 182, 212, 0.1));
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.expertise .role-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.expertise .role-card p {
  color: var(--premium-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 20px;
}

.expertise .role-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.expertise .role-card ul li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: rgba(226, 232, 240, 0.8);
  margin-bottom: 10px;
}

.expertise .role-card ul li i {
  color: var(--premium-accent-2);
  margin-top: 3px;
  flex-shrink: 0;
}

/* ── Value proposition ── */
.value-prop {
  padding: 80px 0;
}

.value-prop .value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.value-prop .value-item {
  padding: 28px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.value-prop .value-num {
  font-family: var(--premium-font-display);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.5), rgba(99, 102, 241, 0.1));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
}

.value-prop .value-item h4 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.value-prop .value-item p {
  font-size: 0.9rem;
  color: var(--premium-muted);
  margin: 0;
  line-height: 1.6;
}

/* ── Experience timeline ── */
.experience-timeline {
  position: relative;
  padding-left: 32px;
}

.experience-timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--premium-accent), var(--premium-accent-2), transparent);
}

.experience-timeline .timeline-item {
  position: relative;
  padding-bottom: 40px;
}

.experience-timeline .timeline-item:last-child {
  padding-bottom: 0;
}

.experience-timeline .timeline-dot {
  position: absolute;
  left: -32px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--premium-accent);
  border: 3px solid var(--premium-bg);
  box-shadow: 0 0 16px var(--premium-glow);
}

.experience-timeline .timeline-card {
  padding: 28px 32px;
}

.experience-timeline .timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.experience-timeline .timeline-date {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--premium-accent-2);
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.experience-timeline .timeline-company {
  font-size: 0.9rem;
  color: var(--premium-muted);
}

.experience-timeline .timeline-card h4 {
  font-size: 1.2rem;
  margin-bottom: 14px;
}

.experience-timeline .timeline-card ul {
  margin: 0;
  padding-left: 18px;
}

.experience-timeline .timeline-card ul li {
  color: var(--premium-muted);
  font-size: 0.92rem;
  line-height: 1.65;
  margin-bottom: 8px;
}

/* ── Projects bento ── */
.projects-bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

.projects-bento .project-tile {
  grid-column: span 6;
  padding: 32px;
  position: relative;
  overflow: hidden;
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

.projects-bento .project-tile.featured {
  grid-column: span 12;
  min-height: 320px;
}

.projects-bento .project-tile .tile-glow {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.projects-bento .project-tile:hover .tile-glow {
  opacity: 0.35;
}

.projects-bento .project-tag {
  display: inline-flex;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
  margin-bottom: 16px;
  width: fit-content;
}

.projects-bento .project-tile h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.projects-bento .project-tile p {
  color: var(--premium-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  flex-grow: 1;
  margin-bottom: 20px;
}

.projects-bento .tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.projects-bento .tech-tags span {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(99, 102, 241, 0.15);
  color: rgba(226, 232, 240, 0.7);
}

/* ── Skills premium ── */
.skills-premium .skill-category {
  padding: 28px;
  margin-bottom: 20px;
}

.skills-premium .skill-category h3 {
  font-size: 1.1rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.skills-premium .skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skills-premium .skill-pill {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: #c7d2fe;
  transition: all 0.3s ease;
}

.skills-premium .skill-pill:hover {
  background: rgba(99, 102, 241, 0.2);
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.4);
}

.skills-premium .skill-bar-item {
  margin-bottom: 18px;
}

.skills-premium .skill-bar-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 500;
}

.skills-premium .skill-bar-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.1);
  overflow: hidden;
}

.skills-premium .skill-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6366f1, #06b6d4);
  width: 0;
  transition: width 1.2s var(--premium-ease);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

/* ── Reveal animations ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s var(--premium-ease), transform 0.8s var(--premium-ease);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Section title override ── */
body.index-page .section-title h2 {
  font-family: var(--premium-font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

body.index-page .section-title p {
  max-width: 680px;
  margin-inline: auto;
  line-height: 1.7;
}

/* ── Header glow ── */
body.index-page .header {
  background: rgba(3, 7, 18, 0.85) !important;
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(99, 102, 241, 0.1);
}

body.index-page .navmenu a.active,
body.index-page .navmenu a:hover {
  color: #fff !important;
}

body.index-page .navmenu a.active .navicon {
  color: var(--premium-accent-2) !important;
}

/* ── Services override ── */
body.index-page .services .service-card {
  background: var(--premium-surface) !important;
  border: 1px solid var(--premium-border) !important;
  border-radius: var(--premium-radius) !important;
}

body.index-page .services .service-card:hover {
  border-color: rgba(99, 102, 241, 0.45) !important;
  box-shadow: 0 20px 50px rgba(99, 102, 241, 0.15) !important;
}

/* ── Contact override ── */
body.index-page .contact .info-box,
body.index-page .contact .contact-form {
  background: var(--premium-surface) !important;
  border: 1px solid var(--premium-border) !important;
  border-radius: var(--premium-radius) !important;
}

body.index-page .contact .form-control {
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid rgba(99, 102, 241, 0.15) !important;
  color: var(--premium-text) !important;
}

body.index-page .contact .form-control:focus {
  border-color: var(--premium-accent) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

/* ── About override ── */
body.index-page .about .profile-card,
body.index-page .about .about-content {
  background: transparent;
}

body.index-page .about .profile-card {
  background: var(--premium-surface) !important;
  border: 1px solid var(--premium-border) !important;
}

/* ── Footer ── */
body.index-page .footer {
  border-top: 1px solid rgba(99, 102, 241, 0.1);
  background: rgba(3, 7, 18, 0.8);
}

/* ── Scroll progress ── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #06b6d4, #a855f7);
  z-index: 9999;
  width: 0%;
  transition: width 0.1s linear;
}

/* ── Responsive ── */
@media (max-width: 991px) {
  .hero-premium .floating-badge {
    display: none;
  }

  .projects-bento .project-tile,
  .projects-bento .project-tile.featured {
    grid-column: span 12;
  }

  .experience-timeline {
    padding-left: 24px;
  }

  .experience-timeline .timeline-dot {
    left: -24px;
  }
}

@media (max-width: 768px) {
  .hero-premium {
    padding-top: 120px;
    text-align: center;
  }

  .hero-premium .hero-desc {
    margin-inline: auto;
  }

  .hero-premium .hero-cta {
    justify-content: center;
  }

  .hero-premium .hero-visual-wrap {
    margin-top: 48px;
  }
}

@media (max-width: 575.98px) {
  .hero-premium {
    padding: 100px 0 40px;
  }

  .hero-premium .hero-title {
    font-size: clamp(2.15rem, 11vw, 3rem);
  }

  .hero-premium .hero-name {
    font-size: 1.15rem;
  }

  .hero-premium .hero-role {
    font-size: 1rem;
  }

  .hero-premium .hero-desc {
    font-size: 0.95rem;
    line-height: 1.65;
  }

  .hero-premium .hero-cta,
  .hero-premium .hero-actions,
  .contact .contact-form .btn,
  .btn-premium {
    width: 100%;
  }

  .hero-premium .hero-cta,
  .hero-premium .hero-actions {
    flex-direction: column;
  }

  .hero-premium .hero-cta .btn-premium,
  .hero-premium .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-premium .profile-ring {
    width: min(280px, 90vw);
  }

  .tech-marquee {
    padding: 20px 0;
  }

  .stats-band {
    padding: 40px 0;
  }

  .stats-band .stat-card,
  .expertise .role-card,
  .value-prop .value-item,
  .projects-bento .project-tile,
  .skills-premium .skill-category,
  .contact .info-box,
  .contact .contact-form {
    padding: 20px;
  }

  .section-title {
    padding-bottom: 36px;
  }

  .section-title h2:before,
  .section-title h2:after {
    display: none;
  }

  .experience-timeline {
    padding-left: 18px;
  }

  .experience-timeline .timeline-dot {
    left: -18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .tech-marquee .marquee-track,
  .hero-premium .profile-ring::before,
  .ambient-bg .orb {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
