/* ==========================================================================
   PORTFOLIO DESIGN SYSTEM & STYLESHEET
   Developer: Praful Singh
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS & CSS CUSTOM PROPERTIES
   -------------------------------------------------------------------------- */
:root {
  /* Color Palette */
  --bg-dark: #090d16;
  --bg-card: rgba(17, 24, 39, 0.7);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-header: rgba(9, 13, 22, 0.8);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --accent-primary: #3b82f6;      /* Vibrant Blue */
  --accent-secondary: #8b5cf6;    /* Soft Purple */
  --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
  --accent-glow: rgba(59, 130, 246, 0.4);
  --accent-hover: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  
  --border-card: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(59, 130, 246, 0.5);

  /* Typography */
  --font-heading: 'Outfit', 'Poppins', sans-serif;
  --font-body: 'Inter', 'Poppins', sans-serif;

  /* Elevation & Borders */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(59, 130, 246, 0.25);

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Light Theme Variable Overrides */
:root[data-theme="light"] {
  --bg-dark: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.82);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --bg-header: rgba(241, 245, 249, 0.88);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;

  --border-card: rgba(0, 0, 0, 0.08);
  --border-focus: rgba(59, 130, 246, 0.5);

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 25px rgba(59, 130, 246, 0.15);
}

/* --------------------------------------------------------------------------
   2. RESET & BASE STYLES
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-main);
}

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

ul, ol {
  list-style: none;
}

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

/* Gradient Text Utility */
.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --------------------------------------------------------------------------
   3. CURSOR TRAIL
   -------------------------------------------------------------------------- */
.trail-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--accent-primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  box-shadow: 0 0 10px var(--accent-primary), 0 0 20px var(--accent-secondary);
  transition: opacity 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
  .trail-dot {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   4. NAVIGATION (HEADER)
   -------------------------------------------------------------------------- */
header {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1150px;
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.logo-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-primary);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px var(--accent-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-links li a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 0.25rem 0;
}

.nav-links li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  transition: width var(--transition-normal);
  border-radius: 2px;
}

.nav-links li a:hover,
.nav-links li a.active {
  color: var(--text-main);
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.github-btn {
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  background: var(--accent-gradient);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  transition: var(--transition-normal);
}

.github-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

/* Mobile Menu Icon */
#menu-icon {
  display: none;
  font-size: 1.5rem;
  color: var(--text-main);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.25rem;
}

/* --------------------------------------------------------------------------
   5. HERO SECTION
   -------------------------------------------------------------------------- */
.hero {
  min-height: 100vh;
  padding: 140px 8% 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  position: relative;
}

/* Subtle background glow effect */
.hero::before {
  content: "";
  position: absolute;
  top: 20%;
  left: 10%;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(0,0,0,0) 70%);
  pointer-events: none;
  z-index: -1;
}

.hero-content {
  flex: 1.1;
  max-width: 650px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-primary);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 3.8rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.hero-role {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--text-muted);
  min-height: 2.2rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background-color: var(--accent-primary);
  animation: blink 1s infinite;
}

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

.hero-description {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 540px;
}

.hero-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.btn {
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: var(--transition-normal);
  border: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-card);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-focus);
  transform: translateY(-2px);
}

.social-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.social-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: var(--transition-normal);
}

.social-icon:hover {
  color: var(--text-main);
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

.hero-image-wrapper {
  flex: 0.9;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.profile-card {
  position: relative;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  padding: 8px;
  background: var(--accent-gradient);
  box-shadow: var(--shadow-glow);
  transition: var(--transition-bounce);
}

.profile-card:hover {
  transform: scale(1.03);
  box-shadow: 0 0 35px rgba(139, 92, 246, 0.4);
}

.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--bg-dark);
}

/* --------------------------------------------------------------------------
   6. SECTIONS COMMON
   -------------------------------------------------------------------------- */
section {
  padding: 100px 8%;
  max-width: 1300px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-subtitle {
  text-transform: uppercase;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2.5rem;
  letter-spacing: -0.01em;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent-gradient);
  margin: 0.75rem auto 0;
  border-radius: 2px;
}

/* --------------------------------------------------------------------------
   7. ABOUT SECTION
   -------------------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-text p {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.about-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.info-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: var(--transition-normal);
}

.info-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.info-card i {
  font-size: 1.8rem;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
  display: block;
}

.info-card h4 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.info-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   8. EDUCATION SECTION
   -------------------------------------------------------------------------- */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  height: 100%;
  width: 2px;
  background: rgba(255, 255, 255, 0.1);
}

.timeline-item {
  position: relative;
  padding-left: 60px;
  margin-bottom: 2.5rem;
}

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

.timeline-dot {
  position: absolute;
  left: 11px;
  top: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-dark);
  border: 3px solid var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-primary);
  z-index: 2;
}

.timeline-content {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: var(--transition-normal);
}

.timeline-content:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
  transform: translateX(4px);
}

.timeline-date {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(59, 130, 246, 0.1);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}

.timeline-content h3 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.timeline-institution {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.timeline-institution a {
  color: var(--accent-primary);
  font-weight: 500;
}

.timeline-institution a:hover {
  text-decoration: underline;
}

.timeline-details {
  font-size: 0.9rem;
  color: var(--text-dim);
}

/* --------------------------------------------------------------------------
   9. SKILLS SECTION (Grouped + Progress Bars)
   -------------------------------------------------------------------------- */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.skill-category-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: var(--transition-normal);
}

.skill-category-card:hover {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-card);
}

.category-title {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-card);
  padding-bottom: 0.75rem;
}

.category-title i {
  color: var(--accent-primary);
}

.skill-bar-item {
  margin-bottom: 1.25rem;
}

.skill-bar-item:last-child {
  margin-bottom: 0;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.skill-info span.skill-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-info span.skill-name i {
  color: var(--accent-primary);
}

.skill-info span.skill-percentage {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0%; /* Animated via JS IntersectionObserver */
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  transition: width 1.2s cubic-bezier(0.1, 0.5, 0.1, 1);
}

/* Additional Tech Chips */
.tech-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.chip {
  padding: 0.4rem 0.8rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-fast);
}

.chip:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--text-main);
  border-color: rgba(59, 130, 246, 0.3);
}

/* --------------------------------------------------------------------------
   10. PROJECTS SECTION
   -------------------------------------------------------------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-normal);
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-card);
}

.project-img-wrapper {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.project-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-img-wrapper img {
  transform: scale(1.06);
}

.project-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 0.3rem 0.75rem;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-primary);
}

.project-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.project-impact {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.6;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.tag {
  padding: 0.2rem 0.6rem;
  background: rgba(59, 130, 246, 0.08);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #60a5fa;
}

.project-links {
  display: flex;
  gap: 0.75rem;
}

.project-link-btn {
  flex: 1;
  padding: 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: var(--transition-fast);
}

.link-primary {
  background: var(--accent-gradient);
  color: #ffffff;
}

.link-primary:hover {
  opacity: 0.9;
}

.link-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-card);
  color: var(--text-main);
}

.link-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-focus);
}

/* --------------------------------------------------------------------------
   11. EXPERIENCE & ACHIEVEMENTS SECTION
   -------------------------------------------------------------------------- */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.achievement-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  transition: var(--transition-normal);
}

.achievement-card:hover {
  border-color: var(--border-focus);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.achievement-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.achievement-info h4 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.achievement-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   12. CONTACT SECTION
   -------------------------------------------------------------------------- */
.contact-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-form-wrapper {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

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

.submit-btn {
  width: 100%;
  padding: 0.9rem;
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  transition: var(--transition-normal);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.form-status {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  display: none;
}

.form-status.success {
  display: block;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.form-status.error {
  display: block;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

/* Contact Info Panel */
.contact-info-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.contact-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.contact-card-text h4 {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.1rem;
}

.contact-card-text p, .contact-card-text a {
  font-size: 1rem;
  font-weight: 500;
}

.map-wrapper {
  width: 100%;
  height: 220px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-card);
}

.map-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: invert(90%) hue-rotate(180deg);
}

/* --------------------------------------------------------------------------
   13. FOOTER
   -------------------------------------------------------------------------- */
footer {
  background: rgba(5, 8, 14, 0.95);
  border-top: 1px solid var(--border-card);
  padding: 3rem 8% 2rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand h3 {
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.back-to-top {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-normal);
}

.back-to-top:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  transform: translateY(-3px);
}

/* --------------------------------------------------------------------------
   14. ANIMATIONS & REVEAL CLASSES (IntersectionObserver)
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* --------------------------------------------------------------------------
   15. RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .hero {
    flex-direction: column-reverse;
    text-align: center;
    padding-top: 130px;
    gap: 3rem;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-role {
    justify-content: center;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    justify-content: center;
  }

  .social-links {
    justify-content: center;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .contact-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  header {
    width: 92%;
    padding: 0.6rem 1.25rem;
  }

  #menu-icon {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 65px;
    left: 0;
    width: 100%;
    background: rgba(9, 13, 22, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    flex-direction: column;
    padding: 1.5rem 0;
    gap: 1.25rem;
    display: none; /* Toggled via main.js */
    box-shadow: var(--shadow-card);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-actions {
    display: none;
  }

  .hero-title {
    font-size: 2.8rem;
  }

  .profile-card {
    width: 260px;
    height: 260px;
  }

  section {
    padding: 70px 6%;
  }

  .section-title {
    font-size: 2rem;
  }

  .about-cards-grid {
    grid-template-columns: 1fr;
  }

  .timeline::before {
    left: 15px;
  }

  .timeline-item {
    padding-left: 45px;
  }

  .timeline-dot {
    left: 6px;
  }

  .footer-content, .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.2rem;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .profile-card {
    width: 210px;
    height: 210px;
  }
}

/* --------------------------------------------------------------------------
   UPGRADE FEATURES: THEME TOGGLE, HERO CANVAS, SKILL FILTERS & MODAL
   -------------------------------------------------------------------------- */

/* Theme Toggle Button */
.theme-toggle-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition-normal);
}

.theme-toggle-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: rotate(15deg) scale(1.05);
}

/* Hero Ambient Background Canvas */
.hero-bg-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* Skill Filter Tabs */
.skill-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.skill-filter-btn {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-card);
  cursor: pointer;
  transition: var(--transition-normal);
}

.skill-filter-btn:hover,
.skill-filter-btn.active {
  color: #ffffff;
  background: var(--accent-gradient);
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* Category card transition when filtered */
.skill-category-card {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.skill-category-card.hidden {
  display: none !important;
  opacity: 0;
  transform: scale(0.95);
}

/* Project Quick View Button */
.project-quick-btn {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border-card);
  cursor: pointer;
  font-family: inherit;
}

.project-quick-btn:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

/* Accessible Project Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 1.5rem;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 780px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-card {
  transform: scale(1) translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: var(--transition-fast);
}

.modal-close-btn:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

.modal-body {
  display: flex;
  flex-direction: column;
}

.modal-media {
  position: relative;
  width: 100%;
  max-height: 320px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-card);
}

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

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

.modal-title {
  font-size: 2rem;
  color: var(--text-main);
}

.modal-summary {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.modal-section h4 {
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-highlights-list {
  list-style: disc;
  padding-left: 1.25rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   AI TECH DEMO SECTION STYLES
   -------------------------------------------------------------------------- */
#ai-demo {
  padding: 100px 8%;
}

.ai-demo-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.ai-demo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.ai-info-text h3 {
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
}

.ai-info-text p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.ai-model-badge {
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--accent-primary);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ai-model-badge.ready {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

.ai-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.sample-pickers {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.sample-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 0.25rem;
}

.btn-sample {
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-normal);
}

.btn-sample:hover,
.btn-sample.active {
  color: #ffffff;
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

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

.btn-sm {
  padding: 0.5rem 1.1rem;
  font-size: 0.88rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.ai-viewport-wrapper {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 1.5rem;
}

.ai-media-container {
  position: relative;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border-card);
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-media-container img {
  max-width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  display: block;
}

#ai-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.ai-results-panel {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ai-results-panel h4 {
  font-size: 1.05rem;
  border-bottom: 1px solid var(--border-card);
  padding-bottom: 0.5rem;
}

.detected-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 320px;
  overflow-y: auto;
}

.detected-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-primary);
  font-size: 0.9rem;
}

.detected-name {
  font-weight: 600;
  text-transform: capitalize;
}

.detected-score {
  font-size: 0.8rem;
  color: var(--accent-primary);
  font-weight: 700;
}

.detected-placeholder {
  color: var(--text-dim);
  font-size: 0.88rem;
  font-style: italic;
  padding: 1rem 0;
  text-align: center;
}

/* --------------------------------------------------------------------------
   LIVE STATS WIDGETS
   -------------------------------------------------------------------------- */
.live-stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
  margin-top: 2.5rem;
}

.stats-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: var(--transition-normal);
}

.stats-card:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
}

.stats-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-card);
  padding-bottom: 0.75rem;
}

.stats-card-header i {
  font-size: 1.4rem;
  color: var(--accent-primary);
}

.stats-card-header h3 {
  font-size: 1.2rem;
  flex: 1;
}

.stats-live-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #22c55e;
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  text-align: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.stat-num {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
}

.text-easy { color: #22c55e; }
.text-medium { color: #f59e0b; }
.text-hard { color: #ef4444; }

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.stats-link {
  font-size: 0.85rem;
  color: var(--accent-primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  transition: var(--transition-fast);
}

.stats-link:hover {
  color: var(--text-main);
  transform: translateX(3px);
}

.coding-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

@media (max-width: 900px) {
  .ai-viewport-wrapper {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   HACKATHON CERTIFICATE & LIGHTBOX STYLES
   -------------------------------------------------------------------------- */
.achievement-btn {
  margin-top: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--accent-primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.achievement-btn:hover {
  background: var(--gradient-primary);
  color: #ffffff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 7, 13, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 1.5rem;
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  max-width: 95vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.85), 0 0 30px rgba(59, 130, 246, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  object-fit: contain;
}

.lightbox-close-btn {
  position: absolute;
  top: -45px;
  right: 0;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.lightbox-close-btn:hover {
  background: #ef4444;
  border-color: #ef4444;
  transform: scale(1.1);
}

.lightbox-caption {
  margin-top: 1rem;
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  background: rgba(15, 23, 42, 0.8);
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  border: 1px solid var(--border-card);
}