/* -------------------- Global Styles -------------------- */
body {
  font-family: sans-serif;
  background-image: radial-gradient(circle at center, #141204, #141204);
  background-color: #141204;
  color: #E8985E;
  margin: 0;
}

body, html {
  overflow-x: hidden;
}

/* -------------------- Container & Layout -------------------- */
.container {
  padding: 10px 10%;
}

.container img {
  display: flex;
  justify-content: flex-start;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

nav ul li {
  display: inline-block;
  list-style: none;
  margin: 10px 20px;
}

nav ul li a {
  text-decoration: none;
  font-size: 18px;
}

/* -------------------- Typography -------------------- */
h1 {
  font-size: 75px;
}

/* -------------------- Introduction Section -------------------- */
.introduction {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 10%;
  font-size: 25px;
  gap: 30px;
  text-align: center;
  min-height: 100vh;
}

.bio-photo {
  width: 485px;
  height: 575px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
}

.bio-photo img {
  width: 500px;
  height: 600px;
  border-radius: 50%;
  object-fit: cover;
}

/* -------------------- About Section -------------------- */
.aboutme {
  font-size: 40px;
  display: flex;
  justify-content: center;
  min-height: 12vh;
  margin-bottom: 5px;
}

.bio {
  font-size: 20px;
  padding: 0 80px;
}

.bio-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.computerimages {
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-around;
}

.computerimages img {
  height: 300px;
  width: 300px;
  filter: drop-shadow(0 0 6px #E8985E);
}

.checkout {
  display: flex;
  justify-content: center;
  padding-top: 20px;
  font-size: 30px;
  height: 5vh;
}

/* -------------------- Projects Section -------------------- */
#works {
  padding: 20px;
  min-height: 50vh;
}

.projects {
  display: flex;
  justify-content: center;
}

.projects-container {
  display: flex;
  flex-flow: column wrap;
  gap: 20px;
}

.project-link {
  text-decoration: none;
}

/* Place a-specific styles after the base .project-link styles to avoid override issues */
.project-link:link {
  color: #E8985E;
}

.project-link:visited {
  color: #54442B;
}

.project-link:hover {
  color: #E8985E;
}

/* Base anchor tag styles (must come in correct order) */
a:link {
  color: #E8985E;
}

a:visited {
  color: #54442B;
}

a:hover {
  color: #E8985E;
}

.modal {
  width: 90%;
  max-width: 500px;
  margin: auto;
  padding: 20px;
  box-sizing: border-box;
  overflow-wrap: break-word;
}


.project-block {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #E8985E;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-image: radial-gradient(#54442B, #141204);
}

.project-block:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* -------------------- Contact Section -------------------- */
#contact {
  padding: 50px 10%;
  justify-content: center;
}

#contactme {
  display: flex;
  justify-content: center;
  font-size: 50px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 600px;
  margin: auto;
  font-size: 22px;
}

.contact-form label {
  text-align: left;
  font-weight: bold;
  margin-bottom: 5px;
  display: block;
}

.contact-form textarea,
.contact-form input {
  background-color: #54442B;
  border-radius: 15px;
  border: 1.5px solid #E8985E;
  color: #E8985E;
  font-size: 16px;
  padding: 10px;
}

.contact-form textarea {
  width: 100%;
  height: 40vh;
}

.contact-form input {
  width: 50%;
  height: 50%;
}

.contact-form button {
  background-color: #E8985E;
  padding: 12px;
  font-size: 18px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.submit {
  display: flex;
  justify-content: center;
}

.loading-spinner {
    width: 50px; /* Adjust size as needed */
    height: 50px;
    border-radius: 50%; /* Creates a circle */
    border: 5px solid #ddd; /* Base border color (light grey) */
    border-top-color: #3498db; /* Color for the spinning part (blue) */
    animation: spin 1s linear infinite; /* Animation properties */
}

@keyframes spin {
    to {
        transform: rotate(360deg); /* Rotate 360 degrees */
    }
}

.loading-state {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3); /* Semi-transparent background */
    z-index: 9999; /* Ensures the overlay appears on top of other elements */
    display: none;
    justify-content: center; /* Centers the spinner horizontally */
    align-items: center; /* Centers the spinner vertically */
}

#form-status {
  display: none;
  font-size: 24px;
  padding: 20px;
}

/* -------------------- Footer -------------------- */
.site-footer {
  background-color: #E8985E;
  color: #141204;
  text-align: center;
  padding: 20px 0;
  margin-top: 40px;
  font-size: 16px;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 20px;
    margin-bottom: 10px;
}

.footer-icon {
  width: 100px;
  height: 100px;
  transition: opacity 0.3s ease;
}

.footer-icon:hover {
  opacity: 0.7;
}

.footer-note {
  font-size: 14px;
  color: #54442B;
  margin: 0;
}

.footer-content img {
  flex: 1;
  max-width: 30%;
  height: auto;
  object-fit: cover;
}

/* -------------------- Misc -------------------- */
.logo {
  width: 150px;
  height: auto;
}

.close-button {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
}

.close-button:hover,
.close-button:focus {
  color: #999;
  text-decoration: none;
}

.wave-emoji {
  display: inline-block;
  transform-origin: 70% 70%;
}

@keyframes wave-animation {
  0%   { transform: rotate(0deg); }
  10%  { transform: rotate(14deg); }
  20%  { transform: rotate(-8deg); }
  30%  { transform: rotate(14deg); }
  40%  { transform: rotate(-4deg); }
  50%  { transform: rotate(10deg); }
  60%  { transform: rotate(0deg); }
  100% { transform: rotate(0deg); }
}


/* -------------------- Responsive Design -------------------- */

/* For tablets and smaller (≤ 768px) */
@media screen and (max-width: 768px) {
  nav {
    flex-direction: column;
    align-items: center; /* center the nav items */
  }

  nav ul {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center; /* center each list item */
    gap: 15px;
    padding: 0;
    margin: 10px;
  }

  nav ul li {
    margin: 0;
  }

  nav ul li a {
    font-size: 20px;
  }

  .container img{
    display: flex;
    justify-content: center;
  }

  .introduction {
    font-size: 20px;
    height: auto;
    padding: 0 5%;
  }

  .bio-photo {
    width: 100%;
    height: auto;
  }

  .bio-photo img {
    width: 100%;
    height: auto;
  }

  .bio {
    padding: 0 20px;
    font-size: 18px;
  }

  .computerimages {
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 20px;
    overflow-x: auto;
    padding: 10px 0;
  }

  .computerimages img {
    flex: 1;
    max-width: 30%;
    height: auto;
    object-fit: cover;
  }

  .projects-container {
    flex-direction: column;
  }

  .project-block {
    width: 100%;
  }

  .contact-form {
    width: 100%;
    padding: 0 10px;
  }

  .contact-form input {
    width: 100%;
  }

  .contact-form textarea {
    height: 25vh;
  }

  #contactme {
    font-size: 36px;
    text-align: center;
    padding-top: 20px;
  }

  #contact {
    padding-left: 10px;
  }

  .checkout {
    font-size: 24px;
    height: auto;
    padding-bottom: 20px;
  }

  .aboutme {
    font-size: 30px;
    height: auto;
    padding-top: 20px;
  }

  .project-block {
    margin: 0 auto;
    width: 90%;
    max-width: 100%;
  }
}

/* For phones and smaller (≤ 480px) */
@media screen and (max-width: 480px) {
  h1 {
    font-size: 42px;
  }

  .bio-photo {
    padding: 0;
  }

  .bio {
    font-size: 16px;
  }

  .project-block {
    padding: 15px;
  }

  .contact-form {
    font-size: 18px;
  }

  #form-status {
    font-size: 18px;
    padding: 10px;
  }
}
