/* Base Styles */
body {
  font-family: "Yu Gothic", "Hiragino Kaku Gothic Pro", sans-serif;
  background-color: #f3f2dc;
  margin: 0;
  color: #3b6e99;
  font-size: 16px;
  line-height: 1.6;
}

/* Header */
header {
  background: #6cc1c3;
  color: #fffcef;
  text-align: center;
  padding: 2rem 1rem;
}

.header-top {
  margin-bottom: 1.5rem; /* Adjust value as needed */
}

.header-top h1 {
  font-family: "Playfair Display", serif;
  font-size: 3rem;
  letter-spacing: 1px;
}

.header-top p {
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  margin: 0.5rem auto;
  text-transform: uppercase;
}

/* Main Sections */
main {
  padding: 1rem;
}

.nav-bar {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  background-color: #fffcef;
  padding: 0.5rem 1rem;
  border-top: 1px solid #dcdcdc;
  border-bottom: 1px solid #dcdcdc;
  font-size: 0.95rem;
}

.nav-bar a {
  color: #3b6e99;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-bar a:hover {
  background-color: #6cc1c3;
  color: #fffcef;
}

.boxed-section {
  background-color: #fffcef;
  padding: 2rem 1rem;
  margin: 2rem auto;
  max-width: 960px;
  border-bottom: 3px solid #6cc1c3;
  position: relative;
}

.boxed-section::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px; /* Adjust to move the second border closer or further */
  width: 100%;
  height: 1px;
  background-color: #dcdcdc;
}

/* Section Titles */
h2 {
  text-align: center;
  color: #3b6e99;
  margin-bottom: 0.5rem; /* reduced space below */
  padding-bottom: 0.25rem; /* reduced space before border */
  font-size: 1.8rem;
}

#portfolio h3 {
  text-align: center;
  font-size: 1.4rem;
  margin-top: 2.5rem;
  color: #3b6e99;
}

/* Portfolio Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
  padding-top: 1.5rem;
}

.item {
  display: flex;
  flex-direction: column;
  align-items: center; /* horizontal centering */
  justify-content: center; /* vertical centering */
  text-align: center;
  background: #f3f2dc;
  padding: 0.5rem;
  height: 100%; /* optional: ensures it fills the grid cell */
}

.item img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  display: block;
}

.caption {
  font-size: 0.95rem;
  color: #3b6e99;
}

/* Section Divider (optional for manual placement) */
.section-divider {
  border: none;
  border-top: 2px dashed #6cc1c3;
  margin: 3rem auto;
  width: 60%;
}

/* Footer */
footer {
  background: #6cc1c3;
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  color: #fffcef;
}

.linkedin-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: #3b6e99;
  font-weight: bold;
}

.linkedin-link:hover {
  color: #6cc1c3;
}

.linkedin-icon {
  width: 20px;
  height: 20px;
  margin-right: 0.5rem;
  vertical-align: middle;
}

/* Modal (background) */
.modal {
  display: none; /* already present */
  position: fixed; /* ensures it's removed from normal flow */
  z-index: 999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
}

/* Modal Image */
.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80vh;
  border-radius: 4px;
}

/* Close Button */
.close {
  position: absolute;
  top: 30px;
  right: 40px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

/* Slide-in Animation */
.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.visible {
  opacity: 1;
  transform: translateX(0);
}

.tagline-flex {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 300;
  color: #fffcef;
  margin-bottom: 2rem; /* space before nav */
}

@keyframes fadeSlideWord {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tagline-flex span {
  opacity: 0;
  display: inline-block;
  animation: fadeSlideWord 0.5s ease forwards;
}

.tagline-flex span:nth-child(1) {
  animation-delay: 0.2s;
}

.tagline-flex span:nth-child(2) {
  animation-delay: 0.4s;
}

.tagline-flex span:nth-child(3) {
  animation-delay: 0.6s;
}

.nav-bar {
  font-family: "Montserrat", sans-serif;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  background-color: #fffcef;
  padding: 0.5rem 1rem;
  border-top: 1px solid #dcdcdc;
  border-bottom: 1px solid #dcdcdc;
  font-size: 1rem; /* Adjust size if needed */
}

.nav-bar a {
  color: #3b6e99;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-weight: 500; /* Adjust weight for better emphasis */
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-bar a:hover {
  background-color: #6cc1c3;
  color: #fffcef;
}
