:root {
  --bg: #0f172a;
  --text: #ffffff;
  --card: #1e293b;
  --primary: #38bdf8;
  --secondary: #334155;
}

/* LIGHT THEME */
body.light {
  --bg: #f8fafc;
  --text: #0f172a;
  --card: #ffffff;
  --primary: #2563eb;
  --secondary: #e2e8f0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  transition: 0.4s;
  line-height: 1.6;
  cursor: none;
  margin: 0;
  padding: 0;
}

/* HEADER */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 80px;
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 100;
  height: 80px;
}

.logo {
  color: var(--primary);
  font-size: 24px;
  font-weight: bold;
}

nav a {
  margin-left: 20px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  transition: 0.3s;
  position: relative;
}

nav a::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  background: var(--primary);
  left: 0;
  bottom: -5px;
  transition: 0.3s;
}

nav a:hover::after {
  width: 100%;
}

nav a:hover {
  color: var(--primary);
}

#themeToggle {
  background: var(--secondary);
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
}

/* HERO */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  background-image: url("Assets/images/background.gif");
  background-size: cover;
  background-position: center;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  z-index: 0;
}

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

.hero h1 {
  font-size: 28px;
  text-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary);
}

.hero h2 {
  font-size: 55px;
  color: var(--primary);
  text-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary);
}

.hero p {
  max-width: 650px;
  margin: 20px auto;
}

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

/* BUTTON */
.btn {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 12px 22px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
  position: relative;
  overflow: hidden;
  display: inline-block;
}

.btn::before {
  content: "";
  position: absolute;
  width: 0%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  left: 0;
  top: 0;
  transition: 0.4s;
}

.btn:hover::before {
  width: 100%;
}

.btn:hover {
  transform: scale(1.05);
  background: var(--primary);
  color: black;
  box-shadow: 0 0 20px var(--primary), 0 0 40px var(--primary);
}

/* SECTION */
section {
  padding: 80px 20px;
  text-align: center;
  scroll-margin-top: 80px;
}

/* ABOUT */
.about-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  max-width: 1100px;
  margin: auto;
  margin-top: 40px;
  text-align: left;
}

.about-container div {
  background: var(--card);
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  transition: 0.3s;
}

.about-container div:hover {
  transform: translateY(-5px);
}

.about-container h3 {
  color: var(--primary);
  margin-bottom: 10px;
  text-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary);
}

/* EDUCATION */
.education-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1000px;
  margin: auto;
  margin-top: 40px;
}

.edu-card {
  background: var(--card);
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  transition: 0.3s;
}

.edu-card:hover {
  transform: translateY(-6px);
}

.edu-card h3 {
  color: var(--primary);
}

/* SKILLS GRID */
.skills-desc {
  max-width: 700px;
  margin: auto;
  margin-top: 10px;
  color: #94a3b8;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 25px;
  max-width: 1100px;
  margin: auto;
  margin-top: 40px;
}

.skill-card {
  background: var(--card);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  justify-content: center;
  font-weight: 600;
  transition: 0.3s;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.skill-card img {
  width: 32px;
  height: 32px;
}

.skill-card:hover {
  transform: translateY(-6px) scale(1.05);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

/* PROJECTS / CARDS */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  max-width: 1200px;
  margin: auto;
}

.card {
  background: var(--card);
  padding: 20px;
  border-radius: 12px;
  transition: 0.4s;
  border: 1px solid rgba(0, 247, 255, 0.2);
  box-shadow: 0 0 20px rgba(0, 247, 255, 0.2);
  backdrop-filter: blur(10px);
}

.card:hover {
  transform: scale(1.05);
  box-shadow: 0 0 40px rgba(0, 247, 255, 0.6);
}

.project-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
}

/* EXPERIENCE */
.timeline {
  max-width: 700px;
  margin: auto;
  border-left: 3px solid var(--primary);
  padding-left: 20px;
  text-align: left;
}

.timeline-item {
  margin-bottom: 30px;
  position: relative;
}

.timeline-item::before {
  content: "";
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
  position: absolute;
  left: -27px;
  top: 5px;
}

/* GITHUB */
.github-stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.github-stats img {
  width: 300px;
  margin: 15px;
  border-radius: 10px;
  transition: 0.4s;
}

.github-stats img:hover {
  transform: scale(1.05);
}

#github-calendar img {
  max-width: 900px;
  width: 100%;
  margin-top: 30px;
  border-radius: 10px;
}

/* CONTACT */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  max-width: 1000px;
  margin: auto;
  margin-top: 40px;
}

.contact-form input,
.contact-form textarea {
  padding: 12px;
  border-radius: 6px;
  border: none;
  background: #334155;
  color: white;
  margin-bottom: 15px;
  width: 100%;
}

.contact-form textarea {
  height: 120px;
}

.contact-form button {
  background: var(--primary);
  border: none;
  padding: 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s;
}

.contact-form button:hover {
  transform: scale(1.05);
}

.contact-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 5px;
}

.social-icons a {
  font-size: 26px;
  color: var(--primary);
  transition: 0.3s;
}

.social-icons a:hover {
  transform: scale(1.2);
  color: #2563eb;
}

/* FOOTER */
footer {
  background: #020617;
  padding: 20px;
  text-align: center;
}

/* MODAL */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal-content {
  background: var(--card);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  width: 90%;
  max-width: 700px;
  position: relative;
  animation: zoomIn 0.4s ease;
}

.close {
  font-size: 28px;
  cursor: pointer;
  position: absolute;
  right: 20px;
  top: 10px;
}

.glass {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

@keyframes zoomIn {
  from {
    transform: scale(0.7);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* CUSTOM CURSOR */
.cursor {
  position: fixed;
  width: 12px;
  height: 12px;
  background: #00f7ff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  box-shadow: 0 0 10px #00f7ff, 0 0 25px #00f7ff, 0 0 50px #00f7ff;
}

/* CANVAS TRAIL */
#trail {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  header {
    padding: 20px;
    flex-direction: column;
    gap: 10px;
    height: auto;
  }

  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

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

  .hero h2 {
    font-size: 40px;
  }

  .cursor {
    display: none;
  }

  body {
    cursor: default;
  }

  section {
    scroll-margin-top: 90px;
  }
/* DEFAULT DARK THEME (The base variables) */
:root {
  --bg: #0f172a;           /* Dark Navy */
  --text: #ffffff;
  --card: #1e293b;
  --primary: #38bdf8;
  --secondary: #334155;
  --header-bg: #1e293b;
}

/* LIGHT THEME (Activates when .light class is on body) */
body.light {
  --bg: #f1f5f9;           /* Light Grey/Slate Background */
  --text: #0f172a;         /* Dark Text for Contrast */
  --card: #ffffff;         /* Pure White Cards */
  --primary: #2563eb;      /* Deeper Blue for visibility */
  --secondary: #e2e8f0;    /* Light Grey elements */
  --header-bg: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  transition: background 0.4s ease, color 0.4s ease; /* Smooth transition */
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

/* HEADER */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 80px;
  background: var(--header-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  height: 80px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo {
  color: var(--primary);
  font-size: 24px;
  font-weight: bold;
}

nav a {
  margin-left: 20px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  transition: 0.3s;
}

nav a:hover {
  color: var(--primary);
}

/* HERO SECTION - Background GIF remains, but text adjusts */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  background-image: url("Assets/images/background.gif");
  background-size: cover;
  background-position: center;
}

/* Overlay needs to be lighter in light mode if you want the GIF visible */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6); /* Keeps text readable on the GIF */
  z-index: 0;
}

body.light .hero::before {
  background: rgba(255, 255, 255, 0.3); /* Lighter overlay for light theme */
}

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

/* SECTION SCROLLING */
section {
  padding: 80px 20px;
  text-align: center;
  scroll-margin-top: 80px; /* Crucial for scrolling to the right spot */
}

/* CARDS (Shared style for About, Edu, Projects) */
.card, .edu-card, .about-container div {
  background: var(--card);
  color: var(--text);
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s, background 0.4s;
}

/* SIDE-BY-SIDE LAYOUT: CONTACT & GITHUB */
.contact-github-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  max-width: 1200px;
  margin: 40px auto;
}

.contact-container, .github-stats {
  flex: 1;
  min-width: 320px;
  max-width: 550px;
}

.github-stats img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--secondary);
}

/* CONTACT FORM COLORS */
.contact-form input, 
.contact-form textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border-radius: 6px;
  border: 1px solid var(--secondary);
  background: var(--card);
  color: var(--text);
}

/* BUTTON */
.btn {
  background: var(--primary);
  color: #fff;
  padding: 12px 25px;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  display: inline-block;
  transition: 0.3s;
}

.btn:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
  header {
    padding: 10px 20px;
    flex-direction: column;
    height: auto;
  }
  
  nav {
    margin-top: 10px;
  }

  .contact-github-wrapper {
    flex-direction: column;
    align-items: center;
  }
}

}