/* ======== CSS Variables (Theme & Effects) ======== */
:root {
  /* Dark Theme (Default) */
  --color-primary: #00aaff;
  --color-primary-dark: #0077bb;
  --color-bg: #0d1117;
  --color-bg-light: #161b22;
  --color-border: #30363d;
  --color-text: #c9d1d9;
  --color-text-dark: #8b949e;
  --color-heading: #ffffff;
  --glow-effect: radial-gradient(
    600px at var(--mouse-x) var(--mouse-y),
    rgba(0, 170, 255, 0.1),
    transparent 80%
  );

  --font-family: "Poppins", sans-serif;
  --transition-speed: 0.3s ease;
}

body.light-mode {
  /* Light Theme */
  --color-primary: #007bff;
  --color-primary-dark: #0056b3;
  --color-bg: #f8f9fa;
  --color-bg-light: #ffffff;
  --color-border: #dee2e6;
  --color-text: #495057;
  --color-text-dark: #6c757d;
  --color-heading: #212529;
  --glow-effect: radial-gradient(
    600px at var(--mouse-x) var(--mouse-y),
    rgba(0, 123, 255, 0.08),
    transparent 80%
  );
}

/* ======== Global & Background Effect Styles ======== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  transition: background-color var(--transition-speed),
    color var(--transition-speed);
  position: relative; /* Needed for the pseudo-element */
}

/* The Techy Hover Effect */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--glow-effect);
  z-index: -1; /* Place it behind all content */
  pointer-events: none; /* Make it non-interactive */
  transition: background 0.1s linear;
}

h1,
h2,
h3 {
  font-weight: 600;
  color: var(--color-heading);
  margin-bottom: 1rem;
}

a {
  text-decoration: none;
  color: var(--color-primary);
  transition: var(--transition-speed);
}
a:hover {
  color: var(--color-primary-dark);
}

.content-section {
  padding: 6rem 10%;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.content-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
}
.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: var(--color-primary);
  border-radius: 2px;
  margin: 0.5rem auto 0;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  transition: var(--transition-speed);
  border: 2px solid transparent;
}
.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-heading);
}
.btn-primary:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-3px);
}
.btn-secondary {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-secondary:hover {
  background-color: var(--color-primary);
  color: var(--color-heading);
  transform: translateY(-3px);
}

/* ======== Header & Navigation ======== */
.header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(var(--color-bg), 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 10%;
}
.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-heading);
}
.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}
.nav-link {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
}
.nav-link.active,
.nav-link:hover {
  color: var(--color-primary);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.theme-toggle-btn {
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 1.4rem;
  cursor: pointer;
  transition: var(--transition-speed);
}
.theme-toggle-btn:hover {
  color: var(--color-primary);
  transform: rotate(15deg) scale(1.1);
}
.hamburger {
  display: none;
  cursor: pointer;
}
.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: var(--color-heading);
  transition: all 0.3s ease-in-out;
}

/* ======== Hero Section ======== */
.hero-section {
  min-height: calc(100vh - 67px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 5%;
}
.hero-content h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
}
.hero-subtitle {
  font-size: 1.5rem;
  color: var(--color-text);
  margin-bottom: 2rem;
  font-weight: 300;
}
.hero-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* ======== About Section ======== */
.about-container {
  display: flex;
  gap: 3rem;
  align-items: center;
}
.about-text {
  flex: 2;
}
.about-text p {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

/* ======== Skills Section ======== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}
.skill-category {
  background: var(--color-bg-light);
  padding: 2rem;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  transition: var(--transition-speed);
}
.skill-category:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 170, 255, 0.1);
}
.skill-category h3 {
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 0.5rem;
  display: inline-block;
}
.skill-category ul {
  list-style: none;
  margin-top: 1rem;
}
.skill-category li {
  font-size: 1.1rem;
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.skill-category li i {
  color: var(--color-primary);
  font-size: 1.2rem;
  width: 20px;
  text-align: center;
}

/* ======== Experience Section (Timeline) ======== */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}
.timeline::after {
  content: "";
  position: absolute;
  width: 4px;
  background-color: var(--color-border);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -2px;
}
.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
}
.timeline-item:nth-child(odd) {
  left: 0;
}
.timeline-item:nth-child(even) {
  left: 50%;
}
.timeline-item::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: var(--color-bg);
  border: 4px solid var(--color-primary);
  border-radius: 50%;
  top: 25px;
  z-index: 1;
}
.timeline-item:nth-child(odd)::after {
  right: -10px;
}
.timeline-item:nth-child(even)::after {
  left: -10px;
}
.timeline-content {
  padding: 1.5rem;
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: 10px;
}
.timeline-content h3 {
  color: var(--color-primary);
}
.timeline-sub {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-heading);
}
.timeline-date {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-dark);
  margin: 0.5rem 0 1rem;
}

/* ======== Projects Section ======== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}
.project-card {
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-speed);
}
.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 170, 255, 0.1);
}
.project-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.project-content h3 {
  font-size: 1.3rem;
}
.project-content p {
  flex-grow: 1;
  margin-bottom: 1rem;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.project-tags span {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}
.project-links {
  display: flex;
  gap: 1rem;
}
.btn-icon {
  font-size: 1.5rem;
  color: var(--color-text-dark);
}
.btn-icon:hover {
  color: var(--color-primary);
}

/* ======== Education Section ======== */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.edu-card {
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  padding: 2rem;
  border-radius: 10px;
}
.edu-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.edu-header i {
  font-size: 1.5rem;
  color: var(--color-primary);
}
.edu-title {
  font-size: 1.2rem;
  margin: 0;
}
.edu-sub {
  font-size: 1rem;
  font-weight: 500;
  margin-top: 1rem;
}
.edu-date {
  font-size: 0.9rem;
  color: var(--color-text-dark);
  font-weight: 600;
}

/* ======== Contact Section ======== */
.contact-container {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}
.contact-text {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

/* ======== Footer ======== */
.footer {
  padding: 3rem 10%;
  background: var(--color-bg-light);
  border-top: 1px solid var(--color-border);
  text-align: center;
}
.social-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}
.social-links a {
  font-size: 1.8rem;
  color: var(--color-text-dark);
}
.social-links a:hover {
  color: var(--color-primary);
  transform: translateY(-3px);
}
.footer p {
  font-size: 0.9rem;
}

/* ======== Responsive Media Queries ======== */
@media (max-width: 992px) {
  .navbar,
  .content-section,
  .footer {
    padding-left: 5%;
    padding-right: 5%;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }
  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 67px;
    flex-direction: column;
    background-color: var(--color-bg);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    gap: 0;
  }
  .nav-menu.active {
    left: 0;
  }
  .nav-item {
    width: 100%;
  }
  .nav-link {
    display: block;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--color-border);
  }
  .hero-content h1 {
    font-size: 2.8rem;
  }
  .hero-subtitle {
    font-size: 1.2rem;
  }
  .about-container {
    flex-direction: column;
    text-align: center;
  }
  .timeline::after {
    left: 30px;
  }
  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 20px;
  }
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    left: 0;
  }
  .timeline-item::after {
    left: 20px;
  }
}
