/*variables*/
:root {
  --primary-color: #173786;
  --bg-color: #fff5db;
  --text-color: #173786;
}

/* Resets & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
}

body {
  background-color: var(--bg-color); /* Updated to use light theme variable */
  color: var(--text-color);
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
  line-height: 1.6;
}

/* Header Styles */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 40px;
  background: linear-gradient(
    to bottom,
    rgba(255, 245, 219, 0.42) 0%,
    rgba(255, 245, 219, 0.12) 55%,
    rgba(255, 245, 219, 0) 100%
  );
  overflow: hidden;
  transition: background 0.3s ease;
}

header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-backdrop-filter: blur(6px) saturate(105%);
  backdrop-filter: blur(6px) saturate(105%);
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.65) 55%,
    rgba(0, 0, 0, 0) 100%
  );
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.65) 55%,
    rgba(0, 0, 0, 0) 100%
  );
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

nav .logo {
  height: clamp(50px, 8vw, 80px); /* Responsive scaling */
  width: auto;
  display: block;
  /* Removed white filter to use original dark logo */
  transition: filter 0.3s ease;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 40px;
}

nav a {
  color: var(--text-color);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.92rem;
  font-weight: 500;
  transition:
    opacity 0.3s,
    color 0.3s;
  padding: 10px 18px; /* Slightly larger default button size */
  /* Invisible background by default to reserve size */
  background: transparent center/100% 100% no-repeat;
}

nav a:hover {
  background-image: url("../assets/active_nav_btn.webp");
  color: var(--text-color); /* Retains its original color */
  opacity: 1; /* Removes any fade effect */
}

header.header-on-dark {
  background: linear-gradient(
    to bottom,
    rgba(10, 23, 59, 0.38) 0%,
    rgba(10, 23, 59, 0.14) 55%,
    rgba(10, 23, 59, 0) 100%
  );
}

header.header-on-dark nav .logo {
  filter: brightness(0) invert(1);
}

header.header-on-dark nav a,
header.header-on-dark nav a:hover {
  color: var(--bg-color);
}

/* Hero Section */
.hero-section {
  position: relative;
  height: 70vh; /* Reduced height */
  width: 90%;
  max-width: 1200px;
  margin: 140px auto 40px; /* Increased top margin for better spacing */
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-radius: 20px; /* Rounded corners for the box */
}

/* Dark overlay on video */
.hero-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  z-index: 0;
}

.video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 100%;
  padding: 0 20px;
}

/* Scroll Indicator */
.scroll-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 60px; /* Space between arrow and projects section */
  pointer-events: none; /* Make it non-clickable */
}

.scroll-arrow {
  width: 50px; /* Increased size from 30px */
  height: auto;
  transform: rotate(90deg); /* Make it point down */
  animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0) rotate(90deg);
  }
  40% {
    transform: translateY(10px) rotate(90deg);
  }
  60% {
    transform: translateY(5px) rotate(90deg);
  }
}

/* Projects Section */
#projects {
  padding: 100px 20px;
  background: transparent; /* Use body background */
  max-width: 1200px;
  margin: 0 auto;
}

#projects h2 {
  text-align: center;
  margin-bottom: 80px;
  font-size: 2rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  font-weight: 300;
  color: var(--text-color);
}

.projects-list {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.project-item {
  display: flex;
  align-items: center;
  gap: 40px;
  border-radius: 20px;
  padding: 24px;
  border: none;
  background: rgba(23, 55, 134, 0.04);
}

/* Alternating Layout */
.project-item:nth-child(even) {
  flex-direction: row-reverse;
}

.project-image-wrapper {
  flex: 1;
  overflow: hidden;
  border-radius: 20px;
}

.project-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 16/9;
  display: block;
  transition: transform 0.5s ease;
}

.project-image-wrapper:hover .project-image {
  transform: scale(1.03);
}

.project-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.project-item:nth-child(even) .project-content {
  align-items: flex-end;
  text-align: right;
}

.project-title {
  margin: 0 0 20px;
  font-family: serif;
  font-size: 2rem;
  font-weight: 400;
  color: var(--text-color);
}

.project-desc {
  font-size: 1rem;
  color: var(--text-color);
  line-height: 1.8;
  margin-bottom: 30px;
}

.project-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 26px;
  border: none;
  border-radius: 999px;
  background: var(--primary-color);
  color: var(--bg-color);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(23, 55, 134, 0.16);
}

.project-link-btn:hover {
  transform: translateY(-1px);
  opacity: 0.92;
  box-shadow: 0 10px 24px rgba(23, 55, 134, 0.2);
}

/* Arrow Icon inside button */
.btn-arrow {
  height: 0.95em;
  width: auto;
  filter: brightness(0) invert(1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  header {
    padding: 12px 16px;
  }

  nav {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }

  nav ul {
    gap: 0;
  }

  nav a {
    white-space: nowrap;
    font-size: 0.75rem;
    letter-spacing: 1px;
    padding: 6px 12px;
  }

  .hero-section {
    margin-top: 170px;
  }

  #projects h2 {
    font-size: 1.5rem;
    margin-bottom: 40px;
  }

  .projects-list {
    gap: 60px;
  }

  .project-item,
  .project-item:nth-child(even) {
    flex-direction: column;
    gap: 20px;
  }

  .project-content,
  .project-item:nth-child(even) .project-content {
    align-items: flex-start;
    text-align: left;
  }

  .project-title {
    font-size: 1.5rem;
  }
}

/* About Page Styles */
.about-main {
  padding-top: 180px;
  padding-bottom: 90px;
  max-width: 1240px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.about-media {
  display: flex;
  justify-content: center;
  margin-bottom: 36px;
}

.about-body {
  width: 100%;
}

.about-header {
  text-align: center;
  margin-bottom: 28px;
}

.about-profile-img {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 20px;
}

.about-title {
  font-size: 2.5rem;
  font-weight: 300;
  margin-bottom: 10px;
}

.about-subtitle {
  color: var(--text-color);
  font-size: 1.1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.about-content {
  font-size: 1.1rem;
  color: var(--text-color);
  line-height: 1.8;
}

.about-content p {
  margin-bottom: 34px;
}

.about-contact {
  margin-top: 28px;
  padding: 18px 20px;
  border: 2px solid var(--primary-color);
  border-radius: 16px;
}

.about-contact-title {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text-color);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.about-contact p {
  margin-bottom: 12px;
  font-size: 1.1rem;
  color: var(--text-color);
}

.about-contact a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.about-contact a:hover {
  text-decoration: underline;
}

@media (min-width: 900px) {
  .about-main {
    display: grid;
    grid-template-columns: minmax(280px, 420px) 1fr;
    gap: 80px;
    align-items: start;
  }

  .about-media {
    justify-content: flex-start;
    margin-bottom: 0;
  }

  .about-header {
    text-align: left;
    margin-bottom: 32px;
  }
}
