/* Color Palette:
        * Base/Background: #F6F5F2 (off-white)
        * Neutral: #8F8E7F (gray/taupe)
        * Accent Light: #5B7BA6 (light navy/blue)
        * Accent Mid: #2C4875 (navy blue) - primary
        * Accent Dark: #1A2B47 (dark navy)
        */

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background-color: #f6f5f2;
  color: #1a1a1a;
  min-height: 100vh;
}

strong,
b {
  color: #2c4875;
  font-weight: 600;
}

.container {
  max-width: 1200px;
  width: 90%;
  margin: 0 auto;
}

.nav-link {
  cursor: pointer;
  padding: 8px 12px;
  margin: 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-bottom 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: #b12e71ff;
  border-bottom-color: #b12e71ff;
}

.nav-link.active {
  font-weight: 600;
}

/* --- Fix nav-link active state on mobile: ensure nav-link.active always has highest specificity --- */
.nav-link.active,
.nav-link.section-title-gradient.active {
  color: #b12e71ff !important;
  border-bottom-color: #b12e71ff !important;
  font-weight: 600 !important;
}

/* On very small screens, ensure nav-link.active is visible and not cut off */
@media (max-width: 500px) {
  .nav-link.active,
  .nav-link.section-title-gradient.active {
    color: #b12e71ff !important;
    -webkit-text-fill-color: #b12e71ff !important;
    border-bottom-color: #b12e71ff !important;
    font-weight: 700 !important;
    background: rgba(255, 255, 255, 0.85);
    z-index: 10;
  }
  .nav-link.section-title-gradient.active {
    background: none !important;
    background-clip: initial !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: #b12e71ff !important;
    color: #b12e71ff !important;
  }
}

.header-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  padding-top: 0;
  padding-bottom: 0;
  height: 0;
  min-height: 0;
  overflow: hidden;
  border-bottom-width: 0;
  transition: transform 0.3s, opacity 0.3s, padding 0.3s, height 0.3s,
    border-bottom-width 0.3s;
}

header:not(.header-hidden) {
  transform: translateY(0);
  opacity: 1;
  z-index: 999;
  pointer-events: auto;
  font-size: clamp(1rem, 8vw, 1rem);
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
  height: auto;
  transition: transform 0.3s, opacity 0.3s, padding 0.3s, height 0.3s,
    border-bottom-width 0.3s;
}

.profile-section {
  position: relative;
  width: 100%;
  height: auto;
  margin: 0 auto;
  overflow: hidden;
  /* box-shadow: 0 10px 40px rgba(12, 34, 4, 0.79); */
}

.profile-image-container {
  position: relative;
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
}

.profile-image {
  width: 100%;
  height: auto;
  /* object-fit: contain; */
  display: block;
}

.profile-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
}

.profile-title {
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 1);
  margin-top: 1.5em;
  /* margin-bottom: 1rem; */
}

.profile-subtitle {
  font-size: clamp(1rem, 3vw, 1.7rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-shadow: 2px 2px 2px rgba(0, 0, 0, 1);
  margin: 0.2em 0 0 0;
}
/* .profile-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  color:#b12e71ff;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.6s ease-in-out;
  animation: bounce 2s infinite;
}

.profile-scroll-hint:not(.hidden) {
  animation: bounce 2s infinite;
}

.profile-scroll-hint.hidden {
  opacity: 0;
  pointer-events: none;
} */
.project-card-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 997;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}


.project-card-hint.show {
  opacity: 0.8;
}

.project-card-hint-content {
  background: rgba(177, 46, 113, 0.95);
  color: white;
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .project-card-hint-content {
    padding: 6px 16px;
    font-size: 0.85rem;
  }
}




.scroll-text {
  font-size: 0.875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

.scroll-icon {
  width: 3rem;
  height: 3rem;
  filter: drop-shadow(1px 1px 4px rgba(0, 0, 0, 0.5));
}

@keyframes bounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-10px);
  }
}

.content-section {
  /* min-height: 60vh; */
  /* padding-top: 12px; */
  box-sizing: border-box;
}

.project-card {
  border: 1px solid #e5e5e5;
  padding: 24px;
  border-radius: 8px;
  background-color: white;
  transition: transform 0.2s, box-shadow 0.2s, grid-column 0.3s ease;
  position: relative;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px #b12e7126;
}

.project-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #b12e7126;
  border-radius: 8px;
  backdrop-filter: blur(2px) saturate(120%);
  -webkit-backdrop-filter: blur(2px) saturate(120%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.project-card:hover .project-card-overlay {
  opacity: 1;
  pointer-events: none; /* keep clicks passing through */
}

.project-card-overlay-text {
  background: white;
  color: #b12e71;
  padding: 12px 32px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.project-card.expanded .project-card-overlay,
.project-card .project-card-overlay.overlay-hidden {
  opacity: 0;
  pointer-events: none;
}

.project-card.expanded {
  grid-column: 1 / -1;
  max-width: none;
  cursor: default;
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: transform 0.1s ease-out, box-shadow 0.3s ease;
  position: relative;
}

.project-card.expanding {
  animation: cardExpanding 0.6s ease-out forwards;
  pointer-events: none;
}

@keyframes cardExpanding {
  0% {
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg) scale(1);
  }
  50% {
    transform: perspective(1000px) rotateX(-1deg) rotateY(1deg) scale(1.02);
  }
  100% {
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg) scale(1);
  }
}

.project-card.expanded:hover {
  transform: none;
  box-shadow: 0 12px 32px rgba(177, 46, 113, 0.15);
}

.project-card.expanded::before {
  content: "";
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  background: radial-gradient(
    circle 300px at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 52, 157, 0.6) 0%,
    transparent 80%
  );
  border-radius: 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: -1;
}

.project-card.expanded:hover::before {
  opacity: 1;
}

.project-card.expanded::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle 200px at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 82, 177, 0.25) 0%,
    transparent 65%
  );
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  mix-blend-mode: screen;
}

.project-card.expanded:hover::after {
  opacity: 1;
}

.project-card.expanded .project-card-overlay {
  display: none;
}

.project-card-content {
  display: block;
  transition: all 0.3s ease;
}

.project-card.expanded .project-card-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  align-items: start;
}

.project-card-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-card-gallery {
  display: none;
  gap: 8px;
  margin-top: 16px;
}


.project-card.expanded .project-card-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.project-card-gallery img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  /* object-position: top;  */
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 2px solid transparent;
}

.project-card-gallery img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-color: #2c4875;
}










/* ================================
   Fullscreen project gallery modal
   ================================ */

.project-gallery-modal {
  display: none;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  align-items: center;
  justify-content: center;

  /* Smooth fade */
  opacity: 0;
  transition: opacity 0.35s ease;
}

.project-gallery-modal.active {
  display: flex;
  opacity: 1;
}

.project-gallery-modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.project-gallery-modal-title {
  font-size: 0.9rem;
  color: white;
  font-weight: 400;
  margin-bottom: 8px;
  text-align: center;
  width: 100%;
  max-width: 90vw;
  word-break: break-word;
}


.project-gallery-modal img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  cursor: pointer;
}

/* ================================
   Top-right close button (BLUE)
   ================================ */

.project-gallery-modal-close {
  position: absolute;
  top: calc(20px + env(safe-area-inset-top));
  right: calc(20px + env(safe-area-inset-right));
  background: #1a2b47;
  border: none;
  cursor: pointer;
  padding: 12px;
  border-radius: 50%;
  z-index: 10000;
  color: #ffffff;
  transition: background 0.3s ease, transform 0.2s ease;
}

.project-gallery-modal-close:hover {
  background: #1a2b47;
  transform: translateY(-2px);
}

.project-gallery-modal-close svg {
  width: 24px;
  height: 24px;
  display: block;
}

/* ================================
   Bottom control bar (CENTERED)
   ================================ */

.project-gallery-modal-bottom {
  position: fixed;
  left: 50%;
  bottom: calc(32px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  z-index: 10001;

  /* Smooth in/out */
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

/* Animate in when modal is active */
.project-gallery-modal.active .project-gallery-modal-bottom {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Shared styles for buttons and counter */

.project-gallery-modal-bottom .project-gallery-modal-arrow,
.project-gallery-modal-bottom .project-gallery-modal-close-bottom,
.project-gallery-modal-bottom .project-gallery-modal-counter {
  background: #1a2b47;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  height: 32px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: background 0.2s ease, transform 0.2s ease;
}

/* Buttons */

.project-gallery-modal-bottom .project-gallery-modal-arrow,
.project-gallery-modal-bottom .project-gallery-modal-close-bottom {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  position: static;
}

.project-gallery-modal-bottom .project-gallery-modal-arrow:hover,
.project-gallery-modal-bottom .project-gallery-modal-close-bottom:hover {
  background: #1a2b47;
  transform: translateY(-1px);
}

.project-gallery-modal-bottom svg {
  width: 18px;
  height: 18px;
}

/* Counter */

.project-gallery-modal-bottom .project-gallery-modal-counter {
  padding: 0 14px;
  border-radius: 16px;
  font-size: 0.95rem;
  font-weight: 600;
  min-width: 70px;
  height: 32px;
  text-align: center;
}





/* ================================
   Mobile adjustments
   ================================ */

@media (max-width: 767px) {
  .project-gallery-modal-bottom {
    bottom: calc(20px + env(safe-area-inset-bottom));
    gap: 10px;
  }

  .project-gallery-modal-bottom .project-gallery-modal-arrow,
  .project-gallery-modal-bottom .project-gallery-modal-close-bottom,
  .project-gallery-modal-bottom .project-gallery-modal-counter {
    height: 26px;
  }

  .project-gallery-modal-bottom .project-gallery-modal-counter {
    font-size: 0.9rem;
    padding: 0 14px;
  }

  .project-gallery-modal-bottom svg {
    width: 26px;
    height: 26px;
  }
}















.project-card-description {
  display: none;
}

.project-card.expanded .project-card-description {
  display: block;
  margin-top: 12px;
  color: #444;
  line-height: 1.6;
}

.project-card-details {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease 0.15s;
  background: #f9f9f9;
  padding: 10px;
  border-radius: 8px;
  border-left: 3px solid #2c4875;
}

.project-card.expanded .project-card-details {
  display: block;
  opacity: 1;
}

.project-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(177, 46, 113, 0.9);
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease, background 0.3s ease;
  display: none;
}

.project-card.expanded .project-close-btn {
  display: block;
  opacity: 1;
}

.project-close-btn:hover {
  background: rgba(177, 46, 113, 1);
}

.project-close-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.project-detail-label {
  font-weight: 600;
  color: #2c4875;
  margin-top: 10px;
  margin-bottom: 0px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-detail-value {
  color: #444;
  line-height: 1.6;
}

.project-link {
  color: #2c4875;
  text-decoration: underline;
  font-weight: 600;
}

.project-link:hover {
  color: #4a6ba0;
}

.project-link.pink {
  color: #b12e71;
  text-decoration: underline;
}

.project-link.pink:hover {
  color: #d63a8c;
}

.project-category {
  font-weight: 600;
  font-size: 1.2rem;
  color: #2c4875;
  margin-bottom: 12px;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.logo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
  overflow: visible;
  max-width: calc(8 * 120px + 7 * 32px);
  margin-left: auto;
  margin-right: auto;
}

.logo-item {
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 100px;
  border-radius: 8px;
  overflow: visible;
  flex-shrink: 0;
}

.logo-item img {
  max-width: 100%;
  max-height: 90px;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  opacity: 0.95;
  filter: grayscale(100%);
  transition: filter 0.5s ease-in-out, opacity 0.2s ease, transform 0.2s ease;
  will-change: filter;
}

.logo-item img.logo-invert-black {
  filter: invert(1) grayscale(0) !important;
}

.logo-item img.logo-invert-black:hover {
  filter: invert(1) grayscale(0) !important;
  opacity: 1;
  transform: translateY(-4px);
}

.logo-item img:hover {
  opacity: 1;
  filter: grayscale(0%);
  transform: translateY(-4px);
}

.scrolling-logos .logo-item img:not(.logo-invert-black) {
  filter: grayscale(50%);
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  overflow-y: scroll;
  height: 100%;
}

:root {
  --header-height: 80px;
  --accent-light: #5b7ba6;
  --accent-mid: #2c4875;
  --accent-hover: #4a6ba0;
}



main {
  width: 100%;
  height: 100vh;
  height: -webkit-fill-available; /* iOS fix */
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

main::-webkit-scrollbar {
  width: 12px;
}

main::-webkit-scrollbar-track {
  background: #f6f5f2;
  border-radius: 999px;
}

main::-webkit-scrollbar-thumb {
  background-color: #2c4875;
  border-radius: 999px;
  border: 3px solid #f6f5f2;
}

main::-webkit-scrollbar-thumb:hover {
  background-color: #2c4875;
}

main {
  scrollbar-width: thin;
  scrollbar-color: #2c4875 #f6f5f2;
}

::selection {
  background: #2c4875;
  color: #ffffff;
}

::-moz-selection {
  background: #2c4875;
  color: #ffffff;
}

.section-title-gradient {
  background: linear-gradient(90deg, #2c4875 0%, #b12e71 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  font-weight: 700;
  display: inline-block;
}













#asdasd0 {
  white-space: pre-line;
}

#asdasd00 {
  white-space: pre-line;
}













/* Filter badge styles */
/* Center the filter badges container */
#project-filters {
  display: flex;
  width:100%;
  flex-wrap: wrap;
  gap: 0.5em;
  justify-content: center;
  position: sticky;
  z-index: 998;
  background: #f6f5f2;
  padding-top: 0.5em;
  padding-bottom: 0.5em;
  margin-bottom: 2rem;
}

/* Make badges only as wide as their text and bold */
.filter-badge {
  z-index:998;
  display: inline-block;
  background: #e5e7eb;
  color: #374151;
  border: none;
  border-radius: 9999px;
  padding: 0.4em 1.1em;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  outline: none;
  text-align: center;
  min-width: 0;
  width: auto;
}

.filter-badge:hover {
  background: #2c4875;
  color: #fff;
}


.filter-badge.selected {
  background: #b12e71;
  color: #fff;
  font-weight: bold;
}

/* Desktop: add 20px gap to the left of the clear button */
.filter-badge.clear {
  margin-left: 10px;
  margin-top: 0px;
  background: #f3f4f6;
  color: #b12e71;
}







  @media (max-width: 767px) {
  #project-filters {
    /* top: 48.5px; */
    gap: 0.25em;
    padding-top: 0.2em;
    padding-bottom: 0.2em;
  }

  /* @media (max-width: 500px) {
    #project-filters {
      top: 80.5px;
    }
  } */

  .filter-badge {
    font-size: 0.90em;
    padding: 0.18em 0.7em;
  }

  /* .filter-badge:hover {
    background: #e5e7eb !important;
    color: #374151 !important;
  } */

  .filter-badge.clear {
    margin-left: 0px;
    margin-top: 0px;
  }
}

.project-tags-card {
  justify-content: flex-start !important;
  display: flex;
  flex-wrap: wrap;
  gap: 0.22em;
  /* margin-top: 10px; */
}

.project-tag.selected {
  background: linear-gradient(90deg, #2c4875 0%, #b12e71 100%);
  color: #fff;
  border-radius: 9999px;
  padding: 0.18em 0.7em;
  font-size: 0.78em;
  font-weight: 400;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 4px rgba(44, 72, 117, 0.08);
  user-select: none;
  border: none;
}

@media (max-width: 767px) {
  .project-tags-card {
    gap: 0.22em;
  }
  .project-tag.selected {
    font-size: 1em;
    padding: 0.13em 0.55em;
  }
}


#projects > h2,
#contact > h3 {
  text-align: center;
  margin-top:12px;
  margin-left: auto;
  margin-right: auto;
}


#submit-button {
  transition: background-color 0.18s ease, box-shadow 0.18s ease,
    transform 0.12s ease;
  background-color: #2c4875;
  min-height: 52px;
  font-size: 1.1rem;
}

#submit-button:hover {
  background-color: #4a6ba0 !important;
  box-shadow: 0 12px 30px rgba(44, 72, 117, 0.35);
  transform: translateY(-2px);
}

#submit-button:focus {
  box-shadow: 0 0 0 6px rgba(44, 72, 117, 0.25);
  outline: none;
}

#submit-button:active {
  background-color: #1a2b47 !important;
  transform: translateY(0);
}



.about-wrap {
  overflow: visible;
  padding: 6px 0;
}

.gallery-wrapper {
  min-height: 656px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 7rem auto;
  width: 100%;
  position: relative;
  gap: 20px;
}

.gallery-image {
  float: none;
  width: 500px; /* Fallback */
  height: 225px; /* Fallback */
  margin: 0;
  border-radius: 12px;
  overflow: visible;
  box-shadow: 0 2px 10px #142469c9;
  background: linear-gradient(210deg, #5b7ba60a, rgba(44, 72, 117, 0.02));
  position: relative;
  transition: width 0.6s ease-in-out, height 0.6s ease-in-out;
  float: none;
  margin: 0 auto;
  z-index: 5;
}

.gallery-title-container {
  position: absolute;
  bottom: 100%; /* place above the .gallery-image container */
  margin-bottom: 12px; /* spacing above the image */
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  text-align: center;
  white-space: normal;
  max-width: calc(100vw - 100px);
  width: max-content;
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  color: #2c4875;
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gallery-title-container.visible {
  opacity: 1;
  pointer-events: none;
}

.gallery-counter {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
  padding: 4px 0;
  width: 52px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 400;
  color: white;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.gallery-counter::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: rgba(255, 255, 255, 0.4);
  z-index: -1;
}

.gallery-counter.timer-running::before {
  animation: counterProgress 7s linear infinite;
}

@keyframes counterProgress {
  0% {
    width: 0%;
  }
  100% {
    width: 101%;
  }
}

.gallery-image:hover .gallery-counter {
  opacity: 1;
}

.gallery-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, background 0.3s ease;
  backdrop-filter: blur(4px);
}

.gallery-image:hover .gallery-close {
  opacity: 1;
  pointer-events: auto;
}

.gallery-close:hover {
  background: rgba(255, 255, 255, 0.5);
}

.gallery-close svg {
  width: 20px;
  height: 20px;
  display: block;
}

.about-content {
  color: #222;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.about-content p {
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.about-content p:last-child {
  margin-bottom: 0;
}

.about-heading {
  color: #2c4875;
  font-weight: 600;
  font-size: 2.4rem;
  margin: 0 0 8px 0;
  display: block;
  text-align: center;
}

.gallery-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #000;
  border-radius: 12px; /* add border radius here since parent overflow is now visible */
}

.gallery-slides {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.gallery-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.gallery-slide.active {
  opacity: 1;
}

.gallery-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
  cursor: pointer;
}

.gallery-slide:nth-child(4n + 1) img {
  animation: panZoom1 20s ease-in-out infinite alternate;
}
.gallery-slide:nth-child(4n + 2) img {
  animation: panZoom2 20s ease-in-out infinite alternate;
}
.gallery-slide:nth-child(4n + 3) img {
  animation: panZoom3 20s ease-in-out infinite alternate;
}
.gallery-slide:nth-child(4n + 4) img {
  animation: panZoom4 20s ease-in-out infinite alternate;
}

/* Disable animations for images marked with no-zoom */
.gallery-slide.no-zoom img {
  animation: none !important;
}

@keyframes panZoom1 {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.1) translate(-2%, -2%);
  }
}
@keyframes panZoom2 {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.1) translate(2%, 2%);
  }
}
@keyframes panZoom3 {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.1) translate(-2%, 2%);
  }
}
@keyframes panZoom4 {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.1) translate(2%, -2%);
  }
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(99, 99, 99, 0.3);
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  z-index: 10;
  opacity: 1;
  transition: opacity 0.3s ease, background 0.3s ease;
  backdrop-filter: blur(4px);
  flex-shrink: 0;
}

.gallery-wrapper:hover .gallery-arrow {
  opacity: 1;
}

.gallery-arrow:hover {
  background: #273e65;
}

.gallery-arrow-left {
  left: -80px;
}

.gallery-arrow-right {
  right: -80px;
}

.gallery-arrow svg {
  width: 20px;
  height: 20px;
  display: block;
  filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.3));
}

@media (max-width: 1100px) {
  .gallery-arrow-left {
    left: 8px;
  }

  .gallery-arrow-right {
    right: 8px;
  }
}

@media (max-width: 900px) {
  .gallery-image {
    float: none;
    width: 100%;
    margin: 0 0 14px 0;
  }
  .about-heading {
    font-size: 1.6rem;
    display: block;
    margin: 0 auto 8px auto;
  }
  .gallery-wrapper {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
  }
  .project-card.expanded .project-card-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .gallery-role-container {
    position: absolute;
    top: 100%;
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    max-width: calc(100vw - 24px);
    padding-left: 8px;
    padding-right: 8px;
  }
  .gallery-role-container.visible {
    opacity: 1;
  }
  .gallery-title-container {
    position: absolute;
    bottom: 100%;
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    justify-content: center;
    margin-bottom: 12px;
    max-width: calc(100vw - 24px);
    font-size: 0.85rem;
    padding-left: 8px;
    padding-right: 8px;
  }
  .gallery-title-container.visible {
    opacity: 1;
  }
  .container {
    width: 100%;
    max-width: 100vw;
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
  }
  .about-content,
  .project-card-details,
  .project-card-description {
    padding-left: 10px;
    padding-right: 10px;
  }
  .project-card {
    padding-left: 10px;
    padding-right: 10px;
  }
  .project-card-gallery {
    gap: 4px;
  }
  .expertise-badge,
  .gallery-role-badge {
    padding-left: 8px;
    padding-right: 8px;
    font-size: 0.85rem;
  }
  .logo-grid {
    gap: 16px;
    padding-left: 4px;
    padding-right: 4px;
  }
}

/* Cursor follower for contact link */
.cursor-follower {
  position: fixed;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 52, 157, 0.4) 0%,
    rgba(177, 46, 113, 0.2) 50%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
  transform: translate(-50%, -50%);
}

.cursor-follower.active {
  opacity: 1;
}

/* replaced per-slide absolute badges with a container placed outside the image */
.gallery-role-container {
  position: absolute;
  top: 100%; /* place below the .about-img container */
  margin-top: 12px; /* spacing below the image */
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap; /* allow badges to wrap to new line */
  gap: 8px;
  z-index: 15;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  align-items: center;
  justify-content: center;
  white-space: normal; /* allow wrapping */
  max-width: calc(
    100vw - 100px
  ); /* wrap only when exceeding viewport minus 100px */
  width: max-content; /* expand to fit content, not constrained by parent */
}

.gallery-role-container.visible {
  opacity: 1;
  pointer-events: none;
}

.gallery-role-badge {
  /* style to match expertise-badge */
  position: relative;
  display: inline-block;
  z-index: 16;
  padding: 6px 12px;
  border-radius: 99px;
  background: linear-gradient(345deg, #1a2b47 1%, #2c4875 99%);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 400;
  box-shadow: none;
  white-space: nowrap;
  pointer-events: none;
}

.gallery-role-badge::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, #2c4875, #1a2b47);
  filter: blur(10px);
  opacity: 0.58;
  transform: scale(1.05);
  transition: opacity 180ms ease;
}

.gallery-role-badge.pink {
  background: linear-gradient(345deg, #b12e71ff 1%, #af1448 99%);
}

.gallery-role-badge.pink::before {
  background: linear-gradient(120deg, #af1448, #b12e71);
}

/* ensure wrapper doesn't clip the role container */
.gallery-wrapper {
  overflow: visible;
}

/* responsive: move badges inside / below image on smaller screens */
@media (max-width: 900px) {
  .gallery-title-container {
    position: absolute;
    bottom: 100%;
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    justify-content: center;
    margin-bottom: 12px;
    max-width: calc(100vw - 100px);
    font-size: 0.85rem;
  }
  .gallery-title-container.visible {
    opacity: 1;
  }
  .gallery-role-container {
    position: absolute;
    top: 100%;
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    max-width: calc(100vw - 100px); /* same wrapping behavior on mobile */
  }
  .gallery-role-container.visible {
    opacity: 1;
  }
}

/* .expertise-badge {
  position: relative;
  display: inline-block;
  z-index: 1;
  padding: 6px 12px;
  border-radius: 99px;
  background: linear-gradient(345deg, #1a2b47 1%, #2c4875 99%);
  color: #fff;
  font-weight: 400;
  box-shadow: none;
  } */

.expertise-badge {
  position: relative;
  z-index: 1;
  padding: 6px 12px;
  flex-basis: auto;

  display: inline-block;
  background: linear-gradient(345deg, #1a2b47 1%, #2c4875 99%);
  color: #fff;
  /* background: #e5e7eb;
  color: #374151; */
  border-radius: 9999px;
  /* padding: 0.3em 1.1em; */
  font-size: 1em;
  font-weight: bold;
  cursor: default;
  transition: background 0.15s, color 0.15s;
}

.expertise-break {
  flex-basis: 100%;
  height: 0;
  padding: 0;
  margin: 0;
}

.expertise-badges-list.show-all .expertise-break {
  display: none;
}

.expertise-badge-more {
  display: block;
  width: max-content;
  margin-top: 10px;
  margin-left: 0px;
  clear: both;
  flex-basis: auto;
  background: linear-gradient(90deg, #b12e71 0%, #d63a8c 100%);
  color: #fff;
  cursor: pointer;
  font-weight: bold;
  outline: none;
}

.expertise-badge-hidden {
  display: none;
}

.expertise-badges-list.show-all .expertise-badge-hidden {
  display: inline-block;
}

.expertise-badges-list.show-all .expertise-badge-more {
  display: none;
}

.expertise-badge::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, #2c4875, #1a2b47);
  filter: blur(10px);
  opacity: 0.58;
  transform: scale(1.05);
  transition: opacity 180ms ease;
}

.expertise-badge:hover::before {
  opacity: 0.42;
}

.link-gradient {
  color: #b12e71;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
}
.link-gradient:hover {
  color: #2c4875;
}


.legal-content h1, .legal-content h2, .legal-content h3, .legal-content h4 {
  font-family: inherit;
  color: #1a202c;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-weight: bold;
}
.legal-content p, .legal-content ul, .legal-content ol {
  font-family: inherit;
  color: #222;
  font-size: 1.05em;
  margin-bottom: 1em;
  line-height: 1.7;
}
.legal-content ul, .legal-content ol {
  padding-left: 1.5em;
}
.legal-content a {
  color: #b12e71;
  text-decoration: underline;
}

@media (max-width: 767px) {
  .legal-content,
  #legal-content-loaded {
    font-size: 0.85em;
    padding-left: 8px;
    padding-right: 8px;
  }
}


    @media (max-width: 767px) {
      .gallery-wrapper {
        display: none !important;
      }
    }


@media (max-width: 900px) {
  .expertise-badge {
    padding-left: 10px;
    padding-right: 10px;
    font-size: 0.85rem;
    border-radius: 99px;
    background: linear-gradient(345deg, #1a2b47 1%, #2c4875 99%);
    color: #fff;
    font-weight: 500;
    box-shadow: none;
    position: relative;
    z-index: 1;
    border-radius: 99px;
    background: linear-gradient(345deg, #1a2b47 1%, #2c4875 99%);
    color: #fff;
    font-weight: 500;
    box-shadow: none;
    position: relative;
    z-index: 1;
    text-align: center;
    display: inline-block;
    white-space: normal;
  }
  .expertise-badge::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(120deg, #2c4875, #1a2b47);
    filter: blur(10px);
    opacity: 0.58;
    transform: scale(1.05);
    transition: opacity 180ms ease;
  }
  .expertise-badge:hover::before {
    opacity: 0.42;
  }

  .expertise-badge-more {
    display: block;
    width: max-content;
    background: linear-gradient(90deg, #b12e71 0%, #d63a8c 100%);
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    outline: none;
    margin-top: 10px;
    margin-left: 0px;
    clear: both;
  }

  .expertise-badge-hidden {
    display: none;
  }

  .expertise-badges-list.show-all .expertise-badge-hidden {
    display: inline-block;
  }

  .expertise-badges-list.show-all .expertise-badge-more {
    display: none;
  }

  /* Responsive navigation fix for very small screens */
  @media (max-width: 500px) {
    header .container {
      flex-direction: column;
      align-items: stretch;
      gap: 0.25rem;
    }
    nav.flex {
      flex-wrap: wrap;
      justify-content: flex-end;
      width: 100%;
      gap: 0.25rem;
    }
    .nav-link {
      font-size: 0.95rem;
      padding: 6px 8px;
      margin: 0 1px;
      min-width: 0;
      max-width: 100vw;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      letter-spacing: 0.08em;
      flex: 1 1 0;
      text-align: center;
    }
    header .container > h1 {
      font-size: 1.1rem !important;
      margin-bottom: 2px;
      margin-top: 2px;
      word-break: break-word;
      max-width: 90vw;
      text-align: left;
    }
  }

/* Inline YouTube embed */
.yt-inline-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  margin: 8px 0 16px;
  display: none;
  border-radius: 10px;
  overflow: hidden;
  background: #0f0f0f;
}
.yt-inline-container.active { display: block; }
.yt-inline-container iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}



.youtube-consent-container { position: relative; width: 100%; padding-bottom: 56.25%; background: #0f0f0f; border-radius: 10px; overflow: hidden; }
.youtube-consent-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: linear-gradient(135deg, #111 0%, #1d1d1d 100%); color: #fff; padding: 1.5rem; cursor: pointer; z-index: 1; }
.youtube-consent-overlay.hidden { display: none; }
.youtube-faux-player { position: relative; width: 88%; max-width: 760px; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; }
.youtube-faux-play svg { width: 72px; height: 72px; filter: drop-shadow(0 6px 12px rgba(0,0,0,0.35)); }
.youtube-faux-timeline { position: absolute; bottom: 10px; left: 8%; right: 8%; height: 6px; background: rgba(255,255,255,0.18); border-radius: 999px; overflow: hidden; }
.youtube-faux-dot { display: block; width: 22%; height: 100%; background: #e53974; border-radius: 999px; }
.youtube-consent-text { font-size: 0.9rem; color: #c9c9c9; text-align: center; max-width: 520px; }
.youtube-consent-privacy { font-size: 0.75rem; color: #8aa0c0; }
.youtube-consent-privacy a { color: #e53974; text-decoration: underline; }
.youtube-embed-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }


}
