/* ==========================================
   CSS Variables & Theme Setup
   ========================================== */
:root {
  /* Dark Mode (Default) */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: rgba(255, 255, 255, 0.05);
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --accent-primary: #00d4ff;
  --accent-secondary: #7b2cbf;
  --accent-tertiary: #ff006e;
  --success: #00ff88;
  --gradient: linear-gradient(135deg, #00d4ff, #7b2cbf, #ff006e);
  
  /* UI Colors */
  --nav-bg: rgba(10, 10, 15, 0.95);
  --card-bg: rgba(255, 255, 255, 0.03);
  --border-color: rgba(255, 255, 255, 0.1);
  
  /* Shadows */
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 5px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

[data-theme="light"] {
  --bg-primary: #f5f5f5;
  --bg-secondary: #ffffff;
  --bg-card: rgba(0, 0, 0, 0.05);
  --text-primary: #1a1a2e;
  --text-secondary: #666666;
  --accent-primary: #0099cc;
  --accent-secondary: #6a1b9a;
  --accent-tertiary: #d81b60;
  --nav-bg: rgba(255, 255, 255, 0.95);
  --card-bg: rgba(0, 0, 0, 0.03);
  --border-color: rgba(0, 0, 0, 0.1);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 5px 20px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* ==========================================
   Base Styles
   ========================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: 'Inter', 'Poppins', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-slow), color var(--transition-slow);
}

::selection {
  background-color: var(--accent-primary);
  color: var(--bg-primary);
}

/* ==========================================
   Preloader / Loading Screen
   ========================================== */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  text-align: center;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid var(--border-color);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

.loader-text {
  font-size: 1.5rem;
  font-weight: 600;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
}

.progress-bar {
  width: 200px;
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto;
}

.progress-fill {
  height: 100%;
  background: var(--gradient);
  animation: loadProgress 1.5s ease-out forwards;
}

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

@keyframes loadProgress {
  from { width: 0%; }
  to { width: 100%; }
}

/* ==========================================
   Navigation
   ========================================== */
#navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: all var(--transition-normal);
}

#navbar.scrolled {
  padding: 0.5rem 0;
  box-shadow: var(--shadow-md);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo a {
  font-size: 1.8rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: width var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

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

.theme-toggle {
  background: transparent;
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: rotate(15deg);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  transition: all var(--transition-fast);
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translateY(8px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-8px);
}

/* ==========================================
   Hero Section
   ========================================== */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: var(--bg-primary);
}

#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.greeting {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  font-family: 'Poppins', sans-serif;
}

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

.roles {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  min-height: 80px;
}

.static-text {
  color: var(--text-secondary);
}

.typed-text {
  color: var(--accent-primary);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.9rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-normal);
  cursor: pointer;
  border: none;
  font-size: 1rem;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--accent-primary);
}

.btn-secondary:hover {
  background: var(--accent-primary);
  color: white;
  transform: translateY(-3px);
}

.btn-sm {
  padding: 0.5rem 1.2rem;
  font-size: 0.9rem;
}

.social-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

.social-links a {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 1.3rem;
  transition: all var(--transition-normal);
  text-decoration: none;
}

.social-links a:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 2;
  color: var(--text-secondary);
}

.mouse {
  width: 25px;
  height: 40px;
  border: 2px solid var(--text-secondary);
  border-radius: 15px;
  margin: 0 auto 10px;
  position: relative;
}

.wheel {
  width: 4px;
  height: 8px;
  background: var(--text-secondary);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll 1.5s infinite;
}

@keyframes scroll {
  0% { opacity: 1; top: 8px; }
  100% { opacity: 0; top: 20px; }
}

/* ==========================================
   Common Section Styles
   ========================================== */
section {
  padding: 100px 0;
  position: relative;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-title {
  font-size: 3rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  font-family: 'Poppins', sans-serif;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: var(--gradient);
  border-radius: 2px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 3rem;
}

/* Glassmorphism Card */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-primary);
}

/* ==========================================
   About Section
   ========================================== */
.about-section {
  background: var(--bg-secondary);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: center;
}

.profile-photo {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid var(--accent-primary);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
  position: relative;
}

.profile-photo::before {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border-radius: 50%;
  background: var(--gradient);
  z-index: -1;
  animation: glow 2s ease-in-out infinite;
}

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

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-text h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--accent-primary);
}

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

.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0;
}

.tag {
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 25px;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

.tag:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

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

/* ==========================================
   Skills Section
   ========================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.skill-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.skill-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.skill-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.skill-name {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.circular-progress {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto;
}

.circular-progress svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.circular-progress circle {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
}

.circular-progress circle:first-child {
  stroke: var(--border-color);
}

.circular-progress .progress-circle {
  stroke: url(#gradient);
  stroke-dasharray: 377;
  stroke-dashoffset: 377;
  transition: stroke-dashoffset 1s ease-out;
}

.progress-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-primary);
}

/* ==========================================
   Education Timeline Section
   ========================================== */
.education-section {
  background: var(--bg-secondary);
}

.timeline {
  position: relative;
  max-width: 1000px;
  margin: 3rem auto;
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 0;
  background: var(--gradient);
  transform: translateX(-50%);
  transition: height 1s ease-out;
}

.timeline-item {
  position: relative;
  margin: 3rem 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.timeline-item:nth-child(odd) .timeline-card {
  grid-column: 1;
}

.timeline-item:nth-child(even) .timeline-card {
  grid-column: 2;
}

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  background: var(--accent-primary);
  border: 4px solid var(--bg-secondary);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.timeline-card {
  position: relative;
}

.timeline-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  margin-bottom: 1rem;
}

.timeline-date {
  display: inline-block;
  padding: 0.3rem 1rem;
  background: var(--accent-primary);
  color: white;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.timeline-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--accent-primary);
}

.timeline-card h4 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.timeline-card p {
  line-height: 1.8;
  color: var(--text-secondary);
}

/* ==========================================
   Projects Section
   ========================================== */
.project-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.7rem 1.8rem;
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2.5rem;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.project-card.hidden {
  display: none;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.project-image {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
}

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

.project-card:hover .project-image img {
  transform: scale(1.1);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

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

.project-link {
  padding: 0.7rem 1.5rem;
  background: var(--accent-primary);
  color: white;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.project-link:hover {
  background: var(--accent-secondary);
  transform: scale(1.05);
}

.project-content {
  padding: 1.5rem;
}

.project-content h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--accent-primary);
}

.project-content p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ==========================================
   GitHub Stats Section
   ========================================== */
.github-stats-section {
  background: var(--bg-secondary);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-primary);
}

.stat-card.full-width {
  grid-column: 1 / -1;
}

.stat-card img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

/* ==========================================
   Certifications Section
   ========================================== */
.certifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.certification-card {
  height: 350px;
  perspective: 1000px;
  cursor: pointer;
}

.certification-card .cert-front,
.certification-card .cert-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  transition: transform 0.6s ease;
  border-radius: 20px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
}

.cert-front {
  transform: rotateY(0deg);
}

.cert-back {
  transform: rotateY(180deg);
  background: var(--gradient);
}

.certification-card:hover .cert-front {
  transform: rotateY(180deg);
}

.certification-card:hover .cert-back {
  transform: rotateY(360deg);
}

.cert-icon {
  font-size: 4rem;
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
}

.certification-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.cert-issuer {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.cert-date {
  color: var(--accent-primary);
  font-weight: 600;
}

.cert-back p {
  color: white;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* ==========================================
   Currently Learning Section
   ========================================== */
.learning-section {
  background: var(--bg-secondary);
}

.learning-grid {
  display: grid;
  gap: 2.5rem;
  max-width: 900px;
  margin: 3rem auto;
}

.learning-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2rem;
  transition: all var(--transition-normal);
}

.learning-item:hover {
  transform: translateX(10px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
}

.learning-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.learning-header h3 {
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.learning-header i {
  color: var(--accent-primary);
}

.learning-percent {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.progress-bar-container {
  height: 12px;
  background: var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 10px;
  width: 0;
  transition: width 1.5s ease-out;
  position: relative;
  overflow: hidden;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

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

/* ==========================================
   Competitive Programming Section
   ========================================== */
.cp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.cp-card {
  text-align: center;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}

.cp-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.cp-card:hover::before {
  opacity: 0.1;
}

.cp-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 1.5rem;
  color: white;
  position: relative;
  z-index: 1;
}

.cp-logo.leetcode {
  background: linear-gradient(135deg, #FFA116, #FF6B00);
}

.cp-logo.codeforces {
  background: linear-gradient(135deg, #1F8ACB, #00549F);
}

.cp-logo.hackerrank {
  background: linear-gradient(135deg, #00EA64, #00BA52);
}

.cp-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.cp-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
  position: relative;
  z-index: 1;
}

.cp-stat {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-primary);
}

/* ==========================================
   Fun Facts Section
   ========================================== */
.fun-facts-section {
  background: var(--bg-secondary);
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.fact-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2.5rem;
  text-align: center;
  transition: all var(--transition-normal);
}

.fact-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.fact-icon {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.fact-icon.bounce {
  animation: bounce 2s infinite;
}

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

.fact-card h3 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}

.fact-card p {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

/* ==========================================
   Contact Section
   ========================================== */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  margin-top: 3rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.info-card {
  padding: 1.5rem;
  text-align: center;
}

.info-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  margin: 0 auto 1rem;
}

.info-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--accent-primary);
}

.info-card p {
  color: var(--text-secondary);
}

.contact-form {
  padding: 2.5rem;
}

.form-group {
  position: relative;
  margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  transition: all var(--transition-normal);
  outline: none;
}

.form-group label {
  position: absolute;
  top: 1rem;
  left: 1rem;
  color: var(--text-secondary);
  pointer-events: none;
  transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label {
  top: -10px;
  left: 10px;
  font-size: 0.85rem;
  background: var(--bg-secondary);
  padding: 0 0.5rem;
  color: var(--accent-primary);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  opacity: 0;
}

.form-error {
  color: var(--accent-tertiary);
  font-size: 0.85rem;
  margin-top: 0.3rem;
  display: none;
}

.form-group.error input,
.form-group.error textarea {
  border-color: var(--accent-tertiary);
}

.form-group.error .form-error {
  display: block;
}

.btn-submit {
  width: 100%;
  position: relative;
}

.btn-loading {
  display: none;
}

.btn-submit.loading .btn-text {
  display: none;
}

.btn-submit.loading .btn-loading {
  display: inline;
}

.form-status {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
  display: none;
}

.form-status.success {
  background: rgba(0, 255, 136, 0.1);
  color: var(--success);
  border: 1px solid var(--success);
  display: block;
}

.form-status.error {
  background: rgba(255, 0, 110, 0.1);
  color: var(--accent-tertiary);
  border: 1px solid var(--accent-tertiary);
  display: block;
}

/* ==========================================
   Footer
   ========================================== */
.footer {
  background: var(--bg-secondary);
  padding: 4rem 0 2rem;
  position: relative;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-section h4 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--accent-primary);
}

.footer-section p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

.footer .social-links {
  margin-top: 1.5rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.footer-bottom p {
  margin: 0.5rem 0;
}

.footer-bottom i {
  color: var(--accent-tertiary);
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--gradient);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  z-index: 999;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.back-to-top.visible {
  display: flex;
}

/* ==========================================
   Utility Classes
   ========================================== */
.parallax-layer {
  transform: translateZ(0);
  transition: transform 0.5s ease-out;
}

/* Visibility utilities for animations */
.reveal-up,
.reveal-down,
.reveal-left,
.reveal-right,
.zoom-in {
  opacity: 0;
  transition: all 0.8s ease-out;
}

.reveal-up {
  transform: translateY(50px);
}

.reveal-down {
  transform: translateY(-50px);
}

.reveal-left {
  transform: translateX(-50px);
}

.reveal-right {
  transform: translateX(50px);
}

.zoom-in {
  transform: scale(0.9);
}

.reveal-up.active,
.reveal-down.active,
.reveal-left.active,
.reveal-right.active,
.zoom-in.active {
  opacity: 1;
  transform: translate(0) scale(1);
}
