
/* ========================================
   1. VARIABLES Y CONFIGURACIÓN GENERAL
======================================== */

:root {
  --bg: #10151B;
  --bg-alt: #111A20;
  --panel: #151E26;
  --panel-hover: #1B292D;
  --border: #283A3B;
  --border-hover: #398F70;
  --text: #F1F5F9;
  --text-muted: #A8B6C0;
  --text-soft: #7D929B;
  --accent: #29D391;
  --accent-light: #6EE7B7;
  --accent-dark: #168A61;
  --success: #29D391;
  --radius: 16px;
  --container: 1120px;
}

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

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: inherit;
}

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

button {
  font: inherit;
}

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

.container {
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
}

.section {
  padding: 100px 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid rgba(41, 211, 145, 0.06);
  border-bottom: 1px solid rgba(41, 211, 145, 0.06);
}

::selection {
  background: var(--accent);
  color: #10151B;
}

/* ========================================
   2. NAVEGACIÓN
======================================== */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(16, 21, 27, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(41, 211, 145, 0.12);
}

.navbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.logo {
  color: var(--text);
  text-decoration: none;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -2px;
}

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

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 25px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

.nav-links .nav-contact {
  color: var(--accent-light);
  padding: 10px 15px;
  border: 1px solid var(--border);
  border-radius: 9px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-links .nav-contact:hover {
  background: rgba(41, 211, 145, 0.08);
  border-color: var(--accent);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 11px;
  color: var(--text);
  cursor: pointer;
}

/* ========================================
   3. ELEMENTOS GENERALES
======================================== */

.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1.5;
}

.section-heading {
  max-width: 650px;
  margin-bottom: 42px;
}

.section-heading h2 {
  margin-top: 10px;
  margin-bottom: 12px;
  color: var(--text);
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.2;
  letter-spacing: -1.3px;
}

.section-heading p {
  color: var(--text-muted);
  max-width: 580px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.panel-number {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

/* ========================================
   4. BOTONES
======================================== */

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease,
    border-color 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #08111e;
}

.button-primary:hover {
  background: var(--accent-light);
}

.button-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.button-secondary:hover {
  background: var(--panel);
  border-color: var(--accent);
}

/* ========================================
   5. INICIO / HERO
======================================== */

.hero {
  position: relative;
  overflow: hidden;
  padding: 95px 0 90px;
}

.hero::before {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  top: -180px;
  right: -100px;
  background: rgba(41, 211, 145, 0.07);
  filter: blur(100px);
  border-radius: 50%;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 75px;
}

.hero-content h1 {
  margin-top: 20px;
  font-size: clamp(54px, 7vw, 84px);
  line-height: 0.98;
  letter-spacing: -5px;
  font-weight: 800;
}

.hero-content h1 span {
  color: var(--accent);
}

.hero-subtitle {
  margin-top: 24px;
  max-width: 550px;
  color: #d8e2f0;
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.4;
  font-weight: 600;
}

.hero-description {
  max-width: 540px;
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.9;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 30px;
}

.hero-tags span,
.skill-tags span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  background: rgba(41, 211, 145, 0.06);
  border: 1px solid rgba(41, 211, 145, 0.16);
  border-radius: 7px;
  color: #C2D8D0;
  font-size: 11px;
  font-weight: 600;
}

/* Tarjeta de perfil */

.hero-visual {
  position: relative;
  padding: 20px;
}

.profile-card {
  position: relative;
  z-index: 2;
  max-width: 380px;
  margin: auto;
  padding: 25px;
  background: linear-gradient(145deg, #19252B, #111920);
  border: 1px solid #304940;
  border-radius: 20px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
}

.profile-top {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 12px rgba(41, 211, 145, 0.35);
}

.profile-photo {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 27px auto 18px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid #398F70;
  border-radius: 50%;
  background: linear-gradient(135deg, #263D36, #101B1A);
}

.profile-photo img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-initials {
  color: var(--accent-light);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -2px;
}

.profile-card > h3 {
  text-align: center;
  font-size: 21px;
  line-height: 1.4;
}

.profile-card > p {
  margin-top: 5px;
  color: var(--text-muted);
  text-align: center;
  font-size: 12px;
}

.profile-divider {
  height: 1px;
  margin: 22px 0 15px;
  background: var(--border);
}

.profile-detail {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(41, 211, 145, 0.08);
  font-size: 12px;
}

.profile-detail span {
  color: var(--text-muted);
}

.profile-detail strong {
  color: #dce8f8;
  text-align: right;
  font-weight: 600;
}

.profile-footer {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
  color: #b8c5d7;
  font-size: 10px;
}

.floating-card {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 15px;
  background: #17231F;
  border: 1px solid #304940;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.floating-card-top {
  top: 55px;
  right: -5px;
}

.floating-card-bottom {
  bottom: 45px;
  left: -5px;
}

.floating-icon {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 8px;
  background: rgba(41, 211, 145, 0.10);
  color: var(--accent-light);
  font-size: 12px;
  font-weight: 800;
}

.floating-card div {
  display: flex;
  flex-direction: column;
}

.floating-card strong {
  font-size: 12px;
}

.floating-card div span {
  color: var(--text-muted);
  font-size: 10px;
}

/* ========================================
   6. DATOS DESTACADOS
======================================== */

.highlights {
  background: #111A20;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.highlight-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 28px 20px;
  border-right: 1px solid var(--border);
}

.highlight-item:first-child {
  border-left: 1px solid var(--border);
}

.highlight-number {
  color: var(--text);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.highlight-label {
  color: var(--text-muted);
  font-size: 12px;
}

/* ========================================
   7. SOBRE MÍ
======================================== */

.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 20px;
}

.about-main {
  padding: 32px;
}

.about-main h3 {
  margin: 17px 0;
  font-size: 25px;
  line-height: 1.35;
  letter-spacing: -0.5px;
}

.about-main p {
  margin-top: 14px;
  color: var(--text-muted);
  line-height: 1.9;
}

.about-side {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 20px;
}

.about-small {
  padding: 24px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.about-small:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.about-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  background: rgba(41, 211, 145, 0.08);
  border: 1px solid rgba(41, 211, 145, 0.18);
  border-radius: 10px;
  color: var(--accent-light);
  font-size: 17px;
  font-weight: 800;
}

.about-small h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.about-small p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.8;
}

/* ========================================
   8. HABILIDADES
======================================== */


.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

.skill-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  padding: 27px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.skill-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

.skill-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  margin-bottom: 20px;
  background: rgba(41, 211, 145, 0.08);
  border: 1px solid rgba(41, 211, 145, 0.18);
  border-radius: 11px;
  color: var(--accent-light);
  font-size: 13px;
  font-weight: 800;
}

.skill-card h3 {
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 1.4;
}

.skill-card > p {
  margin-bottom: 18px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.8;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

.skill-tags span {
  overflow-wrap: anywhere;
}

/* Adaptación para tablets y móviles */
@media (max-width: 600px) {
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .skill-card {
    padding: 23px;
  }
}

/* Respeta la preferencia de movimiento del usuario */
@media (prefers-reduced-motion: reduce) {
  .skill-card {
    transition: none;
  }

  .skill-card:hover {
    transform: none;
  }
}


/* ========================================
   9. PROYECTOS ANTIGUOS
   Se conservan por compatibilidad.
======================================== */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.project-card {
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

.project-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  padding: 30px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.project-visual-api {
  background:
    radial-gradient(ellipse at 50% 100%, rgba(41, 211, 145, 0.13), transparent 65%),
    #111A20;
}

.project-visual-inventory {
  background:
    radial-gradient(ellipse at 50% 100%, rgba(41, 211, 145, 0.10), transparent 65%),
    #111A20;
}

.mock-window {
  width: 100%;
  max-width: 330px;
  overflow: hidden;
  background: #10181D;
  border: 1px solid #30443D;
  border-radius: 11px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.3);
  transform: rotate(-2deg);
}

.mock-window-header {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 12px;
  background: #19251F;
  border-bottom: 1px solid var(--border);
}

.mock-window-header > span {
  width: 7px;
  height: 7px;
  background: #4c5c73;
  border-radius: 50%;
}

.mock-window-header p {
  margin-left: 9px;
  color: #91a2b9;
  font-size: 10px;
}

.mock-code {
  padding: 22px;
  color: #b9c7d9;
  font-family: Consolas, monospace;
  font-size: 12px;
  line-height: 2;
}

.mock-code p {
  overflow-wrap: anywhere;
}

.code-purple {
  color: #c4b5fd;
}

.code-green {
  color: var(--accent-light);
}

.code-indent {
  padding-left: 15px;
  color: #A8C8E8;
}

.project-visual-label {
  position: absolute;
  right: 15px;
  bottom: 15px;
  color: #7f91aa;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.inventory-window {
  width: 100%;
  max-width: 340px;
  padding: 18px;
  background: #151F20;
  border: 1px solid #304940;
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
  transform: rotate(2deg);
}

.inventory-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.inventory-status {
  padding: 4px 7px;
  background: rgba(41, 211, 145, 0.10);
  border-radius: 5px;
  color: var(--accent-light);
  font-size: 8px;
}

.inventory-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 15px;
}

.inventory-stats > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  background: #1B2927;
  border: 1px solid #304940;
  border-radius: 7px;
}

.inventory-stats span {
  color: var(--text-muted);
  font-size: 9px;
}

.inventory-stats strong {
  color: var(--accent-light);
  font-size: 13px;
}

.inventory-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  color: #bdc9d9;
  font-size: 10px;
}

.inventory-square {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  background: #2C5143;
  border-radius: 5px;
}

.inventory-line {
  width: 32px;
  height: 5px;
  margin-left: auto;
  background: #365448;
  border-radius: 5px;
}

.project-content {
  padding: 27px;
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.3px;
}

.project-content h3 {
  margin-bottom: 12px;
  font-size: 21px;
  line-height: 1.4;
  letter-spacing: -0.4px;
}

.project-content > p {
  margin-bottom: 19px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.9;
}

.project-link {
  display: inline-block;
  margin-top: 23px;
  color: var(--accent-light);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}

.project-link:hover {
  color: white;
}

/* ========================================
   10. EXPERIENCIA
======================================== */

.timeline {
  position: relative;
  max-width: 850px;
  margin-left: 8px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 7px;
  width: 1px;
  background: #304940;
}

.timeline-item {
  position: relative;
  padding-left: 34px;
  padding-bottom: 24px;
}

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

.timeline-marker {
  position: absolute;
  top: 27px;
  left: 0;
  z-index: 2;
  width: 15px;
  height: 15px;
  background: var(--bg-alt);
  border: 3px solid var(--accent);
  border-radius: 50%;
}

.timeline-card {
  padding: 26px;
}

.timeline-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 15px;
}

.timeline-top h3 {
  font-size: 18px;
  line-height: 1.5;
}

.timeline-company {
  display: block;
  margin-top: 4px;
  color: var(--accent-light);
  font-size: 12px;
}

.timeline-date {
  flex-shrink: 0;
  padding: 6px 9px;
  background: #19251F;
  border: 1px solid #304940;
  border-radius: 7px;
  color: #C2D8D0;
  font-size: 10px;
}

.timeline-card > p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.9;
}

.timeline-card .skill-tags {
  margin-top: 17px;
}

/* ========================================
   11. FORMACIÓN
======================================== */

.education-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}

.education-card {
  padding: 24px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.education-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

.education-icon {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  margin-bottom: 17px;
  background: rgba(41, 211, 145, 0.08);
  border: 1px solid rgba(41, 211, 145, 0.18);
  border-radius: 10px;
  color: var(--accent-light);
  font-size: 11px;
  font-weight: 800;
}

.education-type {
  display: block;
  margin-bottom: 9px;
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.3px;
}

.education-card h3 {
  margin-bottom: 9px;
  font-size: 16px;
  line-height: 1.5;
}

.education-card p {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.8;
}

.education-date {
  display: inline-block;
  margin-top: 13px;
  color: var(--text-soft);
  font-size: 11px;
}

.language-panel {
  display: flex;
  align-items: center;
  gap: 45px;
  margin-top: 22px;
  padding: 25px;
}

.language-panel h3 {
  margin-top: 4px;
  font-size: 17px;
}

.language-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.language-item span {
  color: var(--text-muted);
  font-size: 12px;
}

.language-item strong {
  color: var(--text);
  font-size: 14px;
}

/* ========================================
   12. CONTACTO
======================================== */

.contact-panel {
  padding: 36px;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(41, 211, 145, 0.07), transparent 45%),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
}

.contact-heading {
  max-width: 700px;
  margin-bottom: 28px;
}

.contact-heading h2 {
  margin-top: 10px;
  margin-bottom: 12px;
  color: var(--text);
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.25;
  letter-spacing: -0.8px;
}

.contact-heading p {
  max-width: 600px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.8;
}

/* Tres tarjetas horizontales */

.contact-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.contact-item {
  min-width: 0;
  min-height: 155px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  padding: 22px;
  background: #111A20;
  border: 1px solid var(--border);
  border-radius: 13px;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease,
    background 0.2s ease, box-shadow 0.2s ease;
}

.contact-item:hover {
  background: #192722;
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.contact-label {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

.contact-value {
  color: var(--accent-light);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.7;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.contact-action {
  margin-top: auto;
  padding-top: 7px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.contact-item:hover .contact-action {
  color: var(--accent-light);
}

/* ========================================
   13. PIE DE PÁGINA
======================================== */

.footer {
  background: #0C1216;
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 95px;
}

.footer-content p {
  color: var(--text-soft);
  font-size: 11px;
  text-align: center;
}

.back-to-top {
  color: var(--text-muted);
  font-size: 12px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.back-to-top:hover {
  color: var(--accent-light);
}

/* ========================================
   14. TABLETAS
======================================== */

@media (max-width: 950px) {
  .nav-links {
    gap: 15px;
  }

  .nav-links a {
    font-size: 12px;
  }

  .hero-grid {
    gap: 35px;
  }

  .hero-visual {
    padding: 15px;
  }

  .floating-card-top {
    right: -12px;
  }

  .floating-card-bottom {
    left: -12px;
  }

  .contact-panel {
    padding: 28px;
  }

  .contact-item {
    padding: 18px;
  }
}

/* ========================================
   15. MÓVILES Y MENÚ RESPONSIVE
======================================== */

@media (max-width: 768px) {
  .container {
    width: min(100% - 32px, var(--container));
  }

  .section {
    padding: 72px 0;
  }

  .navbar {
    min-height: 68px;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 20px 20px;
    background: #111A20;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.active,
  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a,
  .nav-links .nav-contact {
    display: block;
    padding: 13px 10px;
    border: 0;
    border-radius: 7px;
    font-size: 14px;
  }

  .nav-links a:hover {
    background: var(--panel);
  }

  .hero {
    padding: 65px 0 55px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 45px;
  }

  .hero-content h1 {
    font-size: clamp(54px, 13vw, 75px);
    letter-spacing: -3px;
  }

  .hero-subtitle {
    font-size: 21px;
  }

  .hero-description {
    font-size: 14px;
  }

  .hero-visual {
    width: 100%;
    max-width: 430px;
    margin: auto;
    padding: 15px 20px;
  }

  .floating-card-top {
    right: 0;
  }

  .floating-card-bottom {
    left: 0;
  }

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

  .highlight-item {
    padding: 22px 15px;
    border-bottom: 1px solid var(--border);
  }

  .highlight-item:nth-child(odd) {
    border-left: 1px solid var(--border);
  }

  .highlight-number {
    font-size: 17px;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
  }

  .about-main {
    padding: 25px;
  }

  .about-main h3 {
    font-size: 22px;
  }

  .about-small {
    padding: 20px;
  }

  .skills-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

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

  .timeline-top {
    flex-direction: column;
    gap: 10px;
  }

  .timeline-date {
    align-self: flex-start;
  }

  .language-panel {
    flex-wrap: wrap;
    gap: 25px;
  }

  .contact-links {
    grid-template-columns: 1fr;
  }

  .contact-panel {
    padding: 24px;
  }

  .contact-item {
    min-height: 135px;
    padding: 20px;
  }

  .footer-content {
    flex-wrap: wrap;
    justify-content: center;
    padding: 22px 0;
  }

  .footer-content p {
    width: 100%;
    order: 3;
  }
}

/* ========================================
   16. MÓVILES PEQUEÑOS
======================================== */

@media (max-width: 480px) {
  .section {
    padding: 60px 0;
  }

  .section-heading {
    margin-bottom: 30px;
  }

  .section-heading h2 {
    font-size: 30px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-tags {
    gap: 7px;
  }

  .profile-card {
    padding: 21px;
  }

  .floating-card {
    padding: 9px 11px;
  }

  .floating-card-top {
    right: -4px;
  }

  .floating-card-bottom {
    left: -4px;
  }

  .about-side {
    grid-template-columns: 1fr;
  }

  .skill-card,
  .project-content {
    padding: 22px;
  }

  .project-visual {
    min-height: 225px;
    padding: 20px;
  }

  .project-content h3 {
    font-size: 19px;
  }

  .timeline {
    margin-left: 0;
  }

  .timeline-item {
    padding-left: 26px;
  }

  .timeline-card {
    padding: 20px;
  }

  .timeline-top h3 {
    font-size: 16px;
  }

  .education-grid {
    grid-template-columns: 1fr;
  }

  .language-panel {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .contact-panel {
    padding: 20px;
  }

  .contact-heading h2 {
    font-size: 27px;
  }

  .contact-item {
    padding: 18px;
  }

  .footer-content {
    gap: 12px;
  }
}

/* ========================================
   17. ACCESIBILIDAD
======================================== */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ========================================
   18. GALERÍA Y VISOR ANTIGUO
   Se conserva por compatibilidad.
======================================== */

.inventory-cover,
.project-gallery-item img {
  cursor: zoom-in;
}

.inventory-cover:focus-visible,
.project-gallery-item img:focus-visible {
  outline: 3px solid var(--accent-light);
  outline-offset: -3px;
}

.project-gallery-item img {
  height: auto;
  min-height: 150px;
  object-fit: contain;
  background: var(--bg);
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 18px;
  background: rgba(5, 11, 10, 0.97);
  backdrop-filter: blur(12px);
}

.image-lightbox[hidden] {
  display: none;
}

.image-lightbox__topbar,
.image-lightbox__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.image-lightbox__topbar {
  justify-content: space-between;
  min-height: 42px;
  color: var(--text-muted);
  font-size: 13px;
}

.image-lightbox__title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-lightbox__button {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid #304940;
  border-radius: 10px;
  background: #17231F;
  color: var(--text);
  font-size: 17px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.image-lightbox__button:hover:not(:disabled) {
  background: #20372D;
  border-color: var(--accent);
}

.image-lightbox__button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.image-lightbox__viewport {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(41, 211, 145, 0.16);
  border-radius: 12px;
  background: #0B1110;
  overscroll-behavior: contain;
}

.image-lightbox__image {
  display: block;
  flex: 0 0 auto;
  max-width: none;
  height: auto;
  object-fit: contain;
  transform: none;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
}

.image-lightbox__image.is-zoomed {
  cursor: zoom-out;
}

.image-lightbox__hint {
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
}

body.lightbox-open {
  overflow: hidden;
}

@media (max-width: 600px) {
  .image-lightbox {
    gap: 9px;
    padding: 10px;
  }

  .image-lightbox__topbar {
    gap: 8px;
  }

  .image-lightbox__button {
    min-width: 38px;
    min-height: 38px;
    padding: 7px 10px;
  }

  .image-lightbox__hint {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .image-lightbox__button {
    transition: none;
  }
}

/* ========================================
   19. HABILIDADES TÉCNICAS
======================================== */

.tech-section {
  --tech-bg: #10151B;
  --tech-green: #29D391;
  --tech-green-light: #6EE7B7;
  --tech-blue: #426BFF;
  --tech-surface: #151E26;
  --tech-surface-alt: #26332F;
  --tech-border: #283A3B;
  --tech-text: #F1F5F9;
  --tech-muted: #A8B6C0;
}

.tech-section .tech-heading h2 {
  color: var(--tech-text);
}

.tech-section .tech-heading > p {
  color: var(--tech-muted);
}

.tech-section .tech-heading .eyebrow {
  color: var(--tech-green);
}

.tech-section .tech-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 42px;
  align-items: stretch;
}

.tech-section .tech-card {
  position: relative;
  min-width: 0;
  padding: 28px;
  overflow: hidden;
  background: var(--tech-surface);
  border: 1px solid var(--tech-border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  transition: border-color 220ms ease, background-color 220ms ease,
    transform 220ms ease;
}

.tech-section .tech-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 28px;
  width: 44px;
  height: 3px;
  background: var(--tech-green);
  border-radius: 0 0 4px 4px;
  transition: width 220ms ease;
}

.tech-section .tech-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.tech-section .tech-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border: 1px solid rgba(41, 211, 145, 0.24);
  border-radius: 12px;
  background: var(--tech-surface-alt);
  color: var(--tech-green);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.tech-section .tech-index {
  color: var(--tech-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
}

.tech-section .tech-card h3 {
  margin: 0 0 10px;
  color: var(--tech-text);
  font-size: 19px;
  line-height: 1.4;
  font-weight: 650;
}

.tech-section .tech-description {
  margin: 0 0 22px;
  color: var(--tech-muted);
  font-size: 14px;
  line-height: 1.7;
}

.tech-section .tech-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: auto;
}

.tech-section .tech-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 11px;
  border: 1px solid var(--tech-border);
  border-radius: 7px;
  background: rgba(38, 51, 47, 0.48);
  color: var(--tech-text);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 500;
  overflow-wrap: anywhere;
  transition: color 180ms ease, background-color 180ms ease,
    border-color 180ms ease;
}

/* Interacción de las tarjetas de tecnologías */

@media (hover: hover) and (pointer: fine) {
  .tech-section .tech-card:hover {
    border-color: rgba(41, 211, 145, 0.65);
    background: #172129;
    transform: translateY(-3px);
  }

  .tech-section .tech-card:hover::before {
    width: 68px;
  }

  .tech-section .tech-card:hover .tech-icon {
    border-color: rgba(41, 211, 145, 0.48);
  }

  .tech-section .tech-tags span:hover {
    color: var(--tech-green-light);
    background: rgba(41, 211, 145, 0.09);
    border-color: rgba(41, 211, 145, 0.42);
  }
}

/* Azul secundario únicamente en el cuarto icono */

.tech-section .tech-card:nth-child(4) .tech-icon {
  color: var(--tech-blue);
  border-color: rgba(66, 107, 255, 0.30);
}

/* Tabletas: tecnologías */

@media (max-width: 900px) {
  .tech-section .tech-grid {
    gap: 16px;
    margin-top: 32px;
  }

  .tech-section .tech-card {
    padding: 23px;
  }

  .tech-section .tech-card::before {
    left: 23px;
  }
}

/* Móviles: tecnologías */

@media (max-width: 600px) {
  .tech-section .tech-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin-top: 26px;
  }

  .tech-section .tech-card {
    padding: 22px;
    border-radius: 13px;
  }

  .tech-section .tech-card::before {
    left: 22px;
  }

  .tech-section .tech-card-header {
    margin-bottom: 19px;
  }

  .tech-section .tech-card h3 {
    font-size: 18px;
  }

  .tech-section .tech-tags {
    gap: 8px;
  }

  .tech-section .tech-tags span {
    font-size: 12px;
    padding: 7px 9px;
  }
}

/* Movimiento reducido para tecnologías */

@media (prefers-reduced-motion: reduce) {
  .tech-section .tech-card,
  .tech-section .tech-card::before,
  .tech-section .tech-icon,
  .tech-section .tech-tags span {
    transition: none;
  }

  .tech-section .tech-card:hover {
    transform: none;
  }
}
