/* ========================================
   BASE LAYOUT & GLOBAL STYLES
======================================== */
html, body {
  height: 100%;
  margin: 0;
  font-family: 'Inter', sans-serif; /* Segoe UI, Tahoma, Geneva, Verdana, sans-serif; */
  line-height: 1.6;
  color: #333;
}

body {
  display: flex;
  flex-direction: column;
}

.main-content {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
  padding-top: 120px; /* Adjust if your navbar is taller or shorter */
}

/* top padding to prevent content from being hidden under the navbar: */
main.hero,
main.about-section,
main.contact-section {
  padding-top: 150px;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}


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

.navbar {
  position: fixed; /* pins the nav to the top */
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 0.6rem 1.2rem;
  z-index: 1000; /*  ensures it’s above all content */
  backdrop-filter: blur(6px); /* + light background gives it a modern floating look */
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}

.logo-img {
  height: 80px;
  width: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  position: relative;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.25rem 0;
  transition: color 0.3s ease;
}

/* Hover underline animation */
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 1px;
  background-color: #0077cc;
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a:hover {
  color: #0077cc;
}

/* Active page highlight */
.nav-links a.active {
  color: #0077cc;
  font-weight: 600;
}

.nav-links a.active::after {
  width: 100%;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0.5rem;
  }
}

@media (min-width: 769px) {
  .nav-toggle {
    display: none;
  }
}


.nav-toggle .bar {
  width: 25px;
  height: 3px;
  background-color: #333;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Animate into X when menu is open */
.nav-toggle.open .bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.open .bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open .bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Default hidden on mobile */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: center;       /* ✅ center items horizontally */
    justify-content: center;   /* optional: vertical centering if needed */
    text-align: center;        /* centers text inside links */
    position: absolute;
    top: 100%;
    left: 0;
    width: 100vw;
    background-color: white;
    padding: 1.5rem 2rem;
    z-index: 999;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    animation: slideFadeIn 0.3s ease forwards;
  }
  

  .nav-links.show {
    display: flex;
  }

  .nav-links a {
    padding: 0;
    font-size: 1.05rem;
    opacity: 0;
    transform: translateY(10px);
    animation: menuItemFade 0.4s ease forwards;
  }

  .nav-links.show a:nth-child(1) { animation-delay: 0.05s; }
  .nav-links.show a:nth-child(2) { animation-delay: 0.1s; }
  .nav-links.show a:nth-child(3) { animation-delay: 0.15s; }
  .nav-links.show a:nth-child(4) { animation-delay: 0.2s; }
  .nav-links.show a:nth-child(5) { animation-delay: 0.25s; }
}



/* ========================================
   HERO SECTION
======================================== */
.hero {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 2rem 0;
  position: relative;
  z-index: 1;
}

.hero-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.hero-text {
  flex: 1;
  min-width: 280px;
}

.hero-text h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.hero-image img {
  max-width: 300px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* === Background Effects === */
#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;           /* Keeps it behind content */
  pointer-events: none;  /* Allows clicking through it */
}


/* ========================================
   CTA BUTTONS
======================================== */
.cta-button {
  background-color: #0077cc;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.cta-button:hover {
  background-color: #005fa3;
}

.cta-button.alt {
  background-color: #333;
}

.cta-button.alt:hover {
  background-color: #555;
}


/* ========================================
   SKILLS SECTION
======================================== */
.skills-section h2 {
  text-align: left;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
  color: #222;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.5rem 3rem; /* More gap between rows and columns */
  justify-content: center;
  align-items: start;
  padding: 1rem 0;
  margin-top: 2rem;
}

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

.skill-category {
  padding: 1rem 1.5rem;
  border-radius: 10px;
  background-color: #f9fbff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease;
}

.skill-category:hover {
  transform: translateY(-4px);
}


.skill-category h3 {
  margin-bottom: 1rem;
  color: #0077cc;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-badges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.skill-badges span {
  background-color: #e0ecf8;
  padding: 0.5rem 0.75rem;
  border-radius: 20px;
  font-size: 0.9rem;
  color: #333;
  text-align: center;
  transition: transform 0.2s ease, background-color 0.2s ease;
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.skill-badges span:hover {
  background-color: #c2dcf8;
  transform: scale(1.05);
}


/* ========================================
   ABOUT SECTION
======================================== */
.about-section {
  padding: 1rem 1.5rem;
  background-color: #fdfdfd;
}

.about-section h2 {
  text-align: left;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
  color: #222;
}

.about-content {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch; /* makes children fill equal height */
  gap: 2rem;
}

.about-text {
  flex: 1 1 60%;
  font-size: 1.05rem;
  line-height: 1.55;
  animation: fadeInUp 1s ease forwards;
  opacity: 0;
}

.about-text p {
  margin-bottom: 1.5rem;
  color: #444;
}

.about-image {
  flex: 1 1 35%;
  display: flex;
  align-items: center;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;  /* fills area without distortion */
  object-position: center; /* 👈 this aligns the image to the top */
  /* background-color: #f9f9f9; optional soft background fill */
  border-radius: 15px;
  box-shadow: none;
}

.about-image img:hover {
  transform: scale(1.02);
  filter: brightness(1.1) contrast(1.08);
}

/* ========== Subtle Fade-In Animation ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Stacking */
@media (max-width: 768px) {
  .about-content {
    flex-direction: column-reverse;
    text-align: center;
  }
  .about-text, .about-image {
    flex: 1 1 100%;
  }
}

@media (max-width: 768px) {
  .about-image img {
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
  }
}



/* ========================================
   PROJECTS SECTION
======================================== */
.projects-section h2 {
  text-align: left;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
  color: #222;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.project-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #fff;
  padding: 1rem;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.project-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 1rem;
}

.btn-project {
  margin-top: 0.5rem;
  display: inline-block;
  text-decoration: none;
  background-color: #0077cc;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

.btn-project:hover {
  background-color: #005fa3;
}

/* ========================================
   CONTACT SECTION
======================================== */
.contact-section {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4rem 1rem;
  background-color: #fdfdfd;
}

.contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  justify-content: center; /* Center horizontally: space between */
  align-items: center;
  max-width: 1000px;
  margin: auto;
  width: 100%;
  margin: 0 auto;
  /* padding: 2rem 1rem; */
}

.contact-column {
  flex: 1 1 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease forwards;
}

.contact-form {
  width: 100%;
  max-width: 400px;
}

.contact-column:nth-child(2) {
  animation-delay: 0.2s;
}

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

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.form-submit {
  text-align: center;
}

.contact-image {
  width: 100%;
  max-width: 650px;
  height: auto;
  margin-bottom: 1.5rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 1rem;
}

.social-links a {
  text-decoration: none;
  width: 50px;
  height: 50px;
  background-color: #f0f0f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  font-size: 1.25rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.social-links a:hover {
  background-color: #0077cc;
  color: white;
  transform: translateY(-3px);
}

@media (max-width: 768px) {

  .contact-form {
    width: 100%;
    padding: 0 1rem;
  }

  .contact-image {
    margin-bottom: 1rem; /* reduce from larger values */
  }

  .form-group input,
  .form-group textarea {
    width: 100%;
    box-sizing: border-box;
  }
}


/* ========================================
   FOOTER
======================================== */
.footer {
  text-align: center;
  padding: 0.2rem 0;
  background-color: #f9f9f9;
  font-size: 0.9rem;
  color: #777;
  border-top: none;
  box-shadow: none;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.footer-logo {
  height: 28px;
  width: 28px;
  border-radius: 50%;
  object-fit: cover;
  opacity: 0.85;
}


/* ========================================
   ANIMATIONS
======================================== */
@keyframes fadeInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.typing-animation {
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid #0077cc;
  width: 0;
  animation: typing 3s steps(40, end) forwards, blink 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink {
  50% { border-color: transparent }
}

.fade-in {
  opacity: 0;
  animation: fadeIn 2s ease-in forwards;
  animation-delay: 3s;
}

@keyframes fadeIn {
  to { opacity: 1 }
}

@keyframes slideFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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