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

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

body {
  font-family: "Roboto Condensed", sans-serif;
  font-optical-sizing: auto;
  font-weight: weight;
  font-style: normal;

  line-height: 1.6;
  background: #2d2d2d;
  color: #333;
  padding-bottom: 50px;
}

header {
  background: #7a6cd4;
  font-family: "Roboto Condensed", sans-serif;
  font-style: italic;
  font-weight: bold;
  font: roboto;
  color: #fff;
  padding: 20px;
  gap: 10px;
  text-align: center;
}

nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  margin-top: 10px;
}

nav a {
  color: #fff;
  text-decoration: none;
  margin: 0 15px;
}

section {
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
}
#about {
  background-color: #7a6cd4;
  color: white;
}
/* About Section */
.about-container {
  display: flex;
  font: roboto;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.self-portrait {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #ccc;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Carousel */
#gallery {
  background-color: #8979ef;
  color: white;
}
.carousel {
  position: relative;
  overflow: hidden;
  background-color: #8979ef;
  color: white;
}

.carousel-track-container {
  overflow: hidden;
  background-color: #8979ef;
  color: white;
  position: relative;
  width: 100%;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
}

.carousel-slide {
  flex: 0 0 100%;
  min-width: 100%;
  transition: opacity 0.4s ease-in-out;
}

.carousel-slide img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 24px;
  border-radius: 50%;
  z-index: 1;
}

.prev {
  left: 10px;
}

.next {
  right: 10px;
}

.carousel-caption-bar {
  background-color: #665bb3;
  color: #fff;
  text-align: center;
  padding: 0.75em;
  font-size: 1rem;
  margin-top: -10px;
  box-shadow: 0 8px 24px rgba(0.35, 0.35, 0.35, 0.35);
  border-radius: 0.5rem;
}

/* Contact Form */
#contact{
  background-color: #7a6cd4;
  color: white;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.contact-form label {
  font-weight: bold;
}

.contact-form input,
.contact-form textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  width: 100%;
}

.contact-form button {
  margin: 0 auto;
  display: block;
  padding: 0.75em 1.5em;
  background-color: #414141;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.contact-form button:hover {
  background-color: #2d2d2d;
}

/* Animated error message */
.error-message {
  color: red;
  font-size: 0.9rem;
  margin-top: 4px;
  opacity: 0;
  height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, height 0.3s ease;
}

.error-message.show {
  opacity: 1;
  height: auto;
  animation: fadeIn 0.3s ease-in-out;
}

/* Confirmation message animation */
.confirmation-message {
  display: none;
  color: green;
  margin-top: 1em;
  text-align: center;
  font-size: 1.1rem;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.confirmation-message.show {
  opacity: 1;
  animation: fadeIn 1s ease-in-out;
}
#contact {
  > p{
    color: white;
  }
}

/* Highlight invalid fields */
input:invalid,
textarea:invalid {
  border-color: red;
}

/* Mobile Responsive Styles */
@media (max-width: 390px) {
  header h1 {
    font-size: 1.5rem;
  }

  nav ul {
    flex-direction: column;
    gap: 10px;
  }

  nav a {
    margin: 5px 0;
    font-size: 1rem;
  }

  section {
    padding: 15px;
    margin: 20px 10px;
  }

  .carousel-btn {
    padding: 6px 10px;
    font-size: 18px;
  }

  .carousel-slide img {
    border-radius: 6px;
  }

  .about-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .self-portrait {
    width: 100px;
    height: 100px;
  }

  footer {
    font-size: 0.9rem;
    padding: 10px;
  }

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

  .contact-form button {
    font-size: 0.95rem;
  }
@media (max-width: 430px) {
  body {
    padding: 10px;
  }

  section {
    margin: 20px 10px;
    padding: 15px;
  }

  .about-container {
    gap: 10px;
  }

  .carousel-caption-bar {
    font-size: 0.9rem;
  }

  .contact-form {
    gap: 10px;
  }
}

}
