/* Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
  font-size: 16px;
}

html {
    scroll-behavior: smooth;
}

body {
    width: 100%;
    height: 100%;
    background-color: #1D1D1D;
    color: #F0ECE5;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    line-height: 1.4;
    overflow-x: hidden;
}

/* STYLES FOR SCROLL MARGIN */
#about,
#projects,
#contact {
    scroll-margin-top: 80px;
    /* height of your fixed header */
}

/* HEADER */
.header-container {
    width: 100%;
    background-color: #1D1D1D;
    border-bottom: 2px solid #FFCC00;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    flex-wrap: wrap;
}

.header-container>a {
    color: #F0ECE5;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    padding: 10px;
    white-space: nowrap;
}

.header-container>a:hover,
.header-container>a:active {
    background-color: #FFCC00;
    color: #1D1D1D;
}

@media (max-width: 600px) {
    .header-container {
        flex-wrap: wrap;
        justify-content: center;
        padding: 12px 10px;
    }

    .header-container>a {
        font-size: 1rem;
        padding: 10px 12px;
        white-space: nowrap;
    }
}

/* MAIN SECTION */
.main-section {
  width: 100%;
  min-height: 100vh;
  padding: 140px 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-bottom: 1px solid #FFCC00;
}

.main-section > h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.main-section > h2 span {
  color: #FFCC00;
  display: block;
}

.intro-text {
  max-width: 600px;
  font-size: 1.1rem;
  line-height: 1.6;
  margin-top: 10px;
  color: #ccc; /* or another subtle shade */
}

/* UNIVERSAL SECTION CONTAINER */
section {
    width: 100%;
    display: flex;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ABOUT SECTION */
.container h2 {
    color: #FFCC00;
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
}

.container h3 {
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 20px;
    text-align: center;
}

.container figure>img {
    max-width: 90%;
    width: 300px;
    height: auto;
    border-radius: 18px;
    display: block;
    margin: 0 auto;
}

figure figcaption {
    color: #989898;
    font-size: 0.8rem;
    margin-top: 8px;
    text-align: center;
}

.about .pees {
    margin-top: 20px;
    max-width: 600px;
    width: 100%;
}

.about p {
    font-size: 1rem;
    text-align: left;
    margin-bottom: 10px;
    color: #F0ECE5;
    padding: 0 10px;
}

/* PROJECTS SECTION */
.projects {
    width: 100%;
    border-block: 2px solid #FFCC00;
    padding-block: 30px;
    margin-block: 30px;
}

.projects-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
    justify-content: center;
}

.boxes {
    width: 90%;
    max-width: 500px;
    text-align: center;
}

.boxes img {
    width: 100%;
    border-radius: 8px;
}

.boxes figcaption {
    color: #989898;
    font-size: 0.8rem;
    margin-top: 8px;
}

/* CONTACT SECTION */
.contact {
    width: 100%;
    margin-top: 40px;
}

.contact-box {
    width: 100%;
}

.contact form {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}

form div {
    margin-bottom: 20px;
}

form label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

form input,
form textarea {
    width: 100%;
    background-color: #1D1D1D;
    color: #FFCC00;
    font-size: 1rem;
    font-weight: 600;
    padding: 14px 20px;
    border: 1px solid #F0ECE5;
    border-radius: 10px;
    outline: none;
}

form input::placeholder,
form textarea::placeholder {
    color: #6e6d6d;
}

form textarea.message {
    height: 140px;
    resize: vertical;
}

.contact-btn {
  margin-block-start: 30px;
  font-size: 1rem;
    text-align: center;
}

.contact-btn>button {
    background-color: #1D1D1D;
    color: #F0ECE5;
    font-size: 1rem;
    font-weight: 600;
    padding: 14px 30px;
    border: 1px solid #F0ECE5;
    border-radius: 30px;
    transition: top 0.3s ease-in-out;
    cursor: pointer;
}

.contact-btn>button:hover {
    background-color: transparent;
    color: #FFCC00;
    border: 1px solid #FFCC00;
}

/* STYLES FOR INPUT, BUTTON, ERROR AND SUCCESS MESSAGES */
.form-group {
  margin-bottom: 15px;
  position: relative;
}

.error-message {
  color: #e63946;
  font-size: 0.8rem;
  position: absolute;
  bottom: -18px;
  left: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.middle {
  margin-block: 30px;
}

.error-message.active {
  opacity: 1;
}

/* Optional animation for form container */
.form-feedback-success {
  animation: bounceFade 0.5s ease-in-out;
}

@keyframes bounceFade {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.03); opacity: 0.9; }
  100% { transform: scale(1); opacity: 1; }
}

/* Form status base */
.form-status {
  font-size: 0.95rem;
  margin-top: 15px;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.3s ease;
  animation: fadeInScale 0.4s forwards;
}

.form-status:not(:empty) {
  opacity: 1;
  transform: scale(1);
}

/* State-specific colors */
.form-status.success {
  color: #1da700;
}

.form-status.error {
  color: #e63946;
}

.form-status.submitting {
  color: #f0ad4e;
}

/* Button disabled state */
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Fade and scale in */
@keyframes fadeInScale {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Optional: bounce-in animation for button feedback (just for fun) */
@keyframes bounceIn {
  0% {
    transform: scale(0.95);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

button.animate {
  animation: bounceIn 0.4s ease-in-out;
}

/* FOOTER */
.footer {
    width: 100%;
    padding-block: 30px;
    text-align: center;
    border-top: 2px solid #FFCC00;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.footer-container>a {
    text-decoration: none;
    color: #F0ECE5;
    font-size: 1.2rem;
    font-weight: 800;
}

.footer-container>a:hover {
    color: #FFCC00;
    text-decoration: double;
}

.footer p {
    color: #FFCC00;
    font-size: 0.9rem;
}

/* BACK TO TOP */
.to-top {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background-color: #FFCC00;
    color: #1D1D1D;
    font-size: 1rem;
    font-weight: 800;
    padding: 8px 14px;
    display: none;
    /* will be toggled with JS */
    z-index: 999;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
}

/* RESPONSIVE PROJECTS GRID */
@media (min-width: 1000px) {
    .projects-wrapper {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 20px;
    }

    .boxes {
        width: 30%;
    }
}