:root {
  --color-bg: #d9e0e2;
  --color-bg-light: #eef5f5;
  --color-bg-soft: #f5fbfb;
  --color-card: #ffffff;
  --color-primary: #10b8ad;
  --color-primary-dark: #0d8f87;
  --color-primary-soft: rgba(16, 184, 173, 0.12);
  --color-primary-medium: rgba(16, 184, 173, 0.28);
  --color-accent-orange: #f28c28;
  --color-text: #152024;
  --color-muted: #5a6c72;
  --color-border: rgba(16, 184, 173, 0.22);
  --shadow-soft: 0 18px 50px rgba(16, 184, 173, 0.08);
  --shadow-strong: 0 24px 70px rgba(16, 184, 173, 0.18);
  --radius-lg: 28px;
  --radius-md: 20px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 105px;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(16, 184, 173, 0.08), transparent 28%),
    var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(16, 184, 173, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 184, 173, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent 70%);
  z-index: -1;
}

img {
  max-width: 100%;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font-family: inherit;
}

/* HERO */

.hero {
  min-height: 100vh;
  padding: 24px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(16, 184, 173, 0.34), transparent 32%),
    radial-gradient(circle at 10% 75%, rgba(16, 184, 173, 0.16), transparent 28%),
    linear-gradient(135deg, #e1e7e9 0%, #f7fbfb 55%, #d5eeee 100%);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(16, 184, 173, 0.12);
  filter: blur(2px);
  pointer-events: none;
}

.hero::before {
  width: 240px;
  height: 240px;
  right: -70px;
  top: 120px;
}

.hero::after {
  width: 160px;
  height: 160px;
  left: -45px;
  bottom: 80px;
}

/* NAVBAR FIJA Y PLEGABLE */

.navbar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translate(-50%, 0);
  z-index: 1000;

  width: calc(100% - 48px);
  max-width: 1180px;

  margin: 0 auto;
  padding: 14px 22px;

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;

  background: rgba(245, 251, 251, 0.86);
  border: 1px solid rgba(16, 184, 173, 0.18);
  border-radius: 0 0 24px 24px;
  box-shadow: 0 14px 34px rgba(16, 184, 173, 0.1);
  backdrop-filter: blur(14px);

  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.navbar.navbar-hidden {
  transform: translate(-50%, calc(-100% + 20px));
  box-shadow: 0 8px 18px rgba(16, 184, 173, 0.08);
}

.navbar.navbar-hidden .logo,
.navbar.navbar-hidden .nav-links,
.navbar.navbar-hidden .language-switcher {
  opacity: 0;
  pointer-events: none;
}

.logo {
  font-weight: 900;
  font-size: 1.25rem;
  color: var(--color-primary);
  letter-spacing: 0.2px;
  transition: opacity 0.2s ease;
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
  color: var(--color-muted);
  font-size: 0.95rem;
  transition: opacity 0.2s ease;
}

.nav-links a {
  position: relative;
}

.nav-links a:hover {
  color: var(--color-primary);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.25s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* SELECTOR DE IDIOMA */

.language-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(16, 184, 173, 0.08);
  border: 1px solid rgba(16, 184, 173, 0.18);
  transition: opacity 0.2s ease;
}

.language-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--color-muted);
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
  transition: 0.2s ease;
}

.language-button:hover {
  color: var(--color-primary);
  background: rgba(255, 255, 255, 0.68);
}

.language-button.is-active {
  color: #ffffff;
  background: var(--color-primary);
  box-shadow: 0 8px 18px rgba(16, 184, 173, 0.18);
}

.language-button:focus-visible {
  outline: 3px solid rgba(16, 184, 173, 0.42);
  outline-offset: 3px;
}

.flag {
  font-size: 1rem;
  line-height: 1;
}

.language-code {
  letter-spacing: 0.4px;
}

.navbar-toggle {
  position: absolute;
  right: 24px;
  bottom: -22px;

  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  border: 1px solid rgba(16, 184, 173, 0.28);
  border-radius: 50%;

  background: rgba(245, 251, 251, 0.96);
  color: var(--color-primary-dark);

  font-size: 1.25rem;
  line-height: 1;
  font-weight: 900;
  cursor: pointer;

  box-shadow: 0 10px 24px rgba(16, 184, 173, 0.12);
  transition: 0.2s ease;
}

.navbar-toggle:hover {
  background: rgba(16, 184, 173, 0.12);
  transform: translateY(-1px);
}

.navbar-toggle:focus-visible {
  outline: 3px solid rgba(16, 184, 173, 0.42);
  outline-offset: 4px;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding-top: 120px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.hero-text-block {
  max-width: 790px;
}

.tag,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--color-primary);
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.tag::before,
.section-kicker::before {
  content: "";
  width: 26px;
  height: 3px;
  border-radius: 999px;
  background: var(--color-accent-orange);
}

h1 {
  max-width: 780px;
  font-size: clamp(2.5rem, 5vw, 4.4rem);
  line-height: 1.06;
  margin-bottom: 24px;
  letter-spacing: -1.5px;
}

.hero-subtitle {
  max-width: 720px;
  color: var(--color-text);
  font-size: 1.18rem;
  margin-bottom: 18px;
}

.hero-text {
  max-width: 720px;
  color: var(--color-muted);
  font-size: 1rem;
  margin-bottom: 24px;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.hero-chips span {
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(16, 184, 173, 0.26);
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: 700;
}

.hero-buttons,
.contact-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* BOTONES */

.btn {
  display: inline-block;
  position: relative;
  overflow: hidden;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.2s ease;
  box-shadow: 0 10px 24px rgba(20, 32, 36, 0.08);
}

.btn.primary {
  background: var(--color-primary);
  color: #ffffff;
}

.btn.primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
}

.btn.secondary {
  border: 1px solid var(--color-border);
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.62);
}

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

.btn.ghost {
  color: var(--color-primary);
  background: rgba(16, 184, 173, 0.1);
  border: 1px solid rgba(16, 184, 173, 0.38);
}

.btn.ghost:hover {
  background: rgba(16, 184, 173, 0.18);
  transform: translateY(-2px);
}

.btn:hover {
  box-shadow: 0 16px 34px rgba(16, 184, 173, 0.16);
}

.btn::after,
.project-link::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 80%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.38),
    transparent
  );
  transform: skewX(-20deg);
  transition: 0.45s ease;
}

.btn:hover::after,
.project-link:hover::after {
  left: 130%;
}

/* HERO VISUAL */

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 430px;
}

.visual-orbit {
  position: absolute;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(16, 184, 173, 0.28);
  border-radius: 50%;
  top: 18px;
}

.visual-orbit::before {
  content: "";
  position: absolute;
  inset: 50px;
  border: 1px dashed rgba(16, 184, 173, 0.24);
  border-radius: 50%;
}

.orbit-dot {
  position: absolute;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 0 8px rgba(16, 184, 173, 0.12);
}

.dot-one {
  top: 20px;
  left: 80px;
}

.dot-two {
  right: 16px;
  top: 145px;
}

.dot-three {
  bottom: 35px;
  left: 62px;
}

.profile-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 430px;
  align-self: center;
  padding: 40px 32px;
  border-radius: 34px;
  background:
    radial-gradient(circle at top, rgba(16, 184, 173, 0.18), transparent 48%),
    linear-gradient(145deg, rgba(16, 184, 173, 0.12), rgba(255, 255, 255, 0.94)),
    var(--color-card);
  border: 1px solid rgba(16, 184, 173, 0.42);
  box-shadow: 0 30px 80px rgba(16, 184, 173, 0.18);
  text-align: center;
}

.logo-image-wrapper {
  width: 260px;
  height: 260px;
  margin: 0 auto 26px;
  border-radius: 52px;
  display: block;
  background:
    radial-gradient(circle at top, rgba(16, 184, 173, 0.22), transparent 55%),
    rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(16, 184, 173, 0.42);
  box-shadow: 0 18px 40px rgba(16, 184, 173, 0.22);
  overflow: hidden;
}

.logo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
  border-radius: 52px;
  display: block;
}

.profile-card h2 {
  font-size: 1.65rem;
  margin-bottom: 10px;
}

.profile-card p {
  color: var(--color-muted);
  font-size: 0.98rem;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.profile-stats div {
  padding: 14px 10px;
  border-radius: 18px;
  background: rgba(16, 184, 173, 0.08);
  border: 1px solid rgba(16, 184, 173, 0.22);
}

.profile-stats strong {
  display: block;
  color: var(--color-primary);
  font-size: 1.35rem;
  line-height: 1;
}

.profile-stats span {
  display: block;
  margin-top: 6px;
  color: var(--color-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

/* SECCIONES */

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 95px 24px;
  position: relative;
}

.section-soft {
  max-width: none;
  padding-left: max(24px, calc((100% - 1180px) / 2 + 24px));
  padding-right: max(24px, calc((100% - 1180px) / 2 + 24px));
  background:
    radial-gradient(circle at top right, rgba(16, 184, 173, 0.09), transparent 30%),
    rgba(255, 255, 255, 0.34);
  border-top: 1px solid rgba(16, 184, 173, 0.12);
  border-bottom: 1px solid rgba(16, 184, 173, 0.12);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  margin-bottom: 30px;
}

.section h2 {
  position: relative;
  display: inline-block;
  font-size: clamp(1.9rem, 3.5vw, 2.45rem);
  line-height: 1.1;
  margin-bottom: 24px;
  color: var(--color-primary);
}

.section h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -9px;
  width: 58px;
  height: 4px;
  border-radius: 999px;
  background: var(--color-primary);
}

.section p {
  max-width: 900px;
  color: var(--color-muted);
  margin-bottom: 16px;
}

.text-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1fr;
  gap: 24px;
}

.text-grid p {
  padding: 24px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(16, 184, 173, 0.16);
  box-shadow: var(--shadow-soft);
}

/* QUÉ APORTO */

.value-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 28px;
}

.value-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(238, 250, 250, 0.86));
  border: 1px solid rgba(16, 184, 173, 0.24);
  box-shadow: var(--shadow-soft);
  transition: 0.25s ease;
}

.value-card::after {
  content: "";
  position: absolute;
  right: -45px;
  top: -45px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(16, 184, 173, 0.1);
}

.value-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-strong);
  border-color: rgba(16, 184, 173, 0.44);
}

.value-icon {
  width: 54px;
  height: 54px;
  margin-bottom: 20px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(16, 184, 173, 0.12);
  border: 1px solid rgba(16, 184, 173, 0.22);
  font-size: 1.55rem;
}

.value-card h3 {
  margin-bottom: 12px;
  font-size: 1.25rem;
}

.value-card p {
  margin-bottom: 0;
}

/* PROYECTOS */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 30px;
  align-items: stretch;
}

.card {
  background:
    linear-gradient(180deg, rgba(16, 184, 173, 0.045), rgba(255, 255, 255, 0.94)),
    var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 24px;
  padding: 26px;
  min-height: 260px;
  transition: 0.2s ease;
  box-shadow: var(--shadow-soft);
}

.card:hover {
  transform: translateY(-8px);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-strong);
}

.card h3 {
  font-size: 1.4rem;
  margin-bottom: 14px;
  color: var(--color-text);
}

.card p {
  color: var(--color-muted);
  margin-bottom: 20px;
}

.tech-summary,
.card > span {
  color: var(--color-primary);
  font-size: 0.95rem;
  font-weight: 800;
}

.project-card {
  position: relative;
  overflow: hidden;
}

.project-label {
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 10px;
}

.project-card ul {
  margin: 18px 0 22px;
  padding-left: 18px;
  color: var(--color-muted);
}

.project-card li {
  margin-bottom: 8px;
}

.project-placeholder {
  width: 100%;
  height: 160px;
  margin-bottom: 24px;
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(16, 184, 173, 0.24), transparent 42%),
    linear-gradient(135deg, rgba(16, 184, 173, 0.08), rgba(255, 255, 255, 0.7));
  border: 1px solid rgba(16, 184, 173, 0.22);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.project-placeholder span {
  color: var(--color-primary);
  font-size: 3rem;
  font-weight: 900;
}

/* TARJETAS FLIP */

.flip-card {
  padding: 0;
  min-height: 660px;
  perspective: 1400px;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
  width: 100%;
  max-width: 100%;
}

.flip-card:hover {
  transform: none;
  border-color: transparent;
  box-shadow: none;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  min-height: 660px;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.72s cubic-bezier(0.2, 0.65, 0.25, 1);
}

.flip-card.is-flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-face {
  position: absolute;
  inset: 0;
  width: 100%;
  min-width: 100%;
  display: flex;
  flex-direction: column;
  padding: 26px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(16, 184, 173, 0.08), transparent 38%),
    linear-gradient(180deg, rgba(16, 184, 173, 0.045), rgba(255, 255, 255, 0.96)),
    var(--color-card);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

.flip-card-face::before {
  content: "";
  position: absolute;
  top: 0;
  left: 26px;
  right: 26px;
  height: 4px;
  background: var(--color-primary);
  border-radius: 999px;
}

.flip-card-back {
  transform: rotateY(180deg);
  align-items: center;
  text-align: center;
}

.project-logo-area {
  margin-bottom: 24px;
}

.project-logo-button {
  position: relative;
  width: 100%;
  height: 160px;
  border: 1px solid rgba(16, 184, 173, 0.22);
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(16, 184, 173, 0.24), transparent 42%),
    linear-gradient(135deg, rgba(16, 184, 173, 0.08), rgba(255, 255, 255, 0.5));
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(16, 184, 173, 0.08);
}

.project-logo-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.project-logo-hint {
  margin: 8px 0 0 !important;
  color: var(--color-primary) !important;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}

.project-logo-button:hover img,
.project-logo-button:focus-visible img {
  transform: scale(1.06);
  filter: brightness(1.04);
}

.project-logo-button:focus-visible,
.project-link:focus-visible,
.btn:focus-visible,
.nav-links a:focus-visible,
.logo:focus-visible,
.screenshot-frame:focus-visible,
.navbar-toggle:focus-visible {
  outline: 3px solid rgba(16, 184, 173, 0.42);
  outline-offset: 4px;
}

.screenshot-frame {
  width: min(100%, 235px);
  margin: 0 auto 14px;
  padding: 9px;
  border-radius: 30px;
  background: #111;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 18px 46px rgba(20, 32, 36, 0.22);
  cursor: pointer;
}

.screenshot-frame::after {
  content: attr(data-screenshot-hint);
  display: block;
  margin-top: 10px;
  color: var(--color-primary);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}

.project-screenshot {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  display: block;
  border-radius: 22px;
  background: #eef6f6;
}

.screenshot-counter {
  margin-bottom: 6px;
  color: var(--color-primary) !important;
  font-size: 0.86rem;
  font-weight: 900;
}

.screenshot-caption {
  min-height: 48px;
  margin-bottom: 16px !important;
}

.flip-actions {
  width: 100%;
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.project-link {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 11px 18px;
  border: none;
  border-radius: 999px;
  background: var(--color-primary);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.project-link:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(16, 184, 173, 0.18);
}

.light-card-button {
  background: rgba(16, 184, 173, 0.1);
  color: var(--color-primary);
  border: 1px solid rgba(16, 184, 173, 0.32);
}

.light-card-button:hover {
  background: rgba(16, 184, 173, 0.18);
  color: var(--color-primary-dark);
}

.image-slide-animation {
  animation: imageSlide 0.35s ease;
}

@keyframes imageSlide {
  from {
    opacity: 0;
    transform: translateX(24px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* TECNOLOGÍAS */

.tech-groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-top: 30px;
}

.tech-group {
  padding: 26px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(16, 184, 173, 0.2);
  box-shadow: var(--shadow-soft);
}

.tech-group h3 {
  margin-bottom: 18px;
  color: var(--color-text);
  font-size: 1.18rem;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tech-list span {
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(16, 184, 173, 0.08);
  border: 1px solid rgba(16, 184, 173, 0.24);
  color: var(--color-text);
  font-weight: 700;
  transition: 0.2s ease;
}

.tech-list span:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: rgba(16, 184, 173, 0.13);
  transform: translateY(-3px);
}

/* IDIOMAS */

.language-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 30px;
}

.language-card {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(238, 250, 250, 0.82));
  border: 1px solid rgba(16, 184, 173, 0.22);
  box-shadow: var(--shadow-soft);
  transition: 0.25s ease;
}

.language-card::after {
  content: "";
  position: absolute;
  right: -38px;
  top: -38px;
  width: 105px;
  height: 105px;
  border-radius: 50%;
  background: rgba(16, 184, 173, 0.1);
}

.language-card:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 184, 173, 0.42);
  box-shadow: var(--shadow-strong);
}

.language-card h3 {
  margin-bottom: 10px;
  color: var(--color-text);
  font-size: 1.28rem;
}

.language-card p {
  margin-bottom: 0;
}

.language-level {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(16, 184, 173, 0.12);
  border: 1px solid rgba(16, 184, 173, 0.28);
  color: var(--color-primary-dark);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.main-language {
  border-color: rgba(16, 184, 173, 0.32);
}

/* CONTACTO */

.section-cta {
  padding-top: 80px;
}

.cta-box {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 30px;
  align-items: center;
  padding: 36px;
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(16, 184, 173, 0.2), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(238, 250, 250, 0.76));
  border: 1px solid rgba(16, 184, 173, 0.28);
  box-shadow: var(--shadow-strong);
}

.contact-links {
  justify-content: flex-end;
}

/* FOOTER */

footer {
  padding: 30px 24px;
  text-align: center;
  color: var(--color-muted);
  border-top: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.28);
}

/* ANIMACIONES */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatSoft {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }

  100% {
    transform: translateY(0);
  }
}

.logo,
.nav-links,
.language-switcher,
.hero-text-block,
.hero-visual {
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
}

.logo {
  animation-delay: 0.1s;
}

.nav-links {
  animation-delay: 0.2s;
}

.language-switcher {
  animation-delay: 0.25s;
}

.hero-text-block {
  animation-delay: 0.3s;
}

.hero-visual {
  animation-delay: 0.45s;
}

.profile-card {
  animation:
    fadeUp 0.8s ease forwards,
    floatSoft 5s ease-in-out infinite;
  animation-delay: 0.45s, 1.4s;
}

/* RESPONSIVE */

@media (min-width: 1200px) {
  .hero-content,
  .navbar,
  .section {
    max-width: 1180px;
  }

  .section-soft {
    max-width: none;
  }
}

@media (max-width: 1100px) {
  .hero-content {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 36px;
  }

  .nav-links {
    gap: 18px;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .future-card {
    grid-column: 1 / -1;
  }

  .text-grid,
  .value-cards {
    grid-template-columns: 1fr;
  }

  .profile-card {
    max-width: 390px;
  }

  .logo-image-wrapper {
    width: 230px;
    height: 230px;
  }
}

@media (max-width: 980px) {
  .navbar {
    gap: 14px;
  }

  .nav-links {
    gap: 12px;
    font-size: 0.9rem;
  }

  .language-button {
    padding: 6px 8px;
  }
}

@media (max-width: 940px) {
  .hero {
    min-height: auto;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding-top: 130px;
  }

  .hero-visual {
    justify-content: center;
  }

  .profile-card {
    max-width: 430px;
  }

  .section-heading {
    display: block;
  }

  .cta-box {
    grid-template-columns: 1fr;
  }

  .contact-links {
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .language-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 800px) {
  html {
    scroll-padding-top: 200px;
  }

  .navbar {
    width: calc(100% - 32px);
    align-items: flex-start;
    gap: 14px;
    flex-direction: column;
    padding: 14px 18px;
    border-radius: 0 0 22px 22px;
  }

  .navbar-toggle {
    right: 16px;
    bottom: -22px;
  }

  .nav-links {
    width: 100%;
    flex-wrap: wrap;
    gap: 12px;
  }

  .nav-links li {
    flex: 1 1 auto;
  }

  .nav-links a {
    display: inline-block;
    padding: 6px 0;
  }

  .language-switcher {
    align-self: flex-start;
  }

  .cards,
  .tech-groups {
    grid-template-columns: 1fr;
  }

  .future-card {
    grid-column: auto;
  }

  .visual-orbit {
    width: 330px;
    height: 330px;
  }
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 225px;
  }

  .hero {
    padding: 18px;
  }

  .navbar {
    padding: 13px 16px;
  }

  .logo {
    font-size: 1.1rem;
  }

  .nav-links {
    font-size: 0.92rem;
  }

  .hero-content {
    padding-top: 225px;
    gap: 34px;
  }

  h1 {
    font-size: clamp(2.35rem, 13vw, 3.4rem);
    margin-bottom: 18px;
    letter-spacing: -1px;
  }

  .tag {
    font-size: 0.75rem;
    margin-bottom: 14px;
  }

  .hero-subtitle {
    font-size: 1.08rem;
    margin-bottom: 18px;
  }

  .hero-text {
    font-size: 1rem;
    margin-bottom: 24px;
  }

  .hero-buttons,
  .contact-links {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .profile-card {
    max-width: 100%;
    padding: 30px 22px;
  }

  .logo-image-wrapper {
    width: 215px;
    height: 215px;
  }

  .visual-orbit {
    display: none;
  }

  .section,
  .section-soft {
    padding: 68px 18px;
  }

  .section h2 {
    font-size: 1.8rem;
    margin-bottom: 28px;
  }

  .section p {
    font-size: 0.98rem;
  }

  .cards,
  .language-cards {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .card,
  .value-card,
  .tech-group,
  .language-card {
    padding: 22px;
  }

  .flip-card,
  .flip-card-inner {
    min-height: 720px;
  }

  .flip-card-face {
    padding: 22px;
  }

  .project-logo-button {
    height: 148px;
  }

  .project-logo-hint {
    font-size: 0.72rem;
  }

  .screenshot-frame {
    width: min(100%, 215px);
  }

  .screenshot-frame::after {
    font-size: 0.68rem;
  }

  .project-screenshot {
    border-radius: 20px;
  }

  .tech-list {
    gap: 10px;
  }

  .tech-list span {
    font-size: 0.92rem;
    padding: 9px 13px;
  }

  .cta-box {
    padding: 26px 22px;
  }
}

@media (max-width: 430px) {
  html {
    scroll-padding-top: 245px;
  }

  .hero {
    padding: 16px;
  }

  .navbar {
    width: calc(100% - 24px);
  }

  .nav-links {
    gap: 8px;
  }

  .nav-links a {
    font-size: 0.88rem;
  }

  .language-button {
    min-height: 32px;
    padding: 5px 8px;
    font-size: 0.74rem;
  }

  .hero-content {
    padding-top: 245px;
  }

  h1 {
    font-size: clamp(2.15rem, 14vw, 3rem);
  }

  .hero-subtitle {
    font-size: 1.02rem;
  }

  .hero-text {
    font-size: 0.96rem;
  }

  .section,
  .section-soft {
    padding: 62px 16px;
  }

  .card h3 {
    font-size: 1.25rem;
  }

  .flip-card,
  .flip-card-inner {
    min-height: 750px;
  }

  .project-logo-button {
    height: 140px;
  }

  .project-logo-hint {
    font-size: 0.7rem;
  }

  .screenshot-frame {
    width: min(100%, 205px);
  }

  .flip-actions {
    gap: 9px;
  }

  .profile-stats {
    grid-template-columns: 1fr;
  }

  .logo-image-wrapper {
    width: 190px;
    height: 190px;
  }
}

@media (max-width: 360px) {
  html {
    scroll-padding-top: 260px;
  }

  .flip-card,
  .flip-card-inner {
    min-height: 790px;
  }

  .project-logo-button {
    height: 132px;
  }

  .project-logo-hint {
    font-size: 0.68rem;
  }

  .screenshot-frame {
    width: min(100%, 190px);
  }

  .btn,
  .project-link {
    padding-left: 14px;
    padding-right: 14px;
    font-size: 0.92rem;
  }

  .logo-image-wrapper {
    width: 170px;
    height: 170px;
  }
}

/* CORRECCIÓN REAL TARJETAS FLIP EN MÓVIL */

@media (max-width: 800px) {
  #proyectos .cards {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  #proyectos .cards > article,
  #proyectos .cards > .card,
  #proyectos .cards > .flip-card,
  #proyectos .cards > .future-card {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  #proyectos .flip-card {
    padding: 0 !important;
    width: 100%;
    max-width: 100%;
  }

  #proyectos .flip-card-inner {
    width: 100%;
    max-width: 100%;
  }

  #proyectos .flip-card-face {
    width: 100%;
    max-width: 100%;
    min-width: 100%;
    left: 0;
    right: 0;
  }
}

@media (max-width: 640px) {
  #proyectos .flip-card {
    padding: 0 !important;
  }
}

@media (max-width: 430px) {
  #proyectos .flip-card {
    padding: 0 !important;
  }
}

/* ACCESIBILIDAD */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .flip-card-inner,
  .flip-card.is-flipped .flip-card-inner {
    transform: none;
  }

  .flip-card-face {
    position: relative;
  }

  .flip-card-back {
    display: none;
  }

  .flip-card.is-flipped .flip-card-front {
    display: none;
  }

  .flip-card.is-flipped .flip-card-back {
    display: flex;
    transform: none;
  }
}