﻿:root {
  --bg: #07111f;
  --panel: #0f1b2d;
  --panel-soft: #14243a;
  --text: #edf5ff;
  --muted: #9fb0c6;
  --line: rgba(255, 255, 255, 0.1);
  --cyan: #39d5d5;
  --green: #7ddf9b;
  --amber: #f3c969;
  --blue: #6aa7ff;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(57, 213, 213, 0.13), transparent 32rem),
    linear-gradient(135deg, #07111f 0%, #0b1424 48%, #101923 100%);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

.site-header {
  position: fixed;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 17, 31, 0.82);
  backdrop-filter: blur(16px);
}

.nav {
  width: min(1120px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(57, 213, 213, 0.4);
  border-radius: 8px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(57, 213, 213, 0.18), rgba(125, 223, 155, 0.14));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 600;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 1.35rem;
  cursor: pointer;
}

section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 88px 0;
}

.hero {
  min-height: 100vh;
  padding-top: 132px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 48px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.78rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 20px;
  color: var(--text);
  font-size: clamp(2.5rem, 6vw, 5.4rem);
  line-height: 0.98;
}

h1 span {
  color: var(--cyan);
}

h2 {
  margin-bottom: 18px;
  color: var(--text);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.08;
}

h3 {
  color: var(--text);
  line-height: 1.2;
}

.hero-text,
.about p,
.data-item p,
.skill-card p,
.contenido p {
  color: var(--muted);
}

.hero-text {
  max-width: 680px;
  font-size: 1.16rem;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
  color: #041016;
  background: linear-gradient(135deg, var(--cyan), var(--green));
}

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

.profile-card,
.about,
.data-profile,
.projects,
.contact {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 27, 45, 0.72);
  box-shadow: var(--shadow);
}

.profile-card {
  padding: 18px;
}

.photo-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(57, 213, 213, 0.2), rgba(243, 201, 105, 0.16));
}

.photo-frame img,
.photo-placeholder {
  width: 100%;
  height: 100%;
}

.photo-frame img {
  object-fit: cover;
}

.photo-placeholder {
  display: none;
  place-items: center;
  color: var(--text);
  font-size: 5rem;
  font-weight: 800;
}

.profile-info {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  color: var(--muted);
}

.profile-info strong {
  color: var(--text);
  font-size: 1.1rem;
}

.about,
.data-profile,
.projects,
.contact {
  padding: 56px;
  margin-bottom: 40px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading.centered {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

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

.skill-card,
.data-item {
  min-height: 210px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.skill-card:hover,
.data-item:hover {
  transform: translateY(-5px);
  border-color: rgba(57, 213, 213, 0.45);
  background: rgba(255, 255, 255, 0.07);
}

.skill-card img,
.skill-card.text-icon span {
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
}

.skill-card.text-icon span {
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #041016;
  font-weight: 800;
  background: linear-gradient(135deg, var(--amber), var(--green));
}

.data-item span {
  color: var(--cyan);
  font-weight: 800;
}

.project-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

#project-counter {
  min-width: 80px;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}

.btn-carrusel {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(57, 213, 213, 0.34);
  border-radius: 8px;
  cursor: pointer;
  background: rgba(57, 213, 213, 0.12);
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn-carrusel:hover {
  transform: translateY(-2px);
  background: rgba(57, 213, 213, 0.22);
}

.carrusel-wrapper,
.carrusel-viewport {
  overflow: hidden;
}

.carrusel {
  display: flex;
  transition: transform 0.45s ease;
}

.tarjeta-proyecto {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.tarjeta-proyecto > img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.contenido {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px;
}

.contenido h3 {
  margin-bottom: 12px;
  font-size: 2rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 24px;
}

.tags span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.82rem;
  font-weight: 800;
}

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

.links a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 8px;
  color: #041016;
  background: var(--cyan);
  font-weight: 800;
  text-decoration: none;
}

.links a:nth-child(2) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
}

.contact {
  text-align: center;
}

.contact-actions {
  justify-content: center;
}

footer {
  padding: 30px 16px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--line);
  background: rgba(7, 17, 31, 0.72);
}

.section-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

@media (max-width: 900px) {
  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .nav-links {
    position: fixed;
    inset: 72px 0 auto 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    background: rgba(7, 17, 31, 0.96);
    border-bottom: 1px solid var(--line);
  }

  body.menu-open .nav-links {
    display: flex;
  }

  .nav-links a {
    justify-content: center;
  }

  .hero,
  .tarjeta-proyecto {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

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

  .tarjeta-proyecto > img {
    min-height: 260px;
    max-height: 320px;
  }
}

@media (max-width: 620px) {
  section {
    width: min(100% - 24px, 1120px);
    padding: 62px 0;
  }

  .hero {
    padding-top: 110px;
  }

  .about,
  .data-profile,
  .projects,
  .contact {
    padding: 28px 18px;
  }

  .skill-grid,
  .data-grid {
    grid-template-columns: 1fr;
  }

  .contenido {
    padding: 24px;
  }

  .contenido h3 {
    font-size: 1.55rem;
  }

  .hero-actions,
  .contact-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

.project-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 26px;
  padding: 6px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.project-tab {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.project-tab:hover,
.project-tab.active {
  color: #041016;
  background: linear-gradient(135deg, var(--cyan), var(--green));
}

.project-tab:hover {
  transform: translateY(-1px);
}

.project-panel {
  display: none;
}

.project-panel.active {
  display: block;
}

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

.data-project-card {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(57, 213, 213, 0.12), rgba(255, 255, 255, 0.04)),
    var(--panel-soft);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.data-project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(125, 223, 155, 0.45);
}

.project-badge {
  width: fit-content;
  margin-bottom: 18px;
  padding: 7px 10px;
  border-radius: 8px;
  color: #041016;
  background: var(--amber);
  font-size: 0.8rem;
  font-weight: 800;
}

.data-project-card p {
  color: var(--muted);
}

@media (max-width: 900px) {
  .data-project-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .project-tabs {
    width: 100%;
    flex-direction: column;
  }
}

.data-project-card {
  min-height: auto;
  overflow: hidden;
  padding: 0;
}

.data-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.data-image img,
.data-image-placeholder {
  width: 100%;
  height: 100%;
}

.data-image img {
  object-fit: cover;
}

.data-image-placeholder {
  display: none;
  place-items: center;
  padding: 22px;
  color: var(--text);
  font-weight: 800;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(57, 213, 213, 0.18), rgba(243, 201, 105, 0.18)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.08) 0 1px, transparent 1px 42px),
    var(--panel-soft);
}

.data-project-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px;
}

.analysis-list {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.94rem;
}

.analysis-list li::marker {
  color: var(--cyan);
}

.data-project-body .links {
  margin-top: auto;
}

.data-controls #data-project-counter {
  min-width: 80px;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}

.data-carrusel-wrapper,
.data-carrusel-viewport {
  overflow: hidden;
}

.data-project-grid {
  display: flex;
  grid-template-columns: none;
  gap: 0;
  transition: transform 0.45s ease;
}

.data-project-card {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  background:
    linear-gradient(145deg, rgba(57, 213, 213, 0.12), rgba(255, 255, 255, 0.04)),
    var(--panel-soft);
}

.data-project-card .data-image {
  height: 100%;
  min-height: 420px;
  border-right: 1px solid var(--line);
  border-bottom: 0;
}

@media (max-width: 900px) {
  .data-project-card {
    grid-template-columns: 1fr;
  }

  .data-project-card .data-image {
    min-height: 260px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

/* Ajuste de capturas en carruseles: muestra la imagen completa sin recortarla. */
.tarjeta-proyecto {
  min-height: auto;
  align-items: stretch;
}

.tarjeta-proyecto > img {
  width: 100%;
  height: 100%;
  max-height: 420px;

  object-fit: contain;
  object-position: center;

  padding: 24px;

  background:
    linear-gradient(
      135deg,
      rgba(57, 213, 213, 0.08),
      rgba(125, 223, 155, 0.06)
    ),
    #07111f;
}

.data-project-card .data-image {
  min-height: 360px;
  background:
    linear-gradient(135deg, rgba(57, 213, 213, 0.08), rgba(243, 201, 105, 0.08)),
    #07111f;
}

.data-image img {
  width: 100%;
  height: 100%;

  object-fit: contain;
  object-position: center;

  padding: 20px;
}

@media (max-width: 900px) {
  .tarjeta-proyecto > img,
  .data-project-card .data-image {
    height: auto;
    min-height: 260px;
  }

  .tarjeta-proyecto > img {
    height: clamp(240px, 58vw, 340px);
  }
}

@media (max-width: 620px) {
  .tarjeta-proyecto > img,
  .data-project-card .data-image {
    min-height: 220px;
  }

  .tarjeta-proyecto > img,
  .data-image img {
    padding: 10px;
  }
}

