/*General*/

body {
  margin: 0;
  background-color: #f8f9fa;
  font-family: "Fira Sans", sans-serif;
  display: flex;
  flex-direction: column;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

strong,
b {
  color: #354f52;
}

/*Navigation bar*/
header {
  width: 100%;
  position: fixed;
  z-index: 1;
  color: #f8f9fa;
  background: linear-gradient(to bottom, #e8f0f0, transparent);
  /* background-color: #e8f0f0; */
}

nav {
  display: flex;
  justify-content: right;
}

.nav-child {
  display: flex;
  align-items: center;
}

.nav-child a {
  margin: 1rem;
  text-decoration: none;
  color: #354f52;
  font-weight: 700;
  padding: 1px;
  border-bottom: 3px solid transparent;
  padding-bottom: 5px;
}

.nav-child a:hover {
  color: #008cba;
  border-bottom-color: #008cba;
  transition: all 0.3s ease;
}

/*Hero*/
.hero-container {
  display: flex;
  align-items: center; /* Centers items vertically */
  justify-content: center; /* Centers the group horizontally */
  gap: 4rem; /* Adds space between the name and the intro */
  background-color: #e8f0f0;
  background-image: url("../assets/images/00_Hero.png");
  background-position: center;
  background-size: cover;
  min-height: 60vh;
  width: 100%;
}

.hero-text {
  text-align: center;
}

.hero-text h4 {
  font-weight: 300;
}

.intro {
  flex: 0 1 40%; /* Limits width so it doesn't stretch across the whole screen */
  text-align: left;
  border-left: 2px solid #354f52; /* Optional: adds a nice visual separator */
  padding-left: 2rem;
}

/*About*/
#about {
  display: flex;
  align-items: center;
  flex-direction: row;
  justify-content: center;
  gap: 4rem;
  min-height: 60vh;
  margin-right: 20%;
  margin-left: 20%;
  padding-top: 3%;
  padding-bottom: 3%;
}
.profile-picture img {
  width: 300px;
  border-radius: 8px; /* Matches your other images */
  box-shadow: 8px 8px 0px #e8f0f0; /* Consistent with featured cards */
}
.bio p {
  margin-bottom: 1rem; /* Add space between paragraphs */
  line-height: 1.6; /* Improves readability */
}

.bio h1 {
  margin-bottom: 1.5rem;
  color: #354f52;
}
/*Featured*/
#featured-projects {
  padding: 60px 10%;
  background-color: #ffffff;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
  font-size: 2.5rem;
  color: #354f52;
}

.featured-card {
  display: flex;
  align-items: center;
  gap: 50px;
  margin-bottom: 100px;
}

/* Zig-zag layout */
.featured-card:nth-child(even) {
  flex-direction: row-reverse;
}

.featured-image {
  flex: 1.2;
}

.featured-image img {
  width: 100%; /* Makes all images consistent size */
  max-width: 100%;
  height: 100%; /* Fixed height */
  object-fit: cover; /* Crops nicely if aspect ratio varies */
}

.featured-image img:hover {
  transform: scale(1.02);
  transition: all 0.5s ease;
}

.featured-content {
  flex: 1;
}

.tag {
  color: #008cba;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 1px;
}

.featured-content h2 {
  margin: 10px 0;
  font-size: 1.8rem;
  color: #2f3e46;
}

.tech-stack {
  margin: 20px 0;
}

.tech-stack span {
  background: #f1f3f5;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  margin-right: 8px;
  color: #354f52;
  border: 1px solid #dee2e6;
}

.btn-primary {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 25px;
  background-color: #354f52;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.3s;
}

.btn-primary:hover {
  background-color: #52796f;
}

/* Mobile Responsiveness */
@media (max-width: 810px) {
  .featured-card,
  .featured-card:nth-child(even) {
    flex-direction: column;
    gap: 30px;
  }
  .featured-image {
    width: 100%;
  }
}
/*Projects*/
#projects {
  background-color: #e8f0f0;
  padding: 10px;
}
.row {
  display: flex;
  flex-wrap: wrap;
  padding: 0 4px;
}

#projects h1 {
  text-align: center;
}

.column {
  flex: 25%;
  max-width: 50%;
  padding: 0 4px;
}

.column img {
  margin-top: 8px;
  vertical-align: middle;
  width: 100%;
}

/*---Images overlay---*/
.container {
  position: relative;
  width: 100%;
  min-height: 300px; /* Ensures consistent card heights */
}

.image {
  display: block;
  width: 100%;
  height: auto;
}

.overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  width: 100%;
  opacity: 0;
  transition: 0.5s ease;
  background-color: #354f52d7;
  display: flex;
  align-items: center; /* Centers content vertically */
  justify-content: center;
}

.container:hover .overlay {
  opacity: 1;
}

.text {
  color: white;
  padding: 20px; /* Keeps text away from the edges */
  width: 90%; /* Forces the text to use most of the box width */
  text-align: center;
  font-size: 16px; /* Adjusted for long descriptions */
  line-height: 1.4;
  /* Removed absolute positioning and transforms—Flexbox above handles this now */
}

.text ul {
  text-align: left; /* Left-align bullet points for readability */
  max-width: 90%;
}

/*---Button---*/
.button {
  display: inline-block;
  border-radius: 4px;
  background-color: #354f52;
  border: none;
  color: #ffffff;
  text-align: center;
  font-size: 15px;
  padding: 15px;
  width: 150px;
  cursor: pointer;
}

.button span {
  display: inline-block;
  position: relative;
  transition: 0.5s;
}

.button span:after {
  content: "\00bb";
  position: absolute;
  opacity: 0;
  right: -20px;
  transition: 0.5s;
}

.button:hover span {
  padding-right: 25px;
}

.button:hover span:after {
  opacity: 1;
  right: 0;
}
/* Footer Styles */
#contact {
  padding: 60px 10% 20px 10%;
  background-color: #f8f9fa;
  color: #354f52;
}

.footer-divider {
  border: 0;
  height: 1px;
  background-image: linear-gradient(
    to right,
    transparent,
    #354f52,
    transparent
  );
  margin-bottom: 50px;
}

/* Contact Form Styles */
.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 50px;
  margin-bottom: 40px;
}

.footer-msg {
  flex: 1;
  min-width: 300px;
}

.footer-msg h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: #354f52;
}

.footer-msg p {
  font-weight: 300;
  color: #52796f;
}

.contact-form {
  flex: 1;
  min-width: 300px;
  max-width: 500px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #dee2e6;
  border-radius: 4px;
  font-family: 'Fira Sans', sans-serif;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  background-color: #ffffff;
  color: #354f52;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #008cba;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.btn-submit {
  width: 100%;
  padding: 12px 25px;
  background-color: #354f52;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-family: 'Fira Sans', sans-serif;
}

.btn-submit:hover {
  background-color: #52796f;
}

.btn-submit:disabled {
  background-color: #8ba8a5;
  cursor: not-allowed;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #dee2e6;
}

.footer-links a {
  text-decoration: none;
  color: #354f52;
  font-weight: 600;
  font-size: 1.1rem;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: #008cba;
  border-bottom-color: #008cba;
}

.footer-bottom {
  margin-top: 60px;
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Mobile responsive footer */
@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    text-align: center;
  }
  
  .contact-form {
    max-width: 100%;
  }
  
  .footer-msg {
    min-width: 100%;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 15px;
  }
}

/* Mobile responsive footer */
@media (max-width: 600px) {
  .footer-container {
    flex-direction: column;
    text-align: center;
  }
  .footer-links {
    flex-direction: column;
    gap: 15px;
  }
}
/*Responsive controls*/
/*--- Tablets (Up to 810px) ---*/
@media screen and (max-width: 810px) {
  #about {
    flex-direction: column;
    padding-top: 10%;
    margin-left: 5%; /* Reducing desktop margins for tablet */
    margin-right: 5%;
  }
  .column {
    flex: 40%;
    max-width: 40%; /* Changed from 33% to 50% to allow two columns */
  }
}

/*--- Phones (Up to 600px) ---*/
@media (max-width: 600px) {
  .hero-container {
    background-image: none;
    flex-direction: column;
  }
  .intro {
    text-align: center;
    border-left: none;
    padding-left: 0;
  }
  .column {
    flex: 100%;
    max-width: 100%; /* Stacks them vertically on phones */
  }
}
