/* ==========================================
   CSS TUTORIAL - Let's Learn CSS Step by Step!
   ========================================== */

/* CSS Variables - Store reusable values (like colors) */
:root {
  /* Primary Colors */
  --primary-color: #6366f1; /* Indigo color */
  --secondary-color: #8b5cf6; /* Purple color */
  --accent-color: #ec4899; /* Pink color */

  /* Neutral Colors */
  --text-dark: #1f2937; /* Dark gray for text */
  --text-light: #6b7280; /* Light gray for secondary text */
  --bg-light: #f9fafb; /* Light background */
  --bg-white: #ffffff; /* White background */

  /* Spacing */
  --spacing-xs: 0.5rem; /* 8px */
  --spacing-sm: 1rem; /* 16px */
  --spacing-md: 2rem; /* 32px */
  --spacing-lg: 4rem; /* 64px */
  --spacing-xl: 6rem; /* 96px */

  /* Typography */
  --font-family: "Poppins", sans-serif;
  --font-size-base: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ==========================================
   RESET & BASE STYLES
   ========================================== */

/* Reset default browser styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box; /* Makes padding included in width calculations */
}

/* Body styling - sets default font and background */
body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6; /* Space between lines for readability */
  color: var(--text-dark);
  background-color: var(--bg-white);
  overflow-x: hidden; /* Prevents horizontal scrolling */
}

/* Make all images responsive */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Remove default list styles */
ul {
  list-style: none;
}

/* Remove default link styles */
a {
  text-decoration: none;
  color: inherit; /* Inherits color from parent */
}

/* ==========================================
   CONTAINER - Centers content with max width
   ========================================== */

.container {
  max-width: 1200px; /* Maximum width of content */
  margin: 0 auto; /* Centers horizontally */
  padding: 0 var(--spacing-sm); /* Padding on left and right */
}

/* ==========================================
   NAVIGATION BAR
   ========================================== */

.navbar {
  position: fixed; /* Stays at top when scrolling */
  top: 0;
  left: 0;
  right: 0;
  background-color: rgba(255, 255, 255, 0.95); /* Semi-transparent white */
  backdrop-filter: blur(10px); /* Blur effect behind navbar */
  box-shadow: var(--shadow-sm);
  z-index: 1000; /* Stays above other content */
  transition: var(--transition-normal);
}

.navbar .container {
  display: flex; /* Flexbox for horizontal layout */
  justify-content: space-between; /* Space between logo and menu */
  align-items: center; /* Vertically centers items */
  padding: var(--spacing-sm) var(--spacing-sm);
}

/* Logo styling */
.logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Navigation menu */
.nav-menu {
  display: flex; /* Horizontal menu */
  gap: var(--spacing-md); /* Space between menu items */
}

.nav-link {
  color: var(--text-dark);
  font-weight: 500;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: 6px;
  transition: var(--transition-fast);
  position: relative;
}

/* Hover effect on nav links */
.nav-link:hover {
  color: var(--primary-color);
  background-color: rgba(99, 102, 241, 0.1);
}

/* Hamburger menu (hidden on desktop, shown on mobile) */
.hamburger {
  display: none; /* Hidden by default */
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

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

/* ==========================================
   HERO SECTION - First impression section
   ========================================== */

.hero {
  min-height: 100vh; /* Full viewport height */
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-align: center;
  padding-top: 80px; /* Space for fixed navbar */
}

.hero-content {
  animation: fadeInUp 1s ease-out; /* Animation on load */
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  line-height: 1.2;
}

.highlight {
  color: #fbbf24; /* Yellow highlight */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  opacity: 0.95;
}

.hero-description {
  font-size: 1.1rem;
  margin-bottom: var(--spacing-md);
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================
   BUTTONS
   ========================================== */

.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 8px;
  font-weight: 600;
  transition: var(--transition-normal);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background-color: white;
  color: var(--primary-color);
}

.btn-primary:hover {
  transform: translateY(-2px); /* Moves up slightly */
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background-color: transparent;
  color: white;
  border-color: white;
}

.btn-secondary:hover {
  background-color: white;
  color: var(--primary-color);
}

/* ==========================================
   SECTION STYLING
   ========================================== */

section {
  padding: var(--spacing-xl) 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--spacing-lg);
  color: var(--text-dark);
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
  margin: var(--spacing-sm) auto;
  border-radius: 2px;
}

/* ==========================================
   ABOUT SECTION
   ========================================== */

.about {
  background-color: var(--bg-light);
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-light);
  margin-bottom: var(--spacing-sm);
}
.about-text a {
  color: var(--primary-color);
  text-decoration: underline;
  transition: var(--transition-fast);
  font-weight: 600;
}
.about-text a:visited {
  color: var(--primary-color);
}
.about-text a:hover {
  color: var(--secondary-color);
}

.about-text a:hover {
  color: var(--secondary-color);
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 equal columns */
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.stat {
  text-align: center;
  padding: var(--spacing-md);
  background-color: white;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
}

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

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--spacing-xs);
}

.stat-label {
  color: var(--text-light);
  font-weight: 500;
}

/* ==========================================
   SKILLS SECTION
   ========================================== */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.skill-card {
  background-color: white;
  padding: var(--spacing-md);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
  border: 2px solid transparent;
}

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

.skill-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: var(--spacing-sm);
}

.skill-card h3 {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-xs);
  color: var(--text-dark);
}

.skill-card p {
  color: var(--text-light);
  margin-bottom: var(--spacing-sm);
}

.skill-bar {
  width: 100%;
  height: 8px;
  background-color: var(--bg-light);
  border-radius: 4px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 4px;
  width: 0%; /* Starts at 0, will be animated with JavaScript */
  transition: width 1s ease-out;
}

/* ==========================================
   CURRENTLY LEARNING SECTION
   ========================================== */

.learning {
  background-color: var(--bg-white);
}

.learning-content {
  max-width: 1000px;
  margin: 0 auto;
}

.learning-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.learning-category {
  background-color: white;
  padding: var(--spacing-md);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
  border-left: 4px solid var(--primary-color);
}

.learning-category:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  border-left-color: var(--secondary-color);
}

.learning-category-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  color: var(--text-dark);
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.learning-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.learning-list li {
  color: var(--text-light);
  font-size: 1rem;
  line-height: 1.8;
  padding: var(--spacing-xs) 0;
  padding-left: var(--spacing-sm);
  position: relative;
}

.learning-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

.learning-list li:hover {
  color: var(--text-dark);
  transform: translateX(5px);
  transition: var(--transition-fast);
}

/* ==========================================
   PROJECTS SECTION
   ========================================== */

.projects {
  background-color: var(--bg-light);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.project-card {
  background-color: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.project-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-placeholder {
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
}

.project-content {
  padding: var(--spacing-md);
}

.project-content h3 {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-xs);
  color: var(--text-dark);
}

.project-content p {
  color: var(--text-light);
  margin-bottom: var(--spacing-sm);
  line-height: 1.6;
}

.project-tags {
  display: flex;
  gap: var(--spacing-xs);
  flex-wrap: wrap;
  margin-bottom: var(--spacing-sm);
}

.tag {
  background-color: var(--bg-light);
  color: var(--primary-color);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
}

.project-link {
  color: var(--primary-color);
  font-weight: 600;
  transition: var(--transition-fast);
}

.project-link:hover {
  color: var(--secondary-color);
  transform: translateX(5px);
  display: inline-block;
}

/* ==========================================
   CONTACT SECTION
   ========================================== */

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
  max-width: 1000px;
  margin: 0 auto;
}

.contact-info p {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: var(--spacing-md);
  line-height: 1.8;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.contact-item strong {
  color: var(--text-dark);
}

.contact-item a {
  color: var(--primary-color);
  transition: var(--transition-fast);
}

.contact-item a:hover {
  color: var(--secondary-color);
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group input,
.form-group textarea {
  padding: 12px;
  border: 2px solid var(--bg-light);
  border-radius: 8px;
  font-family: var(--font-family);
  font-size: 1rem;
  transition: var(--transition-fast);
  background-color: white;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
  resize: vertical; /* Allow vertical resizing only */
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
  background-color: var(--text-dark);
  color: white;
  padding: var(--spacing-md) 0;
  text-align: center;
}

.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.social-links {
  display: flex;
  gap: var(--spacing-md);
}

.social-link {
  color: white;
  transition: var(--transition-fast);
}

.social-link:hover {
  color: var(--accent-color);
  transform: translateY(-2px);
}

/* ==========================================
   ANIMATIONS
   ========================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================
   RESPONSIVE DESIGN - Mobile First Approach
   ========================================== */

/* Tablet and below (max-width: 768px) */
@media (max-width: 768px) {
  /* Typography adjustments */
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
  }

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

  /* Navigation menu */
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%; /* Hidden off-screen */
    width: 100%;
    height: calc(100vh - 70px);
    background-color: white;
    flex-direction: column;
    padding: var(--spacing-md);
    transition: var(--transition-normal);
    box-shadow: var(--shadow-lg);
  }

  .nav-menu.active {
    left: 0; /* Slides in when active */
  }

  .hamburger {
    display: flex; /* Show hamburger on mobile */
  }

  /* Stats grid */
  .about-stats {
    grid-template-columns: 1fr; /* Single column on mobile */
  }

  /* Contact section */
  .contact-content {
    grid-template-columns: 1fr; /* Single column on mobile */
  }

  /* Footer */
  .footer .container {
    flex-direction: column;
    text-align: center;
  }
}

/* Small mobile (max-width: 480px) */
@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

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

  .btn {
    width: 100%;
    text-align: center;
  }

  .skills-grid,
  .projects-grid {
    grid-template-columns: 1fr; /* Single column */
  }
}
