/* Dan Anderson — Fade & Blur Portfolio */

:root {
  /* Brand palette — matched to DA logo cyan #00AEEF */
  --navy: #010b14;
  --deep-teal: #01344d;
  --teal: #00aeef;
  --mint: #7ad7f7;
  --black: #0d0d0d;

  --bg: var(--black);
  --bg-elevated: #0c1218;
  --bg-soft: #111820;
  --border: rgba(0, 174, 239, 0.12);
  --border-strong: rgba(0, 174, 239, 0.28);
  --text: #eef6fb;
  --text-muted: #8aa4b5;
  --text-dim: #5e7380;
  --accent: var(--teal);
  --accent-mid: #0088c2;
  --accent-deep: var(--deep-teal);
  --accent-soft: rgba(0, 174, 239, 0.16);
  --accent-glow: rgba(0, 174, 239, 0.32);
  --blur-blue: rgba(0, 80, 130, 0.45);
  --radius: 14px;
  --radius-sm: 10px;
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: "Montserrat", system-ui, sans-serif;
  --font-body: "Montserrat", system-ui, sans-serif;
  --shadow: 0 24px 60px rgba(1, 11, 20, 0.55);
  --max: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-optical-sizing: auto;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 8% -10%, rgba(0, 80, 130, 0.5), transparent 55%),
    radial-gradient(ellipse 55% 40% at 92% 0%, rgba(0, 174, 239, 0.18), transparent 50%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(1, 11, 20, 0.7), transparent 60%);
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  background: rgba(13, 13, 13, 0.72);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.site-header.scrolled {
  border-bottom-color: var(--border);
  background: rgba(1, 11, 20, 0.88);
}

.logo {
  display: flex;
  align-items: center;
  z-index: 2;
  line-height: 0;
  border-radius: 10px;
  transition: box-shadow 0.3s var(--ease), transform 0.25s var(--ease);
}

.logo:hover {
  transform: translateY(-1px);
  filter: drop-shadow(0 0 12px rgba(0, 174, 239, 0.35));
}

.logo-img {
  height: 52px;
  width: auto;
  max-width: min(180px, 46vw);
  object-fit: contain;
  border-radius: 0;
  /* Dark-optimized PNG (white wordmark) — no light plate */
  background: transparent;
  padding: 0;
  box-sizing: content-box;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  position: relative;
  padding: 0.55rem 0.95rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.06);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.75px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}

/* App shell */
.app {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 140px);
  padding-top: var(--header-h);
}

.view {
  animation: fadeUp 0.55s var(--ease) both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* Hero */
.hero {
  position: relative;
  padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(2.75rem, 6vw, 4.75rem);
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  width: min(70vw, 620px);
  height: min(70vw, 620px);
  top: -10%;
  right: -8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 174, 239, 0.28), transparent 68%);
  filter: blur(40px);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

.hero-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
}

.hero h1 {
  margin: 0 0 1.25rem;
  max-width: 12em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, #fff 10%, var(--mint) 55%, var(--teal) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 48ch;
  margin: 0 0 2rem;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--text-muted);
  line-height: 1.7;
}

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

/* Hero logo — dark PNG (white wordmark) on soft teal glow */
.hero-brand {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-logo-wrap {
  position: relative;
  width: min(100%, 400px);
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border-radius: calc(var(--radius) + 10px);
  /* Soft cyan radial glow behind the dark logo */
  background:
    radial-gradient(
      circle at 50% 45%,
      rgba(0, 174, 239, 0.22) 0%,
      rgba(0, 174, 239, 0.14) 35%,
      rgba(1, 52, 77, 0.08) 55%,
      transparent 72%
    );
  border: none;
  box-shadow: none;
}

.hero-logo-wrap::after {
  display: none;
}

.hero-logo {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  display: block;
  /* No blend mode — black PNG field matches page; white outline wordmark pops */
  filter: drop-shadow(0 0 28px rgba(0, 174, 239, 0.35));
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .hero-brand {
    order: -1;
    justify-content: flex-start;
  }

  .hero-logo-wrap {
    width: min(100%, 240px);
    padding: 0.5rem;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: var(--navy);
  background: linear-gradient(145deg, #b8eaff 0%, var(--mint) 40%, var(--teal) 100%);
  box-shadow: 0 8px 28px var(--accent-glow);
}

.btn-primary:hover {
  box-shadow: 0 12px 34px rgba(0, 174, 239, 0.4);
}

.btn-ghost {
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
}

/* Sections */
.section {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  max-width: 42ch;
}

.eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.work-group {
  margin-bottom: 2.5rem;
}

.work-group h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 650;
}

/* Cards grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  transition: transform 0.35s var(--ease), border-color 0.3s, box-shadow 0.35s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 174, 239, 0.4);
  box-shadow: var(--shadow);
}

.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-soft);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease), filter 0.4s;
  filter: saturate(0.92) brightness(0.92);
}

.card:hover .card-media img {
  transform: scale(1.05);
  filter: saturate(1.05) brightness(1);
}

.card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13, 13, 13, 0.8) 0%, transparent 55%);
  pointer-events: none;
}

.card-body {
  padding: 1.15rem 1.2rem 1.35rem;
}

.card-body h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

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

.card-meta {
  display: inline-flex;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Featured video row */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.feature-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  cursor: pointer;
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 174, 239, 0.4);
  box-shadow: var(--shadow);
}

.feature-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #000;
}

.feature-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
  transition: opacity 0.3s, transform 0.6s var(--ease);
}

.feature-card:hover .feature-thumb img {
  opacity: 1;
  transform: scale(1.03);
}

.play-badge {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.play-badge span {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(1, 11, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  font-size: 1.1rem;
  padding-left: 3px;
  transition: transform 0.25s var(--ease), background 0.25s;
}

.feature-card:hover .play-badge span {
  transform: scale(1.08);
  background: linear-gradient(145deg, var(--mint), var(--teal));
  color: var(--navy);
  border-color: transparent;
}

.feature-body {
  padding: 1rem 1.15rem 1.2rem;
}

.feature-body h3 {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.feature-body p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Skills / about strip */
.about-panel {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  padding: clamp(1.75rem, 4vw, 2.5rem);
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--border);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.03), transparent 40%),
    var(--bg-elevated);
}

.about-panel h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2rem);
  letter-spacing: -0.02em;
}

.about-panel p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 1.02rem;
}

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

.skill-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-content: start;
}

.skill-list li {
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Category / work pages */
.page-hero {
  padding: clamp(2.5rem, 6vw, 3.75rem) 0 1.25rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb span {
  opacity: 0.5;
}

.page-hero h1 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.page-hero .lede {
  margin: 0;
  max-width: 55ch;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 0.5rem;
}

.chip {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.chip:hover,
.chip.active {
  color: var(--text);
  border-color: rgba(0, 174, 239, 0.45);
  background: var(--accent-soft);
}

/* Galleries */
.gallery-section {
  margin-bottom: 2.5rem;
}

.gallery-section h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 650;
}

.masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
}

.masonry.wide {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
}

.gallery-item.portrait {
  aspect-ratio: 3 / 4;
}

.gallery-item.tall {
  aspect-ratio: 3 / 4;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease), filter 0.35s;
  filter: brightness(0.94);
}

.gallery-item:hover img {
  transform: scale(1.04);
  filter: brightness(1.02);
}

.masonry.shots {
  grid-template-columns: minmax(0, 720px);
}

.gallery-item.shot {
  aspect-ratio: auto;
  cursor: pointer;
}

.gallery-item.shot img {
  height: auto;
  object-fit: contain;
  filter: none;
}

.gallery-item.shot:hover img {
  transform: none;
  filter: none;
}
}

/* Video grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.video-tile {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  cursor: pointer;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}

.video-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 174, 239, 0.4);
}

.video-tile .thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-tile .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

.video-tile .label {
  padding: 0.75rem 0.95rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* External embeds (Maps 360, etc.) */
.embed-section {
  margin-bottom: 2rem;
}

.embed-section h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 650;
}

.embed-frame {
  position: relative;
  width: 100%;
  max-width: 960px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}

.embed-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.embed-frame-tall {
  max-width: 100%;
  aspect-ratio: auto;
  height: auto;
}

.embed-frame-tall iframe {
  position: static;
  width: 100%;
  height: 480px;
  display: block;
}

/* Info / empty-ish categories */
.info-panel {
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  max-width: 640px;
}

.info-panel p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.info-panel ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text);
}

.info-panel li {
  margin-bottom: 0.4rem;
}

/* Contact */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2rem;
  align-items: start;
}

.contact-copy h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: -0.02em;
}

.contact-copy p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.contact-form {
  display: grid;
  gap: 0.9rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(0, 174, 239, 0.65);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.form-status {
  margin: 0;
  font-size: 0.9rem;
  color: var(--accent);
  min-height: 1.25em;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

#contact-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  padding: 1.75rem 0 2.25rem;
}

.footer-inner {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.footer-brand {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}

.footer-note {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.back-top {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.back-top:hover {
  color: var(--accent);
}

.theme-switch {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.theme-switch:hover {
  color: var(--text);
}

/* Lightbox & video modal */
.lightbox,
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(1, 11, 20, 0.92);
  backdrop-filter: blur(10px);
  padding: 1.5rem;
}

.video-modal {
  background: var(--bg);
}

.lightbox[hidden],
.video-modal[hidden] {
  display: none;
}

.lightbox-figure {
  margin: 0;
  max-width: min(96vw, 1100px);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-figure img {
  max-height: 80vh;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.lightbox-figure figcaption {
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--text);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.75rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.12);
}

.lightbox-nav.prev {
  left: 1rem;
}

.lightbox-nav.next {
  right: 1rem;
}

.video-frame {
  position: relative;
  width: min(96vw, 960px);
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #000;
  flex-shrink: 0;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #000;
}

.video-fallback img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  filter: blur(2px);
}

.video-fallback-copy {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1.25rem;
  max-width: 28rem;
}

.video-fallback-copy p {
  margin: 0 0 0.5rem;
  color: var(--text);
  font-weight: 600;
}

.video-fallback-hint {
  font-weight: 400 !important;
  color: var(--text-muted) !important;
  font-size: 0.9rem;
}

.video-fallback-hint code,
.file-protocol-banner code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.85em;
  color: var(--mint);
}

.video-fallback-hint a,
.file-protocol-banner a {
  color: var(--mint);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.video-fallback .btn {
  margin-top: 0.85rem;
}

.file-protocol-banner {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 99;
  padding: 0.7rem 1.25rem;
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text);
  background: #3a1020;
  border-bottom: 1px solid rgba(255, 80, 80, 0.35);
}

body.has-file-banner .app {
  padding-top: calc(var(--header-h) + 3.25rem);
}

.video-yt-link {
  position: relative;
  z-index: 1;
  margin-top: 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--mint);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.video-yt-link:hover {
  color: #fff;
}

/* Ensure modal shows above everything when opened */
.video-modal:not([hidden]) {
  display: flex;
}

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

  .about-panel,
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

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

  .nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(1, 11, 20, 0.97);
    backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
  }

  .logo-img {
    height: 42px;
    max-width: min(140px, 42vw);
  }

  .nav.open {
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    font-size: 1.25rem;
    padding: 0.85rem 1.25rem;
  }

  .card-grid,
  .featured-grid {
    grid-template-columns: 1fr;
  }

  .lightbox-nav {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
