/* ============================================================
   TOKENS
   ============================================================ */
:root {
  --bg:          #0d0f12;
  --surface:     #13161b;
  --surface-2:   #1a1e25;
  --border:      #252a33;
  --text:        #e2e6ed;
  --text-muted:  #7a8494;
  --text-faint: #aaaaaf;
  --accent: #f4c35d;       /* teal-mint — XR/medical green energy */
  --accent-dim: rgb(113 158 239 / 0.12);
  --accent-glow: rgb(32 92 73 / 0.06);
  --warn:        #ff6b6b;

  --font-display: 'Space Grotesk', sans-serif;
  --font-mono:    'Space Mono', monospace;

  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 16px;

  --max-w: 1100px;
  --gap: 2rem;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 2rem;
  background: rgba(13,15,18,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text);
  letter-spacing: 0.04em;
}
.nav-logo:hover { text-decoration: none; color: var(--accent); }

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

.nav-cta {
  color: var(--accent) !important;
  border: 1px solid var(--accent);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-sm);
  transition: background 0.15s !important;
}
.nav-cta:hover { background: var(--accent-dim) !important; }

.nav-cta { display: inline-flex; align-items: center; }
.nav-cta-icon { display: none; }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

.section { padding: 5rem 0; }
.section + .section { border-top: none; }

/* ============================================================
   HOMEPAGE HERO
   ============================================================ */
.hero-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url('https://pub-ddea74deb64644809276e3fe8bf1089f.r2.dev/259e15_87eddc14252b4b049020557839986118~mv2.avif');
  background-size: cover;
  background-position: center;
  opacity: 0.12;
  transition: opacity 0.05s linear;
  pointer-events: none;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, var(--bg) 100%);
}

.hero {
  min-height: 88vh;
  display: flex;
  align-items: center;
  padding: 6rem 2rem 4rem;
  max-width: var(--max-w);
  margin: 0 auto;
  gap: 4rem;
}

.hero-text { flex: 1; }

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.hero-title span {
  color: var(--accent);
}

.hero-body {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover { opacity: 0.88; text-decoration: none; color: var(--bg); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--text-muted); text-decoration: none; }

/* Hero media grid */
.hero-media {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 0.75rem;
  max-width: 480px;
}

.hero-media-item {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16/10;
}

.hero-media-item:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 16/7;
}

.hero-media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

/* ============================================================
   FEATURED PROJECTS STRIP (homepage)
   ============================================================ */
.featured-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

/* ============================================================
   PROJECT CARD
   ============================================================ */
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  text-decoration: none;
}

.project-card-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--surface-2);
  position: relative;
}

.project-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.project-card:hover .project-card-thumb img {
  transform: scale(1.04);
}

.project-card-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-faint);
}

.project-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.project-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

.project-card-footer {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-card-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.05em;
}

/* ============================================================
   PROJECT CARD — new media variant (replaces thumb)
   ============================================================ */
.project-card-media {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--surface-2);
}

.project-card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.project-card:hover .project-card-media img {
  transform: scale(1.04);
}

.project-card-placeholder {
  width: 100%; height: 100%;
  background: repeating-linear-gradient(
    135deg,
    var(--surface-2) 0px,
    var(--surface-2) 8px,
    var(--surface) 8px,
    var(--surface) 16px
  );
}

.project-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}

.project-card-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgb(57 136 239 / 0.08);
  border: 1px solid rgb(97 168 241 / 0.2);
  border-radius: 3px;
  padding: 0.1rem 0.4rem;
}

/* ============================================================
   WORK FILTER & GRID
   ============================================================ */
.work-filter-wrap {
  scroll-margin-top: 57px;
  padding-top: 1.5rem;
}

.project-search {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 0.6rem 1rem;
  margin-bottom: 0.75rem;
  outline: none;
  transition: border-color 0.15s;
}

.project-search::placeholder { color: var(--text-muted); }
.project-search:focus { border-color: var(--accent); }

.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-bottom: 1rem;
}

.tag-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 2rem;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.tag-pill:not(.tag-pill--active):hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tag-pill--active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.work-sections {
  padding-bottom: 6rem;
}

.work-section {
  margin-top: 3.5rem;
}

.work-section-title {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
}


/* ============================================================
   PROJECT SHOWCASE PAGE
   ============================================================ */
.project-hero {
  padding: 5rem 2rem 3rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

.project-hero-back {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 2.5rem;
  transition: color 0.15s;
}
.project-hero-back:hover { color: var(--accent); text-decoration: none; }

.project-hero-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.project-hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.7;
}

.project-banner {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin: 2rem 0;
}

/* Feature cards grid on project page */
.feature-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem 5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.feature-card-media {
  aspect-ratio: 16/9;
  background: var(--surface-2);
  overflow: hidden;
}

.feature-card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.feature-card-body { padding: 1.1rem 1.25rem; }

.feature-card-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.feature-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.feature-card-desc {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.55;
}

a.feature-card--link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s;
}

a.feature-card--link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

a.feature-card--link .feature-card-title {
  color: var(--accent);
}

.feature-card-arrow {
  opacity: 0.6;
  font-size: 0.85em;
}

/* ============================================================
   ABOUT / CV
   ============================================================ */
/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-hero {
  padding-top: 5rem;
  padding-bottom: 3rem;
}

.about-name {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
  margin-top: 0.75rem;
}

.about-stats {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}

.about-stat {
  display: flex;
  flex-direction: column;
}

.about-stat-num {
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  font-family: var(--font-mono);
}

.about-stat-suffix {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
}

.about-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 5rem;
  padding-bottom: 6rem;
  align-items: start;
}

.about-bio p {
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.about-skills {
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 2rem;
  padding: 0.3rem 0.85rem;
  transition: border-color 0.2s, color 0.2s;
}

.skill-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

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

.cv-section-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

/* ── Timeline ── */
.timeline {
  position: relative;
  padding-left: 1.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--border) 80%, transparent);
}

.timeline-entry {
  position: relative;
  padding-bottom: 2rem;
}

.timeline-dot {
  position: absolute;
  left: -1.5rem;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  transform: translateX(-4px);
  transition: background 0.2s;
  z-index: 1;
}

.timeline-entry:hover .timeline-dot {
  background: var(--accent);
}

.timeline-tooltip {
  position: fixed;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: 2rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 200;
  transform: translate(calc(-100% - 12px), -50%);
}

.timeline-duration {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}

.timeline-name {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.timeline-employer {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
}

.timeline-intro {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.timeline-bullets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.timeline-bullets li {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  padding-left: 1rem;
  position: relative;
}

.timeline-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 2.5rem 2rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
}

.footer-links a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: color 0.15s;
}

.contact-link:last-child { border-bottom: none; }

.contact-link:hover { color: var(--accent); text-decoration: none; }
.contact-link:hover svg { color: var(--accent); }

.contact-link--static { cursor: default; }
.contact-link--static:hover { color: var(--text); }

.contact-link svg { flex-shrink: 0; color: var(--text-muted); transition: color 0.15s; }

.contact-link-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.1rem;
}

.contact-link-value {
  font-size: 0.9rem;
}

/* ============================================================
   PAGE HERO (generic inner pages)
   ============================================================ */
.page-hero {
  padding: 5rem 2rem 3rem;
  max-width: var(--max-w);
  margin: 0 auto;
  margin-bottom: 3rem;
}

.page-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.page-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 560px;
}

/* ============================================================
   PAGE TRANSITIONS
   ============================================================ */
body.page-enter #main-content {
  animation: pageFadeIn 0.35s ease forwards;
}

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

body.page-exit #main-content {
  animation: pageFadeOut 0.2s ease forwards;
}

@keyframes pageFadeOut {
  to { opacity: 0; transform: translateY(-8px); }
}

/* ============================================================
   CASE STUDY
   ============================================================ */
.case-study {
  padding-top: 3rem;
  padding-bottom: 2rem;
}

.case-study-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.case-study-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.case-study-block--wide {
  grid-column: 1 / -1;
  background: transparent;
  border-color: var(--accent);
  position: relative;
}

.case-study-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.case-study-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.project-tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.25rem;
}

.project-hero {
  padding-top: 4rem;
  padding-bottom: 2rem;
}

.project-hero-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-bottom: 2rem;
  transition: color 0.15s;
}

.project-hero-back:hover { color: var(--accent); text-decoration: none; }

.project-hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.project-hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.75;
}

/* ============================================================
   404 PAGE
   ============================================================ */
.not-found {
  padding-top: 6rem;
  padding-bottom: 4rem;
  max-width: 560px;
}

.not-found-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

.not-found-sub {
  color: var(--text-muted);
  font-size: 1rem;
}

.not-found-game {
  margin-top: 4rem;
}

.not-found-hint {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  margin-bottom: 0.75rem;
  transition: opacity 0.3s;
}

#gameCanvas {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: block;
  cursor: pointer;
  width: 100%;
  max-width: 480px;
}

/* ============================================================
   SCROLL FADE-IN
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   HERO STAGGER ANIMATION
   ============================================================ */
.hero-eyebrow,
.hero-title,
.hero-body,
.hero-actions {
  opacity: 0;
  transform: translateY(16px);
  animation: heroIn 0.6s ease forwards;
}
.hero-eyebrow  { animation-delay: 0.05s; }
.hero-title    { animation-delay: 0.18s; }
.hero-body     { animation-delay: 0.30s; }
.hero-actions  { animation-delay: 0.42s; }

@keyframes heroIn {
  to { opacity: 1; transform: none; }
}

/* ============================================================
   NAV ACTIVE LINK
   ============================================================ */
.nav-links a.nav-active:not(.nav-cta) {
  color: var(--text);
}
.nav-links a.nav-active:not(.nav-cta)::after {
  content: '';
  display: block;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  margin-top: 2px;
}

/* ============================================================
   STICKY FILTER BAR
   ============================================================ */
.work-filter-wrap {
  position: sticky;
  top: 57px;
  z-index: 90;
  padding: 0.75rem 0 0.5rem;
  margin-bottom: 0;
}

.filter-inner {
  background: rgba(13,15,18,0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem 1.25rem 0.5rem;
}

/* ============================================================
   CARD IMAGE CYCLING
   ============================================================ */
.project-card-media {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--surface-2);
  position: relative;
}

.project-card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.project-card-media img.active {
  opacity: 1;
}

.project-card:hover .project-card-media img.active {
  transform: scale(1.04);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    padding-top: 3rem;
    gap: 2.5rem;
  }

  .hero-media {
    max-width: 100%;
    width: 100%;
  }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-stats { gap: 2rem; }

  .case-study-grid { grid-template-columns: 1fr; }
  .case-study-block--wide { grid-column: 1; }

  .nav { padding: 0.9rem 1rem; gap: 0.75rem; }
  .nav-logo { font-size: 0.8rem; white-space: nowrap; }
  .nav-links { gap: 0.9rem; }
  .nav-links a { font-size: 0.8rem; white-space: nowrap; }

  /* CTA collapses to a mail icon */
  .nav-cta { padding: 0.45rem; }
  .nav-cta-icon { display: block; }
  .nav-cta-text { display: none; }

  /* Compact filter bar: small search, one scrollable pill row */
  .filter-inner { padding: 0.6rem 0.75rem 0.4rem; }

  .project-search {
    font-size: 0.85rem;
    padding: 0.45rem 0.8rem;
    margin-bottom: 0.4rem;
  }

  .tag-filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.4rem;
  }
  .tag-filter::-webkit-scrollbar { display: none; }

  .tag-pill {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.65rem;
    padding: 0.3rem 0.7rem;
  }
}

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

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  transform: scale(0.95);
  transition: transform 0.2s;
}

.lightbox.is-open .lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

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

.feature-card:not(a) .feature-card-media img { cursor: zoom-in; }

.project-play-btn { margin-top: 1.5rem; }
