/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  --text: #f8f7f9;
  --muted: rgba(248,247,249,0.65);
  --muted-soft: rgba(248,247,249,0.55);
  --muted-faint: rgba(248,247,249,0.35);
  --accent: #FDD60D;
  font-family: 'DM Sans', sans-serif;
  background: #080808;
  color: #f8f7f9;
  line-height: 1.55;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; background: none; border: none; color: inherit; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.container { max-width: 1060px; margin: 0 auto; padding: 0 24px; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.section-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(2.75rem, 8vw, 6.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 1.25rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 1.5px solid #f8f7f9; border-radius: 100px;
  padding: 0.8rem 1.8rem; font-size: 1rem; font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.btn-primary:hover {
  background: #FDD60D; color: #080808; border-color: #FDD60D;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(253, 214, 13, 0.25);
}
.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 1.5px solid rgba(248,247,249,0.35); border-radius: 100px;
  padding: 0.8rem 1.8rem; font-size: 1rem; font-weight: 500;
  color: rgba(248,247,249,0.75);
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}
.btn-secondary:hover {
  border-color: #f8f7f9; color: #f8f7f9;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255,255,255,0.08);
}

.glow {
  --glow-line-color: #fff;
  --glow-line-thickness: 2px;
  --glow-line-length: 20;
  --glow-blur-color: #fff;
  --glow-blur-size: 10px;
  --animation-speed: 1200ms;
  --container-offset: 100px;
  --glow-outset: 2px;
  --glow-outset-double: 4px;
  position: relative;
  overflow: visible;
}

.glow-container {
  pointer-events: none;
  position: absolute;
  inset: calc(var(--container-offset) / -2);
  width: calc(100% + var(--container-offset));
  height: calc(100% + var(--container-offset));
  opacity: 0;
  overflow: visible;
}

.glow-blur,
.glow-line {
  width: calc(100% - var(--container-offset) + var(--glow-outset-double));
  height: calc(100% - var(--container-offset) + var(--glow-outset-double));
  x: calc((var(--container-offset) / 2) - var(--glow-outset));
  y: calc((var(--container-offset) / 2) - var(--glow-outset));
  fill: transparent;
  stroke: black;
  stroke-width: 5px;
  stroke-dasharray: var(--glow-line-length) calc(50 - var(--glow-line-length));
}

.glow-blur {
  filter: blur(var(--glow-blur-size));
  stroke: var(--glow-blur-color);
  stroke-width: calc(var(--glow-blur-size) * 0.8);
}

.glow-line {
  stroke: var(--glow-line-color);
  stroke-width: var(--glow-line-thickness);
}

.glow:is(:hover, :focus) .glow-blur,
.glow:is(:hover, :focus) .glow-line,
.glow:focus-visible .glow-blur,
.glow:focus-visible .glow-line {
  stroke-dashoffset: -80px;
  transition: stroke-dashoffset var(--animation-speed) ease-in, stroke-dasharray var(--animation-speed) ease-in;
}

.glow:is(:hover, :focus) .glow-container,
.glow:focus-visible .glow-container {
  animation: glow-visibility var(--animation-speed) ease-in;
}

@keyframes glow-visibility {
  0%, 100% { opacity: 0; }
  25%, 75% { opacity: 1; }
}

/* ============================================================
   NAVIGATION (glassmorphism + shrink on scroll)
   ============================================================ */
#main-nav {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(8,8,8,0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: padding 0.35s cubic-bezier(0.23, 1, 0.32, 1),
              background 0.35s;
  padding: 0.9rem 0;
}
#main-nav.nav-scrolled {
  padding: 0.4rem 0;
  background: rgba(8,8,8,0.9);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.nav-container {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1060px; margin: 0 auto; padding: 0 24px;
}
.logo-brand {
  display: inline-flex; align-items: center; gap: 0.75rem;
  color: #f8f7f9; transition: transform 0.25s ease;
}
.logo-brand:hover { transform: translateY(-1px); }
.logo-brand img {
  width: 54px; height: 54px; object-fit: contain;
  border-radius: 0.35rem; padding: 2px;
  background: transparent;
}
.logo-brand span {
  font-size: 1.5rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: #f8f7f9;
  transition: font-size 0.35s;
}
.nav-scrolled .logo-brand span { font-size: 1.4rem; }
.desktop-nav { display: flex; gap: 2rem; }
.nav-link {
  font-size: 0.9375rem; font-weight: 500;
  color: rgba(248,247,249,0.55);
  transition: color 0.25s;
  padding-bottom: 2px;
  border-bottom: 1.5px solid transparent;
}
.nav-link:hover { color: rgba(248,247,249,0.9); }
.nav-link.active { color: #f8f7f9; border-bottom-color: #FDD60D; }
.nav-icons { display: flex; gap: 1.1rem; align-items: center; }
.nav-icons a { color: rgba(248,247,249,0.55); transition: color 0.25s; }
.nav-icons a:hover { color: #f8f7f9; }

.sticky-controls {
  position: sticky;
  top: 4.25rem;
  z-index: 990;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0.75rem 24px 0;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.theme-toggle,
.language-toggle {
  position: relative;
  width: 3.2rem;
  height: 1.75rem;
  border-radius: 100px;
  border: 1px solid rgba(248,247,249,0.18);
  background: rgba(248,247,249,0.08);
  color: #f8f7f9;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.45rem;
  transition: border-color 0.25s, background 0.25s, color 0.25s;
  pointer-events: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.theme-toggle::after,
.language-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(1.75rem - 6px);
  height: calc(1.75rem - 6px);
  border-radius: 50%;
  background: #FDD60D;
  box-shadow: 0 4px 14px rgba(253,214,13,0.35);
  transition: transform 0.25s ease, background 0.25s ease;
}
.theme-toggle:hover,
.language-toggle:hover {
  border-color: rgba(253,214,13,0.5);
  background: rgba(253,214,13,0.12);
}
.theme-icon,
.lang-option {
  position: relative;
  z-index: 1;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}
.theme-icon-moon {
  font-size: 0.58rem;
}
.language-toggle {
  width: 3.65rem;
}
.language-toggle::after {
  width: calc(1.82rem - 6px);
}
.lang-option {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}
.language-toggle.is-spanish::after {
  transform: translateX(1.82rem);
}

.mobile-menu-btn { display: none; flex-direction: column; gap: 5px; padding: 4px; border-radius: 6px; }
.mobile-menu-btn .bar { width: 22px; height: 1.5px; background: #f8f7f9; transition: all 0.3s; display: block; }
.mobile-menu { background: rgba(8,8,8,0.97); border-top: 1px solid rgba(255,255,255,0.07); padding: 0.5rem 0 1rem; }
.mobile-link { display: block; width: 100%; text-align: left; padding: 0.75rem 24px; font-size: 1rem; font-weight: 500; color: rgba(248,247,249,0.65); border-bottom: 1px solid rgba(255,255,255,0.06); transition: color 0.2s, padding-left 0.2s; }
.mobile-link:hover { color: #FDD60D; padding-left: 30px; }

@media (max-width: 768px) {
  .desktop-nav, .nav-icons { display: none; }
  .mobile-menu-btn { display: flex; }
  .logo-brand span { font-size: 0.9rem; }
  .logo-brand img { width: 48px; height: 48px; }
}

/* ============================================================
   HERO – full viewport + moving grid background + advanced parallax
   ============================================================ */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-bottom: 2rem;
}

/* Moving grid background */
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 80px 80px;
  animation: gridMove 25s linear infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(80px, 80px); }
}

.hero-container {
  position: relative;
  z-index: 2;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 4rem;
  align-items: center;
}

/* Text */
.hero-text { position: relative; z-index: 3; }

.hero-greeting {
  font-size: 0.8125rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: #FDD60D;
  margin-bottom: 0.875rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.hero-greeting::before {
  content: '';
  display: inline-block; width: 28px; height: 1.5px; background: #FDD60D;
}

.hero-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(4rem, 10vw, 7rem);
  line-height: 0.9;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #FDD60D 0%, #fff 70%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(253,214,13,0.15);
  overflow: hidden;
  transform: translateX(0);
  will-change: transform;
  transition: transform 0.05s ease-out;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: rgba(248,247,249,0.55);
  margin-bottom: 2.25rem;
  font-weight: 400;
  max-width: 500px;
}

.hero-buttons { display: flex; flex-wrap: wrap; gap: 0.875rem; }

/* Hero image wrapper with parallax */
.hero-image-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.hero-image-frame {
  width: 100%;
  max-width: 380px;
  border-radius: 20px;
  overflow: visible;
}
.hero-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 15%;
  border-radius: 20px;
  display: block;
  transform: scale(1.08);
  transition: transform 0.2s ease-out;
  will-change: transform;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

/* Decorative blobs – now parallax layers */
.hero-deco {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.25;
  will-change: transform;
  transition: opacity 0.3s ease;
}
.deco-1 {
  width: 350px; height: 350px;
  background: #FDD60D;
  top: -100px; right: -120px;
  box-shadow: 0 0 120px rgba(253, 214, 13, 0.4);
}
.deco-2 {
  width: 280px; height: 280px;
  background: #f8f7f9;
  bottom: -20px; left: -80px;
  box-shadow: 0 0 100px rgba(248, 247, 249, 0.3);
}

/* scroll cue – golden accent */
.scroll-cue {
  display: flex; align-items: center; gap: 0.75rem;
  margin-top: 2rem;
  padding-left: 24px;
  color: rgba(248,247,249,0.4);
  font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase;
  z-index: 3;
}
.scroll-line {
  width: 40px; height: 1.5px;
  background: rgba(248,247,249,0.15);
  position: relative; overflow: hidden;
}
.scroll-line::after {
  content: '';
  position: absolute; left: -100%; top: 0;
  width: 100%; height: 100%;
  background: #FDD60D;
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%   { left: -100%; }
  50%  { left: 0%; }
  100% { left: 100%; }
}

/* Stagger animations – smoother */
.stagger > * {
  opacity: 0;
  transform: translateY(30px);
  animation: revealStagger 0.9s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}
.stagger > *:nth-child(1) { animation-delay: 0.1s; }
.stagger > *:nth-child(2) { animation-delay: 0.25s; }
.stagger > *:nth-child(3) { animation-delay: 0.4s; }
.stagger > *:nth-child(4) { animation-delay: 0.55s; }
.stagger > *:nth-child(5) { animation-delay: 0.7s; }

@keyframes revealStagger {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* H1 Sliding Animation on Scroll */
@keyframes slideIn {
  0% { transform: translateX(-100%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
  0% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}

@media (max-width: 820px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  .hero-greeting { justify-content: center; }
  .hero-buttons { justify-content: center; }
  .hero-title { font-size: clamp(3rem, 10vw, 5rem); }
  .hero-image-frame { max-width: 300px; margin: 0 auto; }
  .scroll-cue { justify-content: center; padding-left: 0; }
}

/* ============================================================
   ABOUT SECTION (unchanged except photo sizing)
   ============================================================ */
.about-section {
  position: relative;
  padding: 7rem 0 6rem;
  overflow: hidden;
}
.about-bg-layer {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
  transition: opacity 0.3s ease;
}
.layer-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(253,214,13,0.08) 0%, transparent 70%);
  top: -100px; right: -150px;
  box-shadow: 0 0 150px rgba(253, 214, 13, 0.15);
}
.layer-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(248,247,249,0.06) 0%, transparent 70%);
  bottom: -80px; left: -80px;
  box-shadow: 0 0 120px rgba(248, 247, 249, 0.1);
}
.about-inner {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 5rem;
  align-items: start;
  position: relative; z-index: 1;
}
.about-left { position: sticky; top: 100px; }
.about-title { font-size: clamp(3rem, 7vw, 5.5rem); line-height: 1; margin-bottom: 1.25rem; }
.about-title em { font-style: italic; color: #FDD60D; }
.about-text { font-size: 1rem; line-height: 1.7; color: rgba(248,247,249,0.6); max-width: 320px; }
.about-right { padding-top: 0.5rem; }

.about-photo-wrap { margin-bottom: 2.5rem; display: flex; justify-content: center; }
.about-photo {
  width: 500px;
  height: 305px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  transition: transform 0.3s, box-shadow 0.3s;
}
.about-photo:hover {
  transform: scale(1.02);
  box-shadow: 0 16px 48px rgba(253,214,13,0.15);
}

.skills-block { margin-bottom: 2.5rem; }
.skills-heading { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; }
.skills-label {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(248,247,249,0.35); padding: 0.3rem 0.9rem;
  border: 1px solid rgba(248,247,249,0.12); border-radius: 100px;
}
.skills-divider { height: 1px; background: linear-gradient(90deg, rgba(255,255,255,0.08) 0%, transparent 80%); margin: 2rem 0; }
.skills-cloud { display: flex; flex-wrap: wrap; gap: 0.625rem; align-items: flex-start; }

.tag {
  display: inline-flex; align-items: center; padding: 0.5rem 1.1rem; border-radius: 100px;
  font-weight: 500; cursor: default;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), background 0.3s, border-color 0.3s, color 0.3s, box-shadow 0.3s;
  opacity: 0; transform: translateY(12px);
  animation: tagIn 0.4s cubic-bezier(0.34,1.56,0.64,1) forwards;
  animation-delay: calc(var(--d, 0) * 60ms + 200ms);
  will-change: transform;
}
@keyframes tagIn { to { opacity: 1; transform: translateY(0); } }
.tag:hover { transform: translateY(-4px) scale(1.05) !important; z-index: 2; box-shadow: 0 8px 20px rgba(0,0,0,0.3); }
.tag--sm  { font-size: 0.75rem; }
.tag--md  { font-size: 0.875rem; }
.tag--lg  { font-size: 0.9375rem; }
.tag:not(.tag--accent):not(.tag--soft) {
  background: rgba(248,247,249,0.06); border: 1px solid rgba(248,247,249,0.1); color: rgba(248,247,249,0.75);
}
.tag:not(.tag--accent):not(.tag--soft):hover { background: rgba(248,247,249,0.12); border-color: rgba(248,247,249,0.25); color: #f8f7f9; }
.tag--accent { background: rgba(253,214,13,0.08); border: 1px solid rgba(253,214,13,0.22); color: #FDD60D; }
.tag--accent:hover { background: rgba(253,214,13,0.18); border-color: rgba(253,214,13,0.5); }
.tag--soft { background: rgba(180,200,255,0.06); border: 1px solid rgba(180,200,255,0.14); color: rgba(200,215,255,0.8); }
.tag--soft:hover { background: rgba(180,200,255,0.12); border-color: rgba(180,200,255,0.3); color: #c8d7ff; }
.tag.floating {
  animation: tagIn 0.4s cubic-bezier(0.34,1.56,0.64,1) forwards,
             floatDrift var(--float-dur, 4s) ease-in-out var(--float-delay, 0s) infinite;
  animation-delay: calc(var(--d, 0) * 60ms + 200ms), calc(var(--float-delay, 0s));
}
@keyframes floatDrift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@media (max-width: 900px) { .about-inner { grid-template-columns: 1fr; gap: 3rem; } .about-left { position: static; } .about-text { max-width: 100%; } }

/* ============================================================
   FEATURED PROJECT – deeper shadows
   ============================================================ */
.featured-section { padding: 5rem 0 4rem; }
.featured-header { margin-bottom: 2.5rem; }
.featured-subtitle { font-size: 1.125rem; color: rgba(248,247,249,0.45); margin-top: 0.5rem; }
.featured-card {
  background: #141414;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
  display: grid;
  grid-template-columns: 55% 45%;
  transition: border-color 0.3s, box-shadow 0.3s;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.featured-card:hover {
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 25px 50px rgba(0,0,0,0.4);
}
.featured-image { display: flex; align-items: center; justify-content: center; background: #0a0a0a; }
.featured-img {
  width: 476px;
  height: 500px;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.featured-info { padding: 2.5rem; display: flex; flex-direction: column; justify-content: center; gap: 1.25rem; }
.badge {
  display: inline-block;
  background: rgba(248,247,249,0.07);
  border: 1px solid rgba(248,247,249,0.1);
  padding: 0.3rem 0.85rem; border-radius: 100px;
  font-size: 0.8125rem; font-weight: 500; width: fit-content; color: rgba(248,247,249,0.7);
}
.project-title { font-family: 'Plus Jakarta Sans', sans-serif; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; line-height: 1.2; }
.project-desc { color: rgba(248,247,249,0.6); font-size: 0.9375rem; line-height: 1.65; }
.view-project-link { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.9375rem; font-weight: 600; color: #FDD60D; transition: gap 0.25s; }
.view-project-link:hover { gap: 0.85rem; }
.external-icon { font-size: 1.1em; }
@media (max-width: 768px) { .featured-card { grid-template-columns: 1fr; } .featured-img { width: 100%; height: auto; max-height: 500px; } .featured-info { padding: 1.75rem; } }

/* ============================================================
   MORE PROJECTS SLIDER
   ============================================================ */
.more-projects-section { padding: 4rem 0 5rem; }
.more-header { margin-bottom: 2.5rem; }
.more-subtitle { color: rgba(248,247,249,0.4); font-size: 1rem; margin-top: 0.5rem; }
.slider-wrapper { position: relative; margin: 0 -12px; }
.slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 10;
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  background: rgba(20,20,20,0.95); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s; color: #f8f7f9;
}
.slider-arrow:hover { background: rgba(253,214,13,0.12); border-color: rgba(253,214,13,0.4); color: #FDD60D; transform: translateY(-50%) scale(1.08); }
.slider-arrow.prev { left: -0.5rem; }
.slider-arrow.next { right: -0.5rem; }
.slider-arrow:disabled { opacity: 0; pointer-events: none; }
.slider { display: flex; gap: 1.25rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 0 12px 1rem; scrollbar-width: none; -ms-overflow-style: none; }
.slider::-webkit-scrollbar { display: none; }
.slider-card {
  flex: 0 0 272px; scroll-snap-align: start;
  background: #141414; border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.07);
  transition: transform 0.35s cubic-bezier(0.34, 1.2, 0.64, 1), border-color 0.3s, box-shadow 0.3s;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.slider-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255,255,255,0.2);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 20px rgba(253,214,13,0.05);
}
.slider-card-image { position: relative; height: 228px; overflow: hidden; }
.slider-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s; }
.slider-card:hover .slider-card-image img { transform: scale(1.08); }
.slider-card-category {
  position: absolute; top: 0.75rem; left: 0.75rem;
  background: rgba(8,8,8,0.82); backdrop-filter: blur(8px);
  color: rgba(248,247,249,0.85);
  padding: 0.25rem 0.7rem; border-radius: 100px;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.04em;
  border: 1px solid rgba(255,255,255,0.1);
}
.slider-card-info { padding: 1rem 1.1rem 1.25rem; }
.slider-card-title { font-size: 1rem; font-weight: 600; line-height: 1.3; margin-bottom: 0.4rem; }
.slider-card-desc {
  font-size: 0.8125rem; color: rgba(248,247,249,0.5); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.slider-dots { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1.25rem; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(248,247,249,0.2); transition: all 0.3s; cursor: pointer; }
.dot.active { width: 20px; border-radius: 100px; background: rgba(248,247,249,0.85); }
@media (max-width: 768px) { .slider-arrow { display: none; } }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-section { padding: 6rem 0; position: relative; overflow: hidden; }
.contact-section::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(253,214,13,0.04), transparent); pointer-events: none; }
.contact-content { text-align: center; position: relative; z-index: 1; }
.contact-text { font-size: 1.125rem; color: rgba(248,247,249,0.55); max-width: 520px; margin: 0 auto 2.25rem; line-height: 1.65; }
.contact-buttons { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid rgba(255,255,255,0.07); padding: 1.75rem 24px; text-align: center; color: rgba(248,247,249,0.3); font-size: 0.875rem; }

/* ============================================================
   MODAL, DETAIL, LIGHTBOX (unchanged)
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.85); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.modal-content { background: #111; border-radius: 20px; max-width: 760px; width: 100%; max-height: 90vh; overflow-y: auto; border: 1px solid rgba(255,255,255,0.1); animation: modalIn 0.3s cubic-bezier(0.34,1.2,0.64,1); }
@keyframes modalIn { from { opacity:0; transform:scale(0.94) translateY(12px); } }
.modal-close { position: sticky; top: 1rem; float: right; margin-right: 1rem; z-index: 10; font-size: 1.25rem; background: rgba(255,255,255,0.08); border-radius: 50%; width: 2.25rem; height: 2.25rem; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.modal-close:hover { background: rgba(255,255,255,0.16); }
.modal-image { width: 100%; max-height: none; object-fit: contain; }
.modal-body { padding: 1.75rem 2rem 2rem; }
.modal-title { font-family: 'Plus Jakarta Sans',sans-serif; font-size: 2rem; font-weight: 700; margin: 1rem 0 0.5rem; }
.modal-desc { color: rgba(248,247,249,0.7); font-size: 1rem; margin-bottom: 1.5rem; line-height: 1.65; }
.modal-details { color: rgba(248,247,249,0.65); }
.modal-details h3 { font-size: 1rem; font-weight: 600; margin: 1.25rem 0 0.4rem; color: #f8f7f9; }
.modal-details p { font-size: 0.9375rem; line-height: 1.65; }

/* detail overlay ... (keep existing detail styles from previous code, unchanged) */
/* I'll include them for completeness but they are the same as before */
.detail-overlay { position: fixed; inset: 0; z-index: 3000; background: #060606; overflow: hidden; display: flex; flex-direction: column; }
.detail-container { width: 100%; height: 100%; display: flex; flex-direction: column; overflow: hidden; }
.detail-nav { position: relative; z-index: 3100; flex-shrink: 0; background: rgba(6,6,6,0.95); backdrop-filter: blur(20px); border-bottom: 1px solid rgba(255,255,255,0.08); }
.detail-nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 0 1.5rem; height: 52px; gap: 1rem; }
.detail-back { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; font-weight: 600; color: rgba(248,247,249,0.6); transition: color 0.2s; white-space: nowrap; flex-shrink: 0; }
.detail-back:hover { color: #FDD60D; }
.detail-nav-links { display: flex; align-items: center; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.detail-nav-links::-webkit-scrollbar { display: none; }
.detail-nav-btn { flex-shrink: 0; padding: 0 1rem; height: 52px; font-size: 0.8125rem; font-weight: 500; color: rgba(248,247,249,0.45); transition: color 0.2s; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.detail-nav-btn:hover { color: rgba(248,247,249,0.85); }
.detail-nav-btn.active { color: #f8f7f9; border-bottom-color: #FDD60D; }
.detail-nav-right { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }
.detail-progress-wrap { width: 80px; height: 3px; background: rgba(255,255,255,0.08); border-radius: 100px; overflow: hidden; }
.detail-progress-bar { height: 100%; width: 0%; background: #FDD60D; border-radius: 100px; transition: width 0.1s; }
.detail-hamburger { display: none; flex-direction: column; gap: 4px; padding: 4px; border-radius: 6px; }
.detail-hamburger span { display: block; width: 20px; height: 1.5px; background: rgba(248,247,249,0.7); transition: all 0.25s; }
.detail-mobile-menu { background: rgba(10,10,10,0.98); border-top: 1px solid rgba(255,255,255,0.07); padding: 0.5rem 0; }
.detail-mobile-link { display: block; width: 100%; text-align: left; padding: 0.8rem 1.5rem; font-size: 0.9375rem; color: rgba(248,247,249,0.55); border-bottom: 1px solid rgba(255,255,255,0.05); transition: color 0.2s, padding-left 0.2s; }
.detail-mobile-link:hover { color: #FDD60D; padding-left: 2rem; }
.detail-mobile-link.active { color: #FDD60D; }
@media (max-width: 860px) { .detail-nav-links { display: none; } .detail-progress-wrap { display: none; } .detail-hamburger { display: flex; } }
.detail-main { flex: 1; overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth; }
.detail-main section { max-width: 780px; margin: 0 auto; padding: 3.5rem 24px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.detail-main section:last-child { border-bottom: none; }
.detail-main h1 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: clamp(2.25rem, 6vw, 4rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; margin: 0.75rem 0 1rem; }
.detail-main h2 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 1.5rem; }
.detail-main h3 { font-size: 1rem; font-weight: 600; color: #f8f7f9; margin-bottom: 0.5rem; }
.detail-main p { color: rgba(248,247,249,0.65); font-size: 0.9375rem; line-height: 1.7; }
.detail-main ul li { color: rgba(248,247,249,0.65); font-size: 0.9375rem; line-height: 1.7; margin-bottom: 0.5rem; }
.detail-main a.btn-primary { font-size: 0.9375rem; }
.d-card { background: #111; border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 1.5rem; }
.d-card + .d-card { margin-top: 0.875rem; }
.d-card-highlight { background: rgba(253,214,13,0.04); border-color: rgba(253,214,13,0.15); }
.d-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.875rem; }
.d-grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 0.875rem; }
.d-stack { display: flex; flex-direction: column; gap: 0.875rem; }
@media (max-width: 600px) { .d-grid-2, .d-grid-4 { grid-template-columns: 1fr; } }
.meta-item span.label { display: block; font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(248,247,249,0.35); margin-bottom: 0.2rem; }
.meta-item strong { font-size: 0.9375rem; font-weight: 600; }
.flip-card { perspective: 1200px; cursor: pointer; max-width: 680px; margin: 1.5rem auto; }
.flip-card-label { text-align: center; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(248,247,249,0.3); margin-bottom: 0.75rem; }
.flip-card-label span { color: #FDD60D; }
.flip-card-inner { position: relative; width: 100%; transition: transform 0.85s cubic-bezier(0.34, 1.2, 0.64, 1); transform-style: preserve-3d; }
.flip-card-inner.flipped { transform: rotateY(180deg); }
.flip-card-front, .flip-card-back { backface-visibility: hidden; width: 100%; }
.flip-card-back { position: absolute; top:0; left:0; transform: rotateY(180deg); }
.flip-side-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(248,247,249,0.4); margin-bottom: 0.5rem; font-weight: 600; }
.tab-bar { display: flex; border-bottom: 1px solid rgba(255,255,255,0.08); }
.tab-btn { flex: 1; padding: 0.9rem 0.5rem; text-align: center; font-size: 0.8125rem; font-weight: 500; color: rgba(248,247,249,0.4); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color 0.2s, border-color 0.2s; }
.tab-btn.active { color: #f8f7f9; border-bottom-color: #FDD60D; }
.tab-btn:hover:not(.active) { color: rgba(248,247,249,0.7); }
.tab-panel { padding: 1.5rem; }
.tab-panel.hidden { display: none; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(253,214,13,0.1); border: 1px solid rgba(253,214,13,0.3); color: #FDD60D; font-size: 0.75rem; font-weight: 700; flex-shrink: 0; margin-right: 0.75rem; }
.scroll-top-btn { position: fixed; bottom: 2rem; right: 2rem; z-index: 3200; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: rgba(20,20,20,0.9); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; transition: opacity 0.3s, visibility 0.3s, transform 0.3s; opacity: 0; visibility: hidden; font-size: 1.125rem; }
.scroll-top-btn.visible { opacity: 1; visibility: visible; }
.scroll-top-btn:hover { transform: translateY(-3px); border-color: rgba(253,214,13,0.5); color: #FDD60D; }
.lightbox { position: fixed; inset: 0; z-index: 5000; background: rgba(0,0,0,0.92); backdrop-filter: blur(8px); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lightbox img { max-width: 92%; max-height: 85vh; object-fit: contain; border-radius: 10px; }
.lightbox-close { position: absolute; top: 1.25rem; right: 1.25rem; font-size: 1.5rem; color: rgba(255,255,255,0.6); width: 2.5rem; height: 2.5rem; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,0.08); transition: background 0.2s, color 0.2s; }
.lightbox-close:hover { background: rgba(255,255,255,0.16); color: #fff; }
.lightbox-hint { position: absolute; bottom: 1.25rem; color: rgba(255,255,255,0.3); font-size: 0.8125rem; }

/* ============================================================
   LIGHT THEME
   ============================================================ */
body.light-theme {
  --text: #161410;
  --muted: rgba(22,20,16,0.64);
  --muted-soft: rgba(22,20,16,0.56);
  --muted-faint: rgba(22,20,16,0.42);
  --accent: #b28a00;
  background: #f7f4ee;
  color: #161410;
}

body.light-theme .btn-primary {
  border-color: #161410;
  box-shadow: 0 4px 16px rgba(36,31,22,0.1);
}

body.light-theme .btn-secondary {
  border-color: rgba(22,20,16,0.24);
  color: rgba(22,20,16,0.68);
}

body.light-theme .btn-secondary:hover {
  border-color: #161410;
  color: #161410;
  box-shadow: 0 8px 22px rgba(36,31,22,0.08);
}

body.light-theme #main-nav {
  background: rgba(247,244,238,0.78);
  border-bottom-color: rgba(22,20,16,0.1);
}

body.light-theme #main-nav.nav-scrolled {
  background: rgba(247,244,238,0.94);
  box-shadow: 0 4px 22px rgba(36,31,22,0.1);
}

body.light-theme .nav-link,
body.light-theme .nav-icons a,
body.light-theme .mobile-link,
body.light-theme .detail-nav-btn,
body.light-theme .detail-mobile-link {
  color: rgba(22,20,16,0.58);
}

body.light-theme .logo-brand {
  color: #161410;
}

body.light-theme .logo-brand span {
  color: #161410;
}

body.light-theme .nav-link:hover,
body.light-theme .nav-icons a:hover,
body.light-theme .nav-link.active,
body.light-theme .detail-nav-btn.active {
  color: #161410;
}

body.light-theme .mobile-menu,
body.light-theme .detail-mobile-menu {
  background: rgba(247,244,238,0.98);
  border-color: rgba(22,20,16,0.1);
}

body.light-theme .mobile-link,
body.light-theme .detail-mobile-link {
  border-bottom-color: rgba(22,20,16,0.08);
}

body.light-theme .mobile-menu-btn .bar,
body.light-theme .detail-hamburger span {
  background: #161410;
}

body.light-theme .theme-toggle {
  border-color: rgba(22,20,16,0.18);
  background: rgba(22,20,16,0.06);
  color: #161410;
}

body.light-theme .theme-toggle,
body.light-theme .language-toggle {
  border-color: rgba(22,20,16,0.18);
  background: rgba(22,20,16,0.06);
  color: #161410;
  box-shadow: 0 8px 24px rgba(36,31,22,0.1);
}

body.light-theme .theme-toggle::after,
body.light-theme .language-toggle::after {
  transform: translateX(1.45rem);
  background: #161410;
  box-shadow: 0 4px 14px rgba(36,31,22,0.22);
}

body.light-theme .language-toggle::after {
  transform: translateX(0);
}

body.light-theme .language-toggle.is-spanish::after {
  transform: translateX(1.82rem);
}

body.light-theme .hero-section::before {
  background-image:
    linear-gradient(rgba(22,20,16,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22,20,16,0.045) 1px, transparent 1px);
}

body.light-theme .hero-title {
  background: linear-gradient(135deg, #b28a00 0%, #161410 74%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 0 20px rgba(178,138,0,0.08);
}

body.light-theme .hero-subtitle,
body.light-theme .about-text,
body.light-theme .featured-subtitle,
body.light-theme .more-subtitle,
body.light-theme .project-desc,
body.light-theme .slider-card-desc,
body.light-theme .contact-text,
body.light-theme .modal-desc,
body.light-theme .modal-details,
body.light-theme .detail-main p,
body.light-theme .detail-main ul li {
  color: rgba(22,20,16,0.64);
}

body.light-theme .scroll-cue,
body.light-theme .footer,
body.light-theme .skills-label,
body.light-theme .meta-item span.label,
body.light-theme .flip-card-label,
body.light-theme .flip-side-label {
  color: rgba(22,20,16,0.42);
}

body.light-theme .scroll-line,
body.light-theme .skills-divider {
  background: rgba(22,20,16,0.14);
}

body.light-theme .deco-2 {
  background: #161410;
  opacity: 0.08;
}

body.light-theme .about-photo {
  box-shadow: 0 12px 34px rgba(36,31,22,0.18);
}

body.light-theme .skills-label,
body.light-theme .badge,
body.light-theme .tag:not(.tag--accent):not(.tag--soft) {
  background: rgba(255,255,255,0.48);
  border-color: rgba(22,20,16,0.12);
  color: rgba(22,20,16,0.72);
}

body.light-theme .tag:not(.tag--accent):not(.tag--soft):hover {
  background: rgba(255,255,255,0.82);
  border-color: rgba(22,20,16,0.22);
  color: #161410;
}

body.light-theme .tag--accent {
  background: rgba(253,214,13,0.22);
  border-color: rgba(178,138,0,0.32);
  color: #7a5f00;
}

body.light-theme .tag--soft {
  background: rgba(28,90,142,0.08);
  border-color: rgba(28,90,142,0.18);
  color: #1d5d92;
}

body.light-theme .featured-card,
body.light-theme .slider-card,
body.light-theme .modal-content,
body.light-theme .d-card {
  background: #fffaf0;
  border-color: rgba(22,20,16,0.1);
  box-shadow: 0 16px 36px rgba(36,31,22,0.11);
}

body.light-theme .featured-card:hover,
body.light-theme .slider-card:hover {
  border-color: rgba(22,20,16,0.2);
  box-shadow: 0 22px 48px rgba(36,31,22,0.16);
}

body.light-theme .featured-image {
  background: #ebe4d7;
}

body.light-theme .slider-arrow,
body.light-theme .scroll-top-btn {
  background: rgba(255,250,240,0.96);
  border-color: rgba(22,20,16,0.14);
  color: #161410;
}

body.light-theme .slider-card-category {
  background: rgba(255,250,240,0.86);
  color: rgba(22,20,16,0.78);
  border-color: rgba(22,20,16,0.12);
}

body.light-theme .dot {
  background: rgba(22,20,16,0.22);
}

body.light-theme .dot.active {
  background: rgba(22,20,16,0.82);
}

body.light-theme .footer,
body.light-theme .detail-main section {
  border-color: rgba(22,20,16,0.1);
}

body.light-theme .modal-overlay,
body.light-theme .lightbox {
  background: rgba(22,20,16,0.72);
}

body.light-theme .modal-close,
body.light-theme .lightbox-close {
  background: rgba(22,20,16,0.08);
  color: rgba(22,20,16,0.75);
}

body.light-theme .modal-close:hover,
body.light-theme .lightbox-close:hover {
  background: rgba(22,20,16,0.14);
  color: #161410;
}

body.light-theme .modal-details h3,
body.light-theme .detail-main h3 {
  color: #161410;
}

body.light-theme .detail-overlay {
  background: #f7f4ee;
}

body.light-theme .detail-nav {
  background: rgba(247,244,238,0.96);
  border-bottom-color: rgba(22,20,16,0.1);
}

body.light-theme .detail-back {
  color: rgba(22,20,16,0.62);
}

body.light-theme .detail-progress-wrap,
body.light-theme .tab-bar {
  background: rgba(22,20,16,0.08);
}

body.light-theme .tab-bar {
  border-bottom-color: rgba(22,20,16,0.1);
}

body.light-theme .tab-btn {
  color: rgba(22,20,16,0.5);
}

body.light-theme .tab-btn.active,
body.light-theme .tab-btn:hover:not(.active) {
  color: #161410;
}

body.light-theme .d-card-highlight {
  background: rgba(253,214,13,0.16);
  border-color: rgba(178,138,0,0.24);
}

/* ============================================================
   POLISH PASS: RHYTHM, CONTROLS, CARDS, DETAIL, MOBILE
   ============================================================ */
body {
  --bg: #080808;
  --surface: #121212;
  --surface-2: #181818;
  --border: rgba(255,255,255,0.1);
  --shadow: 0 18px 46px rgba(0,0,0,0.34);
  --radius: 10px;
  --radius-sm: 8px;
  background:
    radial-gradient(circle at 18% 12%, rgba(253,214,13,0.08), transparent 26rem),
    linear-gradient(180deg, #080808 0%, #0d0d0c 46%, #080808 100%);
}

body.light-theme {
  --bg: #f8f3ea;
  --surface: #fffaf1;
  --surface-2: #f1e8da;
  --border: rgba(38,31,20,0.13);
  --shadow: 0 18px 42px rgba(65,48,26,0.12);
  --accent: #9f7800;
  background:
    radial-gradient(circle at 18% 12%, rgba(253,214,13,0.18), transparent 25rem),
    linear-gradient(180deg, #fbf7ef 0%, #f4ecdf 54%, #fbf7ef 100%);
}

::selection {
  background: rgba(253,214,13,0.82);
  color: #080808;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.nav-link:focus-visible,
.mobile-link:focus-visible,
.detail-nav-btn:focus-visible,
.detail-mobile-link:focus-visible {
  border-radius: 6px;
}

#main-nav {
  transition: padding 0.35s cubic-bezier(0.23, 1, 0.32, 1), background 0.35s, box-shadow 0.35s, border-color 0.35s;
}

.sticky-controls {
  top: 4rem;
  padding: 0.55rem 24px 0;
}

.sticky-controls::before {
  content: '';
  position: absolute;
  inset: 0 24px auto;
  height: 2.45rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(10,10,10,0.46);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 12px 34px rgba(0,0,0,0.18);
  pointer-events: none;
}

body.light-theme .sticky-controls::before {
  background: rgba(255,250,240,0.72);
  box-shadow: 0 12px 30px rgba(65,48,26,0.1);
}

.theme-toggle,
.language-toggle {
  height: 2.05rem;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.theme-toggle::after,
.language-toggle::after {
  top: 4px;
  left: 4px;
  width: calc(2.05rem - 8px);
  height: calc(2.05rem - 8px);
}

.language-toggle {
  width: 4.1rem;
}

.language-toggle::after {
  width: calc(2.05rem - 8px);
}

.language-toggle.is-spanish::after {
  transform: translateX(2.02rem);
}

body.light-theme .language-toggle.is-spanish::after {
  transform: translateX(2.02rem);
}

.theme-toggle:hover,
.language-toggle:hover {
  background: rgba(253,214,13,0.1);
}

.section-title {
  max-width: 11ch;
}

.featured-header .section-title,
.more-header .section-title,
.contact-content .section-title {
  max-width: none;
}

.hero-section {
  min-height: calc(100vh - 2.5rem);
  padding-top: 1.5rem;
}

.hero-title {
  letter-spacing: 0;
  text-wrap: balance;
}

.hero-subtitle,
.about-text,
.project-desc,
.more-subtitle,
.contact-text,
.detail-main p,
.detail-main ul li {
  color: var(--muted);
}

.about-section,
.more-projects-section {
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.015), transparent);
}

body.light-theme .about-section,
body.light-theme .more-projects-section {
  background: linear-gradient(180deg, transparent, rgba(120,83,26,0.045), transparent);
}

.about-cta {
  margin-top: 1.5rem;
}

.about-photo,
.hero-image,
.featured-card,
.slider-card,
.modal-content,
.d-card {
  border-radius: var(--radius);
}

.hero-image-frame {
  max-width: 370px;
}

.hero-image {
  box-shadow: var(--shadow);
}

.featured-section,
.more-projects-section,
.contact-section {
  padding-block: clamp(4.5rem, 8vw, 7rem);
}

.featured-card,
.slider-card,
.modal-content,
.d-card {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow);
}

.featured-card {
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
}

.featured-info {
  padding: clamp(1.75rem, 4vw, 3rem);
}

.badge,
.skills-label,
.slider-card-category {
  border-radius: 999px;
  letter-spacing: 0.035em;
}

.featured-img {
  width: 100%;
  height: 100%;
  min-height: 500px;
}

.slider {
  padding-bottom: 1.25rem;
}

.slider-card {
  flex-basis: 286px;
  position: relative;
}

.slider-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, transparent 42%, rgba(253,214,13,0.08));
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}

.slider-card:hover::after {
  opacity: 1;
}

.slider-card-image {
  height: 214px;
  background: var(--surface-2);
}

.slider-card-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.05rem;
}

.slider-card-desc {
  -webkit-line-clamp: 2;
}

.modal-overlay {
  background: rgba(0,0,0,0.72);
}

.modal-content {
  border-radius: 12px;
}

.modal-image {
  background: var(--surface-2);
}

.modal-close,
.lightbox-close,
.scroll-top-btn,
.slider-arrow {
  border-radius: 999px;
}

.detail-overlay {
  background:
    radial-gradient(circle at 16% 0%, rgba(253,214,13,0.08), transparent 28rem),
    #060606;
}

.detail-main section {
  max-width: 820px;
  padding-block: clamp(3rem, 6vw, 5rem);
}

.detail-main h1,
.detail-main h2 {
  letter-spacing: 0;
  text-wrap: balance;
}

.detail-main h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.d-card {
  border-radius: var(--radius);
}

.d-card-highlight {
  background: rgba(253,214,13,0.065);
}

.tab-bar {
  background: rgba(255,255,255,0.02);
}

.tab-btn {
  min-height: 3rem;
}

.detail-hero-copy {
  font-size: 1.125rem;
  color: var(--muted-soft);
  margin-bottom: 2.5rem;
  max-width: 560px;
}

.detail-spacer-lg {
  margin-top: 2rem;
}

.detail-spacer-md {
  margin-top: 1.5rem;
}

.detail-spacer-sm {
  margin-top: 0.875rem;
}

.badge.detail-spacer-sm {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.d-stack .d-card + .d-card {
  margin-top: 0;
}

.d-card.detail-spacer-sm + .d-stack {
  margin-top: 1.25rem;
}

.detail-card-flush {
  padding: 0;
  overflow: hidden;
}

.detail-row {
  display: flex;
  align-items: flex-start;
}

.detail-image,
.flip-card img {
  width: 100%;
  border-radius: var(--radius-sm);
}

.detail-image {
  cursor: pointer;
  margin-top: 0.75rem;
  object-fit: cover;
  background: var(--surface-2);
}

.detail-image-lg {
  margin: 0 0 1.5rem;
}

.detail-image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.detail-image-grid .detail-image {
  margin-top: 0;
}

.detail-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.detail-list li {
  display: flex;
  gap: 0.75rem;
}

.detail-list span {
  color: var(--accent);
  flex-shrink: 0;
}

.detail-center {
  text-align: center;
  border-bottom: none !important;
}

.detail-eyebrow {
  color: var(--muted-faint);
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.accent-heading {
  color: var(--accent) !important;
}

body.light-theme .detail-overlay {
  background:
    radial-gradient(circle at 16% 0%, rgba(253,214,13,0.18), transparent 28rem),
    #f8f3ea;
}

body.light-theme .featured-card,
body.light-theme .slider-card,
body.light-theme .modal-content,
body.light-theme .d-card {
  background: var(--surface);
  border-color: var(--border);
}

body.light-theme .d-card-highlight {
  background: rgba(253,214,13,0.18);
}

body.light-theme .modal-overlay {
  background: rgba(38,31,20,0.58);
}

body.light-theme .theme-toggle::after {
  transform: translateX(1.15rem);
}

body.light-theme .language-toggle::after {
  transform: translateX(0);
}

@media (max-width: 900px) {
  .sticky-controls {
    top: 3.55rem;
  }

  .about-inner {
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  .sticky-controls {
    top: 3.4rem;
    padding-inline: 16px;
  }

  .sticky-controls::before {
    inset-inline: 16px;
  }

  .hero-section {
    min-height: auto;
    padding-top: 4rem;
  }

  .hero-container {
    gap: 2.5rem;
  }

  .hero-buttons .btn-primary,
  .hero-buttons .btn-secondary,
  .contact-buttons .btn-primary,
  .contact-buttons .btn-secondary {
    justify-content: center;
    min-width: min(100%, 14rem);
  }

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

  .featured-img {
    min-height: 320px;
  }

  .slider-card {
    flex-basis: min(82vw, 300px);
  }

  .modal-body {
    padding: 1.4rem;
  }
}

@media (max-width: 520px) {
  .container,
  .nav-container,
  .hero-container {
    padding-inline: 18px;
  }

  .logo {
    font-size: 0.95rem;
  }

  .hero-title {
    font-size: clamp(3rem, 15vw, 4.5rem);
  }

  .hero-subtitle,
  .contact-text {
    font-size: 1rem;
  }

  .about-photo {
    height: 250px;
  }

  .detail-main section {
    padding-inline: 18px;
  }

  .detail-image-grid {
    grid-template-columns: 1fr;
  }

  .tab-bar {
    overflow-x: auto;
  }

  .tab-btn {
    min-width: 8rem;
  }
}

/* ============================================================
   USER REQUESTED REVERTS: TOGGLES + CASE STUDY IMAGE
   ============================================================ */
.sticky-controls {
  top: 4.25rem;
  padding: 0.75rem 24px 0;
}

.sticky-controls::before {
  display: none;
}

.theme-toggle,
.language-toggle {
  width: 3.2rem;
  height: 1.75rem;
  border: 1px solid rgba(248,247,249,0.18);
  background: rgba(248,247,249,0.08);
  color: #f8f7f9;
  padding: 0 0.45rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

.language-toggle {
  width: 3.65rem;
}

.theme-toggle::after,
.language-toggle::after {
  z-index: 1;
  top: 3px;
  left: 3px;
  width: calc(1.75rem - 6px);
  height: calc(1.75rem - 6px);
}

.language-toggle::after {
  width: calc(1.82rem - 6px);
}

.theme-icon,
.lang-option {
  z-index: 2;
  text-shadow: 0 1px 3px rgba(0,0,0,0.35);
}

.language-toggle.is-spanish::after {
  transform: translateX(1.82rem);
}

body.light-theme .theme-toggle,
body.light-theme .language-toggle {
  border-color: rgba(22,20,16,0.18);
  background: rgba(22,20,16,0.06);
  color: #161410;
  box-shadow: 0 8px 24px rgba(36,31,22,0.1);
}

body.light-theme .theme-icon,
body.light-theme .lang-option {
  text-shadow: 0 1px 3px rgba(255,255,255,0.35);
}

body.light-theme .theme-toggle::after {
  transform: translateX(1.45rem);
}

body.light-theme .language-toggle::after {
  transform: translateX(0);
}

body.light-theme .language-toggle.is-spanish::after {
  transform: translateX(1.82rem);
}

.featured-card {
  grid-template-columns: 55% 45%;
}

.featured-img {
  width: 476px;
  height: 500px;
  min-height: 0;
  object-fit: cover;
  object-position: center top;
}

@media (max-width: 900px) {
  .sticky-controls {
    top: 4.25rem;
  }
}

@media (max-width: 768px) {
  .sticky-controls {
    top: 4rem;
    padding-inline: 24px;
  }

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

  .featured-img {
    width: 100%;
    height: auto;
    max-height: 500px;
  }
}

/* ============================================================
   3D NEUMORPHIC PILL TOGGLES
   ============================================================ */
.theme-toggle,
.language-toggle {
  width: 4.35rem;
  height: 2.35rem;
  padding: 0 0.55rem;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  background: linear-gradient(145deg, #151515, #060606);
  color: rgba(248,247,249,0.82);
  box-shadow:
    8px 8px 18px rgba(0,0,0,0.48),
    -6px -6px 14px rgba(255,255,255,0.045),
    inset 1px 1px 2px rgba(255,255,255,0.06),
    inset -2px -2px 5px rgba(0,0,0,0.32);
  transform: translateZ(0);
}

.theme-toggle::after,
.language-toggle::after {
  top: 5px;
  left: 5px;
  width: calc(2.35rem - 10px);
  height: calc(2.35rem - 10px);
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,0.72), transparent 0.42rem),
    linear-gradient(145deg, #ffe75c, #d7ae00);
  box-shadow:
    3px 4px 9px rgba(0,0,0,0.4),
    inset 2px 2px 4px rgba(255,255,255,0.42),
    inset -3px -4px 6px rgba(105,76,0,0.28);
  transition: transform 0.32s cubic-bezier(0.34, 1.35, 0.64, 1), background 0.25s, box-shadow 0.25s;
}

.theme-toggle:hover,
.language-toggle:hover {
  border-color: rgba(253,214,13,0.28);
  background: linear-gradient(145deg, #181818, #070707);
  box-shadow:
    10px 10px 22px rgba(0,0,0,0.5),
    -7px -7px 16px rgba(255,255,255,0.055),
    inset 1px 1px 2px rgba(255,255,255,0.08),
    inset -2px -2px 5px rgba(0,0,0,0.34);
}

.theme-toggle:active,
.language-toggle:active {
  box-shadow:
    inset 5px 5px 12px rgba(0,0,0,0.48),
    inset -4px -4px 10px rgba(255,255,255,0.045);
}

.theme-icon,
.lang-option {
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1rem;
  color: currentColor;
  font-weight: 800;
  text-shadow: 0 1px 4px rgba(0,0,0,0.65);
}

.theme-icon-sun {
  color: #3b2b00;
}

.theme-icon-moon {
  color: rgba(248,247,249,0.82);
}

.language-toggle.is-spanish::after {
  transform: translateX(2rem);
}

body.light-theme .theme-toggle,
body.light-theme .language-toggle {
  border-color: rgba(70,52,24,0.11);
  background: linear-gradient(145deg, #fffaf1, #e5dccd);
  color: rgba(22,20,16,0.72);
  box-shadow:
    8px 8px 18px rgba(92,72,43,0.16),
    -7px -7px 16px rgba(255,255,255,0.92),
    inset 1px 1px 2px rgba(255,255,255,0.9),
    inset -2px -2px 5px rgba(92,72,43,0.1);
}

body.light-theme .theme-toggle:hover,
body.light-theme .language-toggle:hover {
  border-color: rgba(159,120,0,0.25);
  background: linear-gradient(145deg, #fffdf7, #e7ddcc);
}

body.light-theme .theme-toggle::after,
body.light-theme .language-toggle::after {
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,0.75), transparent 0.42rem),
    linear-gradient(145deg, #27231c, #0c0b09);
  box-shadow:
    3px 4px 10px rgba(92,72,43,0.24),
    inset 2px 2px 4px rgba(255,255,255,0.14),
    inset -3px -4px 6px rgba(0,0,0,0.4);
}

body.light-theme .theme-toggle::after {
  transform: translateX(2rem);
}

body.light-theme .language-toggle::after {
  transform: translateX(0);
}

body.light-theme .language-toggle.is-spanish::after {
  transform: translateX(2rem);
}

body.light-theme .theme-icon,
body.light-theme .lang-option {
  text-shadow: 0 1px 3px rgba(255,255,255,0.58);
}

body.light-theme .theme-icon-sun {
  color: rgba(22,20,16,0.72);
}

body.light-theme .theme-icon-moon {
  color: #f8f3ea;
}

@media (max-width: 768px) {
  .theme-toggle,
  .language-toggle {
    width: 4.1rem;
    height: 2.25rem;
  }

  .theme-toggle::after,
  .language-toggle::after {
    width: calc(2.25rem - 10px);
    height: calc(2.25rem - 10px);
  }

  .language-toggle.is-spanish::after,
  body.light-theme .theme-toggle::after,
  body.light-theme .language-toggle.is-spanish::after {
    transform: translateX(1.85rem);
  }
}

/* ============================================================
   CASE STUDY PAGE (/discount-beds-belfast/)
   Reuses the detail styles above, but scrolls the whole page
   instead of an overlay so it has its own shareable URL.
   ============================================================ */
body.cs-page {
  background:
    radial-gradient(circle at 16% 0%, rgba(253,214,13,0.08), transparent 28rem) no-repeat,
    #060606;
}
body.cs-page.light-theme {
  background:
    radial-gradient(circle at 16% 0%, rgba(253,214,13,0.18), transparent 28rem) no-repeat,
    #f8f3ea;
}
.cs-nav { position: sticky; top: 0; z-index: 1000; }
.cs-page .detail-main { overflow: visible; }
.cs-page .detail-main section { scroll-margin-top: 52px; }
.cs-compare .d-card + .d-card { margin-top: 0; }
.cs-page .detail-nav-btn { display: inline-flex; align-items: center; }
.cs-page .detail-nav-right { gap: 0.6rem; }
.cs-toggle { box-shadow: none; }
.cs-page .detail-mobile-link { display: block; }
.cs-page .scroll-top-btn { position: fixed; }

.cs-skip {
  position: absolute; left: 1rem; top: -3rem; z-index: 2000;
  background: var(--accent); color: #080808; font-weight: 600;
  padding: 0.5rem 1rem; border-radius: 100px; transition: top 0.2s;
}
.cs-skip:focus { top: 0.75rem; }

.cs-browser {
  margin: 0 0 1.5rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  background: #141414;
  box-shadow: 0 30px 60px rgba(0,0,0,0.45);
}
.cs-browser-bar { display: flex; gap: 6px; padding: 10px 14px; background: #1b1b1b; border-bottom: 1px solid rgba(255,255,255,0.06); }
.cs-browser-bar span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.18); }
.cs-browser img { width: 100%; cursor: zoom-in; }

.cs-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }
.cs-lead { font-size: 1.0625rem !important; margin: -0.75rem 0 1.75rem; max-width: 620px; }
.cs-subhead { font-size: 1.25rem !important; margin: 2.5rem 0 1rem !important; }
.cs-compare-label { display: block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted-faint); margin-bottom: 0.5rem; }
.cs-compare .detail-list li { color: var(--muted); font-size: 0.9375rem; margin-bottom: 0; }

.cs-phones { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin-top: 0.75rem; }
.cs-phones img {
  width: 100%; border-radius: 14px; cursor: zoom-in;
  border: 1px solid rgba(255,255,255,0.1);
  background: var(--surface-2, #141414);
}
@media (max-width: 600px) {
  .cs-phones { grid-template-columns: repeat(2, 1fr); }
  .cs-page .detail-row { flex-direction: column; gap: 0.75rem; }
}
.lightbox-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

body.light-theme .cs-browser { background: #fff; border-color: rgba(22,20,16,0.12); box-shadow: 0 30px 60px rgba(38,31,20,0.18); }
body.light-theme .cs-browser-bar { background: #efe9de; border-color: rgba(22,20,16,0.08); }
body.light-theme .cs-browser-bar span { background: rgba(22,20,16,0.2); }
body.light-theme .cs-phones img { border-color: rgba(22,20,16,0.12); }
body.light-theme .cs-nav { background: rgba(248,243,234,0.95); border-color: rgba(22,20,16,0.08); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
.featured-img--left { object-position: left top; }
