:root {
  --primary: #05055f;
  --secondary: #f7f7f7;
  --primary-gradient: linear-gradient(160deg, #020123, #05055f);
  --secondary-gradient: linear-gradient(-160deg, #05058c, #07062e);
  --text-secondary: #666;
  --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Montserrat", sans-serif;
  scroll-behavior: smooth;
}

/* Animations */
.revealx {
  opacity: 0;
  transform: translateX(60px);
  transition: 1s ease;
  overflow-x: hidden;
}
.revealx.active {
  opacity: 1;
  transform: translateX(0);
}
.revealy {
  opacity: 0;
  transform: translateY(60px);
  transition: 1s ease;
  overflow-x: hidden;
}
.revealy.active {
  opacity: 1;
  transform: translateY(0);
}

body {
  background: var(--secondary);
  color: var(--primary);
  overflow-x: hidden;
}

img {
  width: 100%;
  display: block;
}

.mobile-menu {
  display: none;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  height: 70px;
  padding: 0 10%;
  background: #ffffff00;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition:
    background 0.4s ease,
    box-shadow 0.4s ease;
  z-index: 100;
  user-select: none;
}
.navbar nav a {
  color: var(--primary);
  margin-left: 25px;
  text-decoration: none;
  transition: 0.3s;
}
.navbar nav a:hover,
.navbar nav a:focus,
.navbar nav a:active {
  font-weight: 700;
  letter-spacing: 1.3px;
}
.navbar.scrolled {
  background: #ffffff00;
  backdrop-filter: blur(16px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.438);
}
.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary);
  letter-spacing: 0.5px;
  transition: 0.3s;
  text-decoration: none;
}
.logo:hover {
  opacity: 0.7;
}
.navbar.scrolled .logo,
.navbar.scrolled nav a {
  color: var(--primary);
}
.navbar.scrolled-color {
  background: #ffffff00;
  backdrop-filter: blur(16px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.438);
}
.navbar.scrolled-color .logo,
.navbar.scrolled-color nav a {
  color: var(--primary);
}
.navbar.scrolled nav a:hover,
.navbar.scrolled nav a:focus,
.navbar.scrolled nav a:active,
.navbar.scrolled-color nav a:hover,
.navbar.scrolled-color nav a:focus,
.navbar.scrolled-color nav a:active {
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 1.3px;
}

/* Page hero */
.page-hero {
  position: relative;
  width: 100%;
  min-height: 35vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--secondary);
  padding: 140px 10% 60px;
  text-align: center;
}
.page-hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  width: 100%;
}
.page-hero h1 {
  color: var(--primary);
  font-size: clamp(32px, 5vw, 60px);
  font-weight: 300;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.page-hero p {
  color: var(--text-secondary);
  font-size: clamp(14px, 2vw, 18px);
  line-height: 1.6;
  margin: 0 auto;
}

/* Filter */
.filter-section {
  padding: 60px 10% 0;
}
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.project-group {
  margin-bottom: 70px;
}
.section-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}
.section-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  color: var(--primary);
  margin: 0;
}
.section-copy {
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 720px;
}
.project-group.hidden {
  display: none;
}

.filter-btn {
  padding: 10px 24px;
  border: 1.5px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s;
  letter-spacing: 0.3px;
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  color: var(--secondary);
}

/* Projects */
.projects-section {
  padding: 50px 10% 80px;
  overflow-x: hidden;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 35px;
}

/* Project card */
.project-card {
  background: #f7f7f7;
  border-radius: 12px;
  overflow-x: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: 0.3s ease;
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.16);
}
.card-link {
  text-decoration: none;
  color: var(--primary);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.card-image-wrap {
  position: relative;
  overflow-x: hidden;
  aspect-ratio: 3 / 2;
}
.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.project-card:hover .card-image-wrap img {
  transform: scale(1.04);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 95, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  transition: 0.35s ease;
}
.project-card:hover .card-overlay {
  opacity: 1;
}

.overlay-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: var(--primary);
}
.overlay-text {
  color: var(--secondary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
}
.video-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}
.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.card-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary);
  opacity: 0.5;
  width: fit-content;
}
.card-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.3;
}
.card-desc {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
  flex: 1;
}
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(5, 5, 95, 0.1);
}
.meta-item {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 5px;
}
.no-results {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-secondary);
}
.no-results i {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.35;
  display: block;
}
.no-results p {
  font-size: 1rem;
  font-weight: 500;
}
.project-card.hidden {
  display: none;
}

/* Footer */
footer {
  background: linear-gradient(160deg, #020123 0%, #05055f 100%);
  color: #fff;
  padding: 56px 10% 32px;
}
.f-head {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.f-head h3 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.f-head > div:first-child > h3 {
  font-size: 20px;
  letter-spacing: 2px;
}
.f-head p {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 14px;
  line-height: 1.6;
}
.f-head a:not(.email-f, .social-links a) {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 13.5px;
  transition:
    color var(--transition),
    opacity var(--transition);
}
.f-head a:hover {
  color: #fff;
  opacity: 1;
}
.f-head > div:first-child > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 8px 18px;
  border-radius: 20px;
  transition:
    background var(--transition),
    border-color var(--transition);
}
.f-head > div:first-child > a:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.6);
}

.social-links {
  display: flex;
  gap: 14px;
  margin-top: 6px;
}
.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  text-decoration: none;
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition),
    transform var(--transition);
}

.email-f {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  text-decoration: none;
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition),
    transform var(--transition);
}

.email-f i{
  margin-right: 6px;
  font-size: 14px;
}

.social-links a:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
  transform: translateY(-2px);
}

.email-f:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
  transform: translateY(-2px);
}

.copyright {
  margin-top: 24px;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.3px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  /* Navbar */
  .navbar {
    height: auto;
    min-height: 60px;
    flex-direction: column;
    justify-content: center;
    padding: 12px 6%;
  }
  .logo {
    display: none;
  }
  .mobile-menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }
  .mobile-menu .logo {
    display: block;
    font-size: 22px;
  }
  .navbar nav {
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background: var(--primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    max-height: 0;
    overflow-x: hidden;
    transition: max-height 0.3s ease;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  }
  .navbar nav.active {
    max-height: 300px;
  }
  .navbar nav a {
    color: var(--secondary);
    padding: 14px 20px;
    margin: 0;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
  }
  .navbar nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--secondary);
    padding: 14px 20px;
  }
  .navbar.scrolled nav a,
  .navbar.scrolled-color nav a {
    color: var(--secondary);
  }

  /* Page hero */
  .page-hero {
    min-height: auto;
    padding: 100px 6% 40px;
  }
  .page-hero h1 {
    font-size: clamp(26px, 7vw, 40px);
  }

  /* Filter */
  .filter-section {
    padding: 36px 6% 0;
  }
  .filter-btn {
    font-size: 12px;
    padding: 9px 14px;
  }

  /* Projects */
  .projects-section {
    padding: 28px 6% 60px;
  }
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Footer */
  footer {
    padding: 40px 6% 28px;
  }
  .f-head {
    flex-direction: column;
    gap: 24px;
  }

  .email-f {
    width: 44%;
    justify-content: center;
  }

  .social-links {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .page-hero {
    padding: 90px 5% 32px;
  }
  .filter-section {
    padding: 28px 5% 0;
  }
  .projects-section {
    padding: 24px 5% 50px;
  }
  footer {
    padding: 32px 5% 22px;
  }
}

/* Footer layout restored to default two-row behavior on small screens */
