:root {
  /* Color Palette - Deep Dark & Neon Accents */
  --bg-deep: #050505;
  --bg-dark: #0f0f0f;
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.08);
  --accent: #00f2fe;
  /* Cyan neon */
  --accent-secondary: #7000ff;
  /* Purple neon */
  --text-primary: #f8f9fa;
  --text-secondary: #adb5bd;
  --glass-blur: blur(16px);

  /* Transitions */
  --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
.navbar-brand {
  font-family: 'Montserrat', sans-serif;
  letter-spacing: -0.5px;
}

h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 3rem;
  text-align: center;
  background: linear-gradient(90deg, #fff, var(--text-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

h3 {
  font-size: 1.8rem;
  font-weight: 700;
}

section {
  padding: 100px 0;
}

.lead {
  font-size: 1.15rem;
  line-height: 1.8;
}

/* ===== UTILITIES ===== */
.section-title {
  margin-bottom: 4rem !important;
}

/* ===== NAVBAR GLASSMORPHISM ===== */
.navbar {
  background: rgba(10, 10, 10, 0.7) !important;
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--card-border);
  transition: var(--transition);
}

.nav-link {
  color: var(--text-secondary) !important;
  font-weight: 500;
  transition: var(--transition);
}

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

#languageToggle {
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 1px;
  padding: 6px 15px !important;
  transition: var(--transition);
  margin-top: 5px;
  /* Ajuste manual para centrar con el texto de nav-link */
  display: inline-flex;
  align-items: center;
  height: 32px;
}

@media (min-width: 992px) {
  #languageToggle {
    margin-top: 0;
    vertical-align: middle;
  }

  .navbar-nav {
    align-items: center;
  }
}

#languageToggle:hover {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}

/* ===== HERO SECTION ENHANCED ===== */
.hero-section-grayscale {
  background: radial-gradient(circle at 70% 30%, rgba(0, 242, 254, 0.08) 0%, transparent 70%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
}

.highlight-text-grayscale {
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.hero-image-wrapper-grayscale {
  position: relative;
}

.hero-image-wrapper-grayscale::after {
  content: '';
  position: absolute;
  inset: -10px;
  background: linear-gradient(45deg, var(--accent), var(--accent-secondary));
  filter: blur(30px);
  opacity: 0.3;
  z-index: -1;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation: morph 8s ease-in-out infinite;
}

.hero-profile-image-grayscale-fixed {
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  box-shadow: 0 0 50px rgba(0, 242, 254, 0.1);
  border: 2px solid var(--card-border);
  transition: var(--transition);
  animation: morph 8s ease-in-out infinite;
  max-width: 320px;
}

@keyframes morph {

  0%,
  100% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  }

  50% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
}

/* ===== GLASS CARDS ===== */
.card,
.testimonial-item,
.project-card {
  background: var(--card-bg) !important;
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--card-border) !important;
  border-radius: 24px !important;
  transition: var(--transition);
  color: var(--text-primary) !important;
  padding: 24px;
}

.card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.2) !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

/* ===== PROJECTS GRID ===== */
.projects-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 32px;
}

.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  padding: 0 !important;
}

.project-image-container {
  height: 240px;
  overflow: hidden;
  position: relative;
}

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

.project-info {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

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

/* ===== TECH TAGS ===== */
.tech-tag {
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.75rem;
  color: var(--accent);
  border: 1px solid rgba(0, 242, 254, 0.2);
  font-weight: 600;
}

/* ===== ANIMATIONS ===== */
.hidden {
  opacity: 0;
  transform: translateY(30px);
}

.visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
  transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* ===== BUTTONS ===== */
.btn-download-cv {
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  border: none !important;
  color: #000 !important;
  font-weight: 700 !important;
  padding: 14px 32px !important;
  transition: var(--transition);
}

.btn-download-cv:hover {
  box-shadow: 0 0 30px rgba(0, 242, 254, 0.4);
  transform: translateY(-3px) scale(1.02);
}

.project-link {
  background: var(--card-border);
  color: var(--text-primary);
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  transition: var(--transition);
  display: inline-block;
}

.project-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== SCROLL TO TOP ===== */
#btn-back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: none;
  z-index: 1000;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  border: none;
  color: #000;
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 10px 20px rgba(0, 242, 254, 0.3);
}

#btn-back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 242, 254, 0.5);
}

/* ===== UTILITIES ===== */
hr {
  border-color: var(--card-border);
  opacity: 0.1;
  margin: 80px 0;
}

.section-title {
  font-size: 3rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 50px;
  background: linear-gradient(180deg, #fff 0%, #888 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Soft Skills Pills */
.soft-skills-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.soft-skill-pill {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 12px 24px;
  border-radius: 100px;
  transition: var(--transition);
}

.soft-skill-pill:hover {
  border-color: var(--accent);
  background: rgba(0, 242, 254, 0.05);
}

/* ===== DECORATIVE GLOW ORBS ===== */
.glow-orb {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -2;
  opacity: 0.15;
  pointer-events: none;
  animation: orbFloat 15s ease-in-out infinite;
}

.orb-1 {
  top: -100px;
  right: -100px;
  background: var(--accent);
}

.orb-2 {
  bottom: 20%;
  left: -150px;
  background: var(--accent-secondary);
}

@keyframes orbFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(30px, 50px) scale(1.1);
  }

  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

/* ===== STATS SECTION ===== */
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  display: block;
  margin-bottom: 5px;
}

.stat-label {
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 2px;
  color: var(--text-secondary);
}

/* ===== SOCIAL LINKS ===== */
.social-links-footer {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.social-icon {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  font-size: 1.2rem;
  transition: var(--transition);
  text-decoration: none;
}

.social-icon:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 242, 254, 0.2);
}

/* ===== TERMINAL INTERACTIVA ===== */
.terminal-container {
  background: #000;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
  font-family: 'JetBrains Mono', monospace;
  max-width: 800px;
  margin: 40px auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.terminal-header {
  background: #1a1a1a;
  padding: 10px 15px;
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--card-border);
}

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

.terminal-body {
  padding: 20px;
  height: 300px;
  overflow-y: auto;
  font-size: 0.9rem;
}

.terminal-input-wrapper {
  display: flex;
  padding: 0 20px 20px;
  background: #000;
}

#terminal-input {
  background: transparent;
  border: none;
  color: var(--accent);
  outline: none;
  width: 100%;
}

.text-accent {
  color: var(--accent);
}

/* ===== SECTION ADJUSTMENTS ===== */
section {
  padding: 100px 0;
}

.section-title {
  margin-bottom: 5rem !important;
}

h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 3rem;
  text-align: center;
  background: linear-gradient(90deg, #fff, var(--text-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Base card normalization */
.card,
.stat-card,
.project-card,
.testimonial-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border) !important;
  backdrop-filter: var(--glass-blur);
  transition: var(--transition);
  border-radius: 20px;
}

.card:hover,
.stat-card:hover,
.project-card:hover,
.testimonial-item:hover {
  border-color: var(--accent) !important;
  transform: translateY(-5px);
}

/* Specific fix for tech interests icons */
#intereses .card i {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}

/* Adjusting padding for smaller screens */
@media (max-width: 768px) {
  section {
    padding: 60px 0;
  }

  h2 {
    font-size: 2rem;
  }
}