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

body {
  background-color: #1a1a2e;
  font-family: 'Poppins', sans-serif;
  color: #e0e0e0;
  line-height: 1.6;
  scroll-behavior: smooth;
}

/* Scroll offset for sticky header */
html {
  scroll-padding-top: 100px;
}

#home, #about, #projects, #contact {
  scroll-margin-top: 100px;
}


/* --- Navbar --- */
.nav {
  margin: 15px 30px;
  padding: 15px 30px;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(99, 99, 255, 0.9);
  border-radius: 50px;
  box-shadow: 0 5px 20px rgba(0, 128, 255, 0.5);
  flex-wrap: wrap;
  text-align: center;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  position: sticky;
  top: 15px;
  z-index: 1000;
}

.nav h3 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 1px;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  transition: all 0.3s ease-in-out;
}

.nav-list li {
  font-size: 19px;
  padding: 10px 20px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 25px;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  font-weight: 500;
}

.nav-list li:hover {
  background-color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

.nav-list li a {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
}


.hamburger {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
  transition: transform 0.3s ease;
}

.hamburger:hover {
  transform: scale(1.1);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  padding: 20px;
  background: #1a1a2e;
}

.hero img {
  border-radius: 50%;
  width: 220px;
  height: 220px;
  object-fit: cover;
  box-shadow: 0 0 40px rgba(0, 128, 255, 0.7);
  border: 5px solid rgba(0, 128, 255, 0.3);
}

.hero h1 {
  font-size: 48px;
  margin: 25px 0 15px;
  font-weight: 700;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
}

.hero p {
  font-size: 22px;
  max-width: 800px;
  margin-bottom: 25px;
}

.hero a {
  text-decoration: none;
  color: white;
  background-color: #ff6f61;
  margin-top: 30px;
  padding: 18px 35px;
  border-radius: 50px;
  font-size: 22px;
  transition: all 0.3s ease;
  box-shadow: 0 5px 25px rgba(255, 165, 0, 0.6);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.hero a:hover {
  box-shadow: 0 8px 40px rgba(255, 255, 255, 0.7);
  background-color: #ff4d3a;
  transform: translateY(-3px);
}

/* --- About Section --- */
.about {
  margin: 0 auto 60px auto;
  padding: 70px 50px;
  border-radius: 0;
  border-top-left-radius: 30px;
  border-top-right-radius: 30px;
  background-color: #1a1a2e;
  box-shadow: 0 -50px 100px -30px rgba(0, 128, 255, 0.2),
              0 50px 100px -30px rgba(0, 128, 255, 0.2);
  font-size: 19px;
  max-width: 100%;
}

.about h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 36px;
  color: #00bfff;
  text-decoration: underline;
  text-underline-offset: 10px;
  text-decoration-thickness: 2px;
}

.about p {
  line-height: 1.8;
  font-size: 20px;
  margin-bottom: 30px;
  color: #c0c0c0;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
}

/* --- Skills Section --- */
.skills {
  margin-top: 60px;
  padding: 20px;
  font-size: 19px;
}

.skills h3 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 32px;
  color: #00bfff;
  text-decoration: underline;
  text-underline-offset: 10px;
  text-decoration-thickness: 2px;
}

.languages {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 50px;
  margin: 30px auto;
  max-width: 1200px;
  flex-wrap: wrap;
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.languages:last-of-type {
  border-bottom: none;
}

.languages p {
  font-weight: 600;
  font-size: 22px;
  width: 250px;
  min-width: 200px;
  color: #e0e0e0;
}

.images {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 15px;
  max-width: 70%;
  justify-content: flex-start;
  align-items: center;
  flex: 1;
}

.skills img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  background-color: #f0f0f0;
  padding: 8px;
  border-radius: 12px;
  box-shadow: 3px 3px 35px rgba(0, 255, 255, 0.5);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.skills img:hover {
  transform: scale(1.1);
  box-shadow: 0 0 50px rgba(0, 255, 255, 0.8);
}

/* --- Projects Section --- */
.projects-section {
  margin: 80px auto;
  padding: 0 40px;
  max-width: 1100px;
  background-color: transparent;
  border-radius: 0;
  border-top-left-radius: 30px;
  border-top-right-radius: 30px; 
  box-shadow: none;
}


.projects-section h2 {
  font-size: 40px;
  margin-bottom: 40px;
  text-align: center;
  color: #00bfff;
  text-decoration: underline;
  text-underline-offset: 10px;
  text-decoration-thickness: 2px;
}

.project-card {
  background-color: #2a2a4a;
  border-radius: 20px;
  padding: 30px;
  margin: 30px 0;
  box-shadow: 0 5px 25px rgba(255, 255, 255, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  border: 1px solid rgba(0, 128, 255, 0.2);
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 40px rgba(0, 128, 255, 0.6);
  background-color: #3b3b5e;
}

.project-card h3 {
  font-size: 28px;
  margin-bottom: 12px;
  color: #00bfff;
}

.project-card p {
  color: #c0c0c0;
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.project-card a {
  color: #ff6f61;
  text-decoration: none;
  font-weight: bold;
  font-size: 17px;
  transition: color 0.2s ease;
}

.project-card a:hover {
  text-decoration: underline;
  color: #ff4d3a;
}

/* --- Contact Section --- */
#contact {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 60px 20px;
  background-color: #1a1a2e;
}

#contact h2 {
  font-size: 36px;
  margin-bottom: 30px;
  color: #00bfff;
  text-decoration: underline;
  text-underline-offset: 10px;
  text-decoration-thickness: 2px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  max-width: 600px;
  width: 100%;
  margin-top: 20px;
  padding: 30px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  box-shadow: 0 0 50px rgba(0, 128, 255, 0.2);
}

.contact-form label {
  margin: 15px 0 8px;
  color: #e0e0e0;
  font-size: 18px;
  font-weight: 500;
}

.contact-form input,
.contact-form textarea {
  padding: 12px;
  border: 1px solid rgba(0, 128, 255, 0.3);
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 1.05rem;
  background-color: #2a2a4a;
  color: #e0e0e0;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #00bfff;
  box-shadow: 0 0 10px rgba(0, 128, 255, 0.5);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form button {
  background-color: #ff6f61;
  color: white;
  border: none;
  padding: 15px 25px;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.contact-form button:hover {
  background-color: #ff4d3a;
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(255, 100, 0, 0.5);
}

.social-links {
  margin-top: 30px;
  display: flex;
  gap: 25px;
  justify-content: center;
  width: 100%;
  max-width: 600px;
  padding: 0 20px;
}

.social-links a {
  color: #00bfff;
  transition: color 0.3s ease, transform 0.2s ease;
}

.social-links a:hover {
  color: #ff6f61;
  transform: translateY(-3px);
}

/* --- Footer --- */
.footer {
  background-color: #1a1a2e;
  color: #c0c0c0;
  text-align: center;
  padding: 25px 20px;
  font-size: 16px;
  margin-top: 50px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cursive-text {
  font-family: 'Dancing Script', cursive;
  font-size: 1.1em;
  font-weight: 700;
  color: #00bfff;
}

/* --- Media Queries --- */

/* Tablet View (max-width: 768px) */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 80px;
  }
  #home, #about, #projects, #contact {
    scroll-margin-top: 80px;
  }

  .nav {
    margin: 10px 15px;
    padding: 12px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    border-radius: 30px;
    top: 10px;
    position: relative;
  }

  .nav h3 {
    width: 100%;
    text-align: left;
    margin-bottom: 0;
  }

  .hamburger {
    display: block;
    position: absolute;
    top: 15px;
    right: 20px;
  }

  .nav-list {
    flex-direction: column;
    width: 100%;
    text-align: center;
    background-color: rgba(99, 99, 255, 0.95);
    max-height: 0;
    overflow: hidden;
    padding: 0;
    border-radius: 15px;
  }

  .nav-list.active {
    max-height: 300px;
    padding: 15px 0;
    margin-top: 10px;
  }

  .nav-list li {
    width: 100%;
    margin: 5px 0;
    background-color: transparent;
  }
  .nav-list li:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }

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

  .hero p {
    font-size: 18px;
  }

  .hero img {
    width: 180px;
    height: 180px;
  }

  .hero a {
    padding: 15px 30px;
    font-size: 18px;
  }

  .about {
    padding: 50px 30px;
    font-size: 17px;
    margin: 0 auto 40px auto;
  }

  .about h2,
  .projects-section h2,
  .skills h3 {
    font-size: 30px;
    margin-bottom: 25px;
  }

  .about p,
  .project-card p {
    font-size: 17px;
    line-height: 1.7;
  }

  .skills {
    font-size: 17px;
    padding: 15px;
  }

  .languages {
    flex-direction: column;
    align-items: center; /* Center items in column for tablet */
    gap: 25px;
    padding: 15px;
  }

  .languages p {
    width: 100%;
    text-align: center; /* Center text */
    margin-bottom: 5px;
    font-size: 20px;
  }

  .images {
    width: 100%;
    justify-content: center;
    gap: 15px;
  }

  .skills img {
    width: 60px;
    height: 60px;
  }

  .projects-section {
    padding: 0 25px;
  }

  .project-card {
    padding: 25px;
    margin: 20px 0;
  }

  .project-card h3 {
    font-size: 24px;
  }

  .contact-form {
    padding: 25px;
  }

  .contact-form label {
    font-size: 16px;
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 0.95rem;
    padding: 10px;
  }

  .contact-form button {
    padding: 12px 20px;
    font-size: 1rem;
  }

  .footer {
    font-size: 14px;
    padding: 20px 15px;
  }
}

/* Mobile View (max-width: 480px) */
@media (max-width: 480px) {
  html {
    scroll-padding-top: 60px;
  }
  #home, #about, #projects, #contact {
    scroll-margin-top: 60px;
  }

  .nav {
    margin: 0;
    border-radius: 0 0 15px 15px;
    padding: 10px 15px;
    top: 0;
  }

  .nav h3 {
    font-size: 20px;
  }

  .hamburger {
    font-size: 24px;
    top: 10px;
    right: 15px;
  }

  .nav-list.active {
    max-height: 350px;
  }

  .nav-list li {
    font-size: 14px;
    padding: 6px 12px;
    margin: 3px 0;
  }

  .hero h1 {
    font-size: 28px;
    margin: 20px 0 10px;
  }

  .hero p {
    font-size: 16px;
    padding: 0 10px;
  }

  .hero img {
    width: 140px;
    height: 140px;
  }

  .hero a {
    padding: 12px 25px;
    font-size: 16px;
  }

  .about {
    padding: 30px 20px;
    font-size: 15px;
    margin: 0 auto 30px auto;
  }

  .about h2,
  .projects-section h2,
  .skills h3 {
    font-size: 26px;
    margin-bottom: 20px;
    text-underline-offset: 8px;
  }

  .about p,
  .project-card p {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 15px;
  }

  .skills {
    font-size: 15px;
    padding: 10px;
  }

  .skills img {
    width: 50px;
    height: 50px;
    padding: 6px;
  }

  .languages {
    padding: 0 10px;
    gap: 15px;
    align-items: center; /* Center items in column for mobile */
  }

  .languages p {
    font-size: 18px;
    margin-bottom: 5px;
    text-align: center; /* Center text */
  }

  .images {
    justify-content: center;
    width: 100%;
    padding: 10px;
    gap: 10px;
  }

  .project-card h3 {
    font-size: 20px;
    margin-bottom: 8px;
  }

  .project-card p {
    font-size: 15px;
  }

  .project-card a {
    font-size: 15px;
  }

  #contact h2 {
    font-size: 30px;
  }

  .contact-form {
    padding: 20px;
  }

  .contact-form label {
    font-size: 15px;
    margin: 10px 0 5px;
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 0.9rem;
    padding: 8px;
    margin-bottom: 15px;
  }

  .contact-form button {
    padding: 10px 15px;
    font-size: 0.95rem;
  }

  .footer {
    font-size: 14px;
    padding: 20px 15px;
  }
}

.wave-emoji {
  display: inline-block; /* Essential for transform to work correctly on inline elements */
  animation-name: wave-animation;
  animation-duration: 2.5s; /* Adjust speed as desired */
  animation-iteration-count: infinite; /* Make it wave continuously */
  transform-origin: 70% 70%; /* Pivot point for the rotation (bottom-left palm) */
}

@keyframes wave-animation {
  0% {
    transform: rotate(0.0deg);
  }
  10% {
    transform: rotate(14.0deg);
  }
  20% {
    transform: rotate(-8.0deg);
  }
  30% {
    transform: rotate(14.0deg);
  }
  40% {
    transform: rotate(-4.0deg);
  }
  50% {
    transform: rotate(10.0deg);
  }
  60% {
    transform: rotate(0.0deg);
  }
  100% {
    transform: rotate(0.0deg);
  }
}

/* --- Flashed Messages --- */
.flashed-messages {
    width: 80%;
    max-width: 800px;
    margin: 20px auto;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.alert {
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid transparent; /* default */
    font-size: 1.1em;
}

.alert-success {
    background-color: #28a745; /* Green */
    color: white;
    border-color: #218838;
}

.alert-error { /* Using 'error' category for red */
    background-color: #dc3545; /* Red */
    color: white;
    border-color: #c82333;
}

/* Make sure these messages are responsive too */
@media (max-width: 768px) {
    .flashed-messages {
        width: 90%;
        margin: 15px auto;
        padding: 8px 15px;
    }
    .alert {
        font-size: 1em;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .flashed-messages {
        width: 95%;
        margin: 10px auto;
        padding: 5px 10px;
    }
    .alert {
        font-size: 0.9em;
        padding: 8px;
    }
}