/* Reset some default styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #212A31;
  color: #CBD2D0;
  line-height: 1.6;
  padding-bottom: 2rem;
}

header {
  background-color: #1B2A34;
  padding: 1rem 2rem;
  border-bottom: 1px solid #124E66;
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 20px;
}

nav ul li a {
  text-decoration: none;
  color: #CBD2D0;
  font-weight: bold;
  transition: color 0.3s;
}

nav ul li a:hover {
  color: #88A3AA;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #124E66;
}

.landing {
  text-align: center;
  padding: 4rem 2rem;
  background-color: #124E66;
}

.landing h2 {
  color: #CBD2D0;
  margin-bottom: 1rem;
}

.about, .projects {
  padding: 3rem 2rem;
  max-width: 1100px;
  margin: auto;
  background-color: #2E3944;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

.about-img {
  max-width: 300px;
  margin-top: 1.5rem;
  display: block;
}

.contact {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #88979D;
}

.contact a {
  margin-right: 10px;
  text-decoration: none;
  color: #124E66;
}

.project-images {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start; /* Align all cards to the top */
  gap: 2rem;
}


.project-card {
  flex: 0 0 300px; /* Fixed width and no grow/shrink */
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: #2E3944;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  margin-bottom: 2rem;
}


.project-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.3s ease, filter 0.3s ease;
  border-radius: 12px 12px 0 0;
}

.project-card:hover img {
  transform: scale(1.05);
  filter: brightness(0.6);
}



.project-card:hover .project-info {
  opacity: 1;
}

.project-info h3 {
  margin-bottom: 0.3rem;
  font-size: 1.2rem;
  font-weight: bold;
}

.project-info p {
  font-size: 0.9rem;
  color: #88979D;
}

.buttons {
  margin-top: 1.5rem;
}

.btn {
  display: inline-block;
  background-color: #0D3B52;
  color: white;
  padding: 0.6rem 1.2rem;
  text-decoration: none;
  margin-right: 10px;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.btn:hover {
  background-color: #124E66;
}

.footer {
  text-align: center;
  padding: 1rem;
  background-color: #2E3944;
  border-top: 1px solid #124E66;
  font-size: 0.9rem;
  color: #88979D;
  margin-top: 2rem;
}

.footer-links {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #748d92;;
  margin: 0 6px;
  text-decoration: none;
  font-weight: 500;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
  background-color: #f9f9f9;
  color: #212A31;
  margin: 5% auto;
  padding: 2rem;
  border-radius: 8px;
  width: 90%;
  max-width: 1000px;
  position: relative;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: row;
  gap: 2rem;
  flex-wrap: wrap;
}

.modal-content img {
  max-width: 100%;
  border-radius: 6px;
}

.modal-content .modal-images {
  flex: 1 1 45%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-content .modal-text {
  flex: 1 1 50%;
  font-size: 0.95rem;
}

.modal-content .modal-text h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: #000;
}

.modal-content .modal-text p {
  margin-bottom: 0.5rem;
}

.modal-content .modal-text em {
  font-style: italic;
}

.modal-content .modal-text strong {
  font-weight: bold;
  color: #b30000;
}

.modal-content .modal-links {
  margin-top: 1.5rem;
}

.modal-btn {
  display: inline-block;
  background-color: #0D3B52;
  color: #CBD2D0;
  padding: 0.6rem 1.2rem;
  text-decoration: none;
  margin-right: 10px;
  border-radius: 5px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  font-weight: 600;
}

.modal-btn:hover {
  background-color: #124E66;
  transform: scale(1.05);
}

.modal-content .tags {
  margin-top: 1rem;
  color: #555;
  font-size: 0.9rem;
}

.close {
  color: #333;
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: #000;
  text-decoration: none;
}

/* Responsive design */
@media (max-width: 768px) {
  .project-images {
    flex-direction: column;
  }

  .project-card {
    flex: 1 1 100%;
  }

  nav ul {
    flex-direction: column;
    align-items: flex-start;
  }

  nav ul li {
    margin: 10px 0;
  }

  .about-img {
    margin: 1.5rem auto 0;
  }

  .modal-content {
    flex-direction: column;
    padding: 1.5rem;
  }
}

.project-link {
  text-align: center;
  color: #CBD2D0;
  padding: 0.75rem;
  background-color: #1f2a30;
  border-top: 1px solid #2E3944;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-link {
  color: #748D92;
  opacity: 0;
}

.project-link a {
  color: #CBD2D0;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s;
}

.project-link a:hover {
  color: #88A3AA;
}



.project-image img {
  width: 100%;
  height: 220px; /* Fixed height for uniformity */
  object-fit: cover;
  object-position: center;
  border-radius: 12px 12px 0 0 !important;

  display: block;
}


.social-icons {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.social-icons img {
  width: 32px;
  height: 32px;
  transition: transform 0.3s ease;
  filter: brightness(0) invert(1);
}

.social-icons img:hover {
  transform: scale(1.15);
}

.scroll-images img.payload-cropped {
  object-fit: cover;
  height: 280px;
  object-position: center;
}

.scroll-images img.launch-cropped {
  object-fit: cover;
  height: 400px;
  object-position: center 40%;
}

.modal-content img.payload-cropped {
  object-fit: cover;
  height: 280px;
  object-position: center;
}

.modal-content img.launch-cropped {
  object-fit: cover;
  height: 400px;
  object-position: center 40%;
}


.project-image {
  overflow: hidden;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}


.project-image {
  overflow: hidden;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  padding-top: 6px; /* Gives all cards breathing room above */
  box-sizing: border-box;
}

#skills .card {
  background-color: #2E3944;
  padding: 30px;
  border-radius: 12px;
  margin-top: 20px;
}

.skills-list {
  list-style: none;
  padding: 0;
  columns: 2;
  column-gap: 40px;
}

.skills-list li {
  margin: 10px 0;
  font-size: 16px;
  color: #fff;
}
.skills-card {
  background-color: #2E3944;
  padding: 30px;
  border-radius: 12px;
  max-width: 1100px; /* Match the other card widths */
  margin: 20px auto;  /* Top/bottom spacing and centered */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); /* Optional for consistency */
}


.skills-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 40px;
}

.skills-list li {
  font-size: 16px;
  color: #fff;
}
.project-card {
  background-color: #2E3944;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 300px;
}

.project-image img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}
.project-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
   position: relative;
}

.project-image {
  height: 220px; /* This sets the height of the image container */
  display: flex;
  align-items: stretch;
}




.project-image img {
  width: 100%;
  height: 220px; /* Keep this for all other images */
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 12px 12px 0 0 !important;
}

#pcb-project-card .project-image {
  height: auto; /* Remove the fixed height for this specific card's image container */
  flex-grow: 1; /* Allow this container to take up available space */
  display: flex; /* Ensure it's a flex container for the image */
  align-items: center; /* Vertically centers the image if space remains */
  justify-content: center; /* Horizontally centers the image if space remains */
}

.pcb-stretch {
  width: 50%; /* Fill the width of its flexible container */
  height: 50%; /* Fill the height of its flexible container */
  object-fit: contain; /* Shows the entire image without cropping. Change to 'cover' if cropping is acceptable to fill completely. */
  display: block;
  /* Remove border-bottom-left-radius and border-bottom-right-radius if you want it to match project-image img's radius */
}

.project-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 300px;
  background-color: #2E3944;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.project-image {
  height: 220px;
  width: 100%;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}


#pcb-project-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

#pcb-project-card .project-image {
  flex-grow: 1;
  display: flex;
  align-items: stretch;
}

#pcb-project-card .pcb-stretch {
  width: 100%;
  height: 110%;
  object-fit: cover;
  display: block;
  border-radius: 12px 12px 0 0;
}


.project-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
  padding-top: 10px;  /* restores small space above image */
  box-sizing: border-box;
  border-radius: 10px;
  overflow: hidden;
  background-color: #2e3b47; /* or your card background */
}

.project-image {
  height: 220px;
  overflow: hidden;
  padding: 0;
  margin: 0;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


.project-info, .project-link {
  padding-top: 10px;
  padding-bottom: 10px;
  text-align: center;
}


/* Specific to PCB */
img.pcb-image {
  margin-top: 0px !important;      /* reduce top spacing */
  padding-top: 0px !important;     /* reduce top padding */
  display: block;
}

img.pcb-image {
  margin-top: 0px !important;      /* reduce top spacing */
  padding-top: 0px !important;     /* reduce top padding */
  display: block;
  height: 100%;
}



.project-info h3 {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 0.3rem;
}

.project-info p {
  font-size: 1rem;
  color: #ccc;
  margin-top: 0;
}


.project-image-wrapper {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.project-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px 12px 0 0;
}

.project-info {
  position: absolute;
  bottom: 0px;
  left: 15px;
  right: 15px;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: white;
}

.project-card:hover .project-info {   
  opacity: 1;
}
.about-container {
  display: flex;
  align-items: flex-start;  /* Align tops of image and text */
  justify-content: center;
  gap: 40px;
  padding: 40px;
  flex-wrap: nowrap; /* Prevent wrapping unless screen is narrow */
}

@media (max-width: 768px) {
  .about-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .about-text {
    max-width: 100%;
  }
}


.about-img {
  max-width: 300px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}



.about-text h1, .about-text h2 {
  margin: 0;
}
.modal-img {
  width: 100%;
  border-radius: 8px;
  margin: 20px 0;
}
.project-grid {
  display: flex;
  flex-wrap: wrap; /* allows rows to break */
  gap: 20px; /* or whatever spacing you prefer */
  justify-content: center; /* center horizontally */
  align-items: flex-start; /* align items to the top */
}
