/* ==========================================================================
   PORTAFOLIO MARIO MARTÍNEZ — FULL STACK SOFTWARE ENGINEER
   Diseño Claro, Elegante, Minimalista y de Alto Impacto Visual
   ========================================================================== */

/* --- Google Fonts Import (Outfit & Plus Jakarta Sans: Redondeada, Fresca y Profesional) --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* --- Design Tokens & CSS Variables --- */
:root {
  /* Brand Colors & Tones (Light Palette) */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --bg-surface-glass: rgba(255, 255, 255, 0.85);
  --bg-surface-frosted: rgba(255, 255, 255, 0.65);
  
  /* Text Colors */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  
  /* Accent Colors */
  --accent-primary: #4f46e5;       /* Indigo Royal */
  --accent-primary-hover: #4338ca;
  --accent-primary-light: #eef2ff;
  --accent-secondary: #0ea5e9;     /* Sky Blue */
  --accent-secondary-light: #e0f2fe;
  --accent-emerald: #059669;       /* Emerald / Success */
  --accent-emerald-light: #ecfdf5;
  --accent-purple: #7c3aed;        /* Violet */
  --accent-purple-light: #f5f3ff;
  --accent-amber: #d97706;         /* Amber */
  --accent-amber-light: #fffbeb;
  --accent-rose: #e11d48;          /* Rose / Pink */
  --accent-rose-light: #fff1f2;
  
  /* Gradients */
  --grad-primary: linear-gradient(135deg, #4f46e5 0%, #0ea5e9 100%);
  --grad-vibrant: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  --grad-subtle: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  --grad-surface: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.8));
  --grad-glow: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.12) 0%, rgba(14, 165, 233, 0.05) 50%, transparent 80%);
  --grad-emerald: linear-gradient(135deg, #059669 0%, #10b981 100%);
  
  /* Borders & Dividers */
  --border-light: #e2e8f0;
  --border-subtle: #edf2f7;
  --border-strong: #cbd5e1;
  --border-glass: rgba(255, 255, 255, 0.8);
  --border-accent: rgba(79, 70, 229, 0.2);

  /* Shadows (Multi-layered luxury soft shadows) */
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.05), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.06), 0 8px 10px -6px rgba(15, 23, 42, 0.03);
  --shadow-2xl: 0 25px 50px -12px rgba(15, 23, 42, 0.1);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.2);
  --shadow-card-hover: 0 22px 35px -10px rgba(15, 23, 42, 0.08), 0 0 1px 1px rgba(79, 70, 229, 0.1);

  /* Typography - Redondeada, Fresca y Profesional */
  --font-main: 'Outfit', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Layout */
  --container-max: 1240px;
  --header-height: 76px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Reset & Base Styles --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Background Ambient Lighting Canvas & Blobs */
.ambient-canvas-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background-image: 
    radial-gradient(rgba(79, 70, 229, 0.05) 1px, transparent 1px),
    linear-gradient(to right, rgba(99, 102, 241, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
  background-size: 32px 32px, 64px 64px, 64px 64px;
}

#ambientCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.ambient-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: floatOrb 20s infinite alternate ease-in-out;
}

.ambient-blob-1 {
  width: 500px;
  height: 500px;
  top: -100px;
  right: -50px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, rgba(14, 165, 233, 0.15) 100%);
  animation-duration: 18s;
}

.ambient-blob-2 {
  width: 600px;
  height: 600px;
  top: 35%;
  left: -150px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.2) 0%, rgba(16, 185, 129, 0.12) 100%);
  animation-duration: 24s;
  animation-delay: -5s;
}

.ambient-blob-3 {
  width: 450px;
  height: 450px;
  bottom: 10%;
  right: 5%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.18) 0%, rgba(99, 102, 241, 0.1) 100%);
  animation-duration: 22s;
  animation-delay: -10s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.08); }
  100% { transform: translate(-30px, -20px) scale(0.95); }
}

/* Subtle Grid Texture */
.bg-grid-pattern {
  position: fixed;
  inset: 0;
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(226, 232, 240, 0.4) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(226, 232, 240, 0.4) 1px, transparent 1px);
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 0%, rgba(0,0,0,0.1) 75%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 0%, rgba(0,0,0,0.1) 75%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
  position: relative;
  z-index: 1;
}

section {
  position: relative;
  z-index: 1;
  padding: 48px 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

/* --- Section Headers --- */
.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 32px auto;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--accent-primary-light);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-full);
  color: var(--accent-primary);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.section-tag svg {
  width: 14px;
  height: 14px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.18;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}

.section-title .text-gradient {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-desc {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- Buttons & CTAs --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 26px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: var(--transition-normal);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn svg {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-fast);
}

.btn-primary {
  background: var(--accent-primary);
  color: var(--text-inverse);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(79, 70, 229, 0.45);
}

.btn-primary:hover svg {
  transform: translateX(3px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-card-subtle);
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-emerald {
  background: var(--accent-emerald);
  color: var(--text-inverse);
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-emerald:hover {
  background: #047857;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(5, 150, 105, 0.45);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 15px 32px;
  font-size: 1.05rem;
}

/* --- Navigation Header --- */
.header-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 100;
  transition: var(--transition-normal);
  display: flex;
  align-items: center;
}

.header-nav.scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04);
  height: 68px;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.brand-avatar-wrap {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--accent-primary);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
  flex-shrink: 0;
}

.brand-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: var(--accent-emerald-light);
  border: 1px solid rgba(5, 150, 105, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-emerald);
}

.status-dot {
  width: 7px;
  height: 7px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.2);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(5, 150, 105, 0); }
  100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 6px 0;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  transition: width var(--transition-fast);
  border-radius: 2px;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mobile-toggle {
  display: none;
  padding: 8px;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
}

.mobile-toggle svg {
  width: 24px;
  height: 24px;
}

/* --- Hero Section --- */
.hero-section {
  padding-top: calc(var(--header-height) + 24px);
  padding-bottom: 40px;
  min-height: auto;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 50px;
  align-items: center;
}

.hero-content {
  max-width: 660px;
}

.hero-profile-card {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 8px 18px 8px 10px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
  margin-bottom: 24px;
  transition: var(--transition-normal);
}

.hero-profile-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.hero-avatar-wrapper {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.hero-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-primary);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.avatar-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 13px;
  height: 13px;
  background-color: var(--accent-emerald);
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.2);
}

.hero-profile-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.hero-profile-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.hero-profile-role {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.hero-profile-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  background: var(--accent-emerald-light);
  border: 1px solid rgba(5, 150, 105, 0.2);
  color: var(--accent-emerald);
  border-radius: var(--radius-full);
  margin-left: 6px;
}

.hero-badge-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.hero-badge-highlight {
  color: var(--accent-primary);
  font-weight: 700;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  margin-bottom: 22px;
}

.hero-title .gradient-text {
  background: var(--grad-vibrant);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-subtitle strong {
  color: var(--text-primary);
  font-weight: 600;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border-light);
  width: 100%;
}

.stat-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-lg);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(8px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  text-align: left;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px -5px rgba(15, 23, 42, 0.08);
  border-color: rgba(79, 70, 229, 0.3);
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.stat-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-number .stat-unit {
  color: var(--accent-primary);
  font-size: 0.95rem;
  margin-left: 1px;
}

.stat-number.stat-badge-text {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-primary);
  background: var(--bg-card-subtle);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  letter-spacing: 0.02em;
}

.stat-title {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
  line-height: 1.25;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.35;
}

/* Hero Visual / Interactive Device Showcase Card */
.hero-visual {
  position: relative;
  perspective: 1000px;
}

.hero-card-stack {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.hero-main-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-2xl);
  position: relative;
  z-index: 2;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transform-style: preserve-3d;
  transition: transform var(--transition-normal);
}

.hero-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

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

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.tech-tag-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 10px;
  background: var(--bg-card-subtle);
  border-radius: var(--radius-sm);
  color: var(--accent-primary);
  font-weight: 600;
}

.code-snippet {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--text-primary);
  background: #f8fafc;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  margin-bottom: 18px;
  overflow-x: auto;
}

.code-keyword { color: #7c3aed; font-weight: 600; }
.code-property { color: #0284c7; }
.code-string { color: #059669; }
.code-func { color: #ea580c; font-weight: 600; }
.code-comment { color: #94a3b8; font-style: italic; }

.hero-card-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.feature-mini-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.feature-mini-badge svg {
  width: 16px;
  height: 16px;
  color: var(--accent-primary);
  flex-shrink: 0;
}

/* Floating interactive chips in Hero */
.floating-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(12px);
  z-index: 3;
  animation: floatChip 6s ease-in-out infinite alternate;
}

.floating-chip-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.floating-chip-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.floating-chip-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.chip-1 {
  top: -20px;
  left: -25px;
  animation-duration: 5s;
}

.chip-2 {
  bottom: -20px;
  right: -25px;
  animation-duration: 6.5s;
  animation-delay: -2s;
}

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

/* --- Full Stack Pillars Section --- */
.pillars-section {
  position: relative;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.pillar-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pillar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--grad-primary);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.pillar-card:hover {
  background: #ffffff;
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--border-strong);
}

.pillar-card:hover::before {
  opacity: 1;
}

.pillar-icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  transition: transform var(--transition-fast);
}

.pillar-card:hover .pillar-icon-box {
  transform: scale(1.1);
}

.pillar-icon-box svg {
  width: 26px;
  height: 26px;
}

.pillar-icon-ui { background: #fee2e2; color: #dc2626; }
.pillar-icon-front { background: #e0f2fe; color: #0284c7; }
.pillar-icon-back { background: #f3e8ff; color: #7e22ce; }
.pillar-icon-mobile { background: #ecfdf5; color: #059669; }

.pillar-num {
  position: absolute;
  top: 24px;
  right: 24px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--border-strong);
}

.pillar-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.3;
}

.pillar-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
}

.pillar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.pillar-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

/* --- Projects Showcase Section --- */
.projects-section {
  position: relative;
}

/* Project Filter Tabs */
.project-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: #ffffff;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-btn:hover {
  background: var(--bg-card-subtle);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.filter-btn.active {
  background: var(--text-primary);
  color: var(--text-inverse);
  border-color: var(--text-primary);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.filter-count {
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
}

.filter-btn:not(.active) .filter-count {
  background: var(--bg-card-subtle);
  color: var(--text-muted);
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  opacity: 1;
  transform: scale(1);
}

.project-card.is-hidden {
  display: none !important;
}

.project-card.is-animating-out {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
}

.project-card.is-animating-in {
  animation: projectFadeIn 0.38s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes projectFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.95) translateY(14px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-2xl);
  border-color: rgba(79, 70, 229, 0.3);
}

.project-card.featured-card {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* Project Visual Frame */
.project-preview-wrap {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  padding: 36px 30px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  overflow: hidden;
}

.project-preview-wrap.theme-ned {
  background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 50%, #fbcfe8 100%);
}

.project-preview-wrap.theme-admiris {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 50%, #bfdbfe 100%);
}

.project-preview-wrap.theme-admirisk {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 50%, #bbf7d0 100%);
}

.project-preview-wrap.theme-perlad {
  background: linear-gradient(135deg, #f7fee7 0%, #ecfccb 50%, #d9f99d 100%);
}

/* CSS Ultra-Premium Smartphone Mockup */
.device-phone {
  width: 220px;
  height: 440px;
  background: #090d16;
  border-radius: 46px;
  padding: 8px;
  box-shadow: 
    0 30px 60px -15px rgba(15, 23, 42, 0.45),
    0 10px 24px -8px rgba(196, 34, 125, 0.3),
    0 0 0 1.5px rgba(255, 255, 255, 0.18) inset,
    0 0 0 3px #1e293b,
    0 0 0 4.5px #0f172a;
  position: relative;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
  user-select: none;
}

/* Side physical buttons */
.device-phone::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 90px;
  height: 48px;
  width: 3px;
  background: #334155;
  border-radius: 2px 0 0 2px;
  box-shadow: 0 60px 0 #334155;
}

.device-phone::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 110px;
  height: 65px;
  width: 3px;
  background: #334155;
  border-radius: 0 2px 2px 0;
}

.project-card:hover .device-phone {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 36px 72px -15px rgba(15, 23, 42, 0.52),
    0 16px 36px -8px rgba(196, 34, 125, 0.4),
    0 0 0 1.5px rgba(255, 255, 255, 0.25) inset,
    0 0 0 3px #334155,
    0 0 0 4.5px #0f172a;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: #000000;
  border-radius: 38px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.phone-dynamic-island {
  width: 76px;
  height: 18px;
  background: #000000;
  border-radius: 20px;
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  border: 0.5px solid rgba(255, 255, 255, 0.08);
}

.camera-lens {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #1e293b, #050b14);
  border: 0.8px solid #0f172a;
  box-shadow: inset 0 0 2px #38bdf8;
}

.phone-glare {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.02) 40%, transparent 60%);
  pointer-events: none;
  z-index: 10;
  border-radius: inherit;
}

/* CSS Browser / Desktop Mockup */
.device-browser {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 35px -8px rgba(15, 23, 42, 0.2);
  border: 1px solid var(--border-strong);
  overflow: hidden;
  transition: transform var(--transition-normal);
}

.project-card:hover .device-browser {
  transform: translateY(-4px) scale(1.02);
}

.browser-bar {
  background: #f1f5f9;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-light);
}

.browser-dots {
  display: flex;
  gap: 4px;
}

.browser-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.browser-address {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.browser-screen {
  padding: 16px;
  min-height: 180px;
  background: #ffffff;
}

.browser-screen.has-img {
  padding: 0;
  min-height: 200px;
  height: 220px;
  overflow: hidden;
  position: relative;
  background: #f8fafc;
}

.browser-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.phone-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .browser-img,
.project-card:hover .phone-img {
  transform: scale(1.05);
}

.modal-project-preview-wrap {
  width: 100%;
  height: 240px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  background: #f8fafc;
}

.modal-project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* Project Badge Overlays */
.project-type-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
  z-index: 5;
}

.badge-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

/* Project Info Area */
.project-info {
  padding: 32px 30px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-role-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.25;
}

.project-summary {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 20px;
  flex: 1;
}

.project-highlights {
  list-style: none;
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-highlights li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.project-highlights li svg {
  width: 16px;
  height: 16px;
  color: var(--accent-emerald);
  flex-shrink: 0;
  margin-top: 3px;
}

.project-stack-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
}

.stack-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 10px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
}

.project-action-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
}

.store-btn-group {
  display: flex;
  gap: 8px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #0f172a;
  color: #ffffff;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 600;
  transition: var(--transition-fast);
}

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

.store-btn:hover {
  background: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* --- Tech Stack & Capabilities Matrix --- */
.stack-section {
  position: relative;
}

.stack-categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.stack-category-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

.stack-category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(79, 70, 229, 0.3);
}

.stack-cat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.stack-cat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stack-cat-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.skills-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.skill-name {
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.skill-level {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.skill-bar-bg {
  width: 100%;
  height: 6px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  background: var(--grad-primary);
  border-radius: var(--radius-full);
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Certifications & Professional Credentials (Discreet Collapsible Component) --- */
.trayectoria-section {
  padding: 0 0 36px 0;
  position: relative;
  z-index: 2;
}

.trayectoria-section .cert-accordion-wrapper {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.cert-accordion-wrapper {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border-light);
}

.cert-accordion-trigger {
  width: 100%;
  appearance: none;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 22px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.cert-accordion-trigger:hover {
  background: #fdfdfd;
  border-color: rgba(79, 70, 229, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.1);
}

.cert-accordion-trigger:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

.cert-accordion-wrapper.is-open .cert-accordion-trigger {
  border-color: rgba(79, 70, 229, 0.5);
  box-shadow: var(--shadow-md);
  background: #ffffff;
}

.cert-trigger-left {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
}

.cert-trigger-icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-lg);
  background: rgba(79, 70, 229, 0.08);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.cert-accordion-trigger:hover .cert-trigger-icon-wrap {
  transform: scale(1.06);
  background: rgba(79, 70, 229, 0.12);
}

.cert-trigger-text {
  display: flex;
  flex-direction: column;
}

.cert-trigger-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-primary);
  margin-bottom: 4px;
}

.cert-trigger-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
  letter-spacing: -0.01em;
}

.cert-trigger-desc {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.cert-trigger-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.cert-trigger-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: rgba(79, 70, 229, 0.08);
  color: var(--accent-primary);
  font-size: 0.85rem;
  font-weight: 700;
  transition: all 0.25s ease;
}

.cert-accordion-trigger:hover .cert-trigger-cta {
  background: var(--accent-primary);
  color: #ffffff;
}

.cert-trigger-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cert-accordion-wrapper.is-open .cert-trigger-chevron {
  transform: rotate(180deg);
}

.cert-accordion-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease, margin 0.4s ease;
  margin-top: 0;
}

.cert-accordion-wrapper.is-open .cert-accordion-content {
  max-height: 2500px;
  opacity: 1;
  margin-top: 32px;
}

.cert-accordion-inner {
  padding: 8px 0;
}

.cert-accordion-footer-action {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.certifications-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 32px auto;
}

.cert-section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.certifications-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.cert-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
}

.cert-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(79, 70, 229, 0.35);
}

.cert-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.cert-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cert-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cert-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.35;
}

.cert-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 20px;
  flex-grow: 1;
}

.cert-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-primary);
  padding-top: 14px;
  border-top: 1px dashed var(--border-light);
}

/* --- Work Methodology (4 Steps) --- */
.methodology-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}

.step-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.step-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--accent-primary);
}

.step-number {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent-primary-light);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.step-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.step-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Interactive Project Estimator / Cotizador Section --- */
.estimator-section {
  background: linear-gradient(180deg, var(--bg-main) 0%, #ffffff 100%);
}

.estimator-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 44px;
  max-width: 980px;
  margin: 0 auto;
}

.estimator-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 40px;
}

.estimator-options {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.estimator-group-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.estimator-pills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.estimator-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-main);
  cursor: pointer;
  transition: var(--transition-fast);
  user-select: none;
}

.estimator-choice:hover {
  border-color: var(--accent-primary);
  background: #ffffff;
}

.estimator-choice.selected {
  border-color: var(--accent-primary);
  background: var(--accent-primary-light);
  color: var(--accent-primary);
  font-weight: 600;
}

.choice-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.choice-label {
  font-size: 0.875rem;
}

.estimator-summary-box {
  background: var(--bg-main);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.summary-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.summary-metrics {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.metric-label {
  color: var(--text-secondary);
}

.metric-val {
  font-weight: 700;
  color: var(--text-primary);
}

.price-estimate-display {
  margin-bottom: 24px;
}

.price-label {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 600;
}

.price-range {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-primary);
  line-height: 1.1;
}

.price-timeline {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* --- Contact & Call to Action --- */
.contact-section {
  position: relative;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.contact-info-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.contact-profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

.contact-profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2.5px solid var(--accent-primary);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
  object-fit: cover;
  flex-shrink: 0;
}

.contact-profile-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.contact-profile-role {
  font-size: 0.85rem;
  color: var(--accent-primary);
  font-weight: 600;
}

.contact-direct-channels {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 30px 0;
}

.channel-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-main);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  transition: var(--transition-fast);
}

.channel-item:hover {
  border-color: var(--accent-primary);
  background: #ffffff;
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.channel-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.icon-whatsapp { background: #25d366; }
.icon-email { background: var(--accent-primary); }
.icon-github { background: #0f172a; }

.channel-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.channel-value {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.95rem;
}

/* Contact Form */
.contact-form-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 13px 18px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--bg-main);
  transition: var(--transition-fast);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* --- Project Detail Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

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

.modal-content {
  background: #ffffff;
  border-radius: var(--radius-xl);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-2xl);
  border: 1px solid var(--border-light);
  position: relative;
  transform: translateY(20px) scale(0.96);
  transition: transform var(--transition-normal);
  padding: 40px;
}

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

.modal-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-card-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--border-light);
  color: var(--text-primary);
  transform: rotate(90deg);
}

/* --- Footer --- */
.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  padding: 40px 0 24px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-brand p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-top: 14px;
  max-width: 320px;
}

.footer-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 18px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-link:hover {
  color: var(--accent-primary);
  transform: translateX(2px);
}

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 16px;
}

/* --- Scroll Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive Design & Mobile Optimization
   ========================================================================== */

/* --- Tablets & Medium Screens (<= 1024px) --- */
@media (max-width: 1024px) {
  :root {
    --header-height: 70px;
  }

  section {
    padding: 40px 0;
  }

  .hero-section {
    padding-top: calc(var(--header-height) + 20px);
    padding-bottom: 36px;
    min-height: auto;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }
  
  .hero-content {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-badge-container,
  .hero-cta-group,
  .hero-stats-row {
    justify-content: center;
  }

  .hero-visual {
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
  }

  .pillars-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .methodology-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .stack-categories-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

/* --- Mobile Devices (<= 768px) --- */
@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  html {
    font-size: 15px;
  }

  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  section {
    padding: 32px 0;
  }

  .section-header {
    margin-bottom: 24px;
  }

  .section-title {
    font-size: 2.1rem;
    line-height: 1.2;
  }

  .section-desc {
    font-size: 1rem;
  }

  /* Header & Navigation Menu */
  .header-nav {
    height: var(--header-height);
  }

  .header-nav.scrolled {
    height: 60px;
  }

  .nav-actions .status-badge,
  .nav-actions .btn {
    display: none;
  }

  .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    transition: var(--transition-fast);
  }

  .mobile-toggle:hover,
  .mobile-toggle.active {
    background: var(--accent-primary-light);
    color: var(--accent-primary);
    border-color: var(--border-accent);
  }

  .nav-menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-strong);
    padding: 24px 20px 32px 20px;
    gap: 8px;
    box-shadow: 0 20px 35px -5px rgba(15, 23, 42, 0.15);
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    z-index: 99;
  }

  .nav-menu.open,
  .nav-menu.mobile-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-link {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
  }

  .nav-link:hover,
  .nav-link:active {
    background: var(--accent-primary-light);
    color: var(--accent-primary);
    transform: translateX(4px);
  }

  /* Hero Adjustments */
  .hero-section {
    padding-top: calc(var(--header-height) + 16px);
    padding-bottom: 28px;
  }

  .hero-title {
    font-size: 2.35rem;
    line-height: 1.15;
    margin-bottom: 16px;
  }

  .hero-subtitle {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 24px;
  }

  .hero-profile-card {
    margin-bottom: 18px;
  }

  .hero-badge-container {
    margin-bottom: 18px;
  }

  .hero-stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
    margin-top: 32px;
    padding-top: 24px;
  }

  .stat-card {
    padding: 14px 12px;
    text-align: center;
  }

  .stat-number {
    font-size: 1.75rem;
  }

  /* Floating Chips in Hero on mobile */
  .floating-chip {
    padding: 8px 12px;
    gap: 8px;
    box-shadow: var(--shadow-lg);
  }

  .chip-1 {
    top: -12px;
    left: -8px;
  }

  .chip-2 {
    bottom: -12px;
    right: -8px;
  }

  .hero-main-card {
    padding: 20px 16px;
  }

  .code-snippet {
    font-size: 0.75rem;
    line-height: 1.5;
  }

  /* Pillars & Methodology */
  .pillars-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .pillar-card {
    padding: 24px 20px;
  }

  .methodology-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .step-card {
    padding: 24px 20px;
  }

  /* Project Showcase */
  .project-filters {
    gap: 8px;
    margin-bottom: 32px;
  }

  .filter-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  .project-preview-wrap {
    padding: 28px 16px;
    min-height: 240px;
  }

  .device-phone {
    width: 205px;
    height: 410px;
  }

  .browser-screen.has-img {
    height: 180px;
    min-height: 180px;
  }

  .project-info {
    padding: 24px 20px;
  }

  .project-title {
    font-size: 1.5rem;
  }

  .project-summary {
    font-size: 0.92rem;
  }

  /* Stack Categories & Certifications */
  .stack-category-card {
    padding: 24px 20px;
  }

  .cert-accordion-trigger {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 18px;
    gap: 16px;
  }

  .cert-trigger-left {
    gap: 14px;
  }

  .cert-trigger-right {
    width: 100%;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px dashed var(--border-light);
  }

  .cert-trigger-cta {
    width: 100%;
    justify-content: center;
  }

  .certifications-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .cert-card {
    padding: 22px 18px;
  }

  .cert-section-title {
    font-size: 1.65rem;
  }

  /* Contact Section */
  .contact-info-card,
  .contact-form-card {
    padding: 24px 20px;
  }

  .form-input,
  .form-select,
  .form-textarea {
    font-size: 16px !important; /* Prevents auto-zoom on iOS Safari */
    padding: 13px 16px;
  }

  /* Modal Details Window */
  .modal-overlay {
    padding: 16px;
    align-items: flex-end;
  }

  .modal-content {
    padding: 26px 20px;
    max-height: 90vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }

  .modal-close-btn {
    top: 16px;
    right: 16px;
  }

  .modal-project-preview-wrap {
    height: 180px;
    margin-bottom: 20px;
  }

  /* Footer */
  .site-footer {
    padding: 50px 0 24px 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 36px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
}

/* --- Small Mobile Phones (<= 480px) --- */
@media (max-width: 480px) {
  html {
    font-size: 14.5px;
  }

  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  section {
    padding: 26px 0;
  }

  .section-title {
    font-size: 1.85rem;
  }

  .hero-title {
    font-size: 2.05rem;
    letter-spacing: -0.03em;
  }

  .hero-profile-card {
    width: 100%;
    justify-content: flex-start;
    padding: 8px 12px;
    border-radius: var(--radius-lg);
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .hero-cta-group .btn {
    width: 100%;
    min-height: 48px;
    font-size: 0.95rem;
  }

  .hero-badge-container {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .hero-badge {
    justify-content: center;
    width: 100%;
  }

  .hero-stats-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .stat-card {
    padding: 12px 8px;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.72rem;
  }

  /* Hide floating chips to prevent narrow phone overflows */
  .floating-chip {
    display: none;
  }

  .hero-main-card {
    padding: 16px 12px;
    border-radius: var(--radius-lg);
  }

  .code-snippet {
    font-size: 0.72rem;
    overflow-x: auto;
  }

  /* Project Phone frame for 360-480px screens */
  .device-phone {
    width: 195px;
    height: 395px;
    border-radius: 40px;
    padding: 6px;
  }

  .device-phone::before,
  .device-phone::after {
    display: none;
  }

  .phone-screen {
    border-radius: 34px;
  }

  .phone-dynamic-island {
    width: 66px;
    height: 16px;
    top: 9px;
  }

  .camera-lens {
    width: 6px;
    height: 6px;
  }

  .project-preview-wrap {
    padding: 20px 10px;
    min-height: 220px;
  }

  .browser-screen.has-img {
    height: 150px;
    min-height: 150px;
  }

  .project-info {
    padding: 20px 16px;
  }

  .project-action-buttons {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  .store-btn-group {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .store-btn,
  .project-action-buttons .btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  .project-filters {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 8px;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  .filter-btn {
    flex-shrink: 0;
  }

  .contact-info-card,
  .contact-form-card {
    padding: 20px 14px;
    border-radius: var(--radius-lg);
  }

  .channel-item {
    padding: 12px;
  }

  .contact-profile-header {
    gap: 12px;
  }

  .contact-profile-avatar {
    width: 48px;
    height: 48px;
  }

  .modal-overlay {
    padding: 0;
  }

  .modal-content {
    padding: 20px 14px;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    max-height: 94vh;
  }

  .modal-project-preview-wrap {
    height: 150px;
  }

  .modal-content .section-title {
    font-size: 1.5rem !important;
  }
}
