/* =====================================================
   Angelo Castillo Portfolio — Main CSS
   Tema heroico: azul eléctrico + dark/light mode
   Font: Poppins
===================================================== */

/* ======= Variables ======= */
:root {
  --primary:        #1a56db;
  --primary-light:  #3b82f6;
  --primary-dark:   #1e3a8a;
  --primary-glow:   rgba(26, 86, 219, 0.18);
  --accent:         #06b6d4;
  --success:        #10b981;
  --warning:        #f59e0b;
  --danger:         #ef4444;

  --bg:             #ffffff;
  --bg-secondary:   #f8fafc;
  --bg-card:        #ffffff;
  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;
  --border:         #e2e8f0;

  --shadow-sm: 0 1px 4px rgba(0,0,0,0.07);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.09);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.11);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.13);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --transition: 0.25s ease;
  --transition-slow: 0.4s ease;
}

[data-theme="dark"] {
  --bg:             #080d1a;
  --bg-secondary:   #0f172a;
  --bg-card:        #141e33;
  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #475569;
  --border:         #1e293b;

  --primary-glow:   rgba(59, 130, 246, 0.12);
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.45);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.55);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.65);
}

/* ======= Reset & Base ======= */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', 'Open Sans', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  transition: background var(--transition-slow), color var(--transition-slow);
  overflow-x: hidden;
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-light); }

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

/* ======= Header ======= */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}

#header .navbar {
  padding: 20px 0;
  transition: padding var(--transition);
}

#header.scrolled {
  background: var(--bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
}

#header.scrolled .navbar { padding: 12px 0; }

.navbar-brand {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary) !important;
  letter-spacing: -1px;
}

.navbar-brand span { color: var(--primary); }

.navbar-nav .nav-link {
  color: var(--text-secondary) !important;
  font-weight: 500;
  font-size: 15px;
  padding: 6px 14px !important;
  border-radius: var(--radius-full);
  transition: all var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--primary) !important;
  background: var(--primary-glow);
}

.dark-toggle {
  width: 40px; height: 40px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all var(--transition);
}

.dark-toggle:hover {
  background: var(--primary-glow);
  border-color: var(--primary);
  color: var(--primary);
}

.navbar-toggler {
  border: 1.5px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 20px;
  line-height: 1;
}

/* ======= Section Common ======= */
.section-pad { padding: 90px 0; }
.section-bg { background: var(--bg-secondary); }

.section-header { max-width: 640px; margin: 0 auto; }

.section-tag {
  display: inline-block;
  background: var(--primary-glow);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.2;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 17px;
  margin: 0;
}

/* ======= Hero Section ======= */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--bg);
  padding: 100px 0 60px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 50%, var(--primary-glow) 0%, transparent 70%),
    radial-gradient(ellipse 30% 30% at 20% 80%, rgba(6, 182, 212, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.badge-dot {
  width: 8px; height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

.hero-title {
  font-size: clamp(44px, 7vw, 72px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.5px;
  margin-bottom: 20px;
  text-transform: uppercase;
  font-size: 13px;
}

.hero-description {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 36px;
  max-width: 520px;
}

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

/* Hero Buttons */
.btn-primary-custom {
  background: var(--primary);
  color: #fff !important;
  border: 2px solid var(--primary);
  border-radius: var(--radius-full);
  padding: 13px 30px;
  font-weight: 600;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  transition: all var(--transition);
  box-shadow: 0 4px 20px var(--primary-glow);
  text-decoration: none;
}

.btn-primary-custom:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--primary-glow);
}

.btn-secondary-custom {
  background: transparent;
  color: var(--text-primary) !important;
  border: 2px solid var(--border);
  border-radius: var(--radius-full);
  padding: 13px 30px;
  font-weight: 600;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-secondary-custom:hover {
  border-color: var(--primary);
  color: var(--primary) !important;
  background: var(--primary-glow);
  transform: translateY(-2px);
}

/* Hero Stats */
.hero-stats { margin-top: 40px; }

.stat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 20px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition);
}

.stat-chip:hover { border-color: var(--primary); }

.stat-num {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
  text-align: center;
}

/* Hero Image */
.hero-image-wrapper {
  position: relative;
  display: inline-block;
  margin-top: 40px;
}

.hero-image-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(ellipse at center, var(--primary-glow) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-profile-img {
  width: 570px;
  max-width: 100%;
  height: 570px;
  object-fit: cover;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 1;
  border: 4px solid var(--bg);
  transition: box-shadow 0.1s ease, transform 0.1s ease;
  will-change: transform;
  cursor: pointer;
}

.hero-image-wrapper:hover .hero-profile-img {
  box-shadow: 0 30px 80px rgba(26, 86, 219, 0.35), 0 0 0 2px var(--primary);
}

.hero-tech-badge {
  position: absolute;
  z-index: 2;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-md);
  animation: floatBadge 4s ease-in-out infinite;
}

.hero-tech-badge i { font-size: 16px; }

/* Derecha: Power BI → AI Agents → AI/ML (top → mid → bottom) */
.badge-powerbi  { top: 8%;  right: -30px; animation-delay: 0s;   color: #f2c811; }
.badge-agents   { top: 42%; right: -30px; animation-delay: 1s;   color: #06b6d4; }
.badge-ai       { bottom: 8%; right: -10px; animation-delay: 2s; color: #10b981; }

/* Izquierda: Project Mgmt → Python → MS Fabric (top → mid → bottom) */
.badge-pm       { top: 8%;  left: -30px; animation-delay: 0.5s; color: #7c3aed; }
.badge-python   { top: 42%; left: -30px; animation-delay: 1.5s; color: #3776ab; }
.badge-fabric   { bottom: 8%; left: -10px; animation-delay: 2.5s; color: #0078d4; }

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

/* Hero Scroll Hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  font-size: 22px;
  animation: bounceDown 2s ease-in-out infinite;
  z-index: 2;
}

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

/* ======= Experience Section ======= */
.exp-company-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-md);
  margin-bottom: 48px;
}

.exp-company-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1.5px solid var(--border);
}

.company-logo-placeholder {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.company-info h3 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--text-primary);
}

.company-info p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 8px;
}

.company-badge {
  background: var(--primary-glow);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

/* Company logo image inside header */
.company-logo-wrapper {
  flex-shrink: 0;
}
.company-logo-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  padding: 4px;
  background: var(--bg);
}

/* Clickable company header */
.company-clickable {
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: background var(--transition);
  padding: 10px;
  margin: -10px -10px 26px;
}
.company-clickable:hover {
  background: var(--primary-glow);
}
.company-clickable:hover .company-info h3 { color: var(--primary); }

.company-popup-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: 6px;
  vertical-align: middle;
  transition: color var(--transition);
}
.company-clickable:hover .company-popup-hint { color: var(--primary); }

/* ======= Company Modal ======= */
.company-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.company-modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.company-modal-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px;
  max-width: 480px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-xl);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s ease;
}
.company-modal-overlay.active .company-modal-card {
  transform: translateY(0) scale(1);
}
.company-modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 14px;
  transition: background var(--transition), color var(--transition);
}
.company-modal-close:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.company-modal-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}
.company-modal-logo-wrap {
  width: 72px; height: 72px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-secondary);
  display: flex; align-items: center; justify-content: center;
  padding: 6px;
}
.company-modal-logo {
  width: 100%; height: 100%;
  object-fit: contain;
}
.company-modal-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px;
}
.company-modal-badge {
  background: var(--primary-glow);
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}
.company-modal-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 16px 0 20px;
}
.company-modal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.company-modal-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.company-modal-link:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Timeline */
.timeline-container { position: relative; padding-left: 28px; }

.timeline-container::before {
  content: '';
  position: absolute;
  left: 7px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
  border-radius: 2px;
  opacity: 0.3;
}

.timeline-item {
  position: relative;
  margin-bottom: 32px;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -25px;
  top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--primary);
}

.pulse-dot {
  background: var(--success);
  box-shadow: 0 0 0 2px var(--success);
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 2px var(--success); }
  50%       { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.2); }
}

.timeline-content {
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.timeline-content:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.timeline-header h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.current-badge {
  background: var(--success);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.timeline-content p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 14px;
  line-height: 1.65;
}

.timeline-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
  font-size: 12px;
  font-weight: 500;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

/* Experience Footer */
.exp-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1.5px solid var(--border);
}

.exp-impacts {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.impact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.impact-item i {
  color: var(--primary);
  font-size: 16px;
}

/* ======= Projects Section ======= */
.filter-buttons { gap: 8px !important; }

.filter-btn {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  padding: 8px 22px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'Poppins', sans-serif;
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-glow);
}

.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

/* Project Card */
.project-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  height: 100%;
}

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

.project-img-wrapper {
  position: relative;
  overflow: hidden;
  height: 200px;
}

.project-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 30, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transition: opacity var(--transition);
  backdrop-filter: blur(4px);
}

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

.overlay-btn {
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.4);
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  color: #fff !important;
  font-size: 18px;
  transition: all var(--transition);
  text-decoration: none;
}

.overlay-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.1);
}

/* Badge en la imagen */
.project-tag-badge {
  position: absolute;
  top: 12px; left: 12px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  z-index: 1;
}

.powerbi-badge     { background: rgba(242,200,17,0.2); color: #a37d00; border: 1px solid rgba(242,200,17,0.4); }
.tableau-badge     { background: rgba(233,118,39,0.15); color: #c05a00; border: 1px solid rgba(233,118,39,0.3); }
.architecture-badge{ background: rgba(139,92,246,0.15); color: #6d28d9; border: 1px solid rgba(139,92,246,0.3); }
.web-badge         { background: rgba(6,182,212,0.15);  color: #0891b2; border: 1px solid rgba(6,182,212,0.3); }
.app-badge         { background: rgba(16,185,129,0.15); color: #047857; border: 1px solid rgba(16,185,129,0.3); }

[data-theme="dark"] .powerbi-badge     { background: rgba(242,200,17,0.1); color: #f2c811; }
[data-theme="dark"] .tableau-badge     { background: rgba(233,118,39,0.1); color: #e97627; }
[data-theme="dark"] .architecture-badge{ background: rgba(139,92,246,0.1); color: #a78bfa; }
[data-theme="dark"] .web-badge         { background: rgba(6,182,212,0.1);  color: #22d3ee; }
[data-theme="dark"] .app-badge         { background: rgba(16,185,129,0.1); color: #34d399; }

/* Project Body */
.project-body { padding: 22px; }

.project-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.4;
}

/* Case Study */
.case-study { margin-bottom: 16px; }

.cs-row {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
  align-items: flex-start;
}

.cs-row p {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.55;
  flex: 1;
}

.cs-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  margin-top: 1px;
  flex-shrink: 0;
}

.cs-label.problem  { background: rgba(239,68,68,0.1);  color: #dc2626; }
.cs-label.solution { background: rgba(59,130,246,0.1); color: #2563eb; }
.cs-label.result   { background: rgba(16,185,129,0.1); color: #059669; }

.result-text {
  font-weight: 600 !important;
  color: var(--success) !important;
}

.result-text i { margin-right: 4px; }

/* Tech Tags */
.project-tech { display: flex; flex-wrap: wrap; gap: 6px; }

.tech-tag {
  font-size: 11px;
  font-weight: 500;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

/* ======= Contact Section ======= */
.contact-info-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px;
  height: 100%;
  box-shadow: var(--shadow-md);
}

.contact-info-card h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.contact-info-card > p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.7;
}

.contact-links { display: flex; flex-direction: column; gap: 14px; }

.contact-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition);
  text-decoration: none;
}

.contact-link:hover {
  border-color: var(--primary);
  background: var(--primary-glow);
  transform: translateX(4px);
}

.contact-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  background: var(--primary-glow);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  font-size: 20px;
  flex-shrink: 0;
}

.linkedin-icon { background: rgba(0,119,181,0.1); color: #0077b5; }
.github-icon   { background: var(--bg); color: var(--text-primary); border: 1px solid var(--border); }

.contact-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.contact-value {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Contact Form */
.contact-input {
  background: var(--bg-secondary) !important;
  border: 1.5px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  color: var(--text-primary) !important;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  padding: 12px 16px !important;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.contact-input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--primary-glow) !important;
  outline: none;
}

.contact-input::placeholder { color: var(--text-muted) !important; }

.contact-input option {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* ======= Footer ======= */
#footer {
  background: var(--bg-secondary);
  border-top: 1.5px solid var(--border);
  padding: 48px 0 28px;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.footer-logo {
  font-size: 28px;
  font-weight: 900;
  color: var(--text-primary) !important;
  letter-spacing: -1px;
  display: block;
  margin-bottom: 8px;
}

.footer-logo span { color: var(--primary); }

.footer-brand p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

.footer-social { display: flex; gap: 12px; }

.footer-social a {
  width: 42px; height: 42px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  font-size: 18px;
  transition: all var(--transition);
}

.footer-social a:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1.5px solid var(--border);
}

.footer-bottom p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

/* ======= Back to Top ======= */
.back-to-top {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 44px; height: 44px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: var(--shadow-md);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition);
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-3px);
}

/* ======= Preloader ======= */
#preloader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
}

#preloader.hidden {
  opacity: 0;
  pointer-events: none;
}

.preloader-ring {
  width: 48px; height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ======= Utilities ======= */
.text-primary-color { color: var(--primary) !important; }

/* Bootstrap outline button override */
.btn-outline-primary {
  color: var(--primary) !important;
  border-color: var(--primary) !important;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 14px;
  padding: 8px 20px;
  transition: all var(--transition);
  font-family: 'Poppins', sans-serif;
}

.btn-outline-primary:hover {
  background: var(--primary) !important;
  color: #fff !important;
}

/* ======= Responsive ======= */
@media (max-width: 991px) {
  #hero { padding: 120px 0 80px; text-align: center; }
  .hero-content { max-width: 100%; }
  .hero-description { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-badge { display: inline-flex; }

  .hero-image-wrapper { margin-top: 48px; }
  .hero-profile-img { width: 420px; height: 420px; }
  .badge-powerbi  { right: -10px; }
  .badge-agents   { right: -10px; }
  .badge-ai       { right: 0; }
  .badge-pm       { left: -10px; }
  .badge-python   { left: -10px; }
  .badge-fabric   { left: 0; }

  .exp-company-card { padding: 28px 20px; }
  .exp-impacts { flex-direction: column; gap: 12px; }
  .timeline-container { padding-left: 22px; }
  .timeline-dot { left: -19px; }

  .section-pad { padding: 70px 0; }
}

@media (max-width: 767px) {
  .hero-title { font-size: 40px; letter-spacing: -1.5px; }
  .hero-profile-img { width: 320px; height: 320px; }

  .hero-tech-badge { padding: 6px 12px; font-size: 12px; }
  .badge-powerbi  { top: 8%;  right: 0; }
  .badge-agents   { top: 42%; right: 0; }
  .badge-ai       { bottom: 8%; right: 0; }
  .badge-pm       { top: 8%;  left: 0; }
  .badge-python   { top: 42%; left: 0; }
  .badge-fabric   { bottom: 8%; left: 0; }

  .filter-btn { font-size: 12px; padding: 7px 16px; }

  .project-img-wrapper { height: 180px; }

  .contact-info-card { padding: 24px; }

  .footer-content { flex-direction: column; text-align: center; }
  .footer-social { justify-content: center; }

  .exp-company-header { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .section-title { font-size: 26px; }
  .hero-title { font-size: 34px; }
  .hero-stats { gap: 8px; }
  .stat-chip { padding: 10px 14px; }
  .stat-num { font-size: 22px; }
  .cs-row { flex-direction: column; gap: 4px; }
}

/* ======= Clients Strip ======= */
.clients-strip {
  padding: 32px 0;
  background: var(--bg-secondary);
  border-top: 1.5px solid var(--border);
  border-bottom: 1.5px solid var(--border);
  overflow: hidden;
}

.clients-label {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Wrapper con fade en los bordes */
.clients-track-wrapper {
  position: relative;
  overflow: hidden;
}

.clients-track-wrapper::before,
.clients-track-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}

.clients-track-wrapper::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-secondary) 0%, transparent 100%);
}

.clients-track-wrapper::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-secondary) 0%, transparent 100%);
}

/* Track que se mueve */
.clients-track {
  display: flex;
  align-items: center;
  gap: 0;
  width: max-content;
  animation: scrollClients 22s linear infinite;
}

.clients-track:hover { animation-play-state: paused; }

@keyframes scrollClients {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Cada logo */
.client-logo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 40px;
  height: 60px;
  border-right: 1.5px solid var(--border);
  flex-shrink: 0;
  transition: opacity var(--transition);
}

.client-logo-item:last-child { border-right: none; }

.client-logo-item img {
  height: 36px;
  width: auto;
  max-width: 44px;
  object-fit: contain;
  filter: grayscale(100%) opacity(0.55);
  transition: filter var(--transition), transform var(--transition);
  flex-shrink: 0;
}

.client-logo-item:hover img {
  filter: grayscale(0%) opacity(1);
  transform: scale(1.08);
}

.client-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color var(--transition);
  letter-spacing: 0.2px;
}

.client-logo-item:hover .client-name { color: var(--text); }

@media (max-width: 767px) {
  .clients-track-wrapper::before,
  .clients-track-wrapper::after { width: 60px; }
  .client-logo-item { padding: 0 28px; }
  .clients-track { animation-duration: 16s; }
}
