/* ==========================================================================
   PORTFOLIO STYLES - Modern, Clean & Responsive
   ========================================================================== */

:root {
  --primary-color: #6366f1;
  --primary-hover: #4f46e5;
  --secondary-color: #06b6d4;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  --card-bg-light: #ffffff;
  --card-border-light: rgba(0, 0, 0, 0.08);
  --section-alt-light: #f8fafc;
  --card-bg-dark: #1e293b;
  --card-border-dark: rgba(255, 255, 255, 0.08);
  --section-alt-dark: #0f172a;
  --transition-speed: 0.3s;
}

[data-bs-theme="dark"] {
  --bg-color: #0b0f19;
  --card-bg: var(--card-bg-dark);
  --card-border: var(--card-border-dark);
  --section-alt: var(--section-alt-dark);
}

[data-bs-theme="light"] {
  --bg-color: #ffffff;
  --card-bg: var(--card-bg-light);
  --card-border: var(--card-border-light);
  --section-alt: var(--section-alt-light);
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  scroll-behavior: smooth;
  color: var(--bs-body-color);
  background-color: var(--bg-color);
  transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

/* --------------------------------------------------------------------------
   NAVBAR
   -------------------------------------------------------------------------- */
.navbar-custom {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
}

.navbar-custom.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid var(--card-border);
}

[data-bs-theme="light"] .navbar-custom.scrolled {
  background-color: rgba(255, 255, 255, 0.88);
}

[data-bs-theme="dark"] .navbar-custom.scrolled {
  background-color: rgba(11, 15, 25, 0.88);
}

.navbar-brand {
  font-weight: 800;
  letter-spacing: -0.5px;
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-link {
  font-weight: 500;
  position: relative;
  transition: color 0.2s ease;
  padding: 0.5rem 1rem !important;
}

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

.theme-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.theme-toggle-btn:hover {
  transform: rotate(15deg) scale(1.05);
}

/* --------------------------------------------------------------------------
   HERO SECTION
   -------------------------------------------------------------------------- */
.hero-section {
  min-height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 5rem;
}

.hero-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(6, 182, 212, 0.05) 50%, transparent 70%);
  top: 10%;
  right: -100px;
  z-index: 0;
  pointer-events: none;
}

.hero-avatar-wrapper {
  position: relative;
  display: inline-block;
}

.hero-avatar {
  width: 320px;
  height: 320px;
  border-radius: 2rem;
  object-fit: cover;
  border: 4px solid var(--card-bg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 1;
}

.floating-badge {
  position: absolute;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  padding: 0.75rem 1.25rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 2;
  animation: float 4s ease-in-out infinite;
}

.badge-pos-1 {
  bottom: 10px;
  left: -20px;
}

.badge-pos-2 {
  top: 20px;
  right: -20px;
  animation-delay: 2s;
}

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

/* --------------------------------------------------------------------------
   GENERAL SECTIONS & CARDS
   -------------------------------------------------------------------------- */
section {
  padding: 5rem 0;
  position: relative;
}

.bg-alt-section {
  background-color: var(--section-alt);
}

.section-title-wrap {
  margin-bottom: 3.5rem;
}

.section-subtitle {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-color);
}

.section-heading {
  font-weight: 800;
  letter-spacing: -0.5px;
}

.custom-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 1.25rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  overflow: hidden;
}

.custom-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 35px rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.3);
}

/* --------------------------------------------------------------------------
   SKILLS / HABILIDADES
   -------------------------------------------------------------------------- */
.skill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 9999px;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.skill-badge:hover {
  transform: translateY(-2px);
  border-color: var(--primary-color);
  color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.skill-category-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-gradient);
  color: white;
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
}

/* --------------------------------------------------------------------------
   PROJECTS / PROYECTOS
   -------------------------------------------------------------------------- */
.project-img-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background-color: #1e293b;
}

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

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

.project-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  background-color: rgba(99, 102, 241, 0.1);
  color: var(--primary-color);
}

/* --------------------------------------------------------------------------
   TIMELINE / EXPERIENCIA
   -------------------------------------------------------------------------- */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 0;
  width: 2px;
  background-color: var(--card-border);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

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

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary-color);
  border: 3px solid var(--bg-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.timeline-date {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

/* --------------------------------------------------------------------------
   BUTTONS & CONTACT
   -------------------------------------------------------------------------- */
.btn-primary-custom {
  background: var(--accent-gradient);
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: 0.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
  color: #fff;
  opacity: 0.95;
}

.btn-outline-custom {
  border: 2px solid var(--card-border);
  color: var(--bs-body-color);
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: 0.75rem;
  transition: all 0.2s ease;
}

.btn-outline-custom:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
}

.form-control-custom {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--bs-body-color);
  padding: 0.8rem 1.2rem;
  border-radius: 0.75rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control-custom:focus {
  background-color: var(--card-bg);
  color: var(--bs-body-color);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.15);
}

.contact-info-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--card-border);
  padding: 2.5rem 0;
}

.social-circle-link {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--bs-body-color);
  font-size: 1.15rem;
  transition: all 0.2s ease;
}

.social-circle-link:hover {
  background: var(--accent-gradient);
  color: #fff !important;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(99, 102, 241, 0.25);
}

/* --------------------------------------------------------------------------
   RESPONSIVE ADJUSTMENTS
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .hero-section {
    padding-top: 7rem;
    text-align: center;
  }
  
  .hero-avatar {
    width: 250px;
    height: 250px;
    margin-top: 2rem;
  }

  .badge-pos-1 {
    left: 0;
  }

  .badge-pos-2 {
    right: 0;
  }
}
