* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
}

/* ===================================
           CSS VARIABLES
           =================================== */
:root {
  --primary: #4a90e2;
  --primary-dark: #357abd;
  --secondary: #e94560;
  --dark: #1a1a2e;
  --light: #f5f5f5;
  --white: #ffffff;
  --gray: #666;
  --shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

/* ===================================
           UTILITY CLASSES
           =================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  font-size: 36px;
  margin-bottom: 50px;
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--primary);
  margin: 15px auto 0;
  border-radius: 5px;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

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

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

/* ===================================
           NAVIGATION (Flexbox)
           =================================== */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--white);
  box-shadow: var(--shadow);
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px;
}

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

.nav-menu {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-menu a {
  text-decoration: none;
  color: var(--dark);
  font-weight: 500;
  transition: var(--transition);
}

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

/* Mobile menu button (hidden on desktop) */
.menu-toggle {
  display: none;
  font-size: 24px;
  cursor: pointer;
}

/* ===================================
           HERO SECTION (Flexbox Centering)
           =================================== */
.hero {
  background: linear-gradient(135deg, var(--dark), #2c2c54);
  color: white;
  min-height: 100vh;
  display: flex;
  align-items: center;
  text-align: center;
  padding-top: 80px;
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 20px;
}

.hero .highlight {
  color: var(--primary);
}

.hero p {
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto 30px;
  opacity: 0.9;
}

/* ===================================
           SKILLS SECTION (Grid auto-fit)
           =================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

.skill-card {
  background: var(--white);
  padding: 30px 20px;
  text-align: center;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.skill-card:hover {
  transform: translateY(-10px);
}

.skill-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.skill-card h3 {
  margin-bottom: 10px;
}

/* ===================================
           PROJECTS SECTION (Grid with spanning)
           =================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

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

.project-card:hover {
  transform: translateY(-8px);
}

.project-img {
  height: 200px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.project-info {
  padding: 20px;
}

.project-info h3 {
  margin-bottom: 10px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px 0;
}

.tag {
  background: var(--light);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
}

/* ===================================
           TESTIMONIALS (Flexbox)
           =================================== */
.testimonials-grid {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: center;
}

.testimonial-card {
  background: var(--white);
  padding: 30px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  flex: 1;
  min-width: 250px;
  text-align: center;
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 20px;
}

.testimonial-author {
  font-weight: bold;
  color: var(--primary);
}

/* ===================================
           CONTACT SECTION (Styled Form)
           =================================== */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  background: var(--white);
  padding: 40px;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-family: inherit;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

/* ===================================
           FOOTER
           =================================== */
.footer {
  background: var(--dark);
  color: white;
  text-align: center;
  padding: 40px 0;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.social-links a {
  color: white;
  text-decoration: none;
  transition: var(--transition);
}

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

/* ===================================
           RESPONSIVE DESIGN (Mobile)
           =================================== */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--white);
    flex-direction: column;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
  }

  .nav-menu.active {
    display: flex;
  }

  .hero h1 {
    font-size: 32px;
  }

  .section-title {
    font-size: 28px;
  }

  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: 25px;
  }
}

@media (max-width: 480px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .testimonials-grid {
    flex-direction: column;
  }
}
