/* Base Reset and Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #a5a488; /* Main accent color */
  --text-color: #111; /* Primary text color */
  --bg-light: #f9f9f9; /* Light background */
  --bg-white: #fff; /* White background */
  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.1); /* Soft shadow */
  --transition-fast: 0.3s ease; /* Fast transition */
  --transition-slow: 0.5s ease; /* Slow transition for animations */
}

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

@media (max-width: 480px) {
  html {
    font-size: 90%;
  }
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg-white);
  color: var(--text-color);
  overflow-x: hidden;
  padding-top: 80px;
  transition: background var(--transition-fast);
}

/* Navbar Styles */
.navbar {
  width: 100%;
  padding: 20px 40px;
  position: fixed;
  top: 0;
  left: 0;
  background: var(--bg-white);
  box-shadow: var(--shadow-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: padding var(--transition-fast), box-shadow var(--transition-fast);
}

.navbar.scrolled {
  padding: 10px 40px; /* Shrink on scroll for better visibility */
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.navbar .logo {
  font-size: 24px;
  font-weight: 700;
  opacity: 0;
  animation: fadeIn 1s forwards; /* Fade-in animation for logo */
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 30px;
}

.nav-links li a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-links li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: var(--primary-color);
  transition: width var(--transition-fast);
}

.nav-links li a:hover {
  color: var(--primary-color);
}

.nav-links li a:hover::after {
  width: 100%; /* Underline animation on hover */
}

.menu-icon {
  display: none;
  font-size: 24px;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.menu-icon:hover {
  transform: rotate(90deg); /* Rotate icon on hover for interactivity */
}

/* Hero Section Styles */
.hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 80px 10%;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.hero-left {
  flex: 1 1 500px;
  z-index: 1;
  opacity: 0;
  animation: slideInLeft 1s 0.5s forwards; /* Slide-in animation */
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-50px); }
  to { opacity: 1; transform: translateX(0); }
}

.hero-left .tagline {
  font-size: 14px;
  color: #999;
  margin-bottom: 20px;
  letter-spacing: 2px;
}

.hero-left h1 {
  font-size: clamp(2.2rem, 6vw, 3rem);
  font-weight: 700;
  margin-bottom: 30px;
  color: var(--text-color);
}

.hero-left h1 span {
  color: var(--primary-color);
  transition: color var(--transition-fast);
}

.hero-left h1:hover span {
  color: #7e826d; /* Subtle color shift on hover */
}

.buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn:hover {
  transform: scale(1.05); /* Scale on hover for interactivity */
  box-shadow: var(--shadow-soft);
}

.btn.primary {
  background: var(--primary-color);
  color: #fff;
}

.btn.outline {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.hero-right {
  flex: 1 1 400px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 0;
  opacity: 0;
  animation: fadeIn 1.5s forwards;
}

.hero-right img {
  width: 550px;
  height: 550px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--bg-white);
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-slow);
}

.hero-right:hover img {
  transform: rotate(5deg) scale(1.05); /* Subtle rotate and scale on hover */
}

.bg-skew {
  position: absolute;
  top: 0;
  right: -20%;
  width: 140%;
  height: 100%;
  background: #f0f0f0;
  transform: skewX(-15deg);
  z-index: -1;
  animation: skewAnimate 2s infinite alternate; /* Gentle skew animation */
}

@keyframes skewAnimate {
  from { transform: skewX(-15deg); }
  to { transform: skewX(-10deg); }
}

/* About Section Styles */
.about-section {
  padding: 60px 20px;
  background: var(--bg-light);
}

.container {
  max-width: 1100px;
  margin: auto;
}

.about-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
}

.about-img img {
  width: 300px;
  max-width: 400px;
  height: 450px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  animation: fadeIn 1s 0.2s forwards;
  transition: transform var(--transition-fast);
}

.about-img:hover img {
  transform: translateY(-5px); /* Lift on hover */
}

.about-content {
  flex: 1;
  opacity: 0;
  animation: slideInLeft 1s 0.4s forwards;
}

.about-content h2 {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  margin-bottom: 15px;
}

.about-content p {
  font-size: 16px;
  margin-bottom: 10px;
  color: #333;
  transition: color var(--transition-fast);
}

.about-content p:hover {
  color: var(--primary-color); /* Color shift for interactivity */
}

.about-details p {
  margin: 6px 0;
}

.interests {
  margin-top: 15px;
}

.interests span {
  display: inline-block;
  margin-right: 15px;
  background: #e0e0e0;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  color: #333;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.interests span:hover {
  background: var(--primary-color);
  color: #fff;
  transform: scale(1.1); /* Pop on hover */
}

/* Skills Section Styles */
.skills-section {
  background: #f4f4f4;
  padding: 60px 20px;
  text-align: center;
  scroll-margin-top: 80px;
}

.skills-section h2 {
  font-size: clamp(2rem, 5vw, 2.5rem);
  margin-bottom: 40px;
  font-weight: 700;
  opacity: 0;
  animation: fadeIn 1s forwards;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  justify-items: center;
}

.skill-card {
  background: var(--bg-white);
  border-radius: 15px;
  padding: 25px 15px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  max-width: 180px;
  opacity: 0;
  animation: slideInUp 1s forwards; /* Staggered animation */
}

.skill-card:nth-child(odd) { animation-delay: 0.2s; }
.skill-card:nth-child(even) { animation-delay: 0.4s; }

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.skill-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.skill-icon {
  width: 120px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 10px;
  transition: transform var(--transition-slow);
}

.skill-card:hover .skill-icon {
  transform: rotate(360deg); /* Spin icon on hover */
}

.skill-card h4 {
  font-size: 18px;
  color: #333;
  font-weight: 600;
}

.level-label {
  font-size: 14px;
  font-weight: 600;
  color: #777;
}

/* Projects Section Styles */
.projects-section {
  padding: 80px 20px;
  background-color: var(--bg-light);
  text-align: center;
}

.projects-grid {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 40px;
}

.project-card {
  position: relative;
  width: 280px;
  height: 200px;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  opacity: 0;
  animation: fadeIn 1s forwards;
}

.project-card:nth-child(odd) { animation-delay: 0.3s; }
.project-card:nth-child(even) { animation-delay: 0.6s; }

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow), filter var(--transition-slow);
}

.project-info {
  position: absolute;
  bottom: -100%; /* Start from bottom for slide-up */
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 10px;
  transition: bottom var(--transition-slow);
}

.project-card:hover img {
  transform: scale(1.1);
  filter: blur(2px);
}

.project-card:hover .project-info {
  bottom: 0; /* Slide-up overlay on hover */
}

.project-info h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.project-info a {
  padding: 6px 14px;
  background: #fff;
  color: #000;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.project-info a:hover {
  background: var(--primary-color);
  color: #fff;
}

/* Education Section Styles */
.education-section {
  padding: 60px 20px;
  background-color: #f8f8f8;
  text-align: center;
}

.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.education-card {
  background: var(--bg-white);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-fast);
  opacity: 0;
  animation: slideInUp 1s forwards;
}

.education-card:hover {
  transform: translateY(-5px);
}

.edu-icon {
  width: 50px;
  margin-bottom: 15px;
  transition: transform var(--transition-slow);
}

.education-card:hover .edu-icon {
  transform: scale(1.2); /* Scale icon on hover */
}

/* Certifications Section Styles */
.certifications-section {
  padding: 60px 20px;
  background-color: var(--bg-light);
  text-align: center;
}

.certifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.cert-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-fast);
  opacity: 0;
  animation: fadeIn 1s forwards;
}

.cert-card:hover {
  transform: translateY(-5px);
}

.cert-icon {
  width: 50px;
  margin-bottom: 15px;
  transition: transform var(--transition-slow);
}

.cert-card:hover .cert-icon {
  transform: rotate(15deg); /* Tilt icon on hover */
}

.cert-link {
  color: #0077cc;
  font-weight: bold;
  display: inline-block;
  margin-top: 10px;
  transition: color var(--transition-fast);
}

.cert-link:hover {
  color: var(--primary-color);
}

/* Contact Section Styles */
.contact-section {
  padding: 80px 20px;
  background: #f5f5f5;
  text-align: center;
}

.contact-section .container {
  max-width: 600px;
  margin: auto;
}

.contact-form {
  margin-top: 30px;
  padding: 0 10px;
}

.form-group {
  margin-bottom: 20px;
  position: relative;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 15px;
  border: none;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  font-size: 16px;
  transition: box-shadow var(--transition-fast), border var(--transition-fast);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  box-shadow: 0 0 12px rgba(165, 164, 136, 0.5); /* Glow on focus */
  border: 1px solid var(--primary-color);
}

.contact-form .btn {
  padding: 10px 20px;
  border: none;
  background: var(--text-color);
  color: #fff;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.contact-form .btn:hover {
  background: var(--primary-color);
  transform: scale(1.05);
}

/* Footer Styles */
.footer {
  background-color: var(--text-color);
  color: #fff;
  padding: 50px 20px;
  text-align: center;
}

.footer h3 {
  font-size: 24px;
  margin-bottom: 10px;
  opacity: 0;
  animation: fadeIn 1s forwards;
}

.footer p {
  margin: 10px 0;
}

.social-icons {
  margin: 20px 0;
}

.social-icons a {
  color: #fff;
  font-size: 20px;
  margin: 0 10px;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.social-icons a:hover {
  color: var(--primary-color);
  transform: scale(1.2); /* Scale social icons on hover */
}

.footer .copyright {
  margin-top: 15px;
  font-size: 14px;
  color: #bbb;
}

/* Responsive Styles */
@media (max-width: 991px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding: 60px 5%;
  }

  .hero-left,
  .hero-right {
    width: 100%;
    max-width: 100%;
  }

  .hero-left {
    margin-bottom: 40px;
  }

  .bg-skew {
    display: none;
  }

  .navbar {
    padding: 15px 20px;
  }

  .nav-links {
    position: absolute;
    top: 60px;
    right: 20px;
    background: var(--bg-white);
    flex-direction: column;
    width: 200px;
    box-shadow: var(--shadow-soft);
    padding: 15px 0;
    display: none;
    opacity: 0;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    transform: translateY(-10px);
  }

  #menu-toggle:checked + .menu-icon + .nav-links {
    display: flex;
    opacity: 1;
    transform: translateY(0); /* Smooth slide-down for mobile menu */
  }

  .nav-links li {
    margin: 10px 0;
    text-align: center;
  }

  .menu-icon {
    display: block;
  }
}

@media (max-width: 768px) {
  .about-grid {
    flex-direction: column;
    text-align: center;
  }

  .projects-grid {
    flex-direction: column;
    align-items: center;
  }

  .project-card {
    width: 95%;
    height: 220px;
  }

  .footer h3 {
    font-size: 20px;
  }

  .footer p {
    font-size: 14px;
  }

  .social-icons a {
    font-size: 18px;
    margin: 0 8px;
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 14px;
  }

  .contact-form .btn {
    width: 100%;
  }
}
