/*Main CSS applies to all pages*/
/*Typography*/
h1 {
  color: #e59312;
  font-size: 28px;
  text-decoration: underline;
}
h2 {
  color: #ae710e;
}
h1,
h2,
h3,
h4 {
  font-family: "Orbitron Regular", serif;
}
p,
u li {
  text-align: left;
  color: #ccbaa5;
  font-size: 20px;
  font-family: "Genos Regular", sans-serif;
}
p {
  text-align: left;
  font-size: 20px;
  width: 70%;
  justify-self: start;
}

p a {
  color: #ccbaa5;
  text-decoration: underline;
}

header nav li {
  font-family: "Genos Regular", sans-serif;
  font-size: 20px;
}

header h1 {
  margin-left: 1.5rem;
}
/*Navigation*/
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header nav {
  margin-right: 1.5rem;
}
nav ul {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
nav ul li {
  display: inline-block;
  font-size: 20px;
  background-color: #8e5915;
  border: 1.5px solid #ccbaa5;
  padding: 0.2rem 0.55rem;
  border-radius: 0.355rem;
  margin-right: 0.4rem;
}

nav ul li:hover {
  background-color: #644722;
}

nav ul li a {
  text-align: center;
  color: #ccbaa5;
  text-decoration: none;
}

/* Hamburger Menu Styling */
.hamburger-menu {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #ae710e;
}

/* Responsive Design Navigation */
@media (max-width: 800px) {
  .hamburger-menu {
    display: block; /* Show hamburger button on small screens */
  }

  .nav-menu {
    display: none; /* Hide the nav menu by default */
    position: absolute;
    top: 3.5rem; /* Adjust to sit below the header */
    right: 0;
    background-color: #a59583; /* Keep it consistent */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Optional: Add shadow */
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 4px;
  }

  .nav-menu.active {
    display: flex; /* Show menu when active */
  }

  .nav-menu li {
    margin: 0;
  }

  .nav-menu li a {
    font-size: 1.2rem;
    color: #ccbaa5; /* Maintain existing link styles */
  }
}

/*Main layout*/
body {
  background-color: #1a141a;
}

header {
  border-bottom: 0.5px solid #e59312;
}

article figure img {
  width: 20rem;
}

img {
  border: 2px solid #8c6d45;
  border-radius: 0.3rem;
}

.align-left {
  float: left;
  margin-right: 1rem;
  display: flex;
  flex-direction: row;
  margin-bottom: 20px;
  max-width: 100%;
}

/*Home page CSS*/
body.home {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto;
  grid-template-areas:
    "header header header header header header header header header header header header"
    ". . about-me about-me about-me about-me about-me about-me about-me about-me . ."
    ". . skills skills skills skills skills skills skills skills . ."
    ". . education education education education education education education education . ."
    ". . projects projects projects projects projects projects projects projects . ."
    ". . contact contact contact contact contact contact contact contact . .";
}

header.home {
  grid-area: header;
}

article#aboutMe {
  grid-area: about-me;
  border-top: none;
}

article#skills {
  grid-area: skills;
}

article#education {
  grid-area: education;
}

article#projects {
  grid-area: projects;
}

article.home {
  padding: 0.5rem;
  border-top: 0.5px solid #e59312;
}

.project {
  width: 75%;
}

/*About Me CSS*/
body.about-me {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto;
  grid-template-areas:
    "header header header header header header header header header header header header"
    ". . about-me about-me about-me about-me about-me about-me about-me about-me . ."
    ". . skills skills skills skills skills skills skills skills . ."
    ". . education education education education education education education education . .";
}

header.about-me {
  grid-area: header;
}

main.about-me {
  grid-area: about-me;
  border: 2px solid #8c6d45;
  border-radius: 0.3rem;
  margin: 2rem;
}

h1.about-me,
p.about-me {
  padding-left: 2.5rem;
}

img.about-me {
  max-width: 100%;
}

article.about-me {
  padding: 0.5rem;
  border-top: 0.5px solid #e59312;
}

article#skills {
  grid-area: skills;
}

article#education {
  grid-area: education;
}

/*Projects CSS*/
.portfolio h1 {
  margin-left: 5rem;
}
.flex-container {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  flex-flow: column wrap;
  gap: 1rem; /* Space between flex-items */
  max-width: 75%; /* Adjust to allow better layout */
  margin: auto; /* Center the container horizontally */
  padding: 0;
  box-sizing: border-box;
  /* border: 1px solid blue; */ /* For debugging layout */
}
figure.banner img {
  margin: auto;
  width: 100rem;
}
.flex-item {
  display: flex;
  flex-direction: row; /* Place image and text side by side */
  align-items: flex-start; /* Align items at the top */
  gap: 1rem; /* Add space between the image and text */
  padding: 1rem;
  max-width: 75%;
  /* border: 1px solid red;*/ /*Debugging layout */
  margin: auto;
}

.flex-item figure {
  flex: 1 1 auto; /* Allow figure to resize based on available space */
  margin: 0; /* Remove default margins */
  width: 33%; /* Ensure it takes up half of the flex item*/
}

.flex-item figure img {
  max-width: 100%; /* Scale the image within its container */
  height: auto; /* Maintain aspect ratio */
  display: none; /* Avoid space below the image */
}

.flex-item:nth-child(3) figure img {
  display: block !important; /* Make the image in the second flex-item visible */
}
.flex-item p {
  flex: 1 1 auto; /* Allow the text to take up more space than the image */
  margin: 0; /* Remove default margins */
  word-wrap: break-word; /* Prevent text from breaking the layout */
  line-height: 1.6; /* Improve readability */
}
/* Ensure content remains within bounds of their flex container */
html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}
/*Workfield Exploration CSS*/

/*Contact CSS*/
/* General reset */
.form-container * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Form container */
.form-container {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 1rem;
}

.registration-form {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 500px;
}

.registration-form h1 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #ae710e;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
  color: #ccbaa5;
  font-family: "Orbitron Regular", serif;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  font-family: "Orbitron Regular", serif;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #8e5915;
  box-shadow: 0 0 4px #8e5915;
}

.registration-form button {
  display: block;
  width: 100%;
  padding: 0.75rem;
  border: none;
  border-radius: 4px;
  background-color: #1a141a;
  color: #ccbaa5;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-family: "Orbitron Regular", serif;
}

.registration-form button:hover {
  background-color: #8e5915;
}

/* Responsive design */
@media screen and (min-width: 800px) {
  /*Home CSS*/
  .project {
    width: 50%;
  }

  /*About-me CSS*/
  img.about-me {
    max-width: 50%;
  }

  /*Projects CSS*/
  .flex-item figure img {
    display: block;
  }

  /*Registration form*/
  .registration-form {
    margin: 1.5rem;
  }

  .form-group input,
  .form-group textarea {
    font-size: 0.9rem;
  }

  .registration-form button {
    font-size: 0.9rem;
  }

  /*Registration form*/
  .form-container {
    max-width: 100%;
    margin: auto;
  }
  .registration-form {
    margin: 1.5rem;
    display: grid;
    grid-template-rows: auto;
    grid-template-columns: 1fr 1fr;
    grid-column-gap: 1rem;
    grid-template-areas:
      "title title"
      "first-name last-name"
      "email phone"
      "message message"
      "button button";
  }

  form h1 {
    grid-area: title;
  }

  label[for="first-name"] {
    grid-area: first-name;
  }

  label[for="last-name"] {
    grid-area: last-name;
  }

  label[for="email"] {
    grid-area: email;
  }

  label[for="phone"] {
    grid-area: phone;
  }

  form button[type="submit"] {
    grid-area: button;
  }

  .form-group.textarea-group {
    grid-area: message;
    grid-column: span 2;
  }

  .form-group input,
  .form-group textarea {
    font-size: 0.9rem;
  }

  .registration-form button {
    font-size: 0.9rem;
  }
}

@media screen and (min-width: 1200px) {
  /*Home CSS*/
  .project {
    width: 33%;
  }
  /*About-me CSS*/
  img.about-me {
    max-width: 33%;
  }
}
