/* --- GENERAL --- */
body {
  margin: 0;
  font-family: "Times New Roman", serif;
  background-color: #F0EAD6; /* eggshell */
  color: #800020; /* burgundy */
  text-align: center;
  overflow-x: hidden;
}

main {
  padding-top: 120px;
  max-width: 1200px;
  margin: 0 auto;
}

/* --- HEADER --- */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(240, 234, 214, 0.85);
  backdrop-filter: blur(8px);
  padding: 20px 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(128, 0, 32, 0.1);
}

h1 {
  color: #800020;
  margin: 0;
  font-size: 2.4em;
}

nav {
  margin-top: 10px;
}

nav button {
  background: none;
  border: none;
  color: #800020;
  margin: 0 15px;
  font-size: 1.1em;
  cursor: pointer;
  transition: color 0.3s, transform 0.2s;
}

nav button:hover {
  color: #B22222;
  transform: translateY(-2px);
}

/* --- PAGE TRANSITIONS --- */
.page, .subpage {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  display: none;
}

.page.active, .subpage.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* --- IMAGE GRID --- */
.image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 20px;
  justify-content: center;
}

.image-grid img {
  width: 100%;
  border-radius: 10px;
  opacity: 0;
  animation: fadeIn 1.5s forwards;
}

.image-grid img:nth-child(1) { animation-delay: 0.2s; }
.image-grid img:nth-child(2) { animation-delay: 0.4s; }
.image-grid img:nth-child(3) { animation-delay: 0.6s; }
.image-grid img:nth-child(4) { animation-delay: 0.8s; }

@keyframes fadeIn {
  to { opacity: 1; }
}

/* --- PROJECT GRID --- */
.project-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 25px;
}

.project-btn {
  background: #800020;
  color: #F0EAD6;
  border: none;
  padding: 12px 25px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.project-btn:hover {
  background: #B22222;
  transform: scale(1.05);
}

.project-image {
  width: 80%;
  max-width: 500px;
  border-radius: 20px;
  margin-bottom: 20px;
  box-shadow: 0 5px 20px rgba(128, 0, 32, 0.2);
}


/* --- BACK BUTTON --- */
.back-btn {
  background: none;
  color: #800020;
  border: 1px solid #800020;
  padding: 8px 16px;
  border-radius: 15px;
  cursor: pointer;
  margin-top: 25px;
  transition: background 0.3s, color 0.3s, transform 0.3s;
}

.back-btn:hover {
  background: #800020;
  color: #F0EAD6;
  transform: scale(1.05);
}

/* --- FORM CONTACT --- */
form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 25px;
}

form input, form textarea {
  width: 80%;
  max-width: 450px;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-size: 1em;
}

form button {
  background: #800020;
  color: #F0EAD6;
  border: none;
  padding: 10px 22px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

form button:hover {
  background: #B22222;
  transform: scale(1.05);
}

/* --- FOOTER --- */
footer {
  margin-top: 60px;
  padding: 25px;
  background: rgba(240, 234, 214, 0.5);
  color: #800020;
  font-size: 1em;
}

/* --- SKILLS SECTION --- */
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
}

.open-skill {
  background: none;
  border: 1px solid #800020;
  color: #800020;
  padding: 10px 20px;
  border-radius: 10px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.open-skill:hover {
  background: #800020;
  color: #f0ead6;
  transform: translateY(-3px);
}

.skill-content {
  margin-top: 40px;
  text-align: center;
  animation: fadeIn 0.7s ease;
}

.skill-image {
  width: 80%;
  max-width: 500px;
  border-radius: 20px;
  margin-bottom: 20px;
  box-shadow: 0 5px 20px rgba(128, 0, 32, 0.2);
}

.skill-content p {
  max-width: 600px;
  margin: 0 auto;
  color: #4b1e1e;
  font-size: 1.1em;
  line-height: 1.6;
}

.back-button {
  display: inline-block;
  margin-top: 20px;
  background: none;
  border: 1px solid #800020;
  color: #800020;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.3s;
}

.back-button:hover {
  background: #800020;
  color: #f0ead6;
}

.hidden {
  display: none;
}

/* --- RESPONSIVE DESIGN --- */

/* TABLET */
@media (max-width: 850px) {
  h1 {
    font-size: 2em;
  }

  nav button {
    margin: 8px;
    font-size: 1em;
  }

  .image-grid {
    grid-template-columns: 1fr;
  }

  main {
    padding-top: 100px;
  }
}

/* MOBILE */
@media (max-width: 500px) {
  h1 {
    font-size: 1.6em;
  }

  nav button {
    display: block;
    margin: 8px auto;
    font-size: 1.1em;
  }

  .project-btn, .back-btn, form button {
    font-size: 1em;
    padding: 8px 16px;
  }

  footer {
    font-size: 0.9em;
  }
}
