/* =============================
   Theme Variables
============================= */
:root {
  --bg-color: #0d1117;
  --text-color: #ffffff;
  --card-bg: #1c1f26;
  --card-border: rgba(0, 255, 255, 0.3);
  --highlight: #0ff;
}

body.light-mode {
  --bg-color: #f9f9f9;
  --text-color: #111111;
  --card-bg: #ffffff;
  --card-border: rgba(0, 0, 0, 0.1);
  --highlight: #0077ff;
}


/* =============================
   Global Styles & Transitions
============================= */
body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  transition: background 0.5s ease, color 0.5s ease;
  overflow-x: hidden;
}

/* Dark & Light Mode */
body.light-mode {
  background: linear-gradient(120deg, #f5f7fa, #c3cfe2);
  color: #111;
}

body.dark-mode {
  background: radial-gradient(circle at top, #0a0f1c, #000);
  color: #eee;
}


/* =============================
   About Me Section (Upgraded)
============================= */
.about-section {
  padding: 5rem 10%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-container {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 2.5rem;
  border: 1px solid rgba(0, 255, 255, 0.3);
  box-shadow: 0 0 15px rgba(0,255,255,0.2);
  transition: transform 0.4s ease;
}
.about-container:hover {
  transform: scale(1.02);
}

.about-image img {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #0ff;
  box-shadow: 0 0 20px #0ff;
  transition: transform 0.4s;
}
.about-image img:hover {
  transform: rotate(3deg) scale(1.05);
}

.about-content {
  max-width: 600px;
}

.about-content h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #0ff;
}

.about-content p {
  line-height: 1.6;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.about-content .highlight {
  color: #0ff;
  font-weight: bold;
}

.about-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: rgba(0, 255, 255, 0.08);
  border: 1px solid rgba(0, 255, 255, 0.4);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  text-align: center;
  box-shadow: 0 0 10px rgba(0,255,255,0.3);
  transition: transform 0.3s, box-shadow 0.3s;
}
.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 20px #0ff;
}

.stat-card h3 {
  font-size: 1.8rem;
  margin-bottom: 0.3rem;
  color: #0ff;
}
.stat-card p {
  font-size: 0.9rem;
  opacity: 0.8;
}


/* =============================
   Loader Animation
============================= */
.loader {
  border: 5px solid #222;
  border-top: 5px solid #0ff;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  margin: auto;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* =============================
   Particle Background
============================= */
#particles-js {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* =============================
   Toggle Button
============================= */
#theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
}
#toggle-btn {
  background: #111;
  color: #0ff;
  border: 2px solid #0ff;
  border-radius: 50%;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.3s ease-in-out;
}
#toggle-btn:hover {
  background: #0ff;
  color: #111;
  box-shadow: 0 0 15px #0ff, 0 0 30px #0ff;
}

/* =============================
   Buttons
============================= */
.btn, a, button {
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

.btn {
  background: transparent;
  border: 2px solid #0ff;
  padding: 0.5rem 1.2rem;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  color: #0ff;
  transition: 0.3s ease-in-out;
}
.btn:hover {
  background: #0ff;
  color: #111;
  box-shadow: 0 0 10px #0ff, 0 0 20px #0ff;
}

/* =============================
   Input Fields
============================= */
.input-field {
  width: 100%;
  padding: 0.75rem;
  margin: 0.5rem 0;
  border-radius: 8px;
  outline: none;
  border: 1px solid #0ff;
  background: rgba(0,0,0,0.5);
  color: #0ff;
  transition: box-shadow 0.3s;
}
.input-field:focus {
  box-shadow: 0 0 10px #0ff, 0 0 20px #0ff;
}

/* =============================
   Timeline
============================= */
.timeline {
  border-left: 2px solid #0ff;
  padding-left: 1rem;
}
.timeline-item {
  margin-bottom: 1.5rem;
  position: relative;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -9px;
  top: 5px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #0ff;
  box-shadow: 0 0 10px #0ff;
}

/* =============================
   Cards (Projects, Skills, Certs)
============================= */
.project-card, .cert-card, .skill {
  background: rgba(20, 20, 30, 0.9);
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid #0ff;
  transition: transform 0.4s, box-shadow 0.4s;
}
.project-card:hover, .cert-card:hover, .skill:hover {
  transform: scale(1.07);
  box-shadow: 0 0 20px #0ff, 0 0 40px #0ff;
}
body {
  background: var(--bg-color);
  color: var(--text-color);
  transition: background 0.4s, color 0.4s;
}

/* Cards (projects, skills, certs) */
.project-card, .cert-card, .skill {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-color);
  transition: transform 0.3s, background 0.3s, color 0.3s;
}
.project-card:hover, .cert-card:hover, .skill:hover {
  transform: scale(1.05);
}

/* Timeline (Education) */
.timeline {
  border-left: 2px solid var(--highlight);
}
.timeline-item {
  color: var(--text-color);
}

/* Headings + Highlights */
h2, h3, .highlight {
  color: var(--highlight);
}

/* =============================
   Animations on Scroll
============================= */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in.show {
  opacity: 1;
  transform: translateY(0);
}
/* =============================
   Education Section (Upgraded)
============================= */
.education-section {
  padding: 5rem 10%;
  text-align: center;
}

.education-section h2 {
  font-size: 2.2rem;
  margin-bottom: 3rem;
  color: var(--highlight);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Timeline container */
.timeline {
  position: relative;
  margin: 0 auto;
  padding: 2rem 0;
  width: 90%;
  max-width: 800px;
}

/* Vertical line */
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--highlight), transparent);
  animation: glowLine 3s linear infinite alternate;
}

/* Timeline items */
.timeline-item {
  position: relative;
  width: 50%;
  padding: 2rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(0,255,255,0.2);
  transition: transform 0.4s, box-shadow 0.4s;
}

.timeline-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 0 25px var(--highlight);
}

/* Alternate left/right */
.timeline-item:nth-child(odd) {
  left: 0;
}
.timeline-item:nth-child(even) {
  left: 50%;
  transform: translateX(50%);
}

/* Icon */
.timeline-icon {
  position: absolute;
  top: 20px;
  left: -35px;
  width: 50px;
  height: 50px;
  background: var(--highlight);
  color: #000;
  font-size: 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px var(--highlight);
  animation: pulseIcon 2s infinite alternate;
}
.timeline-item:nth-child(even) .timeline-icon {
  left: auto;
  right: -35px;
}

/* Content */
.timeline-content h3 {
  color: var(--highlight);
  margin-bottom: 0.5rem;
}
.edu-institute {
  display: block;
  font-weight: bold;
  margin-bottom: 0.3rem;
}
.edu-year {
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Animations */
@keyframes glowLine {
  from { box-shadow: 0 0 10px var(--highlight); }
  to { box-shadow: 0 0 25px var(--highlight); }
}
@keyframes pulseIcon {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

/* Responsive */
@media (max-width: 768px) {
  .timeline::before {
    left: 10px;
  }
  .timeline-item,
  .timeline-item:nth-child(even) {
    width: 100%;
    left: 0;
    transform: none;
    margin-left: 2rem;
  }
  .timeline-item .timeline-icon {
    left: -30px;
    right: auto;
  }
}
/* Floating CTA */
.floating-cta {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--highlight);
  color: #000;
  padding: 0.8rem 1.2rem;
  border-radius: 50px;
  font-weight: bold;
  box-shadow: 0 0 15px var(--highlight);
  transition: transform 0.3s, background 0.3s;
  z-index: 1000;
}
.floating-cta:hover {
  transform: scale(1.1);
  background: #00ffee;
}

/* Resume Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
}
.modal-content {
  background: var(--card-bg);
  color: var(--text-color);
  padding: 2rem;
  border-radius: 12px;
  width: 80%;
  max-width: 800px;
  position: relative;
}
.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
}
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 5px;
  width: 0;
  background: var(--highlight);
  z-index: 3000;
  transition: width 0.2s ease;
}
html {
  scroll-behavior: smooth;
}

section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
section.show {
  opacity: 1;
  transform: translateY(0);
}
/* Contact Section */
.contact-section {
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--accent-color, #3498db);
}

.contact-subtext {
  font-size: 1rem;
  opacity: 0.8;
  margin-bottom: 3rem;
}

/* Layout */
.contact-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: start;
}

/* Info Cards */
.info-card {
  background: rgba(40, 44, 52, 0.85);
  border: 1px solid rgba(52, 152, 219, 0.4);
  border-radius: 15px;
  padding: 2rem 1rem;
  backdrop-filter: blur(10px);
  transition: transform 0.3s, box-shadow 0.3s;
}
.info-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 0 20px rgba(52, 152, 219, 0.7);
}
.info-card i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--accent-color, #3498db);
}
.info-card h3 {
  margin: 0.5rem 0;
}

/* Form */
.contact-form {
  background: rgba(40, 44, 52, 0.9);
  border: 1px solid rgba(52, 152, 219, 0.4);
  border-radius: 15px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  backdrop-filter: blur(10px);
}
.contact-form .input-field {
  padding: 0.8rem;
  border: none;
  border-radius: 10px;
  outline: none;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.9);
  color: #000;
  transition: box-shadow 0.3s;
}
.contact-form .input-field:focus {
  box-shadow: 0 0 10px rgba(52, 152, 219, 0.6);
}

/* Buttons */
.btn-glow {
  background: linear-gradient(45deg, #3498db, #2ecc71);
  border: none;
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 0 15px rgba(52, 152, 219, 0.6);
  text-decoration: none;
  display: inline-block;
}
.btn-glow:hover {
  box-shadow: 0 0 25px rgba(46, 204, 113, 0.8);
  transform: translateY(-3px);
}
/* =========================
   SCROLL ANIMATION EFFECTS
=========================== */

.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s ease-out;
  will-change: opacity, transform;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Optional variations */
.fade-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 1s ease-out;
}

.fade-right {
  opacity: 0;
  transform: translateX(40px);
  transition: all 1s ease-out;
}

.fade-left.visible,
.fade-right.visible {
  opacity: 1;
  transform: translateX(0);
}
html {
  scroll-behavior: smooth;
}
