:root {
  --primary-dark: #2c3e50;
  --primary-mid: #34495e;
  --accent-light: #ecf0f1;
  --highlight: #ffeead;
  --bg-light: #f0f4f8;
  --text-main: #222;
  --font-body: "Times New Roman", Times, serif;
  --button-steel: #4682b4;
  --button-steel-hover: #3a6a99;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  font-family: var(--font-body);
  background-color: var(--bg-light);
  color: var(--text-main);
  overflow-x: hidden;
  line-height: 1.6;
}

.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ========== HEADER ========== */
header {
  background: linear-gradient(
    to right,
    var(--primary-mid),
    var(--primary-dark)
  );
  color: var(--accent-light);
  padding: 20px;
  text-align: center;
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
}

nav {
  background: inherit;
  padding: 15px 30px;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: space-evenly;
  max-width: 1000px;
  margin: 0 auto;
}

nav ul li a {
  color: var(--accent-light);
  text-decoration: none;
  font-size: 1.25rem;
  padding: 10px 15px;
  display: block;
  transition: all 0.3s ease;
}

nav ul li a:hover {
  color: var(--highlight);
  transform: scale(1.05);
  text-shadow: 0 0 8px #ffffff;
}

/* ========== MAIN AREA ========== */
main {
  flex: 1;
  display: flex;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-mid));
}

section {
  width: 100%;
  padding: 60px 30px;
  margin: 0 auto;
  text-align: center;
}

/* ========== HOME SECTION ========== */
#main_section {
  color: var(--accent-light);
}

#main_section h1 {
  font-size: 3rem;
  margin-bottom: 10px;
}

#main_section .italic1 {
  font-style: italic;
  font-size: 1.5rem;
  margin: 10px 0;
}

/* ========== ABOUT SECTION ========== */
#about_section {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-mid));
  color: var(--accent-light);
  width: 50%;
  margin: 0 auto;
  padding: 60px 30px;
  text-align: left;
}

#about_section h1,
#about_section h2 {
  font-weight: bold;
  color: var(--highlight);
  letter-spacing: 1px;
  margin-bottom: 20px;
}

#about_section p {
  font-size: 1.125rem;
  line-height: 1.75;
  margin-bottom: 15px;
}

#about_section ul {
  list-style: disc inside;
  font-size: 1.1rem;
  padding-left: 20px;
  line-height: 1.8;
  margin-top: 10px;
}

/* ========== CTA BUTTON ========== */
.cta-button {
  background-color: var(--button-steel);
  color: #fff;
  font-size: 1.1rem;
  font-weight: bold;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
  margin-top: 20px;
  display: inline-block;
}

.cta-button:hover {
  background-color: var(--button-steel-hover);
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* ========== PROJECTS SECTION ========== */
#projects {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-mid));
  color: var(--accent-light);
  width: 80%;
  margin: 0 auto;
  padding: 60px 30px;
  text-align: center;
}

.project-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 30px;
}

.project {
  width: 280px;
  background-color: #fff;
  color: #333;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
  text-align: left;
}

.project:hover {
  transform: translateY(-5px);
}

.project img {
  width: 100%;
  height: auto;
  margin-top: 10px;
  border-radius: 5px;
}

.project a {
  display: inline-block;
  margin-top: 12px;
  color: var(--button-steel);
  font-weight: bold;
  text-decoration: none;
}

.project a:hover {
  color: var(--button-steel-hover);
}

.project h3 {
  text-align: center;
}

.project h3 small {
  display: block;
  font-size: 0.9rem;
  font-weight: normal;
  margin-top: 4px;
  color: #666;
}

.project p {
  text-align: justify;
}

/* ========== CONTACT SECTION ========== */
#contact {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-mid));
  color: var(--accent-light);
  padding: 60px 30px;
}

#contact h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.contact-flex {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: stretch;
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-info,
.contact-form {
  flex: 1 1 45%;
  min-width: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-form {
  min-height: 400px;
  background-color: #fff;
  color: var(--primary-dark);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-card a {
  color: var(--button-steel);
  text-decoration: none;
}

.contact-card a:hover {
  text-decoration: underline;
}

/* ========== FORM ELEMENTS ========== */
form {
  width: 100%;
}

label {
  font-weight: bold;
  display: block;
  margin-top: 15px;
  color: var(--primary-dark);
}

input,
textarea {
  width: 100%;
  margin-top: 5px;
  padding: 10px;
  border: 1px solid #bbb;
  border-radius: 5px;
  font-size: 1rem;
  font-family: var(--font-body);
}

/* ========== ANIMATIONS ========== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== FOOTER ========== */
footer {
  background: linear-gradient(to top, var(--primary-dark), var(--primary-mid));
  color: var(--accent-light);
  text-align: center;
  padding: 16px;
  font-size: 1rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .contact-flex {
    flex-direction: column;
    align-items: center;
  }

  .contact-info,
  .contact-form {
    width: 100%;
    text-align: center;
  }

  .contact-form form {
    margin: 0 auto;
  }

  .contact-card,
  .contact-form {
    min-height: auto;
  }

  #about_section {
    width: 90%;
    text-align: center;
  }
}

.contact-card h2,
.contact-form h2 {
  color: var(--primary-dark);
  font-size: 1.7rem;
  border-bottom: 2px solid var(--button-steel);
  padding-bottom: 8px;
  margin-bottom: 20px;
}
#send_button {
  display: block;
  margin: 20px auto 0;
}
#error-box {
  font-size: 1rem;
  font-weight: bold;
  text-align: center;
  color: #c0392b;
}
.contact-card {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-mid));
  color: var(--accent-light);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  min-height: 400px;
}
.contact-card h2 {
  color: var(--highlight); /* subtle pop */
  margin-bottom: 15px;
}

.contact-card a {
  color: var(--accent-light);
  text-decoration: none;
  font-weight: 500;
}

.contact-card a:hover {
  text-decoration: underline;
}
.contact-info {
  border-right: 2px solid rgba(255, 255, 255, 0.1);
}
nav ul li a.active {
  border-bottom: 2px solid var(--highlight);
}
input,
textarea,
button {
  transition: all 0.3s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--button-steel);
  box-shadow: 0 0 5px rgba(70, 130, 180, 0.4);
}
@media (max-width: 600px) {
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.5rem;
  }
}
.project h3 {
  word-break: break-word;
}
@media (max-width: 400px) {
  input,
  textarea {
    font-size: 0.95rem;
    padding: 8px;
  }
}
@media (max-width: 480px) {
  .contact-flex {
    flex-direction: column;
    gap: 20px;
  }

  .contact-card,
  .contact-form {
    padding: 20px;
  }

  h1 {
    font-size: 2rem;
  }

  .project {
    width: 100%;
  }

  nav ul {
    flex-direction: column;
    gap: 10px;
  }
}
