/* =========================================================
   ABIMAR — Portfolio
   CSS puro (sin Tailwind)
   ========================================================= */

:root {
  --bg-color: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --accent-color: #7c3aed;
  --accent-dark: #6d28d9;
  --accent-glow: rgba(124, 58, 237, 0.3);
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(0, 0, 0, 0.05);
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --font-main: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-main);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.no-scroll {
  overflow: hidden;
}

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

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

button {
  font: inherit;
}

.icon {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.icon-20 { font-size: 20px; }
.icon-24 { font-size: 24px; }
.icon-28 { font-size: 28px; }
.icon-32 { font-size: 32px; }

.hidden {
  display: none !important;
}

/* Utilidades compartidas */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

.text-gradient {
  background: linear-gradient(to right, #7c3aed, #4f46e5);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  border: none;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
  color: white;
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--accent-glow);
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: var(--text-secondary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-color); }

/* =========================================================
   Animaciones (reemplazo de framer-motion)
   ========================================================= */

@keyframes fadeLeft {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: none; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: none; }
}

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

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

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

/* Revelado al hacer scroll: JS añade .is-visible */
.reveal {
  opacity: 0;
  transform: translateY(var(--reveal-y, 12px)) translateX(var(--reveal-x, 0));
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
  transition-delay: var(--delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-left {
  --reveal-y: 0;
  --reveal-x: -16px;
}

/* Sin JS: todo visible */
.no-js .reveal {
  opacity: 1;
  transform: none;
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* =========================================================
   Navbar
   ========================================================= */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background-color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  border-bottom: 1px solid transparent;
  background-color: transparent;
  padding: 1.5rem 0;
}

.navbar.is-scrolled {
  background-color: rgba(255, 255, 255, 0.96);
  border-bottom-color: rgba(226, 232, 240, 0.6);
  padding: 1rem 0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  z-index: 1000;
}

.logo-text {
  font-size: 1.875rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  color: var(--slate-900);
  transition: color 0.3s ease;
}

.logo-dot {
  color: var(--accent-color);
}

.logo-underline {
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

.logo:hover .logo-underline {
  width: 100%;
}

.desktop-menu {
  display: none;
  align-items: center;
  gap: 3.5rem;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-link {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.3s ease;
  color: var(--slate-700);
}

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

.language-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--slate-600);
  cursor: pointer;
  transition: color 0.3s ease;
}

.language-btn:hover {
  color: var(--accent-color);
}

.mobile-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 1000;
}

.mobile-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  background-color: rgba(255, 255, 255, 0.85);
  border: none;
  border-radius: 9999px;
  color: var(--slate-800);
  cursor: pointer;
}

.mobile-toggle .icon-close {
  display: none;
}

.navbar.menu-open .mobile-toggle .icon-open {
  display: none;
}

.navbar.menu-open .mobile-toggle .icon-close {
  display: block;
}

.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background-color: white;
  z-index: 900;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding-top: 8rem;
  opacity: 0;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.25s var(--ease-out), opacity 0.25s var(--ease-out), visibility 0s linear 0.25s;
}

.navbar.menu-open .mobile-overlay {
  opacity: 1;
  transform: none;
  visibility: visible;
  transition: transform 0.25s var(--ease-out), opacity 0.25s var(--ease-out), visibility 0s;
}

.mobile-menu-content {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  text-align: center;
  margin-top: 2rem;
}

.mobile-link {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--slate-900);
  text-transform: uppercase;
  letter-spacing: -0.05em;
  transition: color 0.3s ease;
}

.mobile-link:hover {
  color: var(--accent-color);
}


@media (min-width: 768px) {
  .desktop-menu {
    display: flex;
  }

  .mobile-controls,
  .mobile-overlay {
    display: none;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 1rem 0;
  }

  .logo-text {
    font-size: 1.5rem;
  }
}

/* =========================================================
   Hero
   ========================================================= */

.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 5rem;
  isolation: isolate;
}

.hero-bg-blue,
.hero-bg-purple {
  position: absolute;
  width: 800px;
  height: 800px;
  z-index: -10;
  pointer-events: none;
}

.hero-bg-blue {
  top: -150px;
  right: -150px;
  background: radial-gradient(circle closest-side, rgba(59, 130, 246, 0.1), transparent);
}

.hero-bg-purple {
  bottom: -150px;
  left: -150px;
  background: radial-gradient(circle closest-side, rgba(168, 85, 247, 0.1), transparent);
}

.hero-container {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  gap: 3rem;
  align-items: center;
}

.hero-text {
  animation: fadeLeft 0.45s var(--ease-out) both;
}

.hero-hello {
  color: var(--accent-color);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.1;
  color: var(--slate-900);
}

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

.hero-subtitle {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--slate-600);
}

.hero-description {
  color: var(--slate-500);
  font-size: 1.125rem;
  margin-bottom: 2rem;
  max-width: 32rem;
  line-height: 1.625;
}

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

.btn-violet {
  display: inline-block;
  background-color: var(--accent-color);
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-violet:hover {
  box-shadow: 0 10px 15px -3px rgba(124, 58, 237, 0.5);
  transform: translateY(-2px);
}

.hero-image-column {
  position: relative;
  display: flex;
  justify-content: center;
  animation: scaleIn 0.45s var(--ease-out) both;
}

.floating-icon {
  position: absolute;
  background-color: var(--slate-800);
  padding: 1rem;
  border-radius: 1rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  z-index: 20;
  border: 1px solid #374151;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}

.floating-icon span {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.6;
}

.icon-ai {
  top: 0;
  left: 2.5rem;
  animation: float10 3s ease-in-out infinite;
}

.icon-ps {
  top: 50%;
  right: 0;
  animation: float15 4s ease-in-out 1s infinite;
}

.icon-id {
  bottom: 2.5rem;
  left: 0;
  animation: float12 5s ease-in-out 0.5s infinite;
}

.icon-ai span { color: #fca311; }
.icon-ps span { color: #38bdf8; }
.icon-id span { color: #a855f7; }

.hero-image-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 28rem;
}

.hero-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-bottom-left-radius: 1.5rem;
  border-bottom-right-radius: 1.5rem;
  -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

.hero-decorative-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -10;
  opacity: 0.3;
}

@media (min-width: 768px) {
  .hero-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .hero-subtitle {
    font-size: 2.25rem;
  }

  .icon-ai {
    left: 5rem;
  }

  .icon-ps {
    right: -1rem;
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding-top: 8rem;
  }

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

  .hero-subtitle {
    font-size: 1.5rem;
  }
}

/* =========================================================
   About
   ========================================================= */

.about-section {
  padding-top: 5rem;
  position: relative;
  overflow: hidden;
  background-color: rgba(248, 250, 252, 0.5);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.about-grid {
  display: grid;
  gap: 4rem;
  align-items: center;
}

.about-image-column {
  position: relative;
  display: none;
}

.about-image-glow {
  position: absolute;
  inset: -1rem;
  border-radius: 1.5rem;
  box-shadow: 0 0 48px 8px rgba(109, 40, 217, 0.22);
}

.about-image {
  position: relative;
  border-radius: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  object-fit: cover;
  height: 600px;
  width: 100%;
}

.availability-card {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  background-color: rgba(255, 255, 255, 0.95);
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-icon {
  padding: 0.75rem;
  background-color: #ede9fe;
  color: var(--accent-color);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-label {
  color: var(--accent-color);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.about-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 1.5rem;
  line-height: 1.25;
}

.about-description {
  color: var(--slate-600);
  font-size: 1.125rem;
  line-height: 1.625;
  margin-bottom: 2rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.skill-card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  border-radius: 1rem;
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out), border-color 0.2s ease;
  transition-delay: var(--delay, 0s), var(--delay, 0s), 0s;
}

.skill-card:hover {
  border-color: #a78bfa;
}

.skill-icon {
  padding: 0.75rem;
  background-color: #f5f3ff;
  border-radius: 0.75rem;
  color: var(--accent-color);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.skill-card:hover .skill-icon {
  background-color: var(--accent-color);
  color: white;
}

.skill-title {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--slate-800);
}

.progress-bar {
  width: 100%;
  background-color: var(--slate-100);
  height: 0.5rem;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background-color: var(--accent-color);
  border-radius: 9999px;
  transition: width 0.6s var(--ease-out);
  transition-delay: calc(var(--delay, 0s) + 0.1s);
}

.skill-card.is-visible .progress-fill,
.no-js .progress-fill {
  width: var(--level);
}

@media (min-width: 1024px) {
  .about-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-image-column {
    display: block;
  }
}

/* =========================================================
   Portfolio
   ========================================================= */

.portfolio-section {
  padding: 5rem 0;
  position: relative;
}

.portfolio-header {
  text-align: center;
  margin-bottom: 4rem;
}

.portfolio-title {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--slate-900);
}

.portfolio-subtitle {
  color: var(--slate-500);
  font-size: 1rem;
}

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

.project-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  --reveal-y: 12px;
  transition: opacity 0.4s var(--ease-out), transform 0.25s ease, border-color 0.2s ease, box-shadow 0.25s ease;
  transition-delay: var(--delay, 0s), 0s, 0s, 0s;
}

.project-card.is-visible:hover {
  border-color: #8b5cf6;
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.project-image-wrapper {
  position: relative;
  height: 12rem;
  overflow: hidden;
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.project-card:hover .project-image {
  transform: scale(1.1);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-card:hover .project-overlay,
.project-overlay:focus-within {
  opacity: 1;
}

.project-link-btn {
  background-color: var(--accent-color);
  color: white;
  padding: 0.75rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.project-link-btn:hover {
  background-color: var(--accent-dark);
}

.project-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-type {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--slate-800);
}

.project-description {
  color: var(--slate-500);
  font-size: 0.875rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 768px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .portfolio-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* =========================================================
   Contact
   ========================================================= */

.contact-section {
  background-color: white;
  position: relative;
  overflow: hidden;
}

.contact-card {
  background-color: var(--slate-900);
  border-radius: 3rem;
  padding: 6rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.contact-glows {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.glow-purple,
.glow-blue {
  position: absolute;
  width: 900px;
  height: 900px;
}

.glow-purple {
  top: -45%;
  left: -30%;
  background: radial-gradient(circle closest-side, rgba(124, 58, 237, 0.3), transparent);
}

.glow-blue {
  bottom: -45%;
  right: -30%;
  background: radial-gradient(circle closest-side, rgba(37, 99, 235, 0.2), transparent);
}

.contact-content {
  position: relative;
  z-index: 10;
  max-width: 56rem;
  margin: 0 auto;
  --reveal-y: 12px;
}

.contact-title {
  font-size: 3rem;
  font-weight: 900;
  color: white;
  margin-bottom: 2rem;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.contact-title-highlight {
  display: block;
  background: linear-gradient(to right, #a78bfa, #818cf8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-top: 0.5rem;
}

.contact-description {
  font-size: 1.25rem;
  color: var(--slate-400);
  margin: 0 auto 3rem;
  line-height: 1.625;
  max-width: 42rem;
  font-weight: 300;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.email-btn,
.copy-btn {
  width: 100%;
  padding: 1.25rem 2.5rem;
  border-radius: 9999px;
  font-size: 1.125rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.email-btn {
  background-color: white;
  color: var(--slate-900);
  box-shadow: 0 10px 15px -3px rgba(255, 255, 255, 0.1);
  border: none;
}

.email-btn:hover {
  background-color: #f5f3ff;
  transform: translateY(-4px);
}

.email-btn .icon {
  color: var(--accent-color);
}

.copy-btn {
  background-color: transparent;
  border: 2px solid var(--slate-700);
  color: white;
}

.copy-btn:hover {
  border-color: #8b5cf6;
  background-color: rgba(139, 92, 246, 0.1);
}

.copy-btn .icon-check {
  display: none;
  color: #4ade80;
}

.copy-btn.is-copied .icon-copy {
  display: none;
}

.copy-btn.is-copied .icon-check {
  display: block;
}

.social-links {
  margin-top: 5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--slate-800);
  display: flex;
  justify-content: center;
  gap: 2.5rem;
}

.social-icon {
  padding: 1rem;
  background-color: rgba(30, 41, 59, 0.5);
  border-radius: 1rem;
  color: var(--slate-400);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-icon:hover {
  color: white;
  background-color: var(--accent-color);
  transform: scale(1.1) rotate(-3deg);
}

@media (min-width: 640px) {
  .contact-actions {
    flex-direction: row;
  }

  .email-btn,
  .copy-btn {
    width: auto;
  }
}

@media (min-width: 768px) {
  .contact-title {
    font-size: 4.5rem;
  }

  .contact-description {
    font-size: 1.5rem;
  }

  .contact-card {
    padding: 6rem;
  }
}

@media (max-width: 480px) {
  .contact-card {
    padding: 4rem 1.5rem;
    border-radius: 2rem;
  }

  .contact-title {
    font-size: 2.5rem;
  }

  .social-links {
    gap: 1.5rem;
  }
}

/* =========================================================
   Footer
   ========================================================= */

.footer {
  padding: 2rem 0;
  margin-top: 5rem;
  border-top: 1px solid var(--slate-200);
  background-color: white;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  color: var(--slate-500);
}

.footer-copyright {
  font-size: 0.875rem;
  text-align: center;
}

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

.footer-link {
  color: var(--slate-500);
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-link:hover {
  color: var(--accent-color);
}

@media (min-width: 768px) {
  .footer-container {
    flex-direction: row;
    justify-content: space-between;
  }

  .footer-copyright {
    text-align: left;
  }
}

/* =========================================================
   Página de proyecto
   ========================================================= */

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.project-page {
  background-color: var(--slate-50);
  padding-top: 8rem;
}

.project-main {
  flex: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-color);
  font-weight: 500;
  margin-bottom: 2rem;
  transition: gap 0.3s ease;
}

.back-link:hover {
  gap: 0.75rem;
}

.project-page-title {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--slate-900);
  margin-bottom: 1rem;
}

.title-bar {
  width: 6rem;
  height: 0.25rem;
  background-color: var(--accent-color);
  margin-bottom: 3rem;
}

.gallery-section + .gallery-section {
  margin-top: 4rem;
}

.gallery-heading {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--slate-800);
}

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

.video-item {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  background-color: black;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-item video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.masonry {
  column-count: 1;
  column-gap: 1.5rem;
}

.masonry-item {
  display: block;
  break-inside: avoid;
  margin-bottom: 1.5rem;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--slate-200);
  background-color: white;
}

.masonry-item img {
  width: 100%;
  height: auto;
  transition: transform 0.5s ease;
}

.masonry-item img:hover {
  transform: scale(1.05);
}

@media (min-width: 640px) {
  .masonry {
    column-count: 2;
  }
}

@media (min-width: 768px) {
  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .masonry {
    column-count: 3;
  }
}

/* =========================================================
   Login y 404
   ========================================================= */

.center-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8rem 1.5rem 3rem;
  text-align: center;
}

.login-panel {
  padding: 2rem;
  width: 100%;
  max-width: 28rem;
  text-align: left;
}

.login-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
}

.login-error {
  color: #ef4444;
  text-align: center;
  margin-bottom: 1rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field-label {
  display: block;
  font-size: 0.875rem;
  color: var(--slate-500);
  margin-bottom: 0.25rem;
}

.field-input {
  width: 100%;
  background-color: white;
  border: 1px solid var(--slate-300);
  border-radius: 0.5rem;
  padding: 0.75rem;
  color: var(--slate-900);
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease;
}

.field-input:focus {
  border-color: #8b5cf6;
}

.login-form .btn {
  margin-top: 1rem;
}

.notfound-code {
  font-size: 6rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
}

.notfound-text {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 1rem 0 1.5rem;
  color: var(--slate-800);
}

/* Retrasos y niveles (sin estilos inline por la CSP) */
.delay-1 { --delay: 0.05s; }
.delay-2 { --delay: 0.1s; }
.delay-3 { --delay: 0.15s; }
.level-95 { --level: 95%; }
.level-90 { --level: 90%; }
.level-85 { --level: 85%; }
.level-80 { --level: 80%; }

/* =========================================================
   Móvil: contenido inmediato, sin animaciones de entrada
   ========================================================= */

@media (max-width: 767px) {
  .reveal,
  .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-text,
  .hero-image-column {
    animation: none;
  }

  .progress-fill {
    width: var(--level);
    transition: none;
  }

}
