/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body */
body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #ffffff;
  display: flex; /* Make the body a flex container */
  flex-direction: column; /* Stack content vertically */
  min-height: 100vh; /* Ensure the body covers the full height of the viewport */
  margin: 0; /* Reset margin */
}

/* Links */
a {
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
}

/* Header */
header {
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1rem;
}

header h1 {
  font-size: 2rem;
  font-weight: bold;
  color: #222;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

nav ul li img {
  height: 20px;
  vertical-align: middle;
  box-shadow: 6px 6px 12px #a3b1c6, -6px -6px 12px #ffffff;
  border-radius: 50%;
}

nav ul li img:hover {
  box-shadow: 0 0 10px #28a745, 0 0 20px #19692c;
}

nav ul li a {
  font-size: 1.2rem;
}

/* Container */
.container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  padding-top: 0px;
  border-radius: 20px;
  background: transparent;
}

/* Intro Section */
section.intro {
  display: flex;              /* Layout side-by-side */
  align-items: center;        /* Vertically center image and text */
  justify-content: center;    /* Optional: center whole block */
  gap: 2rem;                  /* Space between image and text */
  margin: 6rem 0 2rem; 
  text-align: left;           /* Align text to the left */
  flex-wrap: wrap;            /* Allow wrapping on small screens */
}

section.intro h2 {
  font-size: 1.75rem;
  color: #222;
}

section.intro p {
  margin-bottom: 1rem;
  color: #555;
  font-size: 1.2rem;
}

.intro-text {
    display: flex;
  flex-direction: column;
  justify-content: center;  /* Vertically center text */
  text-align: center; 
}

.intro-images {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.intro-images img {
  width: 225px; /* Set the desired width */
  height: 225px; /* Set the desired height */
  object-fit: cover; /* Crops the image to fill the dimensions */
  border-radius: 10px; /* Optional: adds rounded corners */
  box-shadow: 6px 6px 12px #a3b1c6, -6px -6px 12px #ffffff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Contact Box */
.contact-box {
  text-align: center;
  margin-top: 12%;
}

.contact-box h2 {
  font-size: 1.2rem;
  color: #222;
}

.contact-box p {
  font-size: 1rem;
  color: #555;
}

.contact-box a {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 9px 9px 16px #a3b1c6, -9px -9px 16px #ffffff;
  color: #333;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  margin-bottom: 25px;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.875rem;
  color: #777;
  margin-top: auto; /* Push the footer to the bottom if there's not enough content */
  margin-right: 5%;
  margin-left: 5%;
  margin-bottom: 1%;
}

footer p {
  margin: 0;
}

/* Blog Styles */
.blog-container {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.blog-post {
  padding: 2rem;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 9px 9px 16px #a3b1c6, -9px -9px 16px #e9e9e9;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-post:hover {
  transform: translateY(-5px);
  box-shadow: 12px 12px 24px #a3b1c6, -12px -12px 24px #ffffff;
}

.blog-post h1 {
  font-size: 1.5rem;
  text-align: center;
  color: #222;
}

.blog-post img {
  max-width: 100%;
  border-radius: 20px;
  margin: 1rem 0;
  box-shadow: 9px 9px 16px #a3b1c6, -9px -9px 16px #ffffff;
}

.blog-post p {
  color: #333;
  text-align: center;
}

.post-container img {
  max-width: 100%; /* Scale down to fit within the container */
  height: auto; /* Maintain the aspect ratio */
  display: block; /* Remove inline-block space below images */
  margin: 10px auto; /* Add some spacing and center the image */
}

/* Optional: Add borders or shadows for a better appearance */
.post-container img {
  border: 1px solid #ccc;
  border-radius: 5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}


/* Project Section Styling */
.engineering-projects {
  padding: 2rem 1rem;
}

.engineering-projects h2 {
  text-align: center;
  font-size: 2rem;
  color: #222;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 columns of equal width */
  gap: 2rem; /* Space between grid items */
  margin-top: 2rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 9px 9px 16px #a3b1c6, -9px -9px 16px #e9e9e9;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 12px 12px 24px #a3b1c6, -12px -12px 24px #ffffff;
}

.project-card h3 {
  font-size: 1.5rem;
  color: #222;
  margin-bottom: 1rem;
}

.project-image {
  max-width: 300px; /* Set a maximum width */
  max-height: 300px; /* Set a maximum height */
  width: auto; /* Allow width to adjust */
  height: auto; /* Allow height to adjust */
  object-fit: contain; /* Ensure the image fits within the dimensions */
  border-radius: 10px;
  box-shadow: 9px 9px 16px #a3b1c6, -9px -9px 16px #e9e9e9;
  margin-bottom: 1rem;
  display: block; /* Ensure the image is treated as a block element */
}

.project-card p {
  color: #555;
  font-size: 1rem;
}

@media (max-width: 768px) {
  /* Header */
  header {
    flex-direction: column; /* Stack items vertically */
    align-items: center; /* Center align the items */
    text-align: center; /* Ensure text is centered */
    padding: 1rem;
  }

  header h1 {
    font-size: 1.5rem; /* Scale down the title */
    margin-bottom: 0.5rem; /* Add space between title and nav */
  }

  nav ul {
    flex-wrap: wrap; /* Allow items to wrap to the next line */
    justify-content: center; /* Center align the nav items */
    gap: 1rem; /* Adjust spacing between items */
  }

  nav ul li {
    font-size: 1rem; /* Scale down nav items */
  }

  nav ul li a {
    font-size: 1rem; /* Adjust link size */
  }

  /* Reduce padding and margins for smaller screens */
  header {
    padding: 1rem;
    margin: 0.5rem;
  }

  /* Adjust container width and padding */
  .container {
    padding: 1rem;
    margin: 1rem;
  }

  /* Intro section adjustments */
  section.intro {
    margin: 1rem 0;
  }

  .intro-images {
    flex-wrap: wrap; /* Allow images to wrap to new lines */
    gap: 0.5rem; /* Reduce the gap between images */
  }

  .intro-images img {
    width: 150px; /* Smaller image size */
    height: 150px;
  }

  /* Contact box adjustments */
  .contact-box {
    margin-top: 2%;
  }

  .contact-box a {
    font-size: 0.9rem; /* Reduce font size for smaller screens */
    padding: 0.5rem; /* Adjust padding */
  }

  /* Footer */
  footer {
    font-size: 0.75rem; /* Smaller font for footer text */
    padding: 1rem 0.5rem;
    margin: 1%;
  }

  /* Blog styles */
  .blog-post {
    padding: 1rem; /* Reduce padding */
  }

  .blog-post h1 {
    font-size: 1.2rem; /* Adjust font size */
  }

  /* Project Section */
  .project-grid {
    grid-template-columns: 1fr; /* Stack projects in a single column */
  }

  .project-card {
    padding: 1rem;
  }

  .project-card h3 {
    font-size: 1.2rem; /* Smaller font size for project titles */
  }

  .project-image {
    width: 200px; /* Reduce image size */
    height: 200px;
  }
}

