/* ==========================================================================
   DESIGN TOKENS & VARIABLES
   ========================================================================== */
:root {
  /* Colors */
  --bg-primary: #000000;
  --bg-secondary: rgba(10, 10, 12, 0.4);
  --bg-card: rgba(16, 16, 20, 0.55);
  --bg-accent: rgba(22, 22, 30, 0.8);

  --gold: #c9a96e;
  --gold-light: #e8cfa0;
  --gold-dark: #9a7a4a;
  --gold-glow: rgba(201, 169, 110, 0.15);

  --txt-primary: #f0eee8;
  --txt-secondary: #9a9490;
  --txt-muted: #8c8a86;

  --border: rgba(201, 169, 110, 0.14);
  --border-sub: rgba(255, 255, 255, 0.05);

  /* Typography */
  --font-d: 'Outfit', sans-serif;
  --font-b: 'Space Grotesk', sans-serif;

  /* Radii */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 16px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
  background-image: radial-gradient(circle at 50% 40%, rgba(201, 169, 110, 0.15) 0%, rgba(0, 0, 0, 1) 80%);
  background-attachment: fixed;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background-color: transparent;
  color: var(--txt-primary);
  font-family: var(--font-b);
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Grain Overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background-image: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
  opacity: 0.04;
  mix-blend-mode: overlay;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-d);
  font-weight: 700;
  line-height: 1.2;
}

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

ul {
  list-style: none;
}

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

/* ==========================================================================
   ANIMATIONS & UTILITIES
   ========================================================================== */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
  .nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    /* Transiciones específicas para evitar destellos blancos */
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, padding 0.4s ease, border-color 0.4s ease;
    padding: 1.5rem 0;
    background-color: rgba(0, 0, 0, 0);
    border-bottom: 1px solid transparent;
  }
  
  .nav.scrolled {
    padding: 1rem 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-sub);
  }

  /* Primicia page only: smooth dark fade from top for contrast without harsh flat box */
  .nav.nav-primicia {
    background: linear-gradient(180deg, rgba(6, 6, 8, 0.75) 0%, rgba(6, 6, 8, 0.35) 60%, rgba(6, 6, 8, 0) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: none;
  }

  .nav.nav-primicia.scrolled {
    background-color: rgba(8, 8, 12, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-sub);
  }

  .nav.nav-primicia .nav-link {
    color: rgba(255, 255, 255, 0.82);
  }

  .nav.nav-primicia .nav-link:hover {
    color: var(--gold-light);
  }
  
  .nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    position: relative; /* Necesario para anclar el botón derecho */
  }
  
  .nav-logo {
    font-family: 'Alien Block', sans-serif;
    font-size: 2.05rem;
    font-weight: 400;
    font-style: normal;
    color: #C9A96F;
    letter-spacing: 2px;
    opacity: 1;
    pointer-events: auto;
    text-decoration: none;
    line-height: 1;
    display: flex;
    align-items: center;
  }

  .nav-links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2rem;
    align-items: center;
  }

.nav-link {
  font-size: 0.9rem;
  color: var(--txt-secondary);
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--txt-primary);
}

.nav-link.active {
  color: var(--gold);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--gold);
  border-radius: 2px;
}

.nav-cta {
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--gold);
  border-radius: var(--r-md);
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s ease;
  position: absolute;
  right: 2rem;
}

.nav-cta:hover {
  background-color: var(--gold);
  color: var(--bg-primary);
}

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 101;
}

.nav-burger span {
  display: block;
  width: 28px;
  height: 2px;
  background-color: var(--txt-primary);
  transition: all 0.3s ease;
}

.nav-mobile {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--bg-primary);
  z-index: 99;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

.nav-mobile .nav-cta {
  position: relative;
  right: auto;
  margin-top: 0.5rem;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  animation: fadeInVideo 1.5s ease 0.5s forwards;
}

@keyframes fadeInVideo {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 0 2rem;
}

.hero-eyebrow {
  display: block;
  font-size: 0.85rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 1rem;
  font-weight: 600;
}

.hero-name {
  font-family: var(--font-d);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  color: var(--txt-primary);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--txt-secondary);
  margin-bottom: 0.5rem;
  font-weight: 400;
}

.hero-loc {
  font-size: 0.9rem;
  color: var(--txt-muted);
  margin-bottom: 2.5rem;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.hero-btn {
  padding: 0.8rem 2rem;
  border-radius: var(--r-md);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  cursor: pointer;
}

/* ==========================================================================
   ELEGANT BUTTON STYLES OVERRIDE
   ========================================================================== */
.hero-btn, .viewer-btn, .contact-link, .contact-cv, .nav-cta {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: var(--txt-primary) !important;
  backdrop-filter: blur(10px);
  border-radius: 30px !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 20px rgba(0, 0, 0, 0.2);
}

.hero-btn:hover, .viewer-btn:hover, .contact-link:hover, .contact-cv:hover, .nav-cta:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25) !important;
  transform: translateY(-2px) scale(1.02);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 8px 30px rgba(0, 0, 0, 0.4);
}

.btn-primary {
  background: var(--gold) !important;
  color: var(--bg-primary) !important;
  border-color: var(--gold) !important;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(201, 169, 110, 0.2) !important;
}
.btn-primary:hover {
  background: var(--gold-light) !important;
  border-color: var(--gold-light) !important;
  color: #000 !important;
  box-shadow: 0 6px 25px rgba(201, 169, 110, 0.4) !important;
}

.filter-btn.active, .viewer-btn.active {
  background: rgba(201, 169, 110, 0.1);
  border-color: var(--gold) !important;
  color: var(--gold-light) !important;
  box-shadow: inset 0 1px 0 rgba(201, 169, 110, 0.3), 0 4px 20px rgba(201, 169, 110, 0.1);
}

.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translate(-50%, 20px);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.8s ease;
}

.scroll-indicator.ready {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.scroll-indicator.hidden {
  opacity: 0 !important;
  pointer-events: none;
}

.mouse {
  width: 24px;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  position: relative;
  transition: border-color 0.3s ease;
}

.scroll-indicator:hover .mouse {
  border-color: var(--gold);
}

.wheel {
  width: 4px;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.6);
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollWheel 2s cubic-bezier(0.15, 0.41, 0.69, 0.94) infinite;
}

.scroll-indicator:hover .wheel {
  background-color: var(--gold);
}

.scroll-text {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: color 0.3s ease;
}

.scroll-indicator:hover .scroll-text {
  color: var(--gold);
}

@keyframes scrollWheel {
  0% { top: 6px; opacity: 1; height: 6px; }
  20% { top: 6px; opacity: 1; height: 6px; }
  50% { top: 16px; opacity: 0; height: 10px; }
  51% { top: 6px; opacity: 0; height: 6px; }
  100% { top: 6px; opacity: 1; height: 6px; }
}

/* ==========================================================================
   GENERAL SECTIONS
   ========================================================================== */
.section {
  padding: 6rem 0;
  position: relative;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.2rem;
}

.section-title {
  font-family: var(--font-d);
  color: var(--gold);
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  white-space: nowrap;
}

.section-line {
  display: none;
}

.section-subtitle {
  color: var(--txt-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin-bottom: 3rem;
  line-height: 1.6;
}

/* ==========================================================================
   PROJECTS BENTO GRID
   ========================================================================== */
.filter-bar {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 5;
}

.filter-btn {
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  padding: 0.55rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #dcd8d3;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  letter-spacing: 0.015em;
  line-height: 1.25;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(201, 169, 110, 0.5);
  color: #ffffff;
  transform: translateY(-2px);
}

.filter-btn.active {
  background: rgba(201, 169, 110, 0.22);
  border-color: var(--gold);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(201, 169, 110, 0.28);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  grid-auto-rows: 280px;
}

.bento-item {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border-sub);
  background: #000;
  cursor: pointer;
  transition: all 0.4s ease;
}

.bento-item.wide {
  grid-column: span 2;
}

.bento-item.tall {
  grid-row: span 2;
}

/* Featured Project Item */
.bento-item.featured {
  grid-column: 1 / -1;
}

.viewer-canvas-wrap {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border-sub);
  background: radial-gradient(circle at center, #2a1f10 0%, #000000 80%);
}

.viewer-canvas {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 1;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.viewer-canvas.fade-out {
  opacity: 0;
}

#viewer-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--gold);
  font-family: var(--font-d);
  font-size: 1rem;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 2px;
}
#viewer-loading.active {
  opacity: 1;
}
/* Floating Hero Text - Aligned to Portfolio Aesthetics */
.viewer-glow-text {
  position: absolute;
  top: 10%;
  left: 5%;
  pointer-events: none;
  z-index: 10;
  width: 50%;
  max-width: 500px;
}

.viewer-badges-top {
  margin-bottom: 1.2rem;
}

.viewer-glow-text h2 {
  font-size: clamp(1.8rem, 2.5vw, 2.8rem);
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
  margin-bottom: 0.5rem;
  line-height: 1.1;
  font-family: var(--font-d);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.viewer-glow-text p {
  font-size: clamp(0.85rem, 0.9vw, 1rem);
  color: var(--txt-secondary);
  text-shadow: none;
  line-height: 1.5;
}

/* Vertical Model Switcher Menu */
.viewer-menu-vertical {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  pointer-events: auto;
}

.viewer-menu-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--txt-muted);
  margin-bottom: 0.3rem;
  font-family: var(--font-d);
  font-weight: 500;
}

.viewer-menu-item {
  font-size: clamp(0.9rem, 1vw, 1rem);
  font-weight: 500;
  color: var(--txt-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.6;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.viewer-menu-item:hover {
  opacity: 1;
  color: var(--txt-primary);
}

.viewer-menu-item.active {
  opacity: 1;
  color: var(--txt-primary);
  font-weight: 700;
}

.viewer-menu-item .dot {
  color: var(--gold);
  opacity: 0;
  transition: opacity 0.4s, transform 0.4s;
  font-size: 1.5rem;
  line-height: 0;
  transform: translateX(-5px);
}

.viewer-menu-item.active .dot {
  opacity: 1;
  transform: translateX(0);
}

.viewer-bottom-overlay {
  pointer-events: none; /* Let clicks pass through except on children */
}
.viewer-overlay-flex {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.bento-item.hidden {
  display: none;
}

.bento-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.6s ease;
  filter: brightness(0.7) grayscale(30%);
}

.bento-item:hover .bento-img {
  transform: scale(1.05);
  filter: brightness(1) grayscale(0%);
}

.bento-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.2) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.4rem;
  opacity: 1;
  pointer-events: none;
}

.bento-overlay-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  gap: 1rem;
}

.bento-overlay > * {
  pointer-events: auto;
}

.bento-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.9rem;
  background: rgba(201, 169, 110, 0.15);
  border: 1px solid rgba(201, 169, 110, 0.4);
  color: var(--gold-light);
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: nowrap;
  pointer-events: auto;
}

.bento-link-btn:hover {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
  box-shadow: 0 4px 15px rgba(201, 169, 110, 0.35);
  transform: translateY(-2px);
}

.bento-item:hover .bento-overlay {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.98) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
}

/* 3D Viewer overlay override - no dark hover shadow */
.featured-viewer-item .bento-overlay,
.featured-viewer-item:hover .bento-overlay {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.3) 25%, transparent 50%);
}

.bento-meta-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}

.bento-client-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gold-light);
  background: rgba(201, 169, 110, 0.15);
  border: 1px solid rgba(201, 169, 110, 0.3);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.bento-label {
  font-family: var(--font-d);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--txt-primary);
  margin-bottom: 0.2rem;
  transition: transform 0.4s ease;
}

.bento-cat {
  font-size: 0.72rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.bento-item:hover .bento-label,
.bento-item:hover .bento-cat {
  transform: translateY(0);
}

/* ==========================================================================
   3D VIEWER SECTION
   ========================================================================== */
.viewer-section {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-sub);
  border-bottom: 1px solid var(--border-sub);
}

.viewer-container {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: center;
}

.viewer-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.viewer-title {
  font-family: var(--font-d);
  font-size: 1.8rem;
  color: var(--txt-primary);
}

.method-desc {
  font-size: 0.78rem;
  color: var(--txt-secondary);
  line-height: 1.5;
}

.method-img {
  width: 100%;
  max-width: 180px;
  height: auto;
  margin-top: 1.5rem;
  object-fit: contain;
  opacity: 0.75;
  filter: drop-shadow(0 6px 15px rgba(0, 0, 0, 0.4));
  transition: transform 0.3s ease;
}

.viewer-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.viewer-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background-color: var(--bg-card);
  color: var(--txt-secondary);
  font-size: 0.8rem;
  transition: all 0.3s ease;
}

.viewer-btn:hover {
  border-color: var(--gold-dark);
  color: var(--txt-primary);
}

.viewer-btn.active {
  border-color: var(--gold);
  color: var(--gold);
  background-color: var(--gold-glow);
}

/* ==========================================================================
   ABOUT SECTION
   ========================================================================== */
.about-content {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.5rem;
  align-items: stretch;
}

.about-photo-wrap {
  position: relative;
  height: 100%;
}

.about-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
}

.about-text {
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--txt-secondary);
}

.about-text p {
  margin-bottom: 1rem;
}

.about-text .txt-hi {
  color: var(--gold-light);
  font-weight: 600;
}

.methodology {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.method-step {
  background-color: var(--bg-card);
  border: 1px solid var(--border-sub);
  border-radius: var(--r-md);
  padding: 3rem 1.5rem;
  text-align: center;
  backdrop-filter: blur(8px);
  cursor: default;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 250px;
  transition: all 0.3s ease;
}

.method-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold);
  font-family: var(--font-d);
  opacity: 0.5;
  margin-bottom: 0.5rem;
  display: block;
}

.method-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--txt-primary);
  margin: 0.5rem 0 0.3rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.method-desc {
  font-size: 0.72rem;
  color: var(--txt-muted);
  line-height: 1.5;
}

.method-img {
  width: 100%;
  max-width: 180px;
  height: auto;
  margin-top: 1.2rem;
  object-fit: contain;
  filter: drop-shadow(0 6px 15px rgba(0, 0, 0, 0.4));
  transition: transform 0.3s ease;
}

.skills-groups {
  margin-top: 5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.skills-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-content: flex-start;
}

.skills-group-title {
  width: 100%;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.5rem;
}

.skill-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--txt-secondary);
  background-color: rgba(255, 255, 255, 0.03);
  cursor: default;
}

.skill-chip.hi {
  border-color: var(--gold);
  color: var(--gold-light);
  background-color: rgba(201, 169, 110, 0.1);
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact {
  text-align: center;
  padding: 8rem 0;
}

.contact-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-family: var(--font-d);
  font-weight: 800;
  color: var(--txt-primary);
  margin-bottom: 1rem;
}

.contact-subtitle {
  color: var(--txt-secondary);
  margin: 1rem auto 2.5rem;
  max-width: 500px;
  font-size: 1rem;
  line-height: 1.6;
}

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

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  background-color: var(--bg-card);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--txt-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.contact-link:hover {
  border-color: var(--gold);
  color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.contact-cv {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  border-radius: var(--r-md);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.contact-cv:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(201, 169, 110, 0.2);
}

/* ==========================================================================
   MODAL
   ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.modal.active {
  opacity: 1;
  pointer-events: all;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  background-color: var(--bg-card);
  border-radius: var(--r-lg);
  overflow-y: auto;
  border: 1px solid var(--border);
  transform: scale(0.95);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--bg-accent);
  border: 1px solid var(--border);
  color: var(--txt-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  z-index: 3;
}

.modal-close:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: rotate(90deg);
}

.modal-img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  background: #08080a;
  display: block;
}

.modal-info {
  padding: 1.5rem 2rem;
}

.modal-title {
  font-family: var(--font-d);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--txt-primary);
  margin-bottom: 0.3rem;
}

.modal-cat {
  color: var(--gold);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
}

.modal-desc {
  color: var(--txt-secondary);
  font-size: 0.85rem;
  line-height: 1.7;
  margin-top: 0.8rem;
}

/* ==========================================================================
   REVIEWS / TESTIMONIALS SECTION
   ========================================================================== */
.reviews-section {
  background: radial-gradient(circle at 50% 20%, rgba(201, 169, 110, 0.06) 0%, rgba(5, 5, 8, 0.98) 75%);
  border-top: 1px solid var(--border-sub);
  position: relative;
}

.trust-banner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: rgba(201, 169, 110, 0.08);
  border: 1px solid rgba(201, 169, 110, 0.28);
  border-radius: var(--r-md);
  padding: 1rem 1.6rem;
  margin-bottom: 2.5rem;
  width: fit-content;
  max-width: 100%;
  flex-wrap: wrap;
}

.trust-rating {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.trust-stars {
  color: var(--gold);
  font-size: 1.15rem;
  letter-spacing: 2px;
}

.trust-score {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
}

.trust-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.15);
}

.trust-text {
  font-size: 0.88rem;
  color: #dcd8d3;
}

.trust-text strong {
  color: var(--gold-light);
}

/* Reviews Carousel Track & Cards */
.reviews-carousel-wrapper {
  position: relative;
  width: 100%;
  margin-top: 1.8rem;
}

.reviews-carousel-track {
  display: flex;
  gap: 1.4rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0.6rem 0.2rem 1rem 0.2rem;
  user-select: none;
  cursor: grab;
}

.reviews-carousel-track:active {
  cursor: grabbing;
}

.reviews-carousel-track::-webkit-scrollbar {
  display: none;
}

.reviews-carousel-track .review-card {
  flex: 0 0 calc((100% - (2 * 1.4rem)) / 3);
  min-width: calc((100% - (2 * 1.4rem)) / 3);
  max-width: calc((100% - (2 * 1.4rem)) / 3);
  scroll-snap-align: start;
  box-sizing: border-box;
  height: auto;
}

@media (max-width: 992px) {
  .reviews-carousel-track .review-card {
    flex: 0 0 calc((100% - 1.4rem) / 2);
    min-width: calc((100% - 1.4rem) / 2);
    max-width: calc((100% - 1.4rem) / 2);
  }
}

@media (max-width: 650px) {
  .reviews-carousel-track .review-card {
    flex: 0 0 100%;
    min-width: 100%;
    max-width: 100%;
  }
}

/* Reviews Carousel Navigation Controls */
.reviews-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 1.2rem;
}

.reviews-nav-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(18, 18, 24, 0.9);
  border: 1px solid var(--border-sub);
  color: var(--txt-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--tr-fast);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.reviews-nav-btn:hover {
  background: rgba(201, 169, 110, 0.15);
  border-color: var(--gold);
  color: var(--gold-light);
  transform: scale(1.06);
}

.reviews-nav-btn:active {
  transform: scale(0.96);
}

.reviews-dots {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.reviews-dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.22);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.reviews-dot.active {
  width: 26px;
  background: var(--gold);
  border-radius: 4px;
}

.review-card {
  background: rgba(16, 16, 22, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-lg);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: default;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.review-card:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 169, 110, 0.4);
  background: rgba(22, 22, 30, 0.9);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.55), 0 0 25px rgba(201, 169, 110, 0.1);
}

.review-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.9rem;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.review-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.review-name-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.review-name {
  font-family: var(--font-d);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.review-flag {
  font-size: 0.95rem;
}

.review-country {
  font-size: 0.75rem;
  color: var(--txt-muted);
}

.review-stars {
  color: var(--gold);
  font-size: 0.85rem;
  letter-spacing: 2px;
}

.review-badge-wrap {
  margin-bottom: 0.85rem;
}

.review-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--txt-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.review-badge.highlight {
  background: rgba(201, 169, 110, 0.15);
  color: var(--gold-light);
  border-color: rgba(201, 169, 110, 0.35);
}

.review-quote {
  font-size: 0.88rem;
  color: #e4e0db;
  line-height: 1.6;
  margin-bottom: 1.2rem;
  flex-grow: 1;
}

.review-bottom {
  display: flex;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.9rem;
}

.review-service {
  font-size: 0.72rem;
  color: var(--txt-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@media (max-width: 650px) {
  .trust-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }
  .trust-divider {
    display: none;
  }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  border-top: 1px solid var(--border-sub);
  padding: 1.5rem 0;
  background-color: var(--bg-primary);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-loc {
  font-size: 0.85rem;
  color: var(--txt-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.hero-loc span {
  color: var(--gold-dark);
}

.status-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  background-color: #4ade80; /* Verde brillante */
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
  animation: pulseGlow 2.5s infinite ease-in-out;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 4px rgba(74, 222, 128, 0.3); }
  50% { box-shadow: 0 0 14px rgba(74, 222, 128, 0.9); }
  100% { box-shadow: 0 0 4px rgba(74, 222, 128, 0.3); }
}

.footer-text {
  font-size: 0.65rem;
  color: var(--txt-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ==========================================================================
   RESPONSIVE DESIGN (Media Queries)
   ========================================================================== */
@media (max-width: 900px) {
  /* Navigation */
  .nav-inner {
    flex-direction: row-reverse;
    justify-content: space-between;
  }
  .nav-links, .nav-actions {
    display: none;
  }
  .nav-burger {
    display: flex;
  }
  .nav-mobile.active {
    display: flex;
  }
  
  /* Projects */
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-item.wide, .bento-item.featured {
    grid-column: span 2;
  }

  .featured-viewer-inner {
    grid-template-columns: 1fr;
  }

  .featured-viewer-info {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1.5rem;
  }

  .viewer-canvas-wrap {
    min-height: 280px;
  }
  
  /* 3D Viewer */
  .viewer-container {
    grid-template-columns: 1fr;
  }
  
  /* About Section */
  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .about-photo-wrap {
    max-width: 300px;
    margin: 0 auto;
  }
  .methodology {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  /* Hero */
  .hero-name {
    font-size: clamp(2.5rem, 10vw, 3rem);
  }
  .hero-btns {
    flex-direction: column;
    gap: 0.8rem;
  }
  
  /* Section Headers */
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .section-line {
    width: 100%;
    flex: none;
  }
  
  /* Filter bar horizontal scroll on mobile/tablet */
  .filter-bar {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 0.55rem;
    padding: 0.25rem 0.2rem 0.6rem 0.2rem;
    margin-bottom: 1.8rem;
    width: 100%;
  }
  .filter-bar::-webkit-scrollbar {
    display: none;
  }
  .filter-btn {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 0.55rem 1.15rem;
    font-size: 0.82rem;
  }

  /* Projects */
  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 290px;
    gap: 1.2rem;
  }
  .bento-item.wide, .bento-item.tall, .bento-item.featured {
    grid-column: span 1;
    grid-row: span 1;
    min-height: unset;
  }
  .bento-overlay {
    padding: 1.2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.96) 0%, rgba(0, 0, 0, 0.45) 60%, transparent 100%);
  }
  .bento-label {
    font-size: 1.2rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  }
  .bento-meta-head {
    margin-bottom: 0.35rem;
    gap: 0.5rem;
  }
  .bento-client-badge {
    font-size: 0.72rem;
    padding: 0.22rem 0.65rem;
  }
  .bento-cat {
    font-size: 0.74rem;
  }
  
  /* About Section */
  .methodology {
    grid-template-columns: 1fr;
  }
  .skills-groups {
    grid-template-columns: 1fr;
  }
  
  /* Footer */
  .footer-inner {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }
}

/* ==========================================================================
   PROJECT PAGES (CASOS DE ESTUDIO)
   ========================================================================== */
.project-page {
  width: 100%;
}

/* Hero */
.project-hero {
  position: relative;
  width: 100%;
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.project-hero-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
}
.project-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.project-hero-bg::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, var(--bg-primary) 0%, rgba(0,0,0,0.3) 100%);
  z-index: 1;
}
.project-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 0 2rem;
  margin-top: 5rem;
}
.project-meta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.project-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-glow);
  color: var(--gold-light);
  border: 1px solid var(--border);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}
.project-title {
  font-family: var(--font-d);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  color: var(--gold-light);
  line-height: 1;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}
.project-subtitle {
  font-family: var(--font-b);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--txt-primary);
  margin-bottom: 1.5rem;
  font-weight: 300;
}
.project-brief {
  color: var(--txt-secondary);
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

/* Sections */
.project-section {
  padding: 6rem 0;
  width: 100%;
}
.project-section.no-padding-top {
  padding-top: 0;
}
.project-section-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}
.project-text-block {
  max-width: 800px;
  margin: 0 0 3rem 0;
  text-align: left;
}
.project-text-block .section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  white-space: normal;
  line-height: 1.1;
}
.project-text-block .section-subtitle {
  font-size: 1.2rem;
  color: var(--txt-secondary);
  line-height: 1.6;
}

/* Grids */
.gallery-grid-1 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.gallery-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
.gallery-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.gallery-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  grid-auto-flow: dense;
  gap: 2rem;
}
.img-fluid {
  width: 100%;
  height: 100%;
  border-radius: var(--r-md);
  object-fit: cover;
  border: 1px solid var(--border-sub);
}
.mt-2 {
  margin-top: 2rem;
}

/* Footer Nav & Slider */
.project-footer {
  padding: 6rem 0;
  border-top: 1px solid var(--border-sub);
  position: relative;
  overflow: hidden;
}

.footer-slider-header {
  text-align: center;
  margin-bottom: 3rem;
}
.footer-slider-header h3 {
  font-family: var(--font-d);
  font-size: 2rem;
  color: var(--txt-primary);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.footer-slider-container {
  position: relative;
  width: 100%;
  /* Fade edges effect using mask-image */
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.footer-slider {
  display: flex;
  justify-content: safe center;
  gap: 2rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 2rem 10%; /* Extra padding so the first/last items aren't cut off by the mask */
  scroll-behavior: smooth;
  scrollbar-width: none; /* Hide scrollbar Firefox */
}
.footer-slider::-webkit-scrollbar {
  display: none; /* Hide scrollbar Chrome/Safari */
}

.slider-item {
  flex: 0 0 400px;
  scroll-snap-align: center;
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  display: block;
  text-decoration: none;
  aspect-ratio: 16/9;
}
@media (max-width: 768px) {
  .slider-item {
    flex: 0 0 85vw;
  }
}

.slider-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.6s ease;
  filter: brightness(0.6) grayscale(50%);
}

.slider-item:hover .slider-img {
  transform: scale(1.05);
  filter: brightness(1) grayscale(0%);
}

.slider-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
}

.slider-title {
  font-family: var(--font-d);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 0.3rem;
}

.slider-cat {
  font-size: 0.85rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Responsive */
@media (max-width: 768px) {
  .project-section-inner {
    padding: 0 1rem;
  }
  .project-text-block .section-title {
    font-size: 2rem;
  }
  .project-text-block .section-subtitle {
    font-size: 1rem;
  }
  .gallery-grid-1, .gallery-grid-2, .gallery-grid-3, .gallery-masonry {
    gap: 1rem;
  }
  .gallery-grid-2, .gallery-grid-3 {
    grid-template-columns: 1fr;
  }
  .gallery-masonry {
    grid-template-columns: 1fr;
  }
}

/* LANGUAGE SWITCHER */
.lang-switch { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: 0.9rem; color: var(--txt-primary); text-decoration: none; padding-left: 1rem; border-left: 1px solid rgba(255,255,255,0.2); }
.lang-switch span { opacity: 0.5; transition: opacity 0.3s; }
.lang-switch span.active { opacity: 1; }
.lang-switch:hover span:not(.active) { opacity: 0.8; }

/* FIX NAV ACTIONS OVERLAP */
@media (min-width: 901px) {
  .nav-actions { display: flex; align-items: center; position: absolute; right: 2rem; }
  .nav-actions .nav-cta { position: relative; right: auto; margin-right: 1rem; }
}
@media (max-width: 900px) {
  .nav-mobile .lang-switch { min-height: 44px; min-width: 44px; padding: 1rem 2rem; z-index: 100; pointer-events: auto; font-size: 1.2rem; }
}


/* Custom Video Wrapper */
.custom-video-wrapper {
  position: relative;
  width: 100%;
  margin: 2rem 0;
  border-radius: 8px;
  overflow: hidden;
  line-height: 0;
}

.custom-video-wrapper video {
  width: 100%;
  height: auto;
  display: block;
}

.unmute-btn {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease, background 0.3s ease;
  color: white;
  z-index: 10;
}

.custom-video-wrapper:hover .unmute-btn {
  opacity: 1;
}

.unmute-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.unmute-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* ==========================================================================
   CASE STUDY ARCHITECTURE & MEDIA BLOCKS (Web Interface Guidelines)
   ========================================================================== */
.case-study-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 6rem;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--gold-light);
  color: #000;
  padding: 0.8rem 1.2rem;
  font-weight: 700;
  z-index: 1000;
  border-radius: 4px;
  transition: top 0.2s;
  text-decoration: none;
}
.skip-link:focus-visible {
  top: 20px;
  outline: 2px solid #fff;
}

/* Meta Data Grid */
.case-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.8rem;
  background: rgba(18, 18, 22, 0.75);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--r-md);
  padding: 2.2rem 2.5rem;
  margin: -3rem auto 5rem;
  position: relative;
  z-index: 5;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}
.case-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.case-meta-label {
  font-family: var(--font-m);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold-light);
  font-weight: 600;
}
.case-meta-val {
  font-family: var(--font-b);
  font-size: 0.95rem;
  color: var(--txt-primary);
  line-height: 1.4;
}

/* Sections */
.case-section {
  margin-bottom: 5.5rem;
  scroll-margin-top: 100px;
}
.case-section-head {
  margin-bottom: 2rem;
}
.case-step-num {
  font-family: var(--font-m);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
  display: inline-block;
  font-weight: 600;
}
.case-step-title {
  font-family: var(--font-d);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  text-wrap: balance;
  margin-bottom: 1rem;
}
.case-lead-text {
  font-size: 1.35rem;
  color: #fff;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 1.2rem;
  text-wrap: pretty;
}
.case-body-text {
  font-size: 1.05rem;
  color: var(--txt-secondary);
  line-height: 1.7;
  max-width: 900px;
}

/* Hard Targets & Results Metrics */
.case-targets-grid,
.case-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.case-metric-card {
  background: rgba(18, 18, 22, 0.6);
  border: 1px solid var(--border-sub);
  border-radius: var(--r-md);
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color var(--tr-fast), transform var(--tr-fast);
}
.case-metric-card:hover {
  border-color: var(--border-hi);
  transform: translateY(-2px);
}
.case-metric-val {
  font-family: var(--font-d);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 800;
  color: var(--gold-light);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.case-metric-label {
  font-family: var(--font-b);
  font-size: 0.95rem;
  color: var(--txt-secondary);
  line-height: 1.4;
}

/* Constraints & Process & Decisions Cards */
.case-cards-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.case-feature-card {
  background: rgba(18, 18, 22, 0.5);
  border: 1px solid var(--border-sub);
  border-radius: var(--r-md);
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.case-feature-title {
  font-family: var(--font-d);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}
.case-feature-desc {
  font-size: 0.95rem;
  color: var(--txt-secondary);
  line-height: 1.6;
}

/* Callout / Learnings Quote Card */
.case-quote-card {
  background: linear-gradient(135deg, rgba(201, 169, 111, 0.08) 0%, rgba(18, 18, 22, 0.6) 100%);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-md);
  padding: 2.5rem;
  position: relative;
  margin: 2.5rem 0;
}
.case-quote-card blockquote {
  font-family: var(--font-b);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-style: italic;
  color: #fff;
  line-height: 1.6;
  margin: 0;
  text-wrap: pretty;
}

/* Media Mockup Blocks (IMG & VIDEO) */
.case-media-block {
  width: 100%;
  margin: 2rem 0;
  border-radius: var(--r-md);
  overflow: hidden;
  position: relative;
  background: #09090c;
  border: 1px dashed rgba(201, 169, 111, 0.4);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
  text-align: center;
  padding: 2.5rem 1.5rem;
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(201, 169, 111, 0.07) 0%, transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 32px 32px, 32px 32px;
  transition: border-color var(--tr-fast), box-shadow var(--tr-fast);
}
.case-media-block:hover {
  border-color: var(--gold-light);
  box-shadow: 0 20px 48px rgba(201, 169, 111, 0.14);
}
.case-media-block.media-video {
  border-style: solid;
  border-color: rgba(201, 169, 111, 0.45);
}
.media-placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  max-width: 540px;
}
.media-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.2rem;
  border-radius: 999px;
  font-family: var(--font-m);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.media-tag-badge.badge-video {
  background: rgba(201, 169, 111, 0.18);
  border: 1px solid var(--gold-light);
  color: var(--gold-light);
}
.media-tag-badge.badge-img {
  background: rgba(140, 160, 190, 0.15);
  border: 1px solid rgba(180, 200, 230, 0.4);
  color: #d8e4f0;
}
.media-big-type {
  font-family: var(--font-d);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 900;
  letter-spacing: 3px;
  line-height: 1;
  color: var(--gold-light);
  text-shadow: 0 4px 20px rgba(201, 169, 111, 0.25);
}
.case-media-block.media-img .media-big-type {
  color: #d8e4f0;
  text-shadow: 0 4px 20px rgba(180, 200, 230, 0.2);
}
.media-title-label {
  font-family: var(--font-d);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}
.media-desc-label {
  font-family: var(--font-b);
  font-size: 0.95rem;
  color: var(--txt-secondary);
  line-height: 1.5;
}
.media-tech-spec {
  font-family: var(--font-m);
  font-size: 0.75rem;
  letter-spacing: 1px;
  color: var(--txt-muted);
  text-transform: uppercase;
  margin-top: 0.2rem;
}

/* Media Grids */
.case-media-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.case-media-grid-2 .case-media-block,
.case-media-grid-2 .case-media-figure {
  margin: 0;
}

/* Real Media Figures in Case Study */
.case-media-figure {
  width: 100%;
  margin: 2.2rem 0;
  border-radius: var(--r-md);
  overflow: hidden;
  position: relative;
  background: #09090c;
  border: 1px solid var(--border-sub);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  display: block;
  cursor: default;
}
.case-media-figure img,
.case-media-figure video {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
}
.case-media-caption {
  padding: 1rem 1.4rem;
  background: rgba(14, 14, 18, 0.95);
  border-top: 1px solid var(--border-sub);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.case-media-caption-text {
  font-family: var(--font-b);
  font-size: 0.9rem;
  color: var(--txt-secondary);
  line-height: 1.5;
  flex: 1 1 250px;
}
.case-media-caption-title {
  color: #fff;
  font-weight: 600;
  display: inline-block;
  margin-right: 0.4rem;
}
.case-media-caption-tag {
  font-family: var(--font-m);
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold-light);
  background: rgba(201, 169, 111, 0.12);
  border: 1px solid rgba(201, 169, 111, 0.25);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .case-study-container {
    padding: 0 1.25rem 4rem;
  }
  .case-meta-grid {
    grid-template-columns: 1fr;
    padding: 1.5rem;
    margin-top: -1.5rem;
    margin-bottom: 3.5rem;
  }
  .case-section {
    margin-bottom: 3.5rem;
  }
  .case-media-block {
    min-height: 260px;
    padding: 1.8rem 1rem;
  }
}

/* ==========================================================================
   BLOG HUB & EDITORIAL ARTICLE SYSTEM (Apple & High-End Tech Aesthetic)
   ========================================================================== */

/* Reading Progress Bar (for single post) */
.blog-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 70%, #ffffff 100%);
  z-index: 1001;
  transition: width 0.1s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 0 12px var(--gold-glow);
}

/* Base Blog Container */
.blog-wrapper {
  max-width: 1240px;
  margin: 0 auto;
  padding: 8.5rem 1.75rem 6rem;
  position: relative;
  z-index: 2;
}

/* Header & Intro */
.blog-header {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 3.5rem;
}

.blog-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-b);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(201, 169, 110, 0.08);
  border: 1px solid rgba(201, 169, 110, 0.22);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.blog-eyebrow span {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}

.blog-title {
  font-family: var(--font-d);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 1.25rem;
}

.blog-subtitle {
  font-family: var(--font-b);
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--txt-secondary);
  font-weight: 400;
}

/* Controls: Category Filter Tabs & Instant Search */
.blog-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-sub);
  padding-bottom: 1.5rem;
}

.blog-filters {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.blog-filter-btn {
  font-family: var(--font-b);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--txt-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.blog-filter-btn:hover {
  color: #ffffff;
  border-color: rgba(201, 169, 110, 0.3);
  background: rgba(255, 255, 255, 0.06);
}

.blog-filter-btn.active {
  color: #000000;
  background: var(--gold);
  border-color: var(--gold);
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(201, 169, 110, 0.28);
}

.blog-filter-btn .count {
  font-size: 0.72rem;
  opacity: 0.7;
}

.blog-search-box {
  position: relative;
  min-width: 260px;
}

.blog-search-box input {
  width: 100%;
  background: rgba(20, 20, 26, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 0.55rem 1rem 0.55rem 2.4rem;
  color: #ffffff;
  font-family: var(--font-b);
  font-size: 0.88rem;
  outline: none;
  transition: all 0.25s ease;
  backdrop-filter: blur(12px);
}

.blog-search-box input:focus {
  border-color: var(--gold);
  background: rgba(25, 25, 34, 0.9);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
}

.blog-search-box svg {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--txt-muted);
  pointer-events: none;
}

/* ==========================================================================
   FEATURED HERO CARD (Apple Bento Flagship Card)
   ========================================================================== */
.blog-featured {
  margin-bottom: 4rem;
}

.blog-featured-card {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: linear-gradient(145deg, rgba(22, 22, 28, 0.85) 0%, rgba(12, 12, 16, 0.95) 100%);
  border: 1px solid rgba(201, 169, 110, 0.2);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65), 0 0 30px rgba(201, 169, 110, 0.04);
  transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  color: inherit;
  position: relative;
}

.blog-featured-card:hover {
  transform: translateY(-5px);
  border-color: rgba(201, 169, 110, 0.45);
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.8), 0 0 45px rgba(201, 169, 110, 0.12);
}

.blog-featured-content {
  padding: 3.5rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.blog-featured-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.blog-tag {
  font-family: var(--font-b);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold-light);
  background: rgba(201, 169, 110, 0.12);
  border: 1px solid rgba(201, 169, 110, 0.28);
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
}

.blog-tag.badge-featured {
  background: linear-gradient(135deg, rgba(201, 169, 110, 0.25) 0%, rgba(201, 169, 110, 0.08) 100%);
  border-color: var(--gold);
  color: #ffffff;
}

.blog-date, .blog-readtime {
  font-size: 0.82rem;
  color: var(--txt-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.blog-featured-title {
  font-family: var(--font-d);
  font-size: clamp(1.6rem, 2.8vw, 2.3rem);
  font-weight: 700;
  line-height: 1.2;
  color: #ffffff;
  margin-bottom: 1.2rem;
  transition: color 0.3s ease;
}

.blog-featured-card:hover .blog-featured-title {
  color: var(--gold-light);
}

.blog-featured-excerpt {
  font-family: var(--font-b);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--txt-secondary);
  margin-bottom: 2rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-author-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.blog-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.blog-author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--gold);
}

.blog-author-info {
  display: flex;
  flex-direction: column;
}

.blog-author-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff;
}

.blog-author-role {
  font-size: 0.75rem;
  color: var(--txt-muted);
}

.blog-read-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-b);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  transition: transform 0.25s ease, color 0.25s ease;
}

.blog-featured-card:hover .blog-read-cta {
  color: var(--gold-light);
  transform: translateX(4px);
}

.blog-featured-media {
  position: relative;
  overflow: hidden;
  min-height: 380px;
  background: #08080a;
}

.blog-featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}

.blog-featured-card:hover .blog-featured-media img {
  transform: scale(1.05);
}

.blog-featured-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(12, 12, 16, 0.8) 0%, rgba(12, 12, 16, 0) 40%);
  pointer-events: none;
}

/* ==========================================================================
   BLOG POSTS GRID
   ========================================================================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 5rem;
}

.blog-card {
  background: rgba(18, 18, 24, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  color: inherit;
  backdrop-filter: blur(16px);
  position: relative;
}

.blog-card:hover {
  transform: translateY(-6px);
  border-color: rgba(201, 169, 110, 0.35);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7), 0 0 25px rgba(201, 169, 110, 0.08);
  background: rgba(22, 22, 30, 0.85);
}

.blog-card-media {
  position: relative;
  width: 100%;
  padding-top: 58%; /* 16:9.3 Aspect */
  overflow: hidden;
  background: #0d0d12;
}

.blog-card-media img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover .blog-card-media img {
  transform: scale(1.06);
}

.blog-card-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
}

.blog-card-body {
  padding: 1.75rem 1.6rem 1.6rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.78rem;
  color: var(--txt-muted);
  margin-bottom: 0.85rem;
}

.blog-card-title {
  font-family: var(--font-d);
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.32;
  color: #ffffff;
  margin-bottom: 0.8rem;
  transition: color 0.3s ease;
}

.blog-card:hover .blog-card-title {
  color: var(--gold-light);
}

.blog-card-excerpt {
  font-family: var(--font-b);
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--txt-secondary);
  margin-bottom: 1.5rem;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.82rem;
}

.blog-card-link-text {
  font-weight: 600;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: transform 0.25s ease;
}

.blog-card:hover .blog-card-link-text {
  transform: translateX(3px);
  color: var(--gold-light);
}

/* ==========================================================================
   BLOG NEWSLETTER / CALLOUT (Apple Design Style)
   ========================================================================== */
.blog-subscribe-card {
  background: radial-gradient(circle at 50% 0%, rgba(201, 169, 110, 0.12) 0%, rgba(16, 16, 22, 0.8) 70%);
  border: 1px solid rgba(201, 169, 110, 0.25);
  border-radius: 20px;
  padding: 3.5rem 2rem;
  text-align: center;
  max-width: 860px;
  margin: 0 auto 4rem;
  position: relative;
  overflow: hidden;
}

.blog-subscribe-card h3 {
  font-family: var(--font-d);
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.blog-subscribe-card p {
  font-family: var(--font-b);
  font-size: 1rem;
  color: var(--txt-secondary);
  max-width: 580px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.blog-subscribe-form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  max-width: 500px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.blog-subscribe-form input {
  flex: 1 1 260px;
  background: rgba(8, 8, 12, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0.8rem 1.4rem;
  color: #ffffff;
  font-family: var(--font-b);
  font-size: 0.92rem;
  outline: none;
  transition: all 0.25s ease;
}

.blog-subscribe-form input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
}

.blog-subscribe-form button {
  padding: 0.8rem 1.8rem;
  background: var(--gold);
  color: #000000;
  font-family: var(--font-b);
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 18px rgba(201, 169, 110, 0.3);
}

.blog-subscribe-form button:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(201, 169, 110, 0.45);
}

/* ==========================================================================
   SINGLE BLOG POST TEMPLATE (Apple Newsroom & Tech Essay Style)
   ========================================================================== */
.post-article {
  max-width: 820px;
  margin: 0 auto;
  padding: 8rem 1.5rem 6rem;
  position: relative;
  z-index: 2;
}

.post-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-b);
  font-size: 0.88rem;
  color: var(--txt-muted);
  text-decoration: none;
  margin-bottom: 2.5rem;
  transition: all 0.25s ease;
}

.post-back-link:hover {
  color: var(--gold);
  transform: translateX(-4px);
}

.post-header {
  margin-bottom: 2.75rem;
}

.post-header-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.post-title {
  font-family: var(--font-d);
  font-size: clamp(2.2rem, 4.8vw, 3.4rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 1.5rem;
}

.post-lead {
  font-family: var(--font-b);
  font-size: 1.25rem;
  line-height: 1.65;
  color: #e5e5ea;
  font-weight: 400;
  margin-bottom: 2.25rem;
}

/* Author & Social Bar */
.post-author-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border-sub);
  border-bottom: 1px solid var(--border-sub);
  flex-wrap: wrap;
  gap: 1rem;
}

.post-share-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.post-share-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--txt-secondary);
  cursor: pointer;
  transition: all 0.25s ease;
}

.post-share-btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #000000;
  transform: translateY(-2px);
}

.post-share-btn svg {
  width: 16px;
  height: 16px;
}

/* Post Hero Media */
.post-hero-figure {
  margin: 0 -2rem 3.5rem;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #09090d;
}

.post-hero-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.post-figure-caption {
  padding: 0.9rem 1.4rem;
  font-size: 0.82rem;
  color: var(--txt-muted);
  background: rgba(14, 14, 18, 0.8);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Post Content Typography & Components */
.post-body {
  font-family: var(--font-b);
  font-size: 1.1rem;
  line-height: 1.78;
  color: #d6d5dc;
}

.post-body p {
  margin-bottom: 1.85rem;
}

.post-body p.drop-cap::first-letter {
  font-family: var(--font-d);
  font-size: 4rem;
  float: left;
  line-height: 0.8;
  padding-right: 0.6rem;
  padding-top: 0.15rem;
  color: var(--gold);
  font-weight: 800;
}

.post-body h2 {
  font-family: var(--font-d);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
  margin: 3.5rem 0 1.25rem;
  letter-spacing: -0.01em;
  position: relative;
}

.post-body h2::before {
  content: "";
  display: block;
  width: 32px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  margin-bottom: 0.9rem;
}

.post-body h3 {
  font-family: var(--font-d);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--gold-light);
  margin: 2.5rem 0 0.9rem;
}

.post-body ul, .post-body ol {
  margin-bottom: 2rem;
  padding-left: 1.5rem;
}

.post-body li {
  margin-bottom: 0.6rem;
}

.post-body strong {
  color: #ffffff;
  font-weight: 600;
}

/* Callout Box (Apple translucent card) */
.post-callout {
  background: rgba(20, 20, 28, 0.7);
  border: 1px solid rgba(201, 169, 110, 0.3);
  border-left: 4px solid var(--gold);
  border-radius: 12px;
  padding: 1.75rem 2rem;
  margin: 2.75rem 0;
  backdrop-filter: blur(16px);
}

.post-callout-title {
  font-family: var(--font-d);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-callout p {
  margin-bottom: 0;
  font-size: 0.98rem;
  line-height: 1.65;
  color: #e0dee6;
}

/* Blockquote */
.post-blockquote {
  border-left: 3px solid var(--gold);
  padding: 1rem 0 1rem 2rem;
  margin: 3rem 0;
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.55;
  color: #ffffff;
  background: transparent;
}

.post-blockquote-cite {
  display: block;
  font-size: 0.85rem;
  font-style: normal;
  color: var(--gold);
  margin-top: 0.75rem;
  font-weight: 600;
}

/* Code Snippet Box */
.post-code-block {
  background: #0b0b10;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  overflow: hidden;
  margin: 2.75rem 0;
}

.post-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-b);
  font-size: 0.78rem;
  color: var(--txt-muted);
}

.post-code-lang {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.post-code-dots {
  display: flex;
  gap: 6px;
}

.post-code-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.post-code-copy-btn {
  background: none;
  border: none;
  color: var(--txt-muted);
  font-family: var(--font-b);
  font-size: 0.78rem;
  cursor: pointer;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.post-code-copy-btn:hover {
  color: var(--gold);
}

.post-code-content {
  padding: 1.5rem 1.4rem;
  overflow-x: auto;
  font-family: 'Space Mono', Consolas, Monaco, monospace;
  font-size: 0.88rem;
  line-height: 1.65;
  color: #a9b7c6;
  tab-size: 2;
}

.post-code-content code {
  font-family: inherit;
}

/* Side by side image gallery inside post */
.post-image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 3rem 0;
}

.post-image-card {
  background: #0e0e14;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
}

.post-image-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.post-image-caption {
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  color: var(--txt-muted);
}

/* Post Tags */
.post-tags {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 3.5rem 0 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-sub);
}

.post-tag-item {
  font-size: 0.82rem;
  color: var(--txt-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.post-tag-item:hover {
  color: var(--gold);
  border-color: rgba(201, 169, 110, 0.3);
}

/* Post Author Bio Box */
.post-author-box {
  background: rgba(18, 18, 24, 0.8);
  border: 1px solid rgba(201, 169, 110, 0.2);
  border-radius: 16px;
  padding: 2.25rem;
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin-bottom: 5rem;
  backdrop-filter: blur(16px);
}

.post-author-box-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  flex-shrink: 0;
}

.post-author-box-content h4 {
  font-family: var(--font-d);
  font-size: 1.25rem;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

.post-author-box-content .role {
  font-size: 0.82rem;
  color: var(--gold);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.65rem;
  display: block;
}

.post-author-box-content p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--txt-secondary);
  margin-bottom: 1rem;
}

.post-author-box-links {
  display: flex;
  gap: 1rem;
}

.post-author-box-links a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-author-box-links a:hover {
  color: var(--gold-light);
  text-decoration: underline;
}

/* Related Posts Section */
.post-related-section {
  padding-top: 4rem;
  border-top: 1px solid var(--border-sub);
}

.post-related-heading {
  font-family: var(--font-d);
  font-size: 1.75rem;
  color: #ffffff;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.post-related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

/* Toast Notification (Copy Link Feedback) */
.blog-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: rgba(14, 14, 20, 0.95);
  border: 1px solid var(--gold);
  color: #ffffff;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-family: var(--font-b);
  font-size: 0.88rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px var(--gold-glow);
  z-index: 9999;
  opacity: 0;
  transform: translateY(15px);
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (Blog Hub & Post)
   ========================================================================== */
@media (max-width: 1024px) {
  .blog-featured-card {
    grid-template-columns: 1fr;
  }
  .blog-featured-media {
    min-height: 280px;
    order: -1;
  }
  .blog-featured-content {
    padding: 2.5rem 2rem;
  }
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .blog-wrapper, .post-article {
    padding-top: 6.5rem;
  }
  .blog-header {
    margin-bottom: 2.5rem;
  }
  .blog-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .blog-filters {
    overflow-x: auto;
    padding-bottom: 0.5rem;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .blog-filter-btn {
    white-space: nowrap;
  }
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .post-hero-figure {
    margin: 0 -1.5rem 2.5rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  .post-image-grid {
    grid-template-columns: 1fr;
  }
  .post-author-box {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1.5rem;
  }
  .post-author-box-links {
    justify-content: center;
  }
  .post-related-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   WIREFRAME & MAQUETA PLACEHOLDER ASSETS
   ========================================================================== */
.placeholder-img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(20, 20, 28, 0.75) 100%);
  border: 1px dashed rgba(201, 169, 110, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  color: var(--txt-muted);
  font-family: var(--font-b);
  font-size: 0.88rem;
  text-align: center;
  padding: 2rem 1.5rem;
  user-select: none;
  border-radius: 12px;
}

.placeholder-img svg {
  width: 38px;
  height: 38px;
  color: var(--gold);
  opacity: 0.7;
}

.placeholder-img .placeholder-label {
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.placeholder-img .placeholder-ratio {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: rgba(201, 169, 110, 0.1);
  border: 1px solid rgba(201, 169, 110, 0.25);
  color: var(--gold-light);
  font-family: monospace;
}

/* ==========================================================================
   BLOG EMPTY STATE (Coming Soon / Próximamente)
   ========================================================================== */
.blog-empty-hero {
  max-width: 860px;
  margin: 1rem auto 4.5rem;
}

.blog-empty-card {
  background: radial-gradient(circle at 50% 0%, rgba(201, 169, 110, 0.12) 0%, rgba(16, 16, 22, 0.9) 70%);
  border: 1px solid rgba(201, 169, 110, 0.25);
  border-radius: 24px;
  padding: 4.5rem 2.5rem;
  text-align: center;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.7), 0 0 35px rgba(201, 169, 110, 0.06);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
}

.blog-empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.75rem;
  border-radius: 50%;
  background: rgba(201, 169, 110, 0.1);
  border: 1px solid rgba(201, 169, 110, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
}

.blog-empty-icon svg {
  width: 28px;
  height: 28px;
}

.blog-empty-title {
  font-family: var(--font-d);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: #ffffff;
  margin: 1.25rem 0 1rem;
  line-height: 1.2;
}

.blog-empty-desc {
  font-family: var(--font-b);
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--txt-secondary);
  max-width: 640px;
  margin: 0 auto 2.5rem;
}

.blog-empty-topics {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.blog-empty-topic {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gold-light);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.45rem 1rem;
  border-radius: 999px;
}



