/* ==========================================================================
   Víctor Menjón Portfolio - Design System & Modern Stylesheet
   ========================================================================== */

/* 1. Design System & CSS Variables */
:root {
  --bg-dark: #090d16;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --border-color: rgba(56, 189, 248, 0.15);
  --border-glow: rgba(56, 189, 248, 0.4);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-blue: #0284c7;
  --accent-cyan: #38bdf8;
  --accent-glow: rgba(56, 189, 248, 0.25);
  
  --font-main: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 2. Reset & Global Base & Custom Scrollbar */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Custom Scrollbar Styles */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #090d16;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-blue), var(--accent-cyan));
  border-radius: 5px;
  border: 2px solid #090d16;
}

::-webkit-scrollbar-thumb:hover {
  background: #00f2fe;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-blue) #090d16;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
}

/* Floating Scroll to Top Button */
.scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-blue), #0284c7);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  z-index: 999;
  border: 1px solid var(--border-glow);
  box-shadow: 0 4px 20px rgba(2, 132, 199, 0.4);
  cursor: pointer;
  transition: var(--transition-normal);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  text-decoration: none;
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.scroll-top-btn:hover {
  transform: translateY(-4px) scale(1.08);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  box-shadow: 0 6px 25px rgba(56, 189, 248, 0.6);
  color: #ffffff;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

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

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

/* 3. Background Glows & Grid Overlay */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: -2;
  opacity: 0.45;
}

.bg-glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #0284c7 0%, transparent 70%);
  top: -100px;
  left: -100px;
}

.bg-glow-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #1e1b4b 0%, #0369a1 100%);
  bottom: 10%;
  right: -150px;
}

.bg-grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: -1;
}

/* 4. Layout Container & Full Viewport Height Sections */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section, .footer {
  min-height: 100vh;
  min-height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  box-sizing: border-box;
  padding: 5rem 0 2rem 0;
}

.hero-section {
  padding-top: 5rem;
  padding-bottom: 2rem;
}

/* 5. Navigation Bar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-normal);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav-logo {
  font-weight: 800;
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.logo-accent {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.nav-menu {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition-fast);
  position: relative;
}

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

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
  border-radius: 2px;
}

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

/* Language Switcher */
.lang-switcher {
  display: flex;
  background: rgba(15, 23, 42, 0.9);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

.lang-switcher-mobile {
  display: none !important;
}

.lang-switcher-desktop {
  display: flex !important;
}

.lang-btn {
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.lang-btn.active {
  background: linear-gradient(135deg, var(--accent-blue), #0369a1);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.4);
}

.mobile-toggle {
  display: none;
  font-size: 1.4rem;
  color: var(--text-main);
}

/* 6. Buttons & UI Elements */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition-normal);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue), #0284c7);
  color: #ffffff;
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 4px 20px rgba(2, 132, 199, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(56, 189, 248, 0.5);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
}

.btn-secondary {
  background: rgba(30, 41, 59, 0.8);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
}

.btn-icon {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: var(--radius-md);
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 1.2rem;
}

.btn-icon:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-whatsapp:hover {
  border-color: #22c55e;
  color: #22c55e;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.btn-github:hover {
  border-color: #000000;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.btn-sm {
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
}

/* Section Header Typography */
.section-header {
  margin-bottom: 3.5rem;
}

.text-center {
  text-align: center;
}

.section-subtitle {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-cyan);
  display: block;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto;
}

/* 7. Hero Section (1ª Sección) */
.hero-section {
  padding-top: 10rem;
  padding-bottom: 6rem;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

.highlight-gradient {
  background: linear-gradient(135deg, #ffffff 30%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-bottom: 1.25rem;
}

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

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.hero-social-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero-visual {
  position: relative;
}

.visual-card-frame {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  position: relative;
}

.hero-banner-img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  margin: 0;
}

.visual-card-overlay {
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.95);
}

.card-chip {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-cyan);
  margin-bottom: 0.75rem;
}

.code-snippet {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.code-keyword { color: #f43f5e; }
.code-number { color: #f59e0b; }
.code-string { color: #34d399; }

/* 8. Projects Carousel Section (2ª Sección) */
.projects-section {
  background: rgba(15, 23, 42, 0.4);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding-top: 4.5rem;
}

.projects-section .section-header {
  margin-bottom: 1.5rem;
}

.carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.carousel-arrow {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.carousel-arrow:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 15px var(--accent-glow);
  transform: scale(1.08);
}

.carousel-track-container {
  overflow: hidden;
  width: 100%;
  border-radius: var(--radius-lg);
  touch-action: pan-y;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.carousel-slide {
  min-width: 100%;
  box-sizing: border-box;
  padding: 0.5rem;
}

/* Project Card Layout with 16:9 Aspect Ratio on both Image and Text halves */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  backdrop-filter: blur(12px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  align-items: center;
}

.project-img-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: rgba(9, 13, 22, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}

.multi-img-wrapper {
  position: relative;
}

.sub-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(9, 13, 22, 0.85);
  border: 1px solid var(--border-glow);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  z-index: 5;
  cursor: pointer;
  transition: var(--transition-fast);
  opacity: 0.8;
}

.sub-arrow:hover {
  opacity: 1;
  background: rgba(2, 132, 199, 0.9);
  color: #ffffff;
  transform: translateY(-50%) scale(1.1);
}

.sub-prev { left: 0.75rem; }
.sub-next { right: 0.75rem; }

.project-thumbs-strip {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.4rem;
  background: rgba(9, 13, 22, 0.85);
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(8px);
  z-index: 5;
  max-width: 90%;
  overflow-x: auto;
}

.thumb-img {
  width: 44px;
  height: 28px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.6;
  border: 1px solid transparent;
  transition: var(--transition-fast);
}

.thumb-img:hover, .thumb-img.active {
  opacity: 1;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-glow);
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.project-category-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(9, 13, 22, 0.85);
  border: 1px solid var(--border-glow);
  color: var(--accent-cyan);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  backdrop-filter: blur(6px);
}

.project-info {
  padding: 2rem 2.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  aspect-ratio: 16 / 9;
  box-sizing: border-box;
}

.project-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.project-logo-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border: none;
  background: transparent;
  padding: 0;
  border-radius: 0;
  flex-shrink: 0;
}

.project-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 0;
}

.project-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.project-links {
  display: flex;
  gap: 1rem;
}

/* Dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.3);
  transition: var(--transition-fast);
}

.dot.active {
  width: 32px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
  box-shadow: 0 0 10px var(--accent-glow);
}

/* 9. Tools & Skills Section (Redesigned Minimalist Tiles) */
.tools-grid-redesign {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
}

.tool-tile {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  backdrop-filter: blur(12px);
}

.tool-icon-wrap {
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tool-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.tool-tile-body {
  display: flex;
  flex-direction: column;
}

.tool-tile-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.tool-tile-cat {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Icon specific colors */
.color-python { color: #3776ab; }
.color-fastapi { color: #009688; }
.color-cpp { color: #00599c; }
.color-asm { color: #a855f7; }
.color-sql { color: #f59e0b; }
.color-js { color: #f7df1e; }
.color-ts { color: #3178c6; }
.color-html { color: #e34f26; }
.color-css { color: #1572b6; }
.color-react { color: #61dafb; }
.color-tailwind { color: #06b6d4; }
.color-django { color: #10b981; }
.color-node { color: #22c55e; }
.color-mongo { color: #47a248; }
.color-mysql { color: #00758f; }
.color-git { color: #f05032; }
.color-vercel { color: #ffffff; }
.color-android { color: #3ddc84; }
.color-ai { color: #ec4899; }
.color-cyber { color: #e11d48; }
.color-discord { color: #5865f2; }

/* 10. Footer Section (4ª Sección) */
.footer {
  background: #04070d;
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem 0;
}

.footer-container {
  display: flex;
  flex-direction: column;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-tagline {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 1rem;
  max-width: 350px;
}

.footer-contact h4, .footer-socials h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1.2rem;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-list a {
  color: var(--text-muted);
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: var(--transition-fast);
}

.contact-list a:hover {
  color: var(--accent-cyan);
}

.social-icons {
  display: flex;
  gap: 0.75rem;
}

.social-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition-fast);
}

.social-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-3px);
}

.btn-wa-icon:hover {
  border-color: #22c55e;
  color: #22c55e;
}

.footer-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 2rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.footer-legal-tags {
  display: flex;
  gap: 1.5rem;
}

/* Responsive Media Queries (Sobremesa, Laptop, Tablet, Móvil) */

/* 1. Sobremesa / Grandes Monitores (>= 1200px) */
@media (min-width: 1200px) {
  .section, .footer {
    height: 100vh;
    height: 100dvh;
  }
  .projects-section {
    padding-top: 4.2rem !important;
  }
  .projects-section .section-header {
    margin-bottom: 1.2rem !important;
  }
  .tools-grid-redesign {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.9rem;
  }
  .tool-tile {
    padding: 0.75rem 1rem;
  }
}

/* 2. Laptops & Pantallas de Portátiles (992px a 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
  .section, .footer {
    height: 100vh;
    height: 100dvh;
    padding: 4.5rem 0 1.5rem 0;
  }
  .projects-section {
    padding-top: 4.2rem !important;
  }
  .projects-section .section-header {
    margin-bottom: 1rem !important;
  }
  .hero-title {
    font-size: 2.8rem;
  }
  .section-header {
    margin-bottom: 1.5rem;
  }
  .tools-grid-redesign {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.65rem;
  }
  .tool-tile {
    padding: 0.6rem 0.8rem;
  }
  .tool-tile-name {
    font-size: 0.88rem;
  }
  .tool-tile-cat {
    font-size: 0.7rem;
  }
}

/* 3. Tablets (768px a 991px) */
@media (max-width: 991px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-visual {
    max-width: 550px;
    margin: 0 auto;
  }
  .project-card {
    grid-template-columns: 1fr;
  }
  .project-info {
    aspect-ratio: auto;
    padding: 1.5rem;
    gap: 0.8rem;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .tools-grid-redesign {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }
}

/* 4. Dispositivos Móviles (< 768px) */
@media (max-width: 767px) {
  .section, .footer {
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    padding: 6.5rem 0 2rem 0;
  }

  .hero-section {
    padding-top: 7.5rem !important;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .nav-menu {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: rgba(9, 13, 22, 0.98);
    flex-direction: column;
    align-items: center;
    padding: 3rem 0;
    transition: var(--transition-normal);
    backdrop-filter: blur(20px);
  }

  .nav-menu.active {
    left: 0;
  }

  .mobile-toggle {
    display: block;
  }

  /* Language Switcher inside Mobile Hamburger Menu */
  .lang-switcher-desktop {
    display: none !important;
  }

  .lang-switcher-mobile {
    display: flex !important;
    margin-top: 1.5rem;
  }

  /* Hero buttons mobile layout: PDF row 1 (100% width), icons row 2 (space-between) */
  .hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    width: 100%;
    align-items: stretch;
  }

  .hero-buttons #btnDownloadCv {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }

  .hero-social-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
  }

  .hero-social-row .btn-icon {
    width: 55px;
    height: 48px;
    flex: 0 0 auto;
  }

  /* Mobile Projects Section Redesign */
  .carousel-wrapper {
    position: relative;
    gap: 0;
  }

  .carousel-arrow {
    display: none !important;
  }

  .project-card {
    grid-template-columns: 1fr;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  }

  .project-img-wrapper {
    aspect-ratio: 16 / 9;
    width: 100%;
    overflow: hidden;
    position: relative;
    background: rgba(9, 13, 22, 0.8);
  }

  /* Hide inner sub-arrows and inner thumbs strip on mobile cards to keep 16:9 image 100% clean! */
  .sub-arrow,
  .project-thumbs-strip {
    display: none !important;
  }

  .project-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .project-category-badge {
    top: 0.65rem;
    left: 0.65rem;
    font-size: 0.68rem;
    padding: 0.2rem 0.55rem;
  }

  .project-info {
    padding: 1.15rem;
    gap: 0.75rem;
    aspect-ratio: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .project-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .project-logo-icon {
    width: 30px;
    height: 30px;
  }

  .project-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
  }

  .project-desc {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-muted);
  }

  .project-links {
    margin-top: 0.25rem;
  }

  .project-links .btn {
    width: 100%;
    justify-content: center;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }

  .carousel-dots {
    margin-top: 1.25rem;
    gap: 0.5rem;
  }

  /* Herramientas Grid 2 Columnas Simétricas Sin Desbordamiento */
  .tools-grid-redesign {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
    width: 100%;
    box-sizing: border-box;
  }

  .tool-tile {
    min-width: 0;
    padding: 0.75rem 0.5rem;
    gap: 0.5rem;
    align-items: center;
    box-sizing: border-box;
  }

  .tool-icon-wrap {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
  }

  .tool-logo-img {
    width: 22px;
    height: 22px;
  }

  .tool-tile-body {
    min-width: 0;
    overflow: hidden;
  }

  .tool-tile-name {
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .tool-tile-cat {
    font-size: 0.65rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* ==========================================================================
   Project Lightbox Modal Gallery
   ========================================================================== */

.clickable-zoom {
  cursor: zoom-in;
}

.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 7, 13, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.lightbox-content {
  position: relative;
  z-index: 10000;
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  box-sizing: border-box;
}

.lightbox-close {
  position: absolute;
  top: -45px;
  right: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 10001;
}

.lightbox-close:hover {
  background: var(--accent-blue);
  border-color: var(--accent-cyan);
  transform: scale(1.1);
}

.lightbox-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-align: center;
  flex-wrap: wrap;
  justify-content: center;
}

.lightbox-header h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.lightbox-badge {
  padding: 0.25rem 0.75rem;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.lightbox-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 85vw;
  max-height: 70vh;
}

.lightbox-img {
  max-width: 85vw;
  max-height: 70vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  border: 1px solid var(--border-color);
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(9, 13, 22, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 10;
}

.lightbox-arrow:hover {
  background: var(--accent-blue);
  border-color: var(--accent-cyan);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
  left: -24px;
}

.lightbox-next {
  right: -24px;
}

.lightbox-thumbs {
  display: flex;
  gap: 0.5rem;
  max-width: 85vw;
  overflow-x: auto;
  padding: 0.5rem 0;
  scrollbar-width: thin;
}

.lightbox-thumb {
  width: 65px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  border: 2px solid transparent;
  opacity: 0.5;
  cursor: pointer;
  transition: var(--transition-fast);
}

.lightbox-thumb:hover, .lightbox-thumb.active {
  opacity: 1;
  border-color: var(--accent-cyan);
  transform: scale(1.05);
}

@media (max-width: 767px) {
  .lightbox-prev {
    left: 10px;
  }
  .lightbox-next {
    right: 10px;
  }
  .lightbox-close {
    top: 10px;
    right: 10px;
  }
  .lightbox-header h3 {
    font-size: 1rem;
  }
}
