/* ============================================================
   Andrew Weyrich — Data Viz Portfolio
   Design tokens: soft white + periwinkle hero,
   dark project cards with electric-blue (Tron) accents.
   ============================================================ */

:root {
  /* Type scale */
  --text-xs:   clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl:  clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(2.75rem, 1rem + 5.5vw, 6rem);

  /* Spacing */
  --space-1: .25rem;  --space-2: .5rem;   --space-3: .75rem;
  --space-4: 1rem;    --space-5: 1.25rem; --space-6: 1.5rem;
  --space-8: 2rem;    --space-10: 2.5rem; --space-12: 3rem;
  --space-16: 4rem;   --space-20: 5rem;   --space-24: 6rem;
  --space-32: 8rem;

  /* Colors — light palette to match Fuselab hero */
  --color-bg:           #f2f3f6;       /* soft cool white */
  --color-surface:      #ffffff;
  --color-surface-2:    #f7f8fb;
  --color-text:         #091528;       /* near-black navy */
  --color-text-muted:   #4a5568;
  --color-text-faint:   #8a94a6;
  --color-border:       #dde1ea;
  --color-divider:      #e6e9f0;

  /* Accents */
  --color-periwinkle:   #b7c6ee;       /* soft blue in hero */
  --color-periwinkle-2: #8ba3e0;
  --color-accent:       #0066ff;       /* Fuselab-ish structural blue */
  --color-tron:         #00d4ff;       /* electric Tron blue for arrows */
  --color-tron-glow:    #4de9ff;
  --color-mint:         #1dec86;       /* optional CTA green (unused primary) */
  --color-magenta:      #e91e8c;       /* portfolio brand accent (logo/type) */
  --color-violet:       #7000ff;
  --color-blue-tag:     #1c63ec;

  /* Card / project palette (dark cover) */
  --card-bg:            #0b1220;
  --card-surface:       rgba(255, 255, 255, 0.06);

  /* Radii */
  --radius-sm: .375rem;
  --radius-md: .625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* Motion */
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:  cubic-bezier(0.4, 0, 0.2, 1);
  --transition-interactive: 220ms var(--ease-out);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(9, 21, 40, 0.06);
  --shadow-md: 0 8px 24px rgba(9, 21, 40, 0.08);
  --shadow-lg: 0 24px 60px rgba(9, 21, 40, 0.12);

  /* Fonts */
  --font-body:    'Inter', 'Helvetica Neue', system-ui, sans-serif;
  --font-display: 'Instrument Serif', 'Times New Roman', serif;

  /* Layout */
  --content-max:  1440px;
  --gutter:       clamp(1rem, 4vw, 2.5rem);
}

body { background: var(--color-bg); }

/* ============================================================
   Fixed hero canvas — stays behind everything as user scrolls.
   ============================================================ */
.hero-canvas-wrap {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 70% 40%, #ffffff 0%, #eef1f6 40%, #dfe3ec 100%);
}
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
/* Soft fade so the canvas gently transitions into the work section */
.hero-canvas-fade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 40vh;
  background: linear-gradient(to bottom,
    rgba(242, 243, 246, 0) 0%,
    rgba(242, 243, 246, 0.6) 50%,
    rgba(242, 243, 246, 1) 100%);
  pointer-events: none;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center; /* center the inner max-width container */
  padding: var(--space-5) var(--gutter);
  background: rgba(242, 243, 246, 0.6);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(221, 225, 234, 0.5);
}
.site-header-inner {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text);
}
.logo {
  padding-left: 45px; /* shifted right per design direction */
}
.logo-mark {
  width: 68px;
  height: 68px;
  flex-shrink: 0;
  mix-blend-mode: multiply;
}
.logo-mark-img {
  height: 68px;
  width: auto;
  display: block;
  flex-shrink: 0;
  align-self: center;
}
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  font-size: 1.55rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.logo-a { color: var(--color-magenta); font-weight: 700; }
.logo-tag {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--color-accent);
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 6px;
  letter-spacing: 0.01em;
}
.site-nav { display: flex; gap: var(--space-6); align-items: center; }
.nav-link {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--color-text-muted);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  transition: color var(--transition-interactive), background var(--transition-interactive);
  text-transform: lowercase;
  letter-spacing: 0.02em;
}
.nav-link:hover { color: var(--color-text); background: rgba(9, 21, 40, 0.04); }
.nav-link--caps { text-transform: uppercase; letter-spacing: 0.04em; }

/* Nav CTA — purple pill matching the logo mark gradient */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-full);
  background: #7c3aed;
  color: #ffffff;
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-interactive),
              background var(--transition-interactive),
              box-shadow var(--transition-interactive);
}
.nav-cta:hover {
  transform: translateY(-1px);
  background: #6d28d9;
  box-shadow: var(--shadow-md);
  color: #ffffff;
}
.nav-link--current {
  color: var(--color-text);
  font-weight: 600;
}

@media (max-width: 720px) {
  .logo { padding-left: 0; }
  .logo-mark, .logo-mark-img { width: 46px; height: 46px; margin-left: 0; }
  .logo-text { font-size: 1rem; }
  .logo-tag { display: none; }
  .site-nav { gap: var(--space-2); }
  .nav-link { padding: var(--space-2); font-size: 1rem; }
  .nav-cta { padding: var(--space-2) var(--space-4); font-size: 0.95rem; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: max(var(--space-16), 8vh) var(--gutter) var(--space-12);
  max-width: var(--content-max);
  margin-inline: auto;
}
.hero-inner { max-width: 900px; }

.hero-eyebrow {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-accent);
  margin-bottom: var(--space-6);
  /* Nudge right so the eyebrow's optical edge aligns with the hero title below.
     The wide letter-spacing pulls the first glyph visually left of the title. */
  padding-left: 5px;
}

.hero-title {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(2rem, 4.4vw, 3.5rem);
  color: var(--color-text);
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin-bottom: var(--space-5);
  max-width: 22ch;
}
.hero-title em {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  color: var(--color-magenta);
  letter-spacing: -0.01em;
}

.hero-sub {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  font-weight: 400;
  margin-bottom: var(--space-6);
  max-width: 40ch;
}
.hero-sub-accent { color: var(--color-magenta); font-weight: 500; }

.hero-cta-row {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}
.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: var(--text-sm);
  transition: transform var(--transition-interactive),
              background var(--transition-interactive),
              color var(--transition-interactive),
              box-shadow var(--transition-interactive);
}
.hero-btn--primary {
  background: var(--color-text);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}
.hero-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  background: #1a2a44;
}
.hero-btn--ghost {
  background: transparent;
  color: var(--color-text);
  border: 1px solid rgba(9, 21, 40, 0.15);
}
.hero-btn--ghost:hover {
  background: rgba(9, 21, 40, 0.04);
  border-color: rgba(9, 21, 40, 0.3);
}

.hero-contacts {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.contact-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.6);
  color: var(--color-text);
  border: 1px solid rgba(9, 21, 40, 0.08);
  transition: all var(--transition-interactive);
}
.contact-icon:hover {
  background: var(--color-text);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Get-in-touch pill with embedded contact icons */
.hero-touch-group {
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  background: transparent;
  color: var(--color-text);
  border: 1px solid rgba(9, 21, 40, 0.32);
  border-radius: var(--radius-full);
  padding: 0;
  overflow: hidden;
  transition: border-color var(--transition-interactive), background var(--transition-interactive);
}
.hero-touch-group:hover {
  border-color: rgba(9, 21, 40, 0.5);
}
.hero-btn--touch {
  border: 0;
  border-radius: 0;
  padding: var(--space-3) var(--space-5);
  background: transparent;
}
.hero-btn--touch:hover {
  background: rgba(9, 21, 40, 0.04);
}
.hero-touch-divider {
  width: 1px;
  background: rgba(9, 21, 40, 0.22);
  align-self: stretch;
  margin: 6px 0;
}
.hero-touch-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-3);
  color: var(--color-text-muted);
  transition: color var(--transition-interactive), background var(--transition-interactive);
}
.hero-touch-icon + .hero-touch-icon { border-left: 1px solid rgba(9, 21, 40, 0.18); }
.hero-touch-icon:hover {
  background: rgba(9, 21, 40, 0.04);
  color: var(--color-text);
}

.hero-tools {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.05em;
  padding-top: var(--space-4);
  border-top: 1px solid rgba(9, 21, 40, 0.08);
  max-width: 640px;
}
.tool-label { text-transform: uppercase; font-weight: 600; margin-right: var(--space-2); }
.tool { color: var(--color-text-muted); font-weight: 500; }
.tool-sep { color: var(--color-text-faint); }

.hero-scroll-hint {
  position: absolute;
  bottom: var(--space-8);
  left: var(--gutter);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
  padding: var(--space-3) 0;
}
.hero-scroll-hint svg {
  animation: bounce-y 2.4s var(--ease-in-out) infinite;
}
@keyframes bounce-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ============================================================
   Work section
   ============================================================ */
.work {
  position: relative;
  z-index: 2;
  background: #ffffff;
  padding: var(--space-24) var(--gutter) var(--space-20);
  border-top: 1px solid var(--color-divider);
}
.work-header {
  max-width: var(--content-max);
  margin: 0 auto var(--space-12);
}
.section-eyebrow {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}
.section-title {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--text-2xl);
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--space-8);
  max-width: 20ch;
}
.section-title em {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--color-magenta);
  font-weight: 400;
}
.work-header-meta {
  display: flex;
  justify-content: space-between;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-divider);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-text-faint);
  font-weight: 600;
}

/* Project grid */
.project-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: var(--content-max);
  margin: 0 auto;
}

.project-card {
  position: relative;
  display: block;
  aspect-ratio: 2.5 / 1;
  border-radius: 24px;
  overflow: hidden;
  background-color: var(--card-bg);
  background-size: cover;
  background-position: center;
  isolation: isolate;
  cursor: pointer;
  transition: transform 450ms var(--ease-out);
}
.project-card:hover { transform: translateY(-2px); }

/* Media layer inherits the parent card's background image and applies
   grayscale + brightness. Using `inherit` keeps the relative URL resolving
   against the HTML file, not the stylesheet. */
.project-card-media {
  position: absolute;
  inset: 0;
  background-image: inherit;
  background-size: cover;
  background-position: center;
  filter: grayscale(0.85) brightness(0.55) contrast(1.05);
  transition: filter 550ms var(--ease-out), transform 900ms var(--ease-out);
  transform: scale(1.02);
}
.project-card:hover .project-card-media {
  filter: grayscale(0) brightness(0.9) contrast(1);
  transform: scale(1.05);
}

/* Vignette overlay for readability */
.project-card-overlay {
  position: absolute;
  inset: 0;
  padding: clamp(1.25rem, 2.5vw, 2rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(to bottom,
      rgba(11, 18, 32, 0.55) 0%,
      rgba(11, 18, 32, 0.1) 22%,
      rgba(11, 18, 32, 0.05) 45%,
      rgba(11, 18, 32, 0.7) 78%,
      rgba(11, 18, 32, 0.92) 100%);
}

.project-tags {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.project-tags--right { align-self: flex-end; }
/* Row of top tags: left + right */
.project-card-overlay > .project-tags--left {
  order: 1;
}
.project-card-overlay > .project-tags--right {
  order: 2;
  position: absolute;
  top: clamp(1.25rem, 2.5vw, 2rem);
  right: calc(clamp(1.25rem, 2.5vw, 2rem) + 60px); /* leave clearance for the arrow */
  justify-content: flex-end;
  max-width: 55%;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.tag--violet {
  background: rgba(112, 0, 255, 0.22);
  color: #d5c1ff;
  border: 1px solid rgba(112, 0, 255, 0.35);
}
.tag--blue {
  background: rgba(28, 99, 236, 0.22);
  color: #b8ceff;
  border: 1px solid rgba(28, 99, 236, 0.4);
}
.tag--service {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.project-card-footer {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
}
.project-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.8vw, 2.5rem);
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1.05;
  max-width: 80%;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.4);
}

/* Tron-blue arrow — the signature detail */
.project-arrow {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 8, 20, 0.45);
  border: 1.5px solid var(--color-tron);
  color: var(--color-tron);
  transition: all 300ms var(--ease-out);
  box-shadow:
    0 0 0 0 rgba(0, 212, 255, 0.5),
    inset 0 0 12px rgba(0, 212, 255, 0.15);
}
.project-arrow svg {
  transition: transform 300ms var(--ease-out);
}
.project-card:hover .project-arrow {
  background: rgba(0, 212, 255, 0.12);
  border-color: var(--color-tron-glow);
  color: var(--color-tron-glow);
  box-shadow:
    0 0 0 4px rgba(0, 212, 255, 0.15),
    0 0 30px rgba(0, 212, 255, 0.4),
    inset 0 0 20px rgba(0, 212, 255, 0.25);
}
.project-card:hover .project-arrow svg {
  transform: translate(2px, -2px);
}

@media (max-width: 900px) {
  .project-card { aspect-ratio: 4 / 3; }
  .project-card-overlay > .project-tags--right {
    position: static;
    max-width: 100%;
    margin-top: var(--space-2);
    justify-content: flex-start;
  }
  .project-arrow { width: 48px; height: 48px; }
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  position: relative;
  z-index: 2;
  background: var(--color-text);
  color: #e7ecf5;
  padding: var(--space-20) var(--gutter) var(--space-8);
}
.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-12);
  flex-wrap: wrap;
  padding-bottom: var(--space-12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-title {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--text-2xl);
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: var(--space-3);
}
.footer-sub {
  color: rgba(231, 236, 245, 0.6);
  font-size: var(--text-base);
}
.footer-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-4);
}
.footer-cta {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-xl);
  color: var(--color-tron);
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-color: rgba(0, 212, 255, 0.35);
  transition: text-decoration-color var(--transition-interactive);
}
.footer-cta:hover { text-decoration-color: var(--color-tron); }
.footer-links {
  display: flex;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: rgba(231, 236, 245, 0.6);
}
.footer-links a { transition: color var(--transition-interactive); }
.footer-links a:hover { color: #ffffff; }

.footer-meta {
  max-width: var(--content-max);
  margin: 0 auto;
  padding-top: var(--space-6);
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: rgba(231, 236, 245, 0.4);
  letter-spacing: 0.05em;
}

@media (max-width: 720px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-actions { align-items: flex-start; }
  .footer-meta { flex-direction: column; gap: var(--space-2); }
}

/* ============================================================
   TOOLS BAND (logo strip below hero)
   ============================================================ */
.tools-band {
  position: relative;
  z-index: 2;
  background: #ffffff;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.25rem, 5vw, 3rem);
}
.tools-band-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: center;
}
.tools-band-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.55);
  font-weight: 600;
}
.tools-band-logos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  justify-items: center;
  width: 100%;
}
.tools-band-logos img,
.tools-band-logos svg {
  height: clamp(28px, 4vw, 44px);
  width: auto;
  max-width: 100%;
  color: #0f172a;
  fill: currentColor;
  opacity: 0.85;
  transition: opacity 200ms ease, transform 200ms ease;
}
.tools-band-logos a:hover img,
.tools-band-logos a:hover svg {
  opacity: 1;
  transform: translateY(-2px);
}
@media (max-width: 640px) {
  .tools-band-logos {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 2rem;
  }
}

/* ============================================================
   CASE STUDIES SECTION (2-col framed thumbs with title/tags below)
   ============================================================ */
.case-studies {
  padding: clamp(4rem, 10vw, 8rem) clamp(1.25rem, 5vw, 3rem);
  background: #f8f9fb;
  position: relative;
  z-index: 2;
}
.case-studies-inner {
  max-width: 1400px;
  margin: 0 auto;
}
.case-studies-header {
  margin-bottom: clamp(2rem, 5vw, 4rem);
}
.case-studies-title {
  font-family: var(--font-sans);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin: 0;
}
.case-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem) clamp(2rem, 4vw, 3rem);
}
@media (max-width: 720px) {
  .case-grid { grid-template-columns: 1fr; }
}
.case-item {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 220ms ease;
}
.case-item:hover {
  transform: translateY(-3px);
}
.case-thumb {
  background: #eceff3;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 6px;
  padding: clamp(1rem, 2.5vw, 1.75rem);
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: box-shadow 220ms ease, border-color 220ms ease;
}
.case-item:hover .case-thumb {
  box-shadow: 0 20px 60px -20px rgba(15, 23, 42, 0.35);
  border-color: rgba(15, 23, 42, 0.18);
}
.case-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.case-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 0.25rem;
}
.case-title {
  font-family: var(--font-sans);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.01em;
}
.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: rgba(15, 23, 42, 0.68);
  font-weight: 500;
}
.case-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.9rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(0, 67, 255, 0.3);
  border-radius: 999px;
  color: #0043ff;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}
.case-item:hover .case-cta {
  background: #0043ff;
  border-color: #0043ff;
  color: #ffffff;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 20, 0.94);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  opacity: 0;
  transition: opacity 240ms ease;
}
.lightbox.is-open {
  display: flex;
  opacity: 1;
}
.lightbox-content {
  position: relative;
  max-width: min(1400px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
.lightbox-img {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
}
.lightbox-caption {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  flex-wrap: wrap;
  justify-content: center;
}
.lightbox-caption strong {
  font-weight: 600;
  color: #ffffff;
}
.lightbox-fullsize {
  color: #7bd7ff; /* Tron blue */
  text-decoration: none;
  background: transparent;
  border: 1px solid rgba(123, 215, 255, 0.5);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.lightbox-fullsize:hover {
  background: rgba(123, 215, 255, 0.12);
  border-color: rgba(123, 215, 255, 0.9);
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}
.lightbox-close:hover {
  background: rgba(15, 23, 42, 0.95);
  border-color: #ffffff;
  transform: scale(1.05);
}
.lightbox-close svg {
  width: 22px;
  height: 22px;
}

/* ---- Full-size viewer (stacked above lightbox) ---- */
.fullsize {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 20, 0.96);
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
}
.fullsize.is-open {
  opacity: 1;
  visibility: visible;
}
.fullsize-scroll {
  width: 100%;
  height: 100%;
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}
.fullsize-img {
  display: block;
  max-width: none;
  max-height: none;
  width: auto;
  height: auto;
  margin: 0 auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.fullsize-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3010;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}
.fullsize-close:hover {
  background: rgba(15, 23, 42, 1);
  border-color: #ffffff;
  transform: scale(1.05);
}
