body {
  background: #181818;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  padding-top: 64px; /* reserve space for fixed header */
}

.video-container iframe {
  width: 100%;
  max-width: 800px;
  aspect-ratio: 16 / 9;
  height: auto;
  margin: 0 auto;
  display: block;
  border-radius: 8px;
  box-sizing: border-box;
}
.video-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2rem 0;
  padding: 0 1rem;
}
@media (max-width: 700px) {
  .video-container iframe {
    height: 56vw;
    max-height: 400px;
  }
}

video {
  width: 90%;
  max-width: 800px;
  border: 0px solid #fff;
  border-radius: 1px;
}

.caption {
  margin-top: 1rem;
}

.caption h1 {
  font-size: 2rem;
  margin: 0;
}

.caption p {
  margin: 0.5rem 0;
  font-size: 1rem;
  color: #aaa;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  padding: 1.5rem;
  margin: auto;
  max-width: 1080px;
}

@media (min-width: 600px) {
  .grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
}

.grid a {
  text-decoration: none;
  color: white;
  text-align: left;
  display: block;
}


.grid a span {
    display: block;
    text-align: center;
    font-family: 'Orbitron', 'Poppins', sans-serif;
    font-weight: 600;
    font-size: clamp(1.1rem, 2.8vw, 1.8rem); /* responsive, larger on big screens */
    margin-top: 0.6rem;
    color: #fff;
    line-height: 1.1;
}

.grid a:hover span {
  color: #ffcc00;
  transition: color 0.3s;
}

.grid img {
  width: 100%;
  aspect-ratio: 16/7;
  object-fit: cover;         /* Ensures cropping, not stretching */
  object-position: center;   /* Crops from the center */
  border-radius: 1px;
  border: 0px solid #444;
  margin-bottom: 0.5rem;
  transition: transform 0.3s ease;
}

.grid img:hover {
  transform: scale(1.05);
}

.grid-label {
  display: block;
  width: 100%;
  max-width: 1080px;
  margin: 1.5rem auto;
  text-align: center;
  font-family: 'Orbitron', 'Poppins', sans-serif;
  font-weight: 600;
  font-size: clamp(1.2rem, 3vw, 2rem);
  color: #fff;
  line-height: 1.1;
  box-sizing: border-box;
  padding: 0 1rem;
}

#waveBanner,
canvas[data-text] {
  width: 100%;
  display: block;
  background: #19161600;/* Negative margin to pull the video up, allowing overlap if needed */
}

.site-header {
  width: 100%;
  padding: 12px 0;
  position: fixed;     /* make header stick to top */
  top: 0;
  left: 0;
  right: 0;
  height: 64px;        /* consistent header height */
  z-index: 9999;       /* stay above other content */
  background: #181818;
  backdrop-filter: blur(6px);
  box-sizing: border-box;
}

.logo img {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 2rem;
  margin: 0 auto;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #ffcc00; /* hover color */
}

.nav-center {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
}

/* base nav link styling (kept consistent) */
.nav-link {
  color: #fff;
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 1.0rem; /* normal size for non-contact links */
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.2s, opacity 0.2s;
}

/* only the contact link — yellow and slightly larger */
.nav-link.header-contact-btn {
  color: #ffcc00;          /* yellow text */
  font-size: 1.18rem;      /* slightly larger */
  font-weight: 700;        /* bolder to stand out */
  padding: 0.15rem 0.25rem;/* small padding to keep spacing consistent */
}

/* subtle hover state for contact link */
.nav-link.header-contact-btn:hover {
  opacity: 0.95;
}

.nav-link {
  color: #fff;
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.3s;
}

.nav-link:hover {
  color: #ffcc00;
}

.logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-logo {
  height: 32px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
  transition: filter 0.2s;
}

.header-logo:hover {
  filter: invert(77%) sepia(93%) saturate(1000%) hue-rotate(1deg) brightness(1.1);
}

.custom-video-wrapper {
  position: relative;
  display: inline-block;
  width: 90%;
  max-width: 800px;
}

.custom-video-wrapper video {
  width: 100%;
  border: 2px solid #fff;
  border-radius: 1px;
  display: block;
  transition: border-color 0.3s;
}

.custom-video-wrapper:hover video,
.custom-video-wrapper:focus-within video,
#mainVideo:hover,
#mainVideo:focus {
  border-color: #ffcc00;
}

.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90px;
  height: 90px;
  background: rgba(0,0,0,0.6);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.play-btn::before {
  content: '';
  display: block;
  margin-left: 8px;
  border-style: solid;
  border-width: 22px 0 22px 40px;
  border-color: transparent transparent transparent white;
}
.play-btn:focus {
  outline: 2px solid #ffcc00;
}

.site-footer {
  margin-top: 3rem;
  padding: 2rem 0;
  text-align: center;
  color: #aaa;
  font-size: 0.9rem;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.footer-logo {
  height: 32px;
  width: auto;
  display: block;
}

.footer-email {
  color: #fff;
  font-size: .8rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0.2rem 0;
  text-align: center;
  word-break: break-all;
  margin-bottom: 0.5rem;
}

.footer-email:hover {
  filter: none;
  color: #ffcc00;
  transition: color 0.3s;
}

.footer-icons {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.footer-icon {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
  transition: filter 0.2s;
}

.footer-icon:hover { filter: invert(77%) sepia(93%) saturate(1000%) hue-rotate(1deg) brightness(1); }

.about-name {
  display: block;
  font-size: 4rem;
  font-weight: 700;
  color: #ffcc00;
  margin-bottom: 1rem;
  text-align: left;
  line-height: 1.1;
}

.about-flex {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 3rem;
  max-width: 1100px;
  margin: 4rem auto;
  margin-bottom: 0.1rem;
  padding: 0 1rem;
  flex-wrap: wrap; /* Allow wrapping on small screens */
}

.about-textblock, .about-imageblock {
  flex: 1 1 120px; /* Allow shrinking and growing */
  min-width: 0;
}

@media (max-width: 800px) {
  .about-flex {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }
  .about-textblock, .about-imageblock {
    width: 100%;
    max-width: 500px;
  }
  .about-imageblock {
    display: flex;
    justify-content: center;
  }
}

.about-textblock h2 {
  font-family: 'Bungee', cursive;
  font-size: 2rem;
  color: #fff;
  margin-bottom: 3.6rem;
  line-height: 1.2;
  letter-spacing: 0.03em;
}

.about-textblock h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.about-textblock h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 1.2rem;
  line-height: 1.5;
  font-weight: 400;
}

.about-imageblock {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-bottom: 0rem; /* Add padding underneath the about photos */
}

.about-image-stack {
  position: relative;
  width: 440px;
  min-width: 220px;
  height: 540px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-main-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  position: center;
  left: 0;
  top: 0;
  z-index: 1;
}

.about-overlap-image {
  width: 75%;        /* Increased from 60% */
  position: absolute;
  left: 95%;
  top: 55%;
  transform: translate(-50%, -50%);
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
  z-index: 2;
}




.grid-img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 1px;
  border: none;
  transition: transform 0.2s;
  box-shadow: none;
  max-width: none;
  max-height: none;
  background: #222;
}

.grid-img.large {
  transform: scale(1.08);
  z-index: 1;
}

.grid-img.small {
  transform: scale(0.92);
  z-index: 0;
}

/* Responsive: stack to 1 column on small screens */
@media (max-width: 900px) {
  .explainervideo-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    width: 100vw;
    height: auto;
    justify-items: center;
  }
  .grid-img {
    width: 90vw;
    max-width: 600px;
    height: auto;
    aspect-ratio: 16 / 9;
    margin: 1rem 0;
    display: block;
  }
}


.djlogoloops-main {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 3rem 0;
}

.djlogoloops-stack {
  position: relative;
  width: 80vw;
  max-width: 1200px;
  aspect-ratio: 16 / 10;   /* Increased from 16/9 for more vertical space */
  background-size: cover;
  background-position: center;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  padding: 2rem 0 2.5rem 0; /* Increased bottom padding */
  isolation: isolate;
}



.djlogoloops-logo {
  height: clamp(60px, 12vw, 140px); /* Responsive: min 60px, scales with viewport, max 140px */
  width: auto;
  max-width: 70%;
  margin: 0 auto 1.5rem auto;
  display: block;
  z-index: 2;
  border-radius: 16px;
  background: rgba(0,0,0,0.05);
  padding-top: 24px;
  padding-bottom: 24px;
  box-sizing: content-box;
}

.djlogoloops-video {
  width: 70%;                 /* Video fits well inside background */
  max-width: 90vw;
  height: auto;
  border-radius: 1px;
  border: none;                /* Remove border */
  display: block;
  margin: 0 auto;
  z-index: 1;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  background: #111;
  object-fit: contain;         /* Prevent cropping */
}

.five-item-collage {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1.5vw;
  max-width: 1200px;
  margin: 3rem auto;
  width: 95vw;
  aspect-ratio: 16 / 9;
}
.collage-landscape {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  background: #222;
}
.collage-portrait {
  grid-row: 1 / span 2;
  grid-column: 2 / 3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  background: #222;
}

@media (max-width: 300px) {
  .five-item-collage {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    aspect-ratio: auto;
  }
  .collage-landscape,
  .collage-portrait {
    grid-column: 1 !important;
    grid-row: auto !important;
    width: 100%;
    height: auto;
  }
  .collage-portrait {
    height: auto;
  }
}

/* Add to your style.css */
.about-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.2rem;
  margin: 1.5rem 0 0 0;
  width: 100%;
}
.about-tiny-icon {
  width: min(60px, 8vw);
  height: min(60px, 8vw);
  object-fit: contain;
  vertical-align: middle;
  transition: width 0.2s, height 0.2s;
}

.nine-item-main {
  width: 100%;
  max-width: none;        /* allow full-bleed layout */
  margin: 0 auto 4rem auto;
  padding: 1.5rem;        /* page padding so items don't touch edges */
  box-sizing: border-box;
  text-align: center;
}

.nine-item-grid {
  display: grid;
  /* each column grows to fill available space, but keeps a reasonable minimum so images stay large */
  grid-template-columns: repeat(3, minmax(20rem, 1fr));
  gap: 1.5rem;
  justify-items: stretch;
  align-items: start;
  padding: 0 0;           /* outer padding handled by .nine-item-main */
  box-sizing: border-box;
  width: 100%;
  margin: 0 auto;

  /* hide any vertical scrollbar while keeping layout */
  overflow-y: hidden;
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none;    /* Firefox */
}
.nine-item-grid::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

/* images/videos always fill their grid cell and cannot exceed it (prevents overflow) */
.nine-item-grid img,
.nine-item-grid video {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 1px;
  border: none;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  background: #222;
}

/* Larger image minimums on wide screens so grid looks big and fills the page */
@media (min-width: 68.75rem) { /* ~1100px */
  .nine-item-grid {
    grid-template-columns: repeat(3, minmax(24rem, 1fr));
    gap: 2rem;
  }
  .nine-item-main {
    padding: 2.5rem;
  }
}

/* tablet -> 2 columns (move breakpoint up to ~1100px to avoid cutoffs) */
@media (max-width: 68.75rem) { /* ~1100px */
  .nine-item-grid {
    grid-template-columns: repeat(2, minmax(16rem, 1fr));
    gap: 1.25rem;
  }
}

/* mobile -> 1 column, still constrained to viewport */
@media (max-width: 37.5rem) { /* ~600px */
  .nine-item-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .nine-item-main {
    padding: 1rem;
  }
}

/* ensure no accidental full-viewport widths cause horizontal scroll */
html, body, .nine-item-main, .nine-item-grid {
  box-sizing: border-box;
  overflow-x: hidden;
}

.fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(18, 18, 18, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20000;
  cursor: zoom-out;
  transition: opacity 0.2s;
}
.fullscreen-overlay img {
  max-width: 96vw;
  max-height: 96vh;
  border-radius: 10px;
  box-shadow: 0 8px 48px rgba(0,0,0,0.45);
  z-index: 1;
}
.fullscreen-overlay.hidden {
  display: none;
}
.fullscreen-close {
  position: absolute;
  top: 2.5rem;
  right: 2.5rem;
  font-size: 2.5rem;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 2;
  padding: 0;
  line-height: 1;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.fullscreen-close:hover {
  opacity: 1;
}
.fullscreen-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 2;
  opacity: 0.85;
  transition: opacity 0.2s;
  padding: 0 0.5rem;
  user-select: none;
}
.fullscreen-arrow.left {
  left: 2.5rem;
}
.fullscreen-arrow.right {
  right: 2.5rem;
}
.fullscreen-arrow:hover {
  opacity: 1;
}
.video-row {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin: 2.5rem auto 2rem auto;
  width: 100%;
  max-width: 1500px;
  box-sizing: border-box;
  padding: 0 1rem;
  overflow-x: hidden;
}

.video-row > * {
  flex: 1 1 0;
  max-width: 620px;
  width: 100%;
  height: auto;
  padding: 0 2rem;
  box-sizing: border-box;
  aspect-ratio: 16 / 9;
}

/* Single item video row styling */
.video-row[data-items="1"] {
  max-width: 1500px;
  justify-content: center;
}

.video-row[data-items="1"] > * {
  flex: 0 0 auto;
  max-width: calc(620px * 2 + 2rem);
  width: 100%;
  padding: 0 2rem;
  aspect-ratio: 1272 / 349;
}

.video-row[data-items="1"] img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 1px;
  display: block;
}

@media (max-width: 620px) {
  .video-row {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 0 1rem;
    max-width: 198vw;
  }
  .video-row > * {
    max-width: 198vw;
    width: 200%;
  }
}

.ai-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem 1rem;
}

.ai-banner {
  margin-top: 0 rem;
  margin-bottom: 2.5rem;
  text-align: left;
  width: 100vw;
  max-width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  transform: translateX(-50%);
  background: url('/images/bioluminescent-ai.webp') center center/cover no-repeat;
  padding: 3rem 0;
  box-sizing: border-box;
}

.ai-title {
  font-family: "Roboto Slab", serif;
  font-weight: 900;
  font-size: 3rem;
  color: #ffc;
  margin-bottom: 1.2rem;
  line-height: 1.1;
  letter-spacing: 0.03em;
  text-shadow: none;
  font-weight: 700;
  background: none;
  border-left: none;
  padding-left: 0;
  width: 100%;
  text-align: center;
}

.ai-banner-desc {
  background: rgba(30, 20, 10, 0.65);
  border-radius: 12px;
  padding: 1.2rem 2rem;
  max-width: 900px;
  font-size: 1.15rem;
  margin: 1.5rem auto 0 auto;
  color: #ffc;
  text-align: center;
}

.ai-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem 2rem;
  margin-top: 2.5rem;
}

.ai-card {
  background: none;
  text-align: center;
  padding: 0;
}

.ai-card h2 {
  font-size: 1.2rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: #fff;
}

.ai-card p {
  font-size: 0.98rem;
  color: #fff;
  margin-bottom: 0.7rem;
}

.ai-btn {
  display: inline-block;
  margin-bottom: 1.1rem;
  margin-top: 0.2rem;
  padding: 0.5rem 1.5rem;
  border: 2px solid #fff;
  border-radius: 2rem;
  background: none;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.ai-btn:hover {
  color: #181818;
  background: #ffcc00;
  border-color: #ffcc00;
}

.ai-card img {
  width: 100%;
  max-width: 260px;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 2px;
  margin: 0 auto;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  background: #222;
  margin-bottom: 0.5rem;
}

@media (max-width: 1000px) {
  .ai-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .ai-grid {
    grid-template-columns: 1fr;
  }
  .ai-main {
    padding: 1rem 0.2rem 2rem 0.2rem;
  }
  .ai-banner-desc {
    max-width: 100%;
  }
  .ai-title {
    font-size: 2rem;
  }
}

    .video-row.single-column {
      display: flex;
      flex-direction: row;
      align-items: stretch;
      justify-content: center;
      width: 100vw;
      max-width: 100vw;
      margin-left: 50%;
      transform: translateX(-50%);
      box-sizing: border-box;
      gap: 2vw;
      padding: 0 2vw;
    }

    .lofi-video-full {
      flex: 1 1 0;
      width: 48vw;
      max-width: 600px;
      min-width: 0;
      height: auto;
      margin-bottom: 0;
      display: block;
      object-fit: contain;
    }

    @media (max-width: 900px) {
      .video-row.single-column {
        flex-direction: column;
        gap: 2rem;
        padding: 0 1vw;
      }
      .lofi-video-full {
        width: 100vw;
        max-width: 100vw;
      }
    }

.project-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 6rem 0 3rem 0;
  position: relative;
}
.project-divider hr {
  width: 100%;
  border: none;
  border-top: 2px solid #444;
  margin: 0 0 0 0;
}
.project-title {
  font-family: 'Orbitron', Arial, sans-serif;
  font-size: 1.5rem;
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  background: #181818;
  padding: 0.2em 0.8em;
  border-radius: 4px;
  outline: none;
  margin-top: -1.2em;
  z-index: 1;
  position: relative;
}
.project-description {
  font-size: 1.1rem;
  color: #fff;
  font-family: inherit;
  font-weight: 400;
  text-align: center;
  margin: 1em 0 0.5em 0;
  background: #181818;
  border-radius: 4px;
  padding: 0.2em 0.8em;
  outline: none;
  max-width: 600px;
}

.project-description a {
  color: #ffcc00;
  text-decoration: none;
}

.project-description a:hover {
  text-decoration: underline;
}