/* ==========================================================================
   Collin Lloyd — Portfolio
   Palette: shades of blue + warm cream
   ========================================================================== */

:root {
  --cream:        #FAF5EB;
  --cream-soft:   #F3ECDD;
  --navy:         #1C2B54;
  --navy-deep:    #121D3B;
  --blue:         #2C4A9E;
  --blue-bright:  #3E63C8;
  --blue-soft:    #6E8AD6;
  --blue-soft-aa: #8FA5E0; /* lighter step of blue-soft; meets 4.5:1 on navy for small text */
  --ink:          #17203B;
  --muted:        #555D74;
  --line:         #E4DCC9;
  --radius:       14px;
  /* Control radius for buttons/CTAs/filters. Overrides the old full-pill
     (999px) treatment: buttons are now rounded rectangles, while chips/tags
     stay pill-shaped so the two read as distinct (action vs. label).
     ▸ TO RESTORE PILLS: set this to 999px. */
  --radius-btn:   20px;
  /* Height of the sticky nav in normal flow; subtracted from the hero so the
     hero + nav together equal exactly one screen (keeps the scroll cue in view).
     ▸ Retune if the nav's padding or logo size changes. */
  --nav-h:        76px;
  --shadow-sm:    0 1px 3px rgba(23, 32, 59, 0.08);
  --shadow-md:    0 10px 30px rgba(23, 32, 59, 0.12);
  --shadow-lg:    0 30px 60px rgba(23, 32, 59, 0.18);
  --font-head:    "Fraunces", Georgia, serif;
  --font-body:    "Public Sans", -apple-system, "Segoe UI", sans-serif;
  /* Content width cap. Sized so the layout fills a 16:9 fullscreen display
     (1920px wide) edge-to-edge, leaving only the side gutters as margin.
     ▸ TO NARROW: lower this (the old editorial width was 1400px).
     ▸ ON A LARGER MONITOR (1440p/4K): raise toward 2000–2200px. */
  --maxw:         1760px;
  --gutter:       clamp(24px, 5vw, 88px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

section[id] { scroll-margin-top: 76px; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.12;
  margin: 0 0 0.5em;
  color: var(--navy);
}

h1 { font-size: clamp(2.8rem, 8vw, 6rem); font-weight: 600; }
h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }

p { margin: 0 0 1em; }

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

a { color: var(--blue); }

.section-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section-eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.75rem;
}

.section-eyebrow.on-dark { color: var(--blue-soft-aa); }

.section-sub {
  max-width: 640px;
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

/* --------------------------------------------------------------------------
   Scroll progress bar
   -------------------------------------------------------------------------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  z-index: 60;
  background: linear-gradient(90deg, var(--navy), var(--blue), var(--blue-bright));
  transition: width 0.1s linear;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.75rem;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  will-change: transform;
}

.btn-primary {
  background: var(--navy);
  color: var(--cream);
}
.btn-primary:hover { background: var(--blue); box-shadow: var(--shadow-md); }

.btn-ghost {
  color: var(--navy);
  border: 1.5px solid var(--navy);
}
.btn-ghost:hover { background: var(--navy); color: var(--cream); }

.btn-light {
  background: var(--cream);
  color: var(--navy);
}
.btn-light:hover { background: #fff; box-shadow: var(--shadow-md); }

.btn-outline-light {
  color: var(--cream);
  border: 1.5px solid rgba(250, 245, 235, 0.5);
}
.btn-outline-light:hover { border-color: var(--cream); background: rgba(250, 245, 235, 0.1); }

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 245, 235, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.nav.is-scrolled {
  /* ▸ CHANGED: was `border-bottom-color: var(--line);` (a hard 1px line).
     Replaced with a soft shadow so the bottom of the nav blends instead.
     ▸ TO UNDO: restore `border-bottom-color: var(--line);` here and delete
     the `box-shadow` line, then delete the `.nav::after` block below. */
  background: rgba(250, 245, 235, 0.92);
  box-shadow: 0 12px 24px -14px rgba(23, 32, 59, 0.18);
}

.nav-inner {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.9rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  /* Reserve space at the left for the absolutely-positioned logo so the name
     sits to its right. Keep this roughly equal to the logo width + a gap. */
  padding-left: calc(104px + 0.6rem);
  min-height: 46px;
  font-family: var(--font-body);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
}


/* Logomark: anchored to the nav's left margin, larger than the bar so it hangs
   below and overlaps the section beneath — but rides along with the sticky nav. */
.nav-logo {
  position: absolute;
  /* The PNG has ~4.17% transparent padding on each side, so nudge the image
     left by that much (of its 110px width ≈ 4.6px) to sit the visible edge of
     the mark on the margin. Retune the 4.6px if you change the height. */
  left: calc(var(--gutter) - 22px);
  top: 50%;
  transform: translateY(-32%);
  height: 110px;
  width: auto;
  max-width: none;
  z-index: 2;
  /* ▸ ADDED: very subtle drop shadow that follows the mark's shape.
     ▸ TO UNDO: delete the `filter` line below. Softer = lower the 0.18 alpha. */
  filter: drop-shadow(0 2px 3px rgba(23, 32, 59, 0.18));
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}
.nav-menu a:hover { color: var(--blue); }

.nav-menu .nav-cta {
  background: var(--blue);
  color: #fff;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-btn);
  transition: background-color 0.2s ease;
}
.nav-menu .nav-cta:hover { background: var(--navy); color: #fff; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--navy);
  padding: 0.4rem;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  /* Subtract the sticky nav so hero + nav fill exactly one screen and the
     scroll cue at the hero's bottom stays visible without scrolling. */
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  align-items: center;
  padding: 4.5rem 0 4.5rem;
}

.hero-inner {
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 3;
}

/* Subtle background photo (sits beneath the aurora as texture) */
.hero-photo {
  position: absolute;
  /* Occupy only the right portion of the hero so the dome clears the copy.
     Raise `left` to push the photo further right; lower it to bring it in. */
  top: 0;
  right: 0;
  bottom: 0;
  left: 34%;
  z-index: 0;
  background: url("images/capitol-hero.jpg") center 20% / cover no-repeat;
  /* Desaturate + lift so it reads as faint texture, never a focal point */
  filter: grayscale(100%) contrast(1.02) brightness(1.06);
  opacity: 0.16;
  /* Fade the panel's left edge into the cream so there's no hard seam. */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.55) 42%, #000 80%);
          mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.55) 42%, #000 80%);
  pointer-events: none;
}

/* On narrow screens the text stacks, so let the photo span the full width
   again and fade toward the lower-left as before. */
@media (max-width: 860px) {
  .hero-photo {
    left: 0;
    -webkit-mask-image: linear-gradient(118deg, transparent 12%, rgba(0,0,0,0.55) 52%, #000 92%);
            mask-image: linear-gradient(118deg, transparent 12%, rgba(0,0,0,0.55) 52%, #000 92%);
  }
}

/* Faint CL logomark watermark on the left, spanning the full hero height.
   Raise `opacity` to make it bolder; it sits behind the aurora and text. */
.hero-logomark {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 0;
  background: url("images/cl_logomark_gradient.png") left center / auto 100% no-repeat;
  opacity: 0.3;
  mix-blend-mode: color-burn;
  /* Fade the top of the mark out to transparent. */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 42%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 42%);
  pointer-events: none;
}

/* Animated aurora background: three softly-blurred blobs drifting on CSS
   keyframes (drift1/2/3 below). */
.hero-aurora {
  position: absolute;
  inset: 0;
  z-index: 1;
  filter: blur(70px);
  pointer-events: none;
}

.hero-aurora .blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0.55;
  mix-blend-mode: multiply;
}

.blob-1 {
  width: 46vw; height: 46vw;
  top: -12%; left: -6%;
  background: radial-gradient(circle, rgba(44, 74, 158, 0.6), transparent 68%);
  animation: drift1 13s ease-in-out infinite;
}
.blob-2 {
  width: 40vw; height: 40vw;
  top: 8%; right: -8%;
  background: radial-gradient(circle, rgba(28, 43, 84, 0.75), transparent 68%);
  animation: drift2 16s ease-in-out infinite;
}
.blob-3 {
  width: 38vw; height: 38vw;
  bottom: -16%; left: 28%;
  background: radial-gradient(circle, rgba(110, 138, 214, 0.7), transparent 68%);
  animation: drift3 11s ease-in-out infinite;
}

/* Multi-waypoint wandering paths (0% == 100% so each loops seamlessly). Only
   transform + opacity animate, so this stays GPU-cheap. Shorten the durations
   above to speed the drift up further, lengthen them to calm it down. */
@keyframes drift1 {
  0%   { transform: translate(0, 0) scale(1);            opacity: 0.5; }
  25%  { transform: translate(14%, 16%) scale(1.18);     opacity: 0.62; }
  50%  { transform: translate(22%, -8%) scale(1.06);     opacity: 0.5; }
  75%  { transform: translate(8%, 10%) scale(1.22);      opacity: 0.6; }
  100% { transform: translate(0, 0) scale(1);            opacity: 0.5; }
}
@keyframes drift2 {
  0%   { transform: translate(0, 0) scale(1);            opacity: 0.55; }
  30%  { transform: translate(-18%, 12%) scale(1.14);    opacity: 0.68; }
  60%  { transform: translate(-6%, -16%) scale(1.05);    opacity: 0.52; }
  100% { transform: translate(0, 0) scale(1);            opacity: 0.55; }
}
@keyframes drift3 {
  0%   { transform: translate(0, 0) scale(1);            opacity: 0.6; }
  33%  { transform: translate(14%, -16%) scale(1.24);    opacity: 0.72; }
  66%  { transform: translate(-12%, -4%) scale(1.1);     opacity: 0.55; }
  100% { transform: translate(0, 0) scale(1);            opacity: 0.6; }
}

/* Cursor-following spotlight (position set via JS custom props) */
.hero-spotlight {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, 40%),
    rgba(255, 255, 255, 0.35),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
}
.hero:hover .hero-spotlight { opacity: 1; }

.hero-title { margin: 0 0 0.4em; letter-spacing: -0.01em; }
.hero-title .line { display: block; }
.hero-title .line-setup {
  font-size: clamp(1.4rem, 3.4vw, 2.2rem);
  font-weight: 500;
  color: var(--muted);
}
.hero-title .line-punch {
  font-size: clamp(2.8rem, 8vw, 6rem);
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.025em;
  margin-top: 0.12em;
  transition-delay: 0.15s;
}
.hero-title em { font-style: italic; color: var(--blue); }

.hero-sub {
  max-width: 620px;
  font-size: 1.15rem;
  color: var(--muted);
  margin: 1.25rem 0 2.25rem;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  /* Center on the true viewport center via 50vw (vw includes any scrollbar
     gutter), so an always-on scrollbar can't nudge the cue off-center the way
     a container-relative center would. The reveal's translateY is composed
     with this translateX in the .reveal overrides below so the fade-in keeps
     the element centered. */
  left: 50vw;
  transform: translateX(-50%);
  width: max-content;
  z-index: 3;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Keep the horizontal centering while the reveal animation runs its rise. */
.hero-scroll.reveal { transform: translateX(-50%) translateY(24px); }
.hero-scroll.reveal.is-visible { transform: translateX(-50%); }
.hero-scroll svg { animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* --------------------------------------------------------------------------
   Marquee
   -------------------------------------------------------------------------- */
.marquee {
  overflow: hidden;
  background: var(--navy);
  padding: 1.1rem 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 2.5rem;
  white-space: nowrap;
  animation: scroll-x 32s linear infinite;
}

.marquee-track span {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 600;
  font-style: italic;
  color: var(--cream);
}
.marquee-track .star {
  font-style: normal;
  color: var(--blue-soft);
  font-size: 1.1rem;
}

@keyframes scroll-x { to { transform: translateX(-50%); } }

.marquee:hover .marquee-track { animation-play-state: paused; }

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */
.about { padding: clamp(3.5rem, 8vw, 7rem) 0; background: var(--cream-soft); }

.about-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.about-photo {
  position: sticky;
  top: 96px;
}

.about-photo img,
.photo-placeholder {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  object-fit: cover;
  box-shadow: var(--shadow-lg);
}

.photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: linear-gradient(150deg, var(--navy) 0%, var(--blue) 120%);
  color: rgba(250, 245, 235, 0.85);
  font-size: 0.9rem;
  font-weight: 600;
}

.about-copy h2 { font-size: clamp(2rem, 4vw, 3rem); }
.about-copy h3 { margin-top: 1.5rem; color: var(--blue); }
.about-copy p { color: var(--muted); font-size: 1.05rem; }

.interest-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0;
  margin: 1rem 0 0;
}

.interest-tags li {
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  background: var(--cream);
  border: 1px solid var(--line);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.interest-tags li:hover { transform: translateY(-3px); border-color: var(--blue); color: var(--blue); }

/* --------------------------------------------------------------------------
   Work / portfolio grid
   -------------------------------------------------------------------------- */
.work { padding: clamp(3.5rem, 8vw, 7rem) 0; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-btn);
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-btn:hover { border-color: var(--blue); color: var(--blue); }

.filter-btn.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--cream);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

@media (min-width: 760px) {
  .card-featured { grid-column: span 2; }
}

.card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.1s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.card { cursor: pointer; }
.card:hover { box-shadow: var(--shadow-lg); border-color: var(--blue-soft); }

/* Expanded detail — hidden on the grid card, revealed inside the modal */
.card-detail { display: none; }

.card.is-hidden { display: none; }

/* Placeholder thumbnails — replaced by real images/embeds as you add work */
.thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  color: rgba(250, 245, 235, 0.9);
  overflow: hidden;
}

.thumb svg { transition: transform 0.4s ease; }
.card:hover .thumb svg { transform: scale(1.12); }

.thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at 50% -20%, rgba(255,255,255,0.25), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.card:hover .thumb::after { opacity: 1; }

.thumb-label { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.02em; position: relative; z-index: 1; }

.thumb-video    { background: linear-gradient(140deg, var(--navy-deep) 0%, var(--blue) 130%); }
.thumb-branding { background: linear-gradient(140deg, var(--navy) 0%, var(--blue-bright) 130%); }
.thumb-web      { background: linear-gradient(140deg, var(--navy) 0%, var(--blue-soft) 140%); }
.thumb-social   { background: linear-gradient(140deg, var(--blue) 0%, var(--navy-deep) 130%); }

.thumb-img {
  aspect-ratio: 16 / 10;
  width: 100%;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.card:hover .thumb-img { transform: scale(1.04); }

/* Match the media height of the other cards (16 / 10) so the video frame
   isn't shorter than its neighbours. */
.video-embed { aspect-ratio: 16 / 10; background: #000; }
.video-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Extra project images — hidden on the grid card, shown as a gallery in the modal */
.card-gallery { display: none; }

/* Platform badge overlaid on a social thumbnail */
.platform-badge {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem 0.3rem 0.55rem;
  border-radius: 999px;
  background: rgba(18, 29, 59, 0.82);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.platform-badge svg { width: 14px; height: 14px; }
.platform-tiktok   { background: rgba(0, 0, 0, 0.85); }
.platform-linkedin { background: rgba(10, 102, 194, 0.92); }

/* Play button centered over a video-style social thumbnail */
.play-badge {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  aspect-ratio: 16 / 10;   /* overlays the thumbnail exactly */
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.play-badge svg {
  width: 54px;
  height: 54px;
  padding: 15px 14px 15px 17px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  color: var(--navy);
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, background-color 0.25s ease;
}
.card:hover .play-badge svg { transform: scale(1.08); background: #fff; }

/* Engagement metrics row (views / likes / etc.) */
.card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  margin-top: 0.9rem;
}
.card-metrics .metric {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
}
.card-metrics .metric svg { width: 15px; height: 15px; color: var(--blue); flex: 0 0 auto; }

.card-body {
  padding: 1.35rem 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-body p { color: var(--muted); font-size: 0.95rem; margin-bottom: 0; }

.card-body h3 { margin-bottom: 0.15rem; transition: color 0.25s ease; }
.card:hover .card-body h3 { color: var(--blue); }

.card-client {
  font-size: 0.82rem !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue) !important;
  margin-bottom: 0.6rem !important;
}

.card-tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.tag-video    { background: rgba(28, 43, 84, 0.10);  color: var(--navy); }
.tag-branding { background: rgba(62, 99, 200, 0.14); color: var(--blue); }
.tag-web      { background: rgba(28, 43, 84, 0.10);  color: var(--navy); }
.tag-social   { background: rgba(110, 138, 214, 0.18); color: var(--blue); }
.tag-press    { background: var(--cream-soft); color: var(--navy); border: 1px solid var(--line); }

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.9rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--blue);
  text-decoration: none;
}
.card-link svg { transition: transform 0.2s ease; }
.card-link:hover { text-decoration: underline; }
.card-link:hover svg { transform: translate(2px, -2px); }

/* Press cards are text-forward, document style */
.card-press { flex-direction: row; align-items: flex-start; padding: 1.5rem; gap: 1.2rem; }

.press-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, var(--navy) 0%, var(--blue) 140%);
  color: var(--cream);
  transition: transform 0.3s ease;
}
.card-press:hover .press-icon { transform: rotate(-6deg) scale(1.05); }

.card-press .card-body { padding: 0; }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact {
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, var(--navy-deep) 0%, var(--navy) 55%, var(--blue) 160%);
  color: var(--cream);
  padding: clamp(4.5rem, 10vw, 8rem) 0;
}

.contact::before {
  content: "";
  position: absolute;
  top: -30%; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(110,138,214,0.38), transparent 65%);
  filter: blur(40px);
  pointer-events: none;
}

.contact-inner { max-width: 820px; text-align: center; position: relative; z-index: 1; }

.contact h2 { color: var(--cream); font-size: clamp(2.2rem, 5vw, 3.6rem); }

.contact-sub { color: rgba(250, 245, 235, 0.78); margin-bottom: 2rem; font-size: 1.1rem; }

.contact-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  background: var(--navy-deep);
  color: rgba(250, 245, 235, 0.65);
  font-size: 0.88rem;
}

.footer-inner {
  max-width: var(--maxw);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.footer p { margin: 0; }

.footer a { color: rgba(250, 245, 235, 0.85); text-decoration: none; }
.footer a:hover { color: #fff; }

/* --------------------------------------------------------------------------
   Lightbox
   -------------------------------------------------------------------------- */
.lightbox[hidden] { display: none; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(18, 29, 59, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  /* Same crossfade + slide as the modal gallery */
  transition: opacity 0.26s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.lightbox-close {
  position: absolute;
  top: 1.2rem;
  right: 1.6rem;
  background: none;
  border: none;
  color: var(--cream);
  font-size: 2.4rem;
  line-height: 1;
  z-index: 2;
}

/* Prev/next arrows — only shown when the lightbox is paging a multi-image set */
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  display: none;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(250, 245, 235, 0.14);
  color: var(--cream);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: background-color 0.2s ease;
}
.lightbox.has-nav .lightbox-arrow { display: flex; }
.lightbox-arrow:hover { background: rgba(250, 245, 235, 0.3); }
.lightbox-prev { left: clamp(0.75rem, 3vw, 2rem); }
.lightbox-next { right: clamp(0.75rem, 3vw, 2rem); }

/* --------------------------------------------------------------------------
   Project detail modal
   -------------------------------------------------------------------------- */
.project-modal[hidden] { display: none; }

.project-modal {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 2.5rem);
}

.project-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 29, 59, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.project-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--cream);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(22px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.project-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--navy);
  font-size: 1.9rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.project-modal-close:hover { background: #fff; transform: rotate(90deg); }

/* The clicked card is cloned in; strip its card chrome so it reads as content */
.project-modal-content .card {
  border: none;
  box-shadow: none;
  background: transparent;
  cursor: default;
  transform: none !important;
  border-radius: 0;
}
.project-modal-content .thumb,
.project-modal-content .video-embed,
.project-modal-content .thumb-img { border-radius: var(--radius) var(--radius) 0 0; }

/* Modal images size to each file's real proportions instead of cropping to a
   fixed 16/10 box. --media-ratio is set from the image's natural dimensions in
   script.js once it loads; the fallback keeps a sensible box while loading.
   max-height caps very tall portraits so they can't overflow the dialog, and
   object-fit: contain guarantees the whole image is always visible. */
.project-modal-content .thumb-img {
  aspect-ratio: var(--media-ratio, 16 / 10);
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  background: var(--cream-soft);
}
.project-modal-content .card-body { padding: 1.6rem 1.9rem 2rem; }
.project-modal-content .card-body h3 { font-size: 1.9rem; margin-bottom: 0.2rem; }

/* Reveal the expanded detail only inside the modal */
.project-modal-content .card-detail {
  display: block;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.project-modal-content .card-detail p { color: var(--muted); }
.project-modal-content .card-detail ul {
  margin: 0.75rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
}
.project-modal-content .card-detail li { margin-bottom: 0.4rem; }

/* Grid-only overlays don't belong in the modal (media is replaced there) */
.project-modal-content .platform-badge,
.project-modal-content .play-badge { display: none; }
.project-modal-content .card-metrics { padding-top: 0.25rem; }

/* --- Modal image gallery (main image + thumbnail strip + arrows) --- */
.modal-gallery { display: block; }

.mg-stage {
  position: relative;
  overflow: hidden;
  background: #000;
  border-radius: var(--radius) var(--radius) 0 0;
}
.mg-current {
  width: 100%;
  display: block;
  cursor: zoom-in;
  border-radius: 0;
  /* Subtle crossfade + slide when paging between photos (driven from script.js) */
  transition: opacity 0.26s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.mg-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--navy);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.2s ease;
}
.mg-arrow:hover { background: #fff; }
.mg-prev { left: 0.6rem; }
.mg-next { right: 0.6rem; }
.mg-counter {
  position: absolute;
  bottom: 0.6rem;
  right: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(18, 29, 59, 0.72);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
}
.mg-thumbs {
  display: flex;
  gap: 0.5rem;
  padding: 0.7rem;
  overflow-x: auto;
  background: var(--cream-soft);
}
.mg-thumb {
  flex: 0 0 auto;
  width: 66px;
  height: 46px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: none;
  opacity: 0.55;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}
.mg-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mg-thumb:hover { opacity: 1; }
.mg-thumb.is-active { opacity: 1; border-color: var(--blue); }

/* --- Modal TikTok embed --- */
.modal-tiktok {
  display: flex;
  justify-content: center;
  padding: 1.25rem 1rem 0.75rem;
  background: var(--cream-soft);
  border-radius: var(--radius) var(--radius) 0 0;
  min-height: 200px;
}
.modal-tiktok .tiktok-embed,
.modal-tiktok iframe { margin: 0 auto !important; }
.modal-tiktok-loading {
  align-self: center;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}
/* Hide the loading label once TikTok has swapped in the real player */
.modal-tiktok:has(iframe) .modal-tiktok-loading { display: none; }

/* --------------------------------------------------------------------------
   Cursor stuff
   -------------------------------------------------------------------------- */
.inner-cursor,
.outer-cursor {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;          /* both are circles */
  pointer-events: none;
  z-index: 9999;               /* always above nav, buttons, everything */
  mix-blend-mode: difference;  /* stays visible on light AND dark areas */
  opacity: 0;                  /* hidden until the mouse first moves */
  transition: opacity 0.3s ease;
}

/* Revealed by JS once the mouse moves; keyboard/touch users keep a normal cursor */
body.cursor-ready .inner-cursor,
body.cursor-ready .outer-cursor { opacity: 1; }
body.cursor-hidden .inner-cursor,
body.cursor-hidden .outer-cursor { opacity: 0; }

.inner-cursor {
  width: 8px;
  height: 8px;
  background: #fff;
  transition: width 0.25s ease, height 0.25s ease, opacity 0.3s ease;
}

.outer-cursor {
  width: 34px;
  height: 34px;
  border: 1.6px solid #fff;
  transition: width 0.25s ease, height 0.25s ease, opacity 0.3s ease;
}

/* Ring grows (and dot tucks away) over interactive targets */
body.cursor-hover .outer-cursor { width: 54px; height: 54px; }
body.cursor-hover .inner-cursor { width: 0; height: 0; }

/* Hide the system cursor only while the custom one is active, and only on
   devices with a real pointer (mouse/trackpad) — never on touch. */
@media (pointer: fine) {
  body.cursor-ready,
  body.cursor-ready * { cursor: none; }
}

/* --------------------------------------------------------------------------
   Scroll reveal
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-aurora .blob,
  .pulse-dot,
  .hero-scroll svg,
  .marquee-track { animation: none !important; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* --------------------------------------------------------------------------
   Focus states
   -------------------------------------------------------------------------- */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 360px; position: static; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }

  .nav-brand-text { display: none; }

  /* .nav's backdrop-filter would otherwise trap the fixed overlay inside the
     nav bar (a filtered element is the containing block for its fixed
     descendants), so drop it on mobile — the overlay supplies the blur, and the
     nav's translucent cream fill still reads fine on its own. */
  .nav { backdrop-filter: none; -webkit-backdrop-filter: none; }

  /* Keep the logomark and hamburger crisply above the overlay so the menu
     items can sit centered below the hanging logo (no overlap). */
  .nav-logo { z-index: 60; }
  .nav-toggle { position: relative; z-index: 60; }

  /* Full-screen blur overlay that fades + slides up with the nav options
     centered on it. It lives inside .nav (z-50), so it always paints above the
     page; a low z-index here keeps it beneath the logo/toggle above. */
  .nav-menu {
    position: fixed;
    inset: 0;
    z-index: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin: 0;
    padding: var(--nav-h) 2rem 3rem;
    background: rgba(250, 245, 235, 0.72);
    backdrop-filter: blur(22px) saturate(1.3);
    -webkit-backdrop-filter: blur(22px) saturate(1.3);
    /* Hidden state — faded, nudged down, and click-through. */
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px);
    pointer-events: none;
    transition: opacity 0.3s ease,
                transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
                visibility 0s linear 0.3s;
  }

  .nav-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition: opacity 0.3s ease,
                transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
                visibility 0s;
  }

  .nav-menu li { width: 100%; max-width: 320px; text-align: center; }

  .nav-menu a {
    display: block;
    padding: 0.85rem 1rem;
    font-size: 1.6rem;
  }

  .nav-menu .nav-cta {
    display: inline-block;
    margin-top: 0.9rem;
    padding: 0.85rem 2.4rem;
    font-size: 1.05rem;
  }

  /* Gentle staggered rise of each option as the overlay opens. */
  .nav-menu.is-open li {
    animation: menu-item-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .nav-menu.is-open li:nth-child(1) { animation-delay: 0.08s; }
  .nav-menu.is-open li:nth-child(2) { animation-delay: 0.14s; }
  .nav-menu.is-open li:nth-child(3) { animation-delay: 0.20s; }

  @keyframes menu-item-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
  }

  /* Hamburger ⇄ close-X icon swap, driven purely by the button's aria state. */
  .nav-toggle .icon-close { display: none; }
  .nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
  .nav-toggle[aria-expanded="true"] .icon-close { display: block; }

  .footer-inner { flex-direction: column; text-align: center; }

  .card-press { flex-direction: column; }

  .hero { min-height: calc(100svh - var(--nav-h)); }
}

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