/*=== GOOGLE FONTS ===*/
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/*=== CSS VARIABLES ===*/
:root {
  --header-height: 4rem;

  /*=== Colors - ORIGINAL BLUE THEME (to restore, uncomment these and comment orange theme) ===*/
  /*
  --hue: 230;
  --first-color: hsl(var(--hue), 70%, 65%);
  --first-color-alt: hsl(var(--hue), 70%, 55%);
  --first-color-light: hsl(var(--hue), 70%, 85%);
  --gradient-primary: linear-gradient(135deg, hsl(var(--hue), 70%, 65%) 0%, hsl(var(--hue), 80%, 55%) 100%);
  --gradient-accent: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  */

  /*=== Colors - EMERALD GREEN THEME (josecode.netlify.app) ===*/
  --hue: 162;
  --first-color: hsl(162, 100%, 40%);
  --first-color-alt: hsl(162, 56%, 35%);
  --first-color-light: hsl(162, 100%, 60%);
  --title-color: hsl(228, 8%, 95%);
  --text-color: hsl(228, 8%, 65%);
  --text-color-light: hsl(228, 8%, 50%);
  --body-color: hsl(228, 15%, 20%);
  --container-color: hsl(228, 15%, 15%);
  --container-color-alt: hsl(228, 15%, 18%);
  
  /*=== Gradients ===*/
  --gradient-primary: linear-gradient(135deg, hsl(162, 100%, 40%) 0%, hsl(162, 56%, 30%) 100%);
  --gradient-secondary: linear-gradient(135deg, hsl(228, 15%, 15%) 0%, hsl(228, 15%, 18%) 100%);
  --gradient-accent: linear-gradient(135deg, rgba(0, 204, 136, 0.1) 0%, rgba(0, 179, 119, 0.1) 100%);

  /*=== Typography ===*/
  --body-font: 'Inter', sans-serif;
  --biggest-font-size: 3rem;
  --h1-font-size: 2.5rem;
  --h2-font-size: 2rem;
  --h3-font-size: 1.5rem;
  --normal-font-size: 1rem;
  --small-font-size: 0.875rem;
  --smaller-font-size: 0.75rem;

  /*=== Font weight ===*/
  --font-light: 300;
  --font-regular: 400;
  --font-medium: 500;
  --font-semi-bold: 600;
  --font-bold: 700;

  /*=== Margins ===*/
  --mb-0-25: 0.25rem;
  --mb-0-5: 0.5rem;
  --mb-0-75: 0.75rem;
  --mb-1: 1rem;
  --mb-1-5: 1.5rem;
  --mb-2: 2rem;
  --mb-2-5: 2.5rem;
  --mb-3: 3rem;

  /*=== z-index ===*/
  --z-tooltip: 10;
  --z-fixed: 100;
  --z-modal: 1000;

  /*=== Transitions ===*/
  --transition-fast: 0.3s ease;
  --transition-medium: 0.5s ease;
  --transition-slow: 0.7s ease;

  /*=== Shadows ===*/
  --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.15);
  --shadow-heavy: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-color: 0 4px 20px hsla(162, 100%, 35%, 0.35);
}

/*=== RESPONSIVE TYPOGRAPHY ===*/
@media screen and (min-width: 1152px) {
  :root {
    --biggest-font-size: 4rem;
    --h1-font-size: 3rem;
    --h2-font-size: 2.5rem;
    --h3-font-size: 1.75rem;
    --normal-font-size: 1.125rem;
    --small-font-size: 1rem;
    --smaller-font-size: 0.875rem;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  font-weight: var(--font-regular);
  background: var(--body-color);
  color: var(--text-color);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  color: var(--title-color);
  font-weight: var(--font-semi-bold);
  line-height: 1.2;
}

ul {
  list-style: none;
}

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

img, svg {
  max-width: 100%;
  height: auto;
}

input, textarea, button {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  outline: none;
  border: none;
}

/*=== LOADER ===*/
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--body-color);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hide {
  opacity: 0;
  visibility: hidden;
}

.loader__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--mb-1);
}

.loader__circle {
  width: 50px;
  height: 50px;
  border: 3px solid var(--container-color);
  border-top: 3px solid var(--first-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loader__text {
  color: var(--text-color);
  font-weight: var(--font-medium);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/*=== REUSABLE CSS CLASSES ===*/
.container {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 1rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.section {
  padding-block: 5rem 2rem;
}

.section__header {
  text-align: center;
  margin-bottom: var(--mb-3);
}

.section__title {
  font-size: var(--h2-font-size);
  font-weight: var(--font-bold);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--mb-0-5);
}

.section__subtitle {
  font-size: var(--normal-font-size);
  color: var(--title-color);
  max-width: 400px;
  margin: 0 auto;
}

.main {
  overflow: hidden;
}

/*=== BUTTONS ===*/
.button {
  display: inline-flex;
  align-items: center;
  gap: var(--mb-0-5);
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: var(--font-medium);
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  cursor: pointer;
}

.button--primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-color);
}

.button--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px hsla(var(--hue), 85%, 55%, 0.4);
}

.button--ghost {
  background: transparent;
  border: 2px solid var(--first-color);
  color: var(--first-color);
}

.button--ghost:hover {
  background: var(--first-color);
  color: white;
  transform: translateY(-2px);
}

/*=== HEADER & NAV ===*/
.header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  background: rgba(var(--hue), 60%, 8%, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: var(--z-fixed);
  transition: var(--transition-fast);
}

.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: var(--mb-0-5);
}

.nav__logo-img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.nav__logo {
  font-size: var(--h3-font-size);
  font-weight: var(--font-bold);
  color: var(--title-color);
}

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

.nav__menu {
  display: flex;
  align-items: center;
  margin-left: auto;
  margin-right: 1rem;
}

.nav__list {
  display: flex;
  gap: var(--mb-1-5);
}

.nav__link {
  display: flex;
  align-items: center;
  gap: var(--mb-0-25);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  color: var(--text-color);
  font-weight: var(--font-medium);
  transition: var(--transition-fast);
  position: relative;
}

.nav__link i {
  font-size: 1.125rem;
}

.nav__link:hover,
.nav__link.active-link {
  color: var(--first-color);
  background: hsla(var(--hue), 85%, 55%, 0.1);
}

.nav__toggle,
.nav__close {
  display: none;
  font-size: 1.5rem;
  color: var(--title-color);
  cursor: pointer;
}

/*=== LANGUAGE SELECTOR ===*/
.nav__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav__language {
  position: relative;
}

.nav__language-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--container-color);
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  color: var(--text-color);
  font-size: var(--small-font-size);
  cursor: pointer;
  transition: var(--transition-fast);
  border: 2px solid transparent;
}

.nav__language-btn:hover {
  background: var(--container-color-alt);
  color: var(--first-color);
  border-color: var(--first-color);
}

.nav__language-btn i:first-child {
  font-size: 1.1rem;
}

.nav__language-btn i:last-child {
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.nav__language.active .nav__language-btn i:last-child {
  transform: rotate(180deg);
}

.nav__language-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--container-color);
  border-radius: 0.5rem;
  padding: 0.5rem;
  min-width: 150px;
  box-shadow: var(--shadow-medium);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition-fast);
  z-index: var(--z-tooltip);
  border: 1px solid var(--container-color-alt);
}

.nav__language.active .nav__language-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav__language-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: 0.375rem;
  color: var(--text-color);
  font-size: var(--small-font-size);
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: left;
}

.nav__language-option:hover {
  background: var(--container-color-alt);
  color: var(--first-color);
}

.nav__language-option.active {
  background: var(--first-color);
  color: var(--body-color);
}

.nav__language-option.active:hover {
  background: var(--first-color-alt);
}

.language-flag {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 18px;
}

.language-flag svg {
  width: 20px;
  height: 15px;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Language selector responsive */
@media screen and (max-width: 768px) {
  .nav__language {
    order: -1;
  }
  
  .nav__language-btn {
    padding: 0.4rem 0.6rem;
    font-size: var(--smaller-font-size);
  }
  
  .nav__language-menu {
    right: -1rem;
    min-width: 140px;
  }
}

/*=== HOME ===*/
.home {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.home::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, hsla(var(--hue), 85%, 55%, 0.1) 0%, transparent 70%);
  z-index: -1;
}

.home__container {
  position: relative;
  z-index: 2;
  margin-bottom: 30px;
}

.home__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--mb-3);
  align-items: center;
  min-height: calc(100vh - var(--header-height));
}

.home__data {
  max-width: 500px;
}

.home__subtitle {
  margin-bottom: var(--mb-0-5);
}

.home__greeting {
  font-size: var(--normal-font-size);
  color: var(--text-color-light);
  font-weight: var(--font-medium);
}

.home__title {
  margin-bottom: var(--mb-1);
}

.home__name {
  display: block;
  font-size: var(--biggest-font-size);
  font-weight: var(--font-bold);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home__profession {
  display: block;
  font-size: var(--h3-font-size);
  color: var(--title-color);
  font-weight: var(--font-semi-bold);
  margin-top: var(--mb-0-25);
}

.home__profession {
  position: relative;
}

.home__profession::after {
  content: '|';
  color: var(--first-color);
  font-weight: var(--font-medium);
  animation: blink 1s infinite;
  margin-left: 2px;
}

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

.home__description {
  margin-bottom: var(--mb-2);
  color: var(--text-color);
  line-height: 1.7;
}

.home__buttons {
  display: flex;
  gap: var(--mb-1);
  margin-bottom: var(--mb-2-5);
  flex-wrap: wrap;
}

.home__social {
  display: flex;
  gap: var(--mb-1);
}

.home__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--container-color);
  border-radius: 12px;
  color: var(--text-color);
  font-size: 1.25rem;
  transition: var(--transition-fast);
  position: relative;
}

.home__social-link:hover {
  background: var(--first-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: var(--shadow-color);
}

.home__social-link[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--container-color);
  color: var(--title-color);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: var(--smaller-font-size);
  white-space: nowrap;
}

.home__image {
  position: relative;
  justify-self: center;
}

.home__blob {
  width: 350px;
  height: 350px;
  background: var(--gradient-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.home__img {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--first-color);
}

.home__decoration {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
}

.home__decoration-item {
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--first-color);
  border-radius: 50%;
  animation: float 3s ease-in-out infinite;
}

.home__decoration-item--1 {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.home__decoration-item--2 {
  top: 70%;
  right: 15%;
  animation-delay: 1s;
}

.home__decoration-item--3 {
  bottom: 10%;
  left: 20%;
  animation-delay: 2s;
}

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

.home__scroll {
  position: absolute;
  bottom: 6rem; /* Moved 40px up from 2rem */
  left: 50%;
  transform: translateX(-50%);
  animation: floatUpDown 2.5s ease-in-out infinite;
}

.home__scroll-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--mb-0-25);
  color: var(--text-color-light);
  font-size: var(--small-font-size);
  transition: var(--transition-fast);
  z-index: 100;
}

.home__scroll-button:hover {
  color: var(--first-color);
  transform: translateY(-2px);
}

/* Floating animation for scroll down */
@keyframes floatUpDown {
  0%, 100% { 
    transform: translateX(-50%) translateY(0px); 
  }
  50% { 
    transform: translateX(-50%) translateY(-8px); 
  }
}

/*=== ABOUT ===*/
.about__content {
  grid-template-columns: 1fr;
  gap: var(--mb-3);
  align-items: center;
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.about__title {
  font-size: var(--h3-font-size);
  margin-bottom: var(--mb-1);
  color: var(--title-color);
}

.about__description {
  margin-bottom: var(--mb-2);
  color: var(--text-color);
  line-height: 1.7;
}

.about__info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--mb-1);
  margin-bottom: var(--mb-2);
}

.about__info-item {
  text-align: center;
  padding: var(--mb-1);
  background: var(--container-color);
  border-radius: 12px;
  transition: var(--transition-fast);
}

.about__info-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.about__info-number {
  font-size: var(--h2-font-size);
  font-weight: var(--font-bold);
  color: var(--first-color);
  margin-bottom: var(--mb-0-25);
}

.about__info-text {
  font-size: var(--small-font-size);
  color: var(--text-color-light);
}

.about__buttons {
  display: flex;
  gap: var(--mb-1);
  flex-wrap: wrap;
  justify-content: center;
}

/*=== CV DOWNLOAD DROPDOWN ===*/
.cv-download-wrapper {
  position: relative;
  display: inline-block;
}

.cv-dropdown-arrow {
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
}

.cv-download-wrapper.active .cv-dropdown-arrow {
  transform: rotate(180deg);
}

.cv-language-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--container-color);
  border: 1px solid hsl(var(--hue), 50%, 20%);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  overflow: hidden;
  margin-top: 0.5rem;
}

.cv-download-wrapper.active .cv-language-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cv-language-option {
  width: 100%;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  color: var(--text-color);
  font-size: var(--small-font-size);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
}

.cv-language-option:hover {
  background: var(--first-color);
  color: var(--body-color);
}

.cv-language-option .language-flag {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 18px;
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
}

.cv-language-option .language-flag svg {
  width: 100%;
  height: 100%;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
  .cv-language-dropdown {
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    width: 200px;
  }
  
  .cv-download-wrapper.active .cv-language-dropdown {
    transform: translateX(-50%) translateY(0);
  }
}

/*=== SKILLS — TECH CLOUD ===*/
.tech-cloud-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 1;
  min-height: 300px;
  background: transparent;
  border: none;
  box-shadow: none;
}

.tech-bubble {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.65rem;
  background: hsla(228, 15%, 18%, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  cursor: default;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
  will-change: transform;
  z-index: 1;
  box-shadow: 0 2px 16px rgba(0,0,0,0.35), 0 0 6px rgba(255,255,255,0.05);
}

.tech-bubble:hover {
  border-color: rgba(255,255,255,0.45);
  box-shadow:
    0 0 20px rgba(255,255,255,0.2),
    0 0 8px var(--icon-c, rgba(255,255,255,0.3)),
    0 4px 20px rgba(0,0,0,0.4);
  z-index: 10;
}

.tech-bubble i {
  font-size: 1.45rem;
  color: var(--icon-c, #fff);
  filter: drop-shadow(0 0 4px var(--icon-c, rgba(255,255,255,0.4)));
}

.tech-bubble span {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.6);
  white-space: nowrap;
  letter-spacing: 0.03em;
}

/* Brand colors per bubble */
.tech-bubble:nth-child(1)  { --icon-c: #e44d26; } /* HTML5 */
.tech-bubble:nth-child(2)  { --icon-c: #264de4; } /* CSS3 */
.tech-bubble:nth-child(3)  { --icon-c: #f7df1e; } /* JavaScript */
.tech-bubble:nth-child(4)  { --icon-c: #42b883; } /* Vue.js */
.tech-bubble:nth-child(5)  { --icon-c: #dd0031; } /* Angular */
.tech-bubble:nth-child(6)  { --icon-c: #8993be; } /* PHP */
.tech-bubble:nth-child(7)  { --icon-c: #ff2d20; } /* Laravel */
.tech-bubble:nth-child(8)  { --icon-c: #4479a1; } /* MySQL */
.tech-bubble:nth-child(9)  { --icon-c: #f89820; } /* Java */
.tech-bubble:nth-child(10) { --icon-c: #f05032; } /* Git */
.tech-bubble:nth-child(11) { --icon-c: #7952b3; } /* Bootstrap */
.tech-bubble:nth-child(12) { --icon-c: #f24e1e; } /* Figma */
.tech-bubble:nth-child(13) { --icon-c: #3178c6; } /* TypeScript */
.tech-bubble:nth-child(14) { --icon-c: #ea4b71; } /* n8n */
.tech-bubble:nth-child(15) { --icon-c: #d97757; } /* Claude */
.tech-bubble:nth-child(16) { --icon-c: #007acc; } /* VSCode */
.tech-bubble:nth-child(17) { --icon-c: #905fde; } /* PHPStorm */
.tech-bubble:nth-child(18) { --icon-c: #e8eaea; } /* GitHub */
.tech-bubble:nth-child(19) { --icon-c: #fc6d26; } /* GitLab */
.tech-bubble:nth-child(20) { --icon-c: #00cc88; } /* Proactividad */
.tech-bubble:nth-child(21) { --icon-c: #6c8ebf; } /* Consultoría */
.tech-bubble:nth-child(22) { --icon-c: #7ec8c8; } /* Comunicación */
.tech-bubble:nth-child(23) { --icon-c: #b4a0e5; } /* Autodidacta */
.tech-bubble:nth-child(24) { --icon-c: #82b366; } /* Trabajo en equipo */
.tech-bubble:nth-child(25) { --icon-c: #f5a623; } /* Resiliencia */
.tech-bubble:nth-child(26) { --icon-c: #50e3c2; } /* Flexibilidad */
.tech-bubble:nth-child(27) { --icon-c: #ff9f43; } /* Ambición */

/* Float keyframes — movimiento suave, pequeño para que no salgan de la elipse */
@keyframes float-a {
  0%, 100% { transform: translate(0px,   0px); }
  25%       { transform: translate(10px, -13px); }
  50%       { transform: translate(-8px, -18px); }
  75%       { transform: translate(-9px,  -5px); }
}
@keyframes float-b {
  0%, 100% { transform: translate(0px,   0px); }
  30%       { transform: translate(-11px, -9px); }
  60%       { transform: translate( 10px,-16px); }
  80%       { transform: translate( 11px, -5px); }
}
@keyframes float-c {
  0%, 100% { transform: translate(0px,   0px); }
  20%       { transform: translate( 11px, -7px); }
  50%       { transform: translate( -9px,-16px); }
  75%       { transform: translate( -7px, -4px); }
}
@keyframes float-d {
  0%, 100% { transform: translate(0px,   0px); }
  35%       { transform: translate(-13px,-10px); }
  65%       { transform: translate(  9px,-18px); }
}
@keyframes float-e {
  0%, 100% { transform: translate(0px,   0px); }
  40%       { transform: translate( 13px,-13px); }
  70%       { transform: translate( -8px,-18px); }
}

/* Posiciones — 27 burbujas, 3 filas de 9, centradas (left = centro_burbuja - mitad_ancho) */
/* Fila 1 (top ~6-10%) */
.tech-bubble:nth-child(1)  { left:  3%; top:  9%; animation: float-a 14s ease-in-out infinite    0s; }
.tech-bubble:nth-child(2)  { left: 14%; top:  6%; animation: float-b 16s ease-in-out infinite   -2s; }
.tech-bubble:nth-child(3)  { left: 24%; top:  9%; animation: float-c 13s ease-in-out infinite   -5s; }
.tech-bubble:nth-child(4)  { left: 35%; top:  6%; animation: float-d 17s ease-in-out infinite   -1s; }
.tech-bubble:nth-child(5)  { left: 45%; top:  9%; animation: float-e 15s ease-in-out infinite   -3s; }
.tech-bubble:nth-child(6)  { left: 56%; top:  6%; animation: float-a 18s ease-in-out infinite   -6s; }
.tech-bubble:nth-child(7)  { left: 66%; top:  9%; animation: float-b 12s ease-in-out infinite   -4s; }
.tech-bubble:nth-child(8)  { left: 77%; top:  6%; animation: float-c 16s ease-in-out infinite   -7s; }
.tech-bubble:nth-child(9)  { left: 87%; top:  8%; animation: float-d 14s ease-in-out infinite   -9s; }
/* Fila 2 (mid ~42-46%) */
.tech-bubble:nth-child(10) { left:  4%; top: 43%; animation: float-e 19s ease-in-out infinite   -5s; }
.tech-bubble:nth-child(11) { left: 14%; top: 46%; animation: float-a 13s ease-in-out infinite   -8s; }
.tech-bubble:nth-child(12) { left: 25%; top: 42%; animation: float-b 17s ease-in-out infinite   -3s; }
.tech-bubble:nth-child(13) { left: 35%; top: 46%; animation: float-c 15s ease-in-out infinite   -9s; }
.tech-bubble:nth-child(14) { left: 46%; top: 42%; animation: float-d 12s ease-in-out infinite   -1s; }
.tech-bubble:nth-child(15) { left: 57%; top: 46%; animation: float-e 16s ease-in-out infinite   -6s; }
.tech-bubble:nth-child(16) { left: 67%; top: 42%; animation: float-a 14s ease-in-out infinite  -10s; }
.tech-bubble:nth-child(17) { left: 77%; top: 46%; animation: float-b 18s ease-in-out infinite   -4s; }
.tech-bubble:nth-child(18) { left: 87%; top: 42%; animation: float-c 13s ease-in-out infinite   -7s; }
/* Fila 3 (bot ~73-77%) */
.tech-bubble:nth-child(19) { left:  3%; top: 74%; animation: float-d 15s ease-in-out infinite   -2s; }
.tech-bubble:nth-child(20) { left: 13%; top: 77%; animation: float-e 17s ease-in-out infinite   -5s; }
.tech-bubble:nth-child(21) { left: 24%; top: 73%; animation: float-a 14s ease-in-out infinite   -8s; }
.tech-bubble:nth-child(22) { left: 34%; top: 77%; animation: float-b 16s ease-in-out infinite   -3s; }
.tech-bubble:nth-child(23) { left: 47%; top: 73%; animation: float-c 12s ease-in-out infinite  -11s; }
.tech-bubble:nth-child(24) { left: 58%; top: 77%; animation: float-d 19s ease-in-out infinite   -1s; }
.tech-bubble:nth-child(25) { left: 68%; top: 73%; animation: float-e 15s ease-in-out infinite   -6s; }
.tech-bubble:nth-child(26) { left: 78%; top: 77%; animation: float-a 13s ease-in-out infinite   -9s; }
.tech-bubble:nth-child(27) { left: 87%; top: 73%; animation: float-b 16s ease-in-out infinite  -12s; }

.skills__tagline {
  text-align: center;
  margin-top: 1.5rem;
  font-size: var(--small-font-size);
  color: var(--text-color-light);
  font-style: italic;
  opacity: 0.65;
  letter-spacing: 0.02em;
}

/* ── Skills responsive: mobile ── */
@media screen and (max-width: 768px) {
  .tech-cloud-wrapper {
    aspect-ratio: unset;
    min-height: unset;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.5rem 0;
  }

  /* Reset absolute positioning for all bubbles */
  .tech-bubble {
    position: static;
    padding: 0.45rem 0.6rem;
  }

  /* Override per-bubble left/top/animation-delay so they just flow */
  .tech-bubble:nth-child(n) {
    left: unset;
    top: unset;
  }

  .tech-bubble i {
    font-size: 1.25rem;
  }

  .tech-bubble span {
    font-size: 0.6rem;
  }
}

/*=== ACTIVITY HEATMAP ===*/
.activity__section {
  padding-block: 1.5rem 2.5rem;
}

.activity__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.activity__label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: var(--small-font-size);
  color: var(--text-color-light);
  opacity: 0.7;
  letter-spacing: 0.03em;
}

.activity__label i {
  color: var(--first-color);
  font-size: 1rem;
}

/* Horizontal scroll wrapper so it never breaks the layout */
.activity__scroll-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--first-color) transparent;
}

.activity__scroll-wrapper::-webkit-scrollbar {
  height: 4px;
}
.activity__scroll-wrapper::-webkit-scrollbar-thumb {
  background: var(--first-color);
  border-radius: 2px;
}

.activity__calendar-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 780px; /* 56 semanas × ~13px + gaps */
}

/* Month labels row */
.activity__months {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: 1fr;
  padding-left: 0;
  height: 16px;
}

.activity__months span {
  font-size: 0.6rem;
  color: var(--text-color-light);
  opacity: 0.55;
  white-space: nowrap;
}

/* The day grid */
.activity__grid {
  display: grid;
  gap: 3px;
}

.activity__cell {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 3px;
  background: hsl(228, 15%, 14%);
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: default;
}

.activity__cell[data-level="future"] {
  background: transparent;
}

.activity__cell[data-level="0"] {
  background: hsl(228, 15%, 16%);
}

.activity__cell[data-level="1"] {
  background: hsla(162, 100%, 40%, 0.25);
}

.activity__cell[data-level="2"] {
  background: hsla(162, 100%, 40%, 0.48);
}

.activity__cell[data-level="3"] {
  background: hsla(162, 100%, 40%, 0.72);
}

.activity__cell[data-level="4"] {
  background: hsl(162, 100%, 40%);
  box-shadow: 0 0 6px hsla(162, 100%, 40%, 0.5);
}

.activity__cell:not([data-level="0"]):not([data-level="future"]):hover {
  transform: scale(1.25);
  z-index: 2;
  box-shadow: 0 0 10px hsla(162, 100%, 40%, 0.7);
}

/* Legend row */
.activity__footer {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.62rem;
  color: var(--text-color-light);
  opacity: 0.6;
}

.activity__legend {
  display: flex;
  gap: 3px;
  align-items: center;
}

.activity__legend-cell {
  width: 11px;
  height: 11px;
  border-radius: 2px;
}

.activity__legend-cell[data-level="0"] { background: hsl(228, 15%, 16%); }
.activity__legend-cell[data-level="1"] { background: hsla(162, 100%, 40%, 0.25); }
.activity__legend-cell[data-level="2"] { background: hsla(162, 100%, 40%, 0.48); }
.activity__legend-cell[data-level="3"] { background: hsla(162, 100%, 40%, 0.72); }
.activity__legend-cell[data-level="4"] { background: hsl(162, 100%, 40%); }

/*=== PROJECTS ===*/
.projects__filters {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: var(--mb-3);
  flex-wrap: wrap;
}

.projects__filter-btn {
  padding: 0.45rem 1.1rem;
  background: var(--container-color);
  border: 2px solid transparent;
  border-radius: 20px;
  color: var(--text-color);
  font-size: var(--small-font-size);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: var(--transition-fast);
}

.projects__filter-btn:hover,
.projects__filter-btn.active {
  background: var(--first-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-color);
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: var(--mb-2);
}

.project__card {
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
}

.project__img-wrapper {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.project__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.project__card:hover .project__img {
  transform: scale(1.07);
}

.project__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    hsl(var(--project-color) / 0.97) 0%,
    hsl(var(--project-color) / 0.78) 55%,
    hsl(var(--project-color) / 0.12) 100%
  );
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.project__card:hover .project__overlay {
  opacity: 1;
}

.project__overlay-inner {
  width: 100%;
  transform: translateY(12px);
  transition: transform 0.35s ease;
}

.project__card:hover .project__overlay-inner {
  transform: translateY(0);
}

.project__overlay-title {
  font-size: var(--h3-font-size);
  font-weight: var(--font-semi-bold);
  color: #fff;
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.project__overlay-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}

.project__overlay-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.7rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 20px;
  color: #fff;
  font-size: var(--smaller-font-size);
  font-weight: var(--font-medium);
}

.project__overlay-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.project__overlay-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  color: #fff;
  font-size: var(--small-font-size);
  font-weight: var(--font-medium);
  text-decoration: none;
  transition: background 0.3s ease;
  cursor: pointer;
}

.project__overlay-btn:hover {
  background: rgba(0, 0, 0, 0.80);
}

.project__overlay-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  color: #fff;
  font-size: 1rem;
  transition: background 0.3s ease;
  cursor: pointer;
}

.project__overlay-icon-btn:hover {
  background: rgba(255, 255, 255, 0.30);
}

.project__overlay-icon-btn[data-tooltip] {
  position: relative;
}

.project__overlay-icon-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.88);
  color: #fff;
  padding: 0.2rem 0.6rem;
  border-radius: 5px;
  font-size: 0.68rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.project__overlay-icon-btn[data-tooltip]:hover::after {
  opacity: 1;
}

.project__overlay-icon-btn--private {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.15);
}

.project__overlay-icon-btn--private:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Used by project modals */
.project__tech {
  padding: 0.25rem 0.75rem;
  background: hsla(162, 100%, 35%, 0.12);
  border: 1px solid var(--first-color);
  border-radius: 15px;
  color: var(--first-color);
  font-size: var(--small-font-size);
  font-weight: var(--font-medium);
}

.projects__show-more {
  text-align: center;
  margin-top: var(--mb-2);
}

/*=== PROJECT MODAL ===*/
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-fast);
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal__content {
  background: var(--container-color);
  border-radius: 20px;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: var(--mb-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: scale(0.9);
  transition: var(--transition-fast);
  scrollbar-gutter: stable;
}

.modal__content::-webkit-scrollbar {
  width: 6px;
}

.modal__content::-webkit-scrollbar-track {
  background: transparent;
  margin: 20px;
}

.modal__content::-webkit-scrollbar-thumb {
  background: var(--first-color);
  border-radius: 6px;
}

.modal.show .modal__content {
  transform: scale(1);
}

.modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background: var(--container-color-alt);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  font-size: 1.25rem;
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 10;
}

.modal__close:hover {
  background: var(--first-color);
  color: white;
}

.modal__header {
  margin-bottom: var(--mb-2);
}

.modal__title {
  font-size: var(--h2-font-size);
  margin-bottom: var(--mb-1);
  color: var(--title-color);
}

.modal__technologies {
  display: flex;
  gap: var(--mb-0-5);
  flex-wrap: wrap;
}

.modal__body {
  display: grid;
  gap: var(--mb-2);
}

.modal__image {
  text-align: center;
}

.modal__gallery {
  position: relative;
  display: inline-block;
  width: 100%;
}

.modal__gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: hsl(var(--body-hue), 15%, 12%, 0.75);
  border: 1px solid hsl(var(--first-hue), 100%, 40%, 0.35);
  border-radius: 50%;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  z-index: 5;
  opacity: 0;
  pointer-events: none;
}

.modal__gallery.has-multiple .modal__gallery-arrow {
  opacity: 1;
  pointer-events: auto;
}

.modal__gallery-arrow--prev { left: 0.5rem; }
.modal__gallery-arrow--next { right: 0.5rem; }

.modal__gallery-arrow:hover {
  background: var(--first-color);
  border-color: var(--first-color);
}

.modal__gallery-arrow:disabled {
  opacity: 0.25;
  cursor: default;
  pointer-events: none;
}

.modal__gallery-dots {
  position: absolute;
  bottom: 0.6rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.modal__gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  cursor: pointer;
  transition: background 0.2s;
  border: none;
}

.modal__gallery-dot.active {
  background: var(--first-color);
}

.modal__img {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow-medium);
}

.modal__section-title {
  font-size: var(--h3-font-size);
  margin-bottom: var(--mb-1);
  color: var(--first-color);
}

.modal__description {
  color: var(--text-color);
  line-height: 1.7;
  margin-bottom: var(--mb-1-5);
}

.modal__features {
  margin-bottom: var(--mb-1-5);
}

.modal__features li {
  color: var(--text-color);
  margin-bottom: var(--mb-0-5);
  padding-left: 0;
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.modal__features li::before {
  content: '✓';
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--first-color);
  font-weight: var(--font-bold);
}

.modal__tech-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--mb-1);
  margin-bottom: var(--mb-2);
}

.modal__company-note {
  text-align: center;
  font-size: var(--small-font-size);
  color: var(--text-color-light);
  margin-bottom: var(--mb-1-5);
}

.modal__company-note a {
  color: var(--first-color);
  text-decoration: none;
  font-weight: var(--font-semi-bold);
}

.modal__company-note a:hover {
  text-decoration: underline;
}

.modal__actions {
  display: flex;
  gap: var(--mb-1);
  justify-content: center;
}

/*=== SERVICES ===*/
.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--mb-1-5);
}

.service__card {
  background: var(--container-color);
  padding: var(--mb-2);
  border-radius: 16px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition-fast);
}

.service__card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
  border-color: var(--first-color);
}

.service__card-icon {
  font-size: 2rem;
  color: var(--first-color);
  margin-bottom: var(--mb-0-75);
  display: inline-block;
}

.service__card-title {
  font-size: var(--h3-font-size);
  margin-bottom: var(--mb-0-5);
  color: var(--title-color);
}

.service__card-description {
  color: var(--text-color);
  font-size: var(--small-font-size);
  line-height: 1.6;
}

/*=== CONTACT ===*/
.contact__content {
  grid-template-columns: 1fr 1fr;
  gap: var(--mb-3);
  align-items: start;
}

.contact__info {
  display: flex;
  flex-direction: column;
  gap: var(--mb-1-5);
}

.contact__card {
  background: var(--container-color);
  padding: var(--mb-2);
  border-radius: 16px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition-fast);
}

.contact__card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.contact__card-icon {
  font-size: 2rem;
  color: var(--first-color);
  margin-bottom: var(--mb-0-75);
}

.contact__card-title {
  font-size: var(--h3-font-size);
  margin-bottom: var(--mb-0-5);
  color: var(--title-color);
}

.contact__card-data {
  color: var(--text-color);
  margin-bottom: var(--mb-1);
  display: block;
}

.contact__button {
  color: var(--first-color);
  font-weight: var(--font-medium);
  transition: var(--transition-fast);
  text-decoration: none;
}

.contact__button:hover {
  color: var(--first-color-alt);
}

.contact__form {
  background: var(--container-color);
  padding: var(--mb-2-5);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.contact__form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--mb-1);
  margin-bottom: var(--mb-1);
}

.contact__form-input {
  padding: 1rem;
  background: var(--container-color-alt);
  border: 2px solid transparent;
  border-radius: 12px;
  color: var(--title-color);
  transition: var(--transition-fast);
  resize: none;
  font-family: var(--body-font);
}

.contact__form-input--half {
  margin-bottom: 0;
}

.contact__form-input--full {
  width: 100%;
  margin-bottom: var(--mb-1);
}

.contact__form-input:focus {
  border-color: var(--first-color);
  box-shadow: 0 0 0 3px hsla(var(--hue), 85%, 55%, 0.1);
  outline: none;
}

.contact__form-input::placeholder {
  color: var(--text-color-light);
}

.contact__form-area {
  min-height: 150px;
  resize: vertical;
}

.contact__form-button {
  width: 100%;
  justify-content: center;
}

.contact__message {
  margin-top: var(--mb-1);
  padding: var(--mb-0-75);
  border-radius: 8px;
  text-align: center;
  font-weight: var(--font-medium);
  opacity: 0;
  transition: var(--transition-fast);
}

.contact__message.show {
  opacity: 1;
}

.contact__message.success {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid #10b981;
}

.contact__message.error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid #ef4444;
}

/*=== FOOTER ===*/
.footer {
  background: var(--container-color);
  padding: var(--mb-3) 0 var(--mb-1);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__content {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--mb-2);
  align-items: start;
  margin-bottom: var(--mb-2);
}

.footer__brand {
  max-width: 300px;
  text-align: left; /* Alineado a la izquierda en desktop */
}

.footer__logo {
  font-size: var(--h2-font-size);
  font-weight: var(--font-bold);
  color: var(--title-color);
  margin-bottom: var(--mb-0-75);
  display: block;
}

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

.footer__description {
  color: var(--text-color);
  line-height: 1.6;
}

.footer__links {
  display: flex;
  gap: var(--mb-3);
}

.footer__links-title {
  font-size: var(--h3-font-size);
  margin-bottom: var(--mb-1);
  color: var(--title-color);
}

.footer__links-list {
  display: flex;
  flex-direction: column;
  gap: var(--mb-0-5);
}

.footer__link {
  color: var(--text-color);
  transition: var(--transition-fast);
}

.footer__link:hover {
  color: var(--first-color);
}

.footer__social {
  display: flex;
  gap: var(--mb-0-75);
  justify-self: end;
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: var(--container-color-alt);
  border-radius: 12px;
  color: var(--text-color);
  font-size: 1.25rem;
  transition: var(--transition-fast);
}

.footer__social-link:hover {
  background: var(--first-color);
  color: white;
  transform: translateY(-3px);
}

.footer__copy {
  text-align: center;
  padding-top: var(--mb-2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-color-light);
}

/*=== SCROLL UP ===*/
.scrollup {
  position: fixed;
  right: 1rem;
  bottom: -30%;
  background: var(--first-color);
  border-radius: 12px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  transition: var(--transition-fast);
  z-index: var(--z-tooltip);
  box-shadow: var(--shadow-color);
}

.scrollup:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px hsla(var(--hue), 85%, 55%, 0.4);
}

.scrollup.show-scroll {
  bottom: 2rem;
}

/*=== SCROLL BAR ===*/
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--container-color);
}

::-webkit-scrollbar-thumb {
  background: var(--first-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--first-color-alt);
}

/*=== BREAKPOINTS ===*/

/* For small devices */
@media screen and (max-width: 320px) {
  .container {
    padding-inline: 0.75rem;
  }
  
  .home__buttons {
    flex-direction: column;
  }
  
  .projects__grid {
    grid-template-columns: 1fr;
  }
  
  .contact__form-group {
    grid-template-columns: 1fr;
  }
}

/* For medium devices */
@media screen and (max-width: 768px) {
  .nav__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    height: 100vh;
    background: var(--container-color);
    padding: 6rem 2rem 2rem;
    transition: var(--transition-fast);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .nav__menu.show-menu {
    right: 0;
  }
  
  .nav__list {
    flex-direction: column;
    gap: var(--mb-1-5);
  }
  
  .nav__link {
    justify-content: flex-start;
  }
  
  .nav__toggle,
  .nav__close {
    display: block;
  }
  
  .nav__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
  }
  
  .home__content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--mb-2);
  }
  
  .home__buttons {
    justify-content: center;
    text-align: center;
  }
  
  .home__social {
    justify-content: center;
  }
  
  .home__scroll {
    display: none;
  }
  
  .home__image {
    order: -1;
  }
  
  .home__blob {
    width: 280px;
    height: 280px;
  }
  
  .home__img {
    width: 220px;
    height: 220px;
  }
  
  .about__content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .about__buttons {
    justify-content: center;
    text-align: center;
  }
  
  .about__info {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .skills__content {
    grid-template-columns: 1fr;
  }
  
  .projects__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .contact__content {
    grid-template-columns: 1fr;
    gap: var(--mb-2);
  }
  
  .contact__form-row {
    grid-template-columns: 1fr;
    gap: var(--mb-1);
  }
  
  .contact__form {
    padding: var(--mb-1-5);
  }
  
  .footer__content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--mb-2);
  }
  
  .footer__brand {
    text-align: center; /* Centrado solo en móvil */
    justify-self: center;
  }
  
  .footer__links {
    justify-content: center;
  }
  
  .footer__social {
    justify-self: center;
  }
}

/* For large devices */
@media screen and (min-width: 1024px) {
  .container {
    padding-inline: 2rem;
  }
  
  .section {
    padding-block: 7rem 3rem;
  }
  
  .nav__menu {
    margin-left: auto;
    margin-right: 2rem;
  }
  
  .home__content {
    grid-template-columns: 1fr 1fr;
    gap: var(--mb-3);
  }
  
  .home__data {
    max-width: 600px;
  }
  
  .home__blob {
    width: 400px;
    height: 400px;
  }
  
  .home__img {
    width: 340px;
    height: 340px;
  }
  
  .about__content {
    gap: var(--mb-3);
  }
  
  .about__info {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .projects__grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .contact__content {
    grid-template-columns: 1fr 1fr;
    gap: var(--mb-3);
  }
  
  .contact__form-row {
    grid-template-columns: 1fr 1fr;
    gap: var(--mb-1);
  }
}

@media screen and (min-width: 1152px) {
  .container {
    max-width: 1200px;
  }
  
  .home__content {
    gap: var(--mb-3);
  }
  
  .projects__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/*=== UTILITIES ===*/
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blur-header {
  background: rgba(var(--hue), 60%, 8%, 0.95);
  backdrop-filter: blur(25px);
}

/*=== EXPERIENCE MODAL ===*/
.exp-modal__content {
  max-width: 680px;
}

.exp-modal__header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--container-color-alt);
}

.exp-modal__title {
  font-size: var(--h2-font-size);
  font-weight: var(--font-bold);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.3rem;
}

.exp-modal__subtitle {
  font-size: var(--small-font-size);
  color: var(--text-color-light);
}

/*--- Timeline ---*/
.exp-timeline {
  position: relative;
  padding-left: 2.2rem;
}

.exp-timeline::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 8px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--first-color) 60%, transparent);
  border-radius: 2px;
}

.exp-item {
  position: relative;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateX(-16px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.exp-item.visible {
  opacity: 1;
  transform: translateX(0);
}

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

.exp-item__dot {
  position: absolute;
  left: calc(-2.2rem + 5px);
  top: calc(1.25rem + 14px);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--first-color);
  border: 2px solid var(--body-color);
  box-shadow: 0 0 0 3px hsla(162, 100%, 40%, 0.25);
  z-index: 1;
}

.exp-item__dot--current {
  animation: dot-pulse 2.2s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 0 3px hsla(162, 100%, 40%, 0.25); }
  50%       { box-shadow: 0 0 0 7px hsla(162, 100%, 40%, 0); }
}

.exp-item__card {
  background: var(--container-color-alt);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  border: 1px solid transparent;
  transition: border-color 0.3s;
}

.exp-item__card:hover {
  border-color: hsla(162, 100%, 40%, 0.35);
}

.exp-item__top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.exp-item__logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  flex-shrink: 0;
  object-fit: contain;
  background: #fff;
  padding: 3px;
}

.exp-item__meta {
  flex: 1;
  min-width: 0;
}

.exp-item__title {
  font-size: var(--normal-font-size);
  font-weight: var(--font-bold);
  color: var(--title-color);
  margin-bottom: 0.15rem;
  line-height: 1.3;
}

.exp-item__company {
  font-size: var(--small-font-size);
  color: var(--first-color);
  font-weight: var(--font-medium);
  margin-bottom: 0.3rem;
}

.exp-item__dates {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.exp-item__date-badge {
  font-size: var(--smaller-font-size);
  color: var(--text-color-light);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.exp-item__current-badge {
  font-size: var(--smaller-font-size);
  background: hsla(162, 100%, 40%, 0.12);
  color: var(--first-color);
  padding: 0.1rem 0.55rem;
  border-radius: 20px;
  border: 1px solid hsla(162, 100%, 40%, 0.3);
  font-weight: var(--font-medium);
}

.exp-item__location {
  font-size: var(--smaller-font-size);
  color: var(--text-color-light);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.exp-item__bullets {
  list-style: none;
  margin-bottom: 1rem;
  padding: 0;
}

.exp-item__bullets li {
  font-size: var(--small-font-size);
  color: var(--text-color);
  padding: 0.4rem 0 0.4rem 1.2rem;
  position: relative;
  line-height: 1.55;
  border-bottom: 1px solid hsla(228, 15%, 35%, 0.35);
}

.exp-item__bullets li:last-child {
  border-bottom: none;
}

.exp-item__bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.72rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--first-color);
  opacity: 0.65;
}

.exp-item__skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.exp-item__skill-tag {
  font-size: var(--smaller-font-size);
  background: var(--container-color);
  color: var(--first-color);
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  border: 1px solid hsla(162, 100%, 40%, 0.2);
}

.hidden {
  opacity: 0;
  visibility: hidden;
}

.show {
  opacity: 1;
  visibility: visible;
}

/* Animation classes for ScrollReveal */
.sr-hidden {
  opacity: 0;
  transform: translateY(30px);
}

.sr-visible {
  opacity: 1;
  transform: translateY(0);
}

