/* ============================================================
   TMB STUDIO v2 — Black & White / Monochrome
   Seamless section transitions via gradient bleed
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Cinzel+Decorative:wght@400;700&family=EB+Garamond:ital,wght@0,400;0,500;1,400&display=swap");

/* ---------- TOKENS ---------- */
:root {
  --black: #0a0a0a;
  --grey-deep: #111111;
  --grey-dark: #1a1a1a;
  --grey-mid: #2a2a2a;
  --grey-panel: #333333;
  --grey-border: #3a3a3a;
  --grey-muted: #666666;
  --grey-light: #999999;
  --white-dim: #cccccc;
  --white: #f0f0f0;
  --pure-white: #ffffff;

  --border-dim: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(255, 255, 255, 0.25);

  --font-display: "Cinzel Decorative", serif;
  --font-heading: "Cinzel", serif;
  --font-body: "EB Garamond", serif;
}

/* ---------- RESET ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  /* Scroll snap — stops at each section like Infinity Nikki */
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  height: 100%;
}

body {
  background: var(--black);
  color: var(--white-dim);
  font-family: var(--font-body);
  font-size: 20px; /* bumped from 18px for readability */
  line-height: 1.75;
  overflow-x: hidden;
  height: 100%;
}

img {
  max-width: 100%;
  display: block;
}
a {
  color: var(--white);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--pure-white);
}

/* ============================================================
   DECORATIVE ELEMENTS
   ============================================================ */
.ornament {
  display: block;
  text-align: center;
  color: var(--grey-light);
  font-size: 1.2rem;
  letter-spacing: 0.5rem;
  opacity: 0.5;
  margin: 0.5rem 0;
}

.section-label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.25rem;
  text-transform: uppercase;
  color: var(--grey-light);
  opacity: 0.8;
}

.divider {
  border: none;
  border-top: 1px solid var(--border-dim);
  margin: 2rem auto;
  position: relative;
}
.divider::after {
  content: "✦";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 0 0.75rem;
  color: var(--grey-light);
  font-size: 0.75rem;
}

/* ============================================================
   SECTION BACKGROUNDS
   Using solid dark tones that step gradually — more reliable
   than gradients for cross-browser/GitHub Pages rendering.
   A subtle 80px gradient bridge is added via ::before on each
   section so transitions still look blended, not hard-cut.
   ============================================================ */

#home {
  background: #0a0a0a;
}
#about {
  background: #111111;
}
#projects {
  background: #161616;
}
#team {
  background: #111111;
}
#marquee-section {
  background: #0d0d0d;
}
#contact {
  background: #0a0a0a;
}

/* Top-fade bridge — each section fades in from the colour above it */
#about::before,
#projects::before,
#team::before,
#marquee-section::before,
#contact::before {
  content: "";
  display: block;
  height: 80px;
  margin-top: -80px;
  background: inherit;
  /* mask: transparent top → section colour bottom */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 100%);
  pointer-events: none;
}

/* ============================================================
   LANDING PAGE
   ============================================================ */
#landing {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #000000; /* pure black, no gradient */
  text-align: center;
  transition:
    opacity 0.8s ease,
    visibility 0.8s ease;
}

#landing.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* removed ::before radial gradient — pure black background only */

.landing-inner {
  position: relative;
  z-index: 1;
}

.landing-eyebrow {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.4rem;
  color: var(--grey-light);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  opacity: 0.65;
}

.landing-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  color: var(--pure-white);
  line-height: 1.1;
  text-shadow:
    0 0 60px rgba(255, 255, 255, 0.15),
    0 2px 4px rgba(0, 0, 0, 0.9);
  margin-bottom: 0.5rem;
}

.landing-subtitle {
  font-family: var(--font-heading);
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  color: var(--grey-light);
  letter-spacing: 0.2rem;
  margin-bottom: 3rem;
}

.btn-enter {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 0.3rem;
  text-transform: uppercase;
  color: var(--black);
  background: var(--white);
  border: 2px solid var(--white);
  padding: 0.9rem 3rem;
  cursor: pointer;
  transition:
    background 0.25s,
    color 0.25s,
    box-shadow 0.25s;
  clip-path: polygon(12px 0%, 100% 0%, calc(100% - 12px) 100%, 0% 100%);
}
.btn-enter:hover {
  background: transparent;
  color: var(--white);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.15);
}

/* 1. Size and constrain the video */
.landing-video {
  width: 100%; /* Allows it to be responsive */
  max-width: 600px; /* Forces the video to stop growing past 600px (Adjust this to your liking!) */
  height: auto; /* Keeps the original 16:9 aspect ratio perfectly */
  display: block; /* Removes any weird baseline spacing beneath the video */
  margin-bottom: 2rem; /* Creates a nice gap between the video and the "Enter" button */
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); /* Optional: Adds depth so it pops against the dark background */
}

/* 2. Clean up the container layout */
.landing-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column; /* Stacks the video on top of the button */
  align-items: center; /* Centers both items horizontally */
  width: 90%; /* Prevents it from touching screen edges on mobile */
  max-width: 600px; /* Matches the video width */
}

/* mist lines — now white/grey */
.mist-line {
  position: absolute;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  animation: mistDrift 7s linear infinite;
}
.mist-line:nth-child(1) {
  top: 20%;
  animation-duration: 8s;
}
.mist-line:nth-child(2) {
  top: 50%;
  animation-duration: 10s;
  animation-delay: -3s;
}
.mist-line:nth-child(3) {
  top: 80%;
  animation-duration: 7s;
  animation-delay: -1.5s;
}

@keyframes mistDrift {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* ============================================================
   NAVIGATION
   ============================================================ */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 3rem;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.98) 0%,
    rgba(10, 10, 10, 0) 100%
  );
  transition: background 0.3s;
}
#navbar.scrolled {
  background: rgba(10, 10, 10, 0.97);
  border-bottom: 1px solid var(--border-dim);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--pure-white);
  letter-spacing: 0.1rem;
}
.nav-logo span {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.3rem;
  color: var(--grey-muted);
  font-family: var(--font-heading);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.15rem;
  text-transform: uppercase;
  color: var(--grey-muted);
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--white);
  transition: width 0.25s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}
.nav-toggle span {
  width: 24px;
  height: 1px;
  background: var(--white);
  display: block;
  transition: 0.3s;
}

/* ============================================================
   SHARED SECTION STYLES
   ============================================================ */
section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  /* Scroll snap — each section is a snap point */
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Sections that need full-width bg need special treatment */
#projects,
#contact,
#marquee-section {
  max-width: none;
  padding: 6rem 2rem;
}
#projects .inner,
#contact .inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* Marquee section also snaps */
#marquee-section {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-height: auto; /* marquee is short — don't force 100vh */
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 600;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--pure-white);
  margin: 0.5rem 0;
}

/* ============================================================
   HOME / HERO — VIDEO AUTOPLAY
   ============================================================ */
#home {
  min-height: 100vh;
  padding: 0;
  max-width: none;
  display: flex;
  flex-direction: column;
  position: relative;
}

.hero-video-wrap {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 8rem auto 0;
  aspect-ratio: 16/9;
  border: 1px solid var(--border-dim);
  background: #000;
  overflow: hidden;
}

/* Corner brackets */
.hero-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--grey-border);
  border-style: solid;
  z-index: 2;
}
.hero-corner.tl {
  top: 0;
  left: 0;
  border-width: 1px 0 0 1px;
}
.hero-corner.tr {
  top: 0;
  right: 0;
  border-width: 1px 1px 0 0;
}
.hero-corner.bl {
  bottom: 0;
  left: 0;
  border-width: 0 0 1px 1px;
}
.hero-corner.br {
  bottom: 0;
  right: 0;
  border-width: 0 1px 1px 0;
}

/* The actual video element */
.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Placeholder shown before real video is added */
.hero-video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--grey-deep);
  gap: 1rem;
}
.hero-video-placeholder p {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.2rem;
  color: var(--grey-muted);
}

/* Mute/unmute toggle */
.video-mute-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 3;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-dim);
  color: var(--white-dim);
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.1rem;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.video-mute-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-glow);
}

/* Tagline below video */
.hero-tagline {
  text-align: center;
  padding: 3rem 2rem 6rem;
  max-width: 700px;
  margin: 0 auto;
}
.hero-tagline p {
  font-size: 1.1rem;
  color: var(--grey-muted);
  margin-top: 1rem;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.carousel-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-dim);
  /* No fixed aspect-ratio — height is set dynamically by JS per slide,
     based on each image's natural ratio. Default height below is just
     a fallback before JS runs / while images load. */
  height: 400px;
  transition: height 0.45s ease;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  background: var(--grey-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.2rem;
  color: var(--grey-muted);
   position: relative; /* needed so the overlay can be positioned inside it */
}

.carousel-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #000000;
  opacity: 0.25; /* this is your "50% transparency" — lower = lighter, higher = darker */
  pointer-events: none; /* lets clicks pass through to the image underneath */
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--border-dim);
  color: var(--white);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  font-size: 1rem;
  transition: background 0.2s;
}
.carousel-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}
.carousel-btn.prev {
  left: 8px;
}
.carousel-btn.next {
  right: 8px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}
.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--grey-border);
  cursor: pointer;
  transition: background 0.2s;
}
.carousel-dot.active {
  background: var(--white);
  border-color: var(--white);
}

.about-text .section-label {
  margin-bottom: 0.5rem;
}
.about-text h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--pure-white);
  margin-bottom: 1rem;
}
.about-text p {
  color: var(--grey-muted);
  margin-bottom: 1rem;
  font-size: 1rem;
}

/* ============================================================
   PROJECTS
   ============================================================ */
.project-carousel-wrap {
  position: relative;
  overflow: hidden;
}

.project-track {
  display: flex;
  gap: 2rem;
  transition: transform 0.5s ease;
}

.project-card {
  min-width: calc(50% - 1rem);
  background: var(--grey-deep);
  border: 1px solid var(--border-dim);
  overflow: hidden;
  transition:
    border-color 0.25s,
    transform 0.25s;
}
.project-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-3px);
}

.project-card-img {
  aspect-ratio: 16/9;
  background: var(--grey-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.2rem;
  color: var(--grey-muted);
  overflow: hidden;
}
.project-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card-body {
  padding: 1.5rem;
}
.project-card-body h3 {
  font-size: 1.1rem;
  color: var(--pure-white);
  margin-bottom: 0.5rem;
}
.project-card-body p {
  font-size: 0.9rem;
  color: var(--grey-muted);
}

.project-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.15rem;
  text-transform: uppercase;
  color: var(--white-dim);
  border: 1px solid var(--border-dim);
  padding: 0.2rem 0.6rem;
  margin-bottom: 0.75rem;
}

.project-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.project-nav-btn {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.2rem;
  text-transform: uppercase;
  color: var(--white-dim);
  border: 1px solid var(--border-dim);
  background: transparent;
  padding: 0.6rem 1.5rem;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.project-nav-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-glow);
}

.project-dots {
  display: flex;
  gap: 0.5rem;
}
.project-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--grey-border);
  cursor: pointer;
}
.project-dot.active {
  background: var(--white);
  border-color: var(--white);
}

/* ============================================================
   FEATURED PROJECT (index.html)
   ============================================================ */
.featured-project {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  border: 1px solid var(--border-dim);
  padding: 3rem;
  background: var(--grey-deep);
  position: relative;
}

/* subtle top highlight line */
.featured-project::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
}

.featured-project-img {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  border: 1px solid var(--border-dim);
}

.featured-project-placeholder {
  width: 100%;
  height: 100%;
  background: var(--grey-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.2rem;
  color: var(--grey-muted);
}

.featured-project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-project-status {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.15rem;
  text-transform: uppercase;
  color: var(--white-dim);
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid var(--border-dim);
  padding: 0.25rem 0.65rem;
}
.featured-project-status::before {
  color: #8aff8a; /* small green pulse dot */
}

.featured-project-body h3 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--pure-white);
  margin: 0.5rem 0 0;
}

.featured-project-body p {
  color: var(--grey-muted);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.featured-meta {
  list-style: none;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.featured-meta li {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.1rem;
  color: var(--grey-muted);
  display: flex;
  gap: 1rem;
}
.featured-meta li span {
  color: var(--white-dim);
  min-width: 80px;
}

.btn-project {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.25rem;
  text-transform: uppercase;
  color: var(--black);
  background: var(--white);
  border: 1px solid var(--white);
  padding: 0.75rem 2rem;
  clip-path: polygon(10px 0%, 100% 0%, calc(100% - 10px) 100%, 0% 100%);
  transition:
    background 0.25s,
    color 0.25s,
    box-shadow 0.25s;
}
.btn-project:hover {
  background: transparent;
  color: var(--white);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
  .featured-project {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.5rem;
  }
}

.featuredproject-video {
  width: 100%; /* Allows it to be responsive */
  max-width: 600px; /* Forces the video to stop growing past 600px (Adjust this to your liking!) */
  height: auto; /* Keeps the original 16:9 aspect ratio perfectly */
  display: block; /* Removes any weird baseline spacing beneath the video */
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); /* Optional: Adds depth so it pops against the dark background */
}

/* ============================================================
   TEAM
   ============================================================ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.team-card {
  background: var(--grey-deep);
  border: 1px solid var(--border-dim);
  padding: 2rem 1.5rem;
  text-align: center;
  transition:
    border-color 0.25s,
    transform 0.25s;
  position: relative;
}
.team-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--white), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.team-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-4px);
}
.team-card:hover::before {
  opacity: 0.3;
}

.team-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 1px solid var(--border-dim);
  margin: 0 auto 1rem;
  background: var(--grey-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--grey-muted);
  overflow: hidden;
}
.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card h3 {
  font-size: 1rem;
  color: var(--pure-white);
  margin-bottom: 0.25rem;
}
.team-role {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.15rem;
  color: var(--grey-light);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.team-socials {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}
.team-social-link {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--grey-muted);
  font-size: 0.85rem;
  transition:
    color 0.2s,
    border-color 0.2s;
}
.team-social-link:hover {
  color: var(--white);
  border-color: var(--border-glow);
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.contact-link-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--border-dim);
  padding: 0.75rem 1.5rem;
  transition:
    border-color 0.2s,
    background 0.2s;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.1rem;
  color: var(--grey-muted);
}
.contact-link-item:hover {
  border-color: var(--border-glow);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
}
.contact-link-item .icon {
  font-size: 1.1rem;
  color: var(--white-dim);
}
.contact-icon {
  filter: invert(100%);
  width: 20px;
  height: 20px;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--black);
  border-top: 1px solid var(--border-dim);
  padding: 2rem;
  text-align: center;
  scroll-snap-align: start;
}
footer p {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.2rem;
  color: var(--grey-muted);
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  #navbar {
    padding: 1rem 1.5rem;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: var(--black);
    align-items: center;
    justify-content: center;
    gap: 2rem;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-toggle {
    display: flex;
    z-index: 600;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }
  .project-card {
    min-width: 100%;
  }
  section {
    padding: 4rem 1.25rem;
  }
  .landing-title {
    font-size: 2.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  .mist-line,
  .reveal {
    animation: none !important;
    transition: none !important;
  }
}

/* ============================================================
   PROJECT PAGE (project.html) — shared page shell
   ============================================================ */
.page-hero {
  min-height: 55vh;
  display: flex;
  align-items: flex-end;
  padding: 6rem 2rem 3rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    to bottom,
    var(--black) 0%,
    var(--grey-dark) 100%
  );
}

.page-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
}

.page-hero-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.page-hero-content .project-tag {
  margin-bottom: 1rem;
}

.page-hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 4rem);
  color: var(--pure-white);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.page-hero-content p {
  color: var(--grey-light);
  max-width: 600px;
  font-size: 1.1rem;
}

/* Project page body content */
.project-page-body {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem 8rem;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 3rem 0;
}

.gallery-item {
  aspect-ratio: 16/9;
  background: var(--grey-mid);
  border: 1px solid var(--border-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.15rem;
  color: var(--grey-muted);
  overflow: hidden;
  transition: border-color 0.25s;
}
.gallery-item:hover {
  border-color: var(--border-glow);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  margin-top: 3rem;
}

.project-description h2 {
  font-size: 1.5rem;
  color: var(--pure-white);
  margin-bottom: 1rem;
}
.project-description p {
  color: var(--grey-muted);
  margin-bottom: 1rem;
}

.project-info-panel {
  background: var(--grey-deep);
  border: 1px solid var(--border-dim);
  padding: 2rem;
  height: fit-content;
}
.project-info-panel h4 {
  font-size: 0.8rem;
  letter-spacing: 0.2rem;
  color: var(--white-dim);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-dim);
}
.info-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 1.25rem;
}
.info-row span:first-child {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.15rem;
  text-transform: uppercase;
  color: var(--grey-muted);
}
.info-row span:last-child {
  color: var(--white-dim);
  font-size: 0.95rem;
}

.project-cta {
  margin-top: 3rem;
  padding: 3rem;
  background: var(--grey-deep);
  border: 1px solid var(--border-dim);
  text-align: center;
}
.project-cta h3 {
  color: var(--pure-white);
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}
.project-cta p {
  color: var(--grey-muted);
  margin-bottom: 1.5rem;
}

.btn-back {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.2rem;
  text-transform: uppercase;
  color: var(--grey-muted);
  border: 1px solid var(--border-dim);
  padding: 0.6rem 1.5rem;
  transition:
    color 0.2s,
    border-color 0.2s;
}
.btn-back:hover {
  color: var(--white);
  border-color: var(--border-glow);
}

@media (max-width: 768px) {
  .project-detail-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .project-gallery {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   NAV DROPDOWN — Projects submenu
   ============================================================ */
.nav-item {
  position: relative;
}

.nav-dropdown {
  position: absolute;
  top: 100%; /* Changed from calc(100% + 12px) to bridge the gap */
  left: 50%;
  min-width: 180px;
  background: rgba(10, 10, 10, 0.97);
  border: 1px solid var(--border-dim);
  padding: 12px 0 0.5rem 0; /* Added 12px padding to the top to preserve your spacing */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease,
    transform 0.2s ease;
  transform: translateX(-50%) translateY(-6px);
  z-index: 600;
}

/* small triangle pointer */
.nav-dropdown::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 5px solid var(--border-dim);
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown a {
  display: block;
  padding: 0.6rem 1.25rem;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
  color: var(--grey-muted);
  white-space: nowrap;
  transition:
    color 0.15s,
    background 0.15s;
  border-left: 2px solid transparent;
}
.nav-dropdown a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.04);
  border-left-color: var(--white);
}
.nav-dropdown a::after {
  display: none;
} /* hide the underline animation */

/* chevron icon on the Projects link */
.nav-has-dropdown > a::before {
  content: "▾";
  font-size: 0.6rem;
  margin-left: 0.35rem;
  opacity: 0.5;
  vertical-align: middle;
  display: inline;
}
.nav-has-dropdown > a::after {
  display: none;
}

/* ============================================================
   PEEK CAROUSEL — Framer-style, one card at a time
   with dimmed peeking edges
   ============================================================ */
.peek-carousel-outer {
  position: relative;
  /* overflow:hidden clips the peeking cards */
  overflow: hidden;
  /* horizontal padding creates the peek window: cards bleed into it */
  padding: 2rem 0 3rem;
  /* side fade masks — created with a pseudo element below */
}

/* Left & right gradient fade masks */
.peek-carousel-outer::before,
.peek-carousel-outer::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 180px;
  z-index: 2;
  pointer-events: none;
}
.peek-carousel-outer::before {
  left: 0;
  background: linear-gradient(to right, var(--grey-dark) 0%, transparent 100%);
}
.peek-carousel-outer::after {
  right: 0;
  background: linear-gradient(to left, var(--grey-dark) 0%, transparent 100%);
}

.peek-carousel-track {
  display: flex;
  gap: 2rem;
  /* JS sets transform to slide */
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  /* start offset so first card is centered */
  padding: 0 calc(50% - 320px); /* 320 = half card width */
}

/* Each card */
.peek-card {
  flex: 0 0 640px; /* fixed card width */
  max-width: 640px;
  background: var(--grey-deep);
  border: 1px solid var(--border-dim);
  overflow: hidden;
  transition:
    opacity 0.4s ease,
    transform 0.4s ease,
    border-color 0.4s ease;
  /* non-active cards are dimmed */
  opacity: 0.35;
  transform: scale(0.96);
  cursor: pointer;
}

.peek-card.active {
  opacity: 1;
  transform: scale(1);
  border-color: var(--border-glow);
  cursor: default;
}

.peek-card-media {
  aspect-ratio: 16/9;
  background: var(--grey-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.15rem;
  color: var(--grey-muted);
  overflow: hidden;
  position: relative;
}
.peek-card-media video,
.peek-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.peek-card-media .peek-card-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--font-heading);
  font-size: 0.6rem;
  letter-spacing: 0.15rem;
  text-transform: uppercase;
  color: var(--white-dim);
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid var(--border-dim);
  padding: 0.2rem 0.6rem;
}

.peek-card-body {
  padding: 1.75rem 2rem;
}
.peek-card-body h3 {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--pure-white);
  margin-bottom: 0.5rem;
  letter-spacing: 0.06em;
}
.peek-card-body p {
  color: var(--grey-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.peek-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.peek-card-meta {
  display: flex;
  gap: 1rem;
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.1rem;
  color: var(--grey-muted);
}
.peek-card-meta span {
  color: var(--white-dim);
  margin-right: 0.25rem;
}

/* Arrow buttons — sit outside the overflow:hidden zone */
.peek-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
  position: relative;
  z-index: 3;
}

.peek-arrow {
  width: 48px;
  height: 48px;
  border: 1px solid var(--border-dim);
  background: transparent;
  color: var(--grey-muted);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    border-color 0.2s,
    color 0.2s,
    background 0.2s;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}
.peek-arrow:hover {
  border-color: var(--border-glow);
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}
.peek-arrow:disabled {
  opacity: 0.2;
  cursor: default;
}

.peek-dots {
  display: flex;
  gap: 0.6rem;
}
.peek-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid var(--grey-border);
  background: transparent;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.peek-dot.active {
  background: var(--white);
  border-color: var(--white);
}

/* Responsive */
@media (max-width: 900px) {
  .peek-card {
    flex: 0 0 85vw;
    max-width: 85vw;
  }
  .peek-carousel-track {
    padding: 0 7.5vw;
  }
  .peek-carousel-outer::before,
  .peek-carousel-outer::after {
    width: 60px;
  }
}

@media (max-width: 768px) {
  .nav-dropdown {
    left: 0;
    transform: translateX(0) translateY(-6px);
  }
  .nav-item:hover .nav-dropdown {
    transform: translateX(0) translateY(0);
  }
}

/* ============================================================
   MARQUEE — Infinite scrolling software/tool logos
   ============================================================ */
#marquee-section {
  overflow: hidden;
  border-top: 1px solid var(--border-dim);
  border-bottom: 1px solid var(--border-dim);
}

.marquee-track-wrap {
  /* mask fades on left and right so logos appear/disappear smoothly */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 12%,
    black 88%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 12%,
    black 88%,
    transparent 100%
  );
  overflow: hidden;
}

.marquee-track {
  display: flex;
  gap: 3rem;
  /* width: two full sets of logos side-by-side so the loop is seamless */
  width: max-content;
  animation: marqueeScroll 28s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused; /* pause on hover */
}

@keyframes marqueeScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Each logo item */
.marquee-item {
  flex: 0 0 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid var(--border-dim);
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  transition:
    border-color 0.2s,
    background 0.2s;
  white-space: nowrap;
  font-family: var(--font-heading);
  font-weight: 600;
}

.marquee-item:hover {
  border-color: var(--border-glow);
  background: rgba(255, 255, 255, 0.05);
}

.marquee-item img {
  max-height: 80px;
  max-width: 80px;
  object-fit: contain;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.marquee-item:hover img {
  opacity: 1;
}
