/* ==========================================================================
   PORTFOLIO OF NIKHIL RATHOR | DTU (Roll: 25/A04/035)
   UNIFIED ELECTRIC PURPLE & CYBER CYAN DESIGN SYSTEM
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens & CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
  /* Obsidian Base */
  --bg-primary: #06040a;
  --bg-secondary: #0b0716;
  --bg-tertiary: #140d24;
  --bg-card: rgba(16, 10, 30, 0.76);
  --bg-card-hover: rgba(26, 16, 48, 0.9);
  --bg-glass: rgba(10, 6, 20, 0.84);
  --bg-input: rgba(10, 6, 20, 0.92);

  /* Unified 2-Color Accent System (Primary: Purple, Secondary: Cyan) */
  --purple-primary: #a855f7;
  --purple-bright: #c084fc;
  --purple-light: #e9d5ff;
  --purple-soft: #f3e8ff;
  --purple-dark: #7c3aed;
  --purple-deep: #4c1d95;
  --cyan-accent: #38bdf8;
  --cyan-dim: rgba(56, 189, 248, 0.15);
  --emerald-status: #10b981;

  /* Border Tokens */
  --border-subtle: rgba(168, 85, 247, 0.18);
  --border-card: rgba(168, 85, 247, 0.25);
  --border-focus: #c084fc;
  --border-cyan-hover: rgba(56, 189, 248, 0.6);

  /* Typography Colors */
  --text-primary: #faf5ff;
  --text-secondary: #c4b5fd;
  --text-muted: #9382b6;
  --text-dim: #716290;

  /* Gradients */
  --grad-headline-white: linear-gradient(135deg, #ffffff 0%, #f4f4f5 50%, #d4d4d8 100%);
  --grad-purple-cyan: linear-gradient(90deg, #c084fc 0%, #a855f7 45%, #38bdf8 100%);
  --grad-btn-primary: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #c084fc 100%);
  
  /* Shadows & Glows */
  --glow-primary: 0 0 35px rgba(168, 85, 247, 0.4);
  --glow-strong: 0 0 70px rgba(192, 132, 252, 0.55);
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.75);

  /* Typography */
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-code: 'Fira Code', 'JetBrains Mono', SFMono-Regular, monospace;

  /* Sizing & Layout */
  --container-max: 1220px;
  --container-padding: 1.5rem;
  --header-height: 72px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Transitions */
  --trans-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --trans-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: dark;
  accent-color: var(--purple-primary);
  scrollbar-color: var(--purple-deep) var(--bg-primary);
}

/* --------------------------------------------------------------------------
   2. Reset & Global Styles
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 2rem);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.65;
  font-size: 1rem;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Ambient 50px Matrix Grid Background */
.matrix-grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: 
    radial-gradient(circle, rgba(192, 132, 252, 0.22) 1.5px, transparent 1.5px),
    linear-gradient(rgba(168, 85, 247, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 85, 247, 0.04) 1px, transparent 1px);
  background-size: 36px 36px, 72px 72px, 72px 72px;
  opacity: 0.95;
}

/* Interactive Particle Canvas */
#ambient-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.95;
}

/* Top Scroll Progress Bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--grad-purple-cyan);
  z-index: 1001;
  box-shadow: 0 0 12px var(--purple-bright);
  transition: width 0.1s linear;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--purple-deep);
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--purple-primary);
}

::selection {
  background: var(--purple-primary);
  color: #ffffff;
}

img, svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--trans-fast), transform var(--trans-fast);
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
}

/* --------------------------------------------------------------------------
   3. Layout & Section Spacing Rhythm
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
  position: relative;
  z-index: 2;
}

.section {
  padding-block: 5.5rem;
  position: relative;
  z-index: 2;
}

.section-header {
  text-align: center;
  max-width: 780px;
  margin-inline: auto;
  margin-bottom: 2.75rem;
}

/* Section Eyebrow Labels */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-code);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--purple-bright);
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 3.8vw, 2.9rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.18;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
}

.gradient-text {
  background: var(--grad-purple-cyan);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 1.02rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* --------------------------------------------------------------------------
   4. Unified Button Hierarchy (Primary solid vs Secondary ghost)
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.75rem 1.45rem;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  transition: all var(--trans-smooth);
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}

/* Primary Button: Solid Purple Gradient */
.btn-primary {
  background: var(--grad-btn-primary);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(192, 132, 252, 0.65);
}

/* Secondary Button: Dark Translucent Outline */
.btn-secondary {
  background: rgba(18, 12, 38, 0.65);
  color: var(--text-primary);
  border: 1px solid var(--border-card);
}

.btn-secondary:hover {
  background: rgba(168, 85, 247, 0.18);
  border-color: var(--purple-bright);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
}

/* Ghost Outline Button */
.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.btn-outline:hover {
  background: rgba(168, 85, 247, 0.12);
  border-color: var(--purple-bright);
  color: var(--purple-bright);
}

.btn-sm {
  padding: 0.45rem 0.95rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

/* --------------------------------------------------------------------------
   5. Site Header & Floating Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  transition: all var(--trans-smooth);
}

.site-header.is-scrolled {
  background: rgba(6, 4, 12, 0.95);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand-logo-img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(168, 85, 247, 0.15);
  padding: 2px;
  border: 1px solid var(--border-card);
}

.brand-title {
  display: flex;
  flex-direction: column;
}

.brand-tag {
  font-size: 0.7rem;
  font-family: var(--font-code);
  color: var(--purple-bright);
  font-weight: 600;
  margin-top: -3px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link {
  padding: 0.45rem 0.8rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--trans-fast);
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(168, 85, 247, 0.12);
}

.nav-link.active {
  color: var(--purple-bright);
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid var(--border-card);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #a7f3d0;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald-status);
  box-shadow: 0 0 8px var(--emerald-status);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

.mobile-toggle {
  display: none;
  font-size: 1.25rem;
  padding: 0.4rem 0.6rem;
  color: var(--text-primary);
}

.mobile-drawer {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  background: rgba(8, 5, 16, 0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.5rem;
  z-index: 999;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

.mobile-drawer.is-open {
  display: flex;
}

/* --------------------------------------------------------------------------
   6. Hero Section
   -------------------------------------------------------------------------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-height) + 2rem);
  padding-bottom: 3.5rem;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-greeting {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid var(--border-card);
  color: var(--purple-bright);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: clamp(2.3rem, 4.6vw, 3.8rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
}

.hero-typewriter-wrapper {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: clamp(1.02rem, 1.8vw, 1.25rem);
  font-weight: 700;
  color: var(--purple-bright);
  font-family: var(--font-code);
  margin-bottom: 1.25rem;
  min-height: 2rem;
}

.typewriter-cursor {
  display: inline-block;
  width: 3px;
  height: 1.2em;
  background-color: var(--purple-bright);
  animation: blink 0.9s infinite;
  vertical-align: middle;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-desc {
  font-size: 1.02rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.75rem;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2.25rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 1.65rem;
  font-weight: 900;
  font-family: var(--font-code);
  color: var(--purple-bright);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.25rem;
}

/* Avatar Card & Orbiting Badges */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.avatar-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1.5px solid rgba(192, 132, 252, 0.35);
  border-radius: 24px;
  padding: 2.25rem 2rem 2rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.85), 0 0 35px rgba(168, 85, 247, 0.3);
  text-align: center;
  transition: all var(--trans-smooth);
}

.avatar-card:hover {
  border-color: var(--purple-bright);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 55px rgba(192, 132, 252, 0.55);
  transform: translateY(-4px);
}

.avatar-glow-ring {
  position: absolute;
  top: 10%;
  left: 5%;
  width: 90%;
  height: 75%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.45) 0%, rgba(124, 58, 237, 0.2) 50%, transparent 70%);
  filter: blur(35px);
  z-index: 0;
  animation: pulse-halo 4s ease-in-out infinite alternate;
}

@keyframes pulse-halo {
  0% { transform: scale(0.92); opacity: 0.65; }
  100% { transform: scale(1.15); opacity: 0.95; }
}

.avatar-img-wrapper {
  position: relative;
  width: 290px;
  height: 290px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  overflow: hidden;
  border: 2.5px solid var(--purple-bright);
  box-shadow: 0 0 45px rgba(168, 85, 247, 0.55);
  background: var(--bg-tertiary);
  z-index: 1;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.floating-pill {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.05rem;
  border-radius: var(--radius-full);
  background: rgba(14, 8, 28, 0.94);
  border: 1px solid rgba(192, 132, 252, 0.35);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8), 0 0 18px rgba(168, 85, 247, 0.35);
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--font-code);
  color: var(--text-primary);
  z-index: 2;
  animation: float-badge 5s ease-in-out infinite;
}

.floating-pill i {
  color: var(--purple-bright);
}

.pill-1 { top: -12px; left: -22px; animation-delay: 0s; }
.pill-2 { top: 40px; right: -28px; animation-delay: 1.5s; }
.pill-3 { bottom: 105px; left: -28px; animation-delay: 3s; }
.pill-4 { bottom: 65px; right: -22px; animation-delay: 4.5s; }

@keyframes float-badge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.avatar-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  position: relative;
  z-index: 1;
}

.avatar-socials {
  display: flex;
  gap: 0.5rem;
}

.avatar-social-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.avatar-social-btn:hover {
  background: var(--purple-primary);
  color: #ffffff;
  border-color: var(--purple-primary);
  transform: scale(1.1);
}

/* --------------------------------------------------------------------------
   7. About Section & Distinct Feature Pillars
   -------------------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: stretch;
}

.about-card {
  padding: 2rem;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.about-pillars-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.pillar-item {
  padding: 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  transition: all var(--trans-fast);
}

.pillar-item:hover {
  border-color: var(--purple-bright);
  transform: translateY(-3px);
  background: var(--bg-card-hover);
  box-shadow: var(--glow-primary);
}

.pillar-icon {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}

.pillar-title {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
}

.pillar-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   8. Skills Matrix Section
   -------------------------------------------------------------------------- */
.skills-controls {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.filter-btn {
  padding: 0.45rem 1.1rem;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  transition: all var(--trans-fast);
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--purple-bright);
}

.filter-btn.active {
  background: var(--grad-btn-primary);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.skill-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  transition: all var(--trans-fast);
}

.skill-card:hover {
  border-color: var(--purple-bright);
  transform: translateY(-3px);
  background: var(--bg-card-hover);
  box-shadow: var(--glow-primary);
}

.skill-icon-wrapper {
  font-size: 1.5rem;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  display: grid;
  place-items: center;
  color: var(--purple-bright);
}

.skill-info {
  display: flex;
  flex-direction: column;
}

.skill-name {
  font-size: 0.9rem;
  font-weight: 700;
}

.skill-level-badge {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-code);
}

/* --------------------------------------------------------------------------
   9. Featured Projects Showcase with Multi-Slide Carousels
   -------------------------------------------------------------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

.project-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--trans-smooth);
  box-shadow: var(--card-shadow);
}

.project-card:hover {
  border-color: var(--purple-bright);
  transform: translateY(-5px);
  box-shadow: var(--glow-primary);
}

/* Multi-Slide Carousel inside Project Card */
.carousel-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--border-card);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  z-index: 5;
  transition: all var(--trans-fast);
}

.carousel-btn:hover {
  background: var(--purple-primary);
  border-color: var(--purple-bright);
}

.carousel-prev { left: 0.75rem; }
.carousel-next { right: 0.75rem; }

.carousel-dots {
  position: absolute;
  bottom: 0.75rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  z-index: 5;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: all var(--trans-fast);
  cursor: pointer;
}

.dot.active {
  width: 20px;
  border-radius: 4px;
  background: var(--purple-bright);
  box-shadow: 0 0 8px var(--purple-bright);
}

.project-media-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  overflow: hidden;
}

.project-media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--trans-smooth);
}

.project-card:hover .project-media-img {
  transform: scale(1.02);
}

.project-status-tag {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(10, 6, 20, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-card);
  color: var(--purple-bright);
  z-index: 2;
}

.project-body {
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.project-tagline {
  font-size: 0.85rem;
  color: var(--purple-bright);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.project-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.15rem;
  flex: 1;
}

.project-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-bottom: 1.15rem;
}

.project-highlights li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.project-highlights li i {
  color: var(--purple-bright);
  font-size: 0.72rem;
}

.project-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.35rem;
}

.tech-chip {
  padding: 0.22rem 0.65rem;
  font-size: 0.74rem;
  font-family: var(--font-code);
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid var(--border-card);
  color: var(--purple-soft);
}

.project-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border-subtle);
}

/* --------------------------------------------------------------------------
   10. Live GitHub Hub
   -------------------------------------------------------------------------- */
.github-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.github-stat-card {
  padding: 1.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  text-align: center;
}

.github-stat-val {
  font-size: 1.7rem;
  font-weight: 900;
  font-family: var(--font-code);
  color: var(--purple-bright);
}

.github-stat-lbl {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-top: 0.2rem;
}

.github-repos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.repo-card {
  padding: 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--trans-fast);
}

.repo-card:hover {
  border-color: var(--purple-bright);
  transform: translateY(-3px);
  box-shadow: var(--glow-primary);
  background: var(--bg-card-hover);
}

.repo-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.repo-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.repo-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1.1rem;
}

.repo-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--purple-bright);
  font-family: var(--font-code);
}

/* --------------------------------------------------------------------------
   11. Timeline & Journey
   -------------------------------------------------------------------------- */
.timeline-container {
  position: relative;
  max-width: 860px;
  margin-inline: auto;
  padding-left: 2.5rem;
}

.timeline-container::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 11px;
  width: 2px;
  background: linear-gradient(180deg, var(--purple-bright) 0%, var(--purple-deep) 100%);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.25rem;
}

.timeline-dot {
  position: absolute;
  left: -2.5rem;
  top: 0.25rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--purple-bright);
  display: grid;
  place-items: center;
  font-size: 0.65rem;
  color: var(--purple-bright);
  box-shadow: 0 0 12px var(--purple-bright);
}

.timeline-card {
  padding: 1.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  transition: all var(--trans-fast);
}

.timeline-card:hover {
  border-color: var(--purple-bright);
  transform: translateX(4px);
  box-shadow: var(--glow-primary);
}

.timeline-date {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--purple-bright);
  font-family: var(--font-code);
  text-transform: uppercase;
}

.timeline-role {
  font-size: 1.15rem;
  font-weight: 800;
  margin-block: 0.2rem 0.3rem;
}

.timeline-org {
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.timeline-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   12. Contact Section & Polished Inputs
   -------------------------------------------------------------------------- */
.contact-grid-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 2.25rem;
  align-items: start;
}

.contact-info-panel {
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  box-shadow: var(--card-shadow);
}

.contact-item-box {
  padding: 1.1rem 1.25rem;
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all var(--trans-fast);
}

.contact-item-box:hover {
  border-color: var(--purple-bright);
  background: rgba(168, 85, 247, 0.16);
}

.contact-item-box p {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-item-box strong {
  font-size: 0.92rem;
  color: var(--text-primary);
}

.contact-form-panel {
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
}

.topic-chips-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.35rem;
}

.topic-chip {
  padding: 0.4rem 0.95rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  transition: all var(--trans-fast);
}

.topic-chip.active, .topic-chip:hover {
  border-color: var(--purple-bright);
  color: #ffffff;
  background: rgba(168, 85, 247, 0.25);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.15rem;
}

.form-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.form-input, .form-textarea {
  width: 100%;
  padding: 0.85rem 1.15rem;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.92rem;
  font-family: var(--font-main);
  transition: all var(--trans-fast);
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--purple-bright);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.45);
  outline: none;
}

.form-textarea {
  min-height: 110px;
  resize: vertical;
}

/* --------------------------------------------------------------------------
   13. Modal Dialog (<dialog>)
   -------------------------------------------------------------------------- */
dialog.project-modal {
  width: min(840px, 94vw);
  max-height: 90vh;
  margin: auto;
  padding: 0;
  border: 1px solid var(--purple-bright);
  border-radius: var(--radius-lg);
  background: #0d0718;
  color: var(--text-primary);
  box-shadow: 0 0 90px rgba(168, 85, 247, 0.55);
  overflow-y: auto;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.3s ease-out, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), display 0.3s allow-discrete, overlay 0.3s allow-discrete;
  transition-behavior: allow-discrete;
}

dialog.project-modal::backdrop {
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(15px);
}

@starting-style {
  dialog.project-modal[open] {
    opacity: 0;
    transform: scale(0.94) translateY(20px);
  }
}

.modal-header-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8;
  background: #000000;
}

.modal-header-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--border-card);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  transition: all var(--trans-fast);
}

.modal-close-btn:hover {
  background: var(--purple-primary);
  transform: scale(1.1);
}

.modal-content-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

/* Toast Shelf */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  padding: 0.85rem 1.4rem;
  background: #140a24;
  border: 1px solid var(--purple-primary);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9), 0 0 25px rgba(168, 85, 247, 0.45);
  pointer-events: auto;
  transition: all var(--trans-smooth);
}

.toast i {
  color: var(--purple-bright);
  font-size: 1.1rem;
}

/* Footer */
.site-footer {
  padding-block: 3.5rem 2.5rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  position: relative;
  z-index: 2;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}

.footer-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--purple-bright);
}

.back-to-top:hover {
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   14. Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 3rem; text-align: center; }
  .hero-cta-group { justify-content: center; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
  .about-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: 1fr; }
  .github-stats-bar { grid-template-columns: repeat(2, 1fr); }
  .github-repos-grid { grid-template-columns: 1fr; }
  .contact-grid-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-menu { display: none; }
  .mobile-toggle { display: block; }
  .skills-grid { grid-template-columns: 1fr; }
  .section { padding-block: 4rem; }
  .hero-stats { grid-template-columns: 1fr; }
  .about-pillars-grid { grid-template-columns: 1fr; }
}
