/* ===================================== */
/* VARIABLES */
/* ===================================== */
:root {
  color-scheme: dark;
  --bg: #02060c;
  --bg-soft: #050910;
  --ink: #eef8ff;
  --muted: #9ab0bc;
  --line: rgba(125, 238, 255, 0.18);
  --cyan: #7deeff;
  --blue: #00b7ff;
  --electric: #3278ff;
  --panel: rgba(8, 15, 25, 0.72);
  --shadow: 0 34px 110px rgba(0, 0, 0, 0.42), 0 0 64px rgba(0, 183, 255, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100svh;
  overflow-x: clip;
  background:
    radial-gradient(circle at 18% 14%, rgba(0, 183, 255, 0.12), transparent 28rem),
    radial-gradient(circle at 84% 72%, rgba(50, 120, 255, 0.1), transparent 30rem),
    linear-gradient(135deg, #02060c, #050910 58%, #02040a);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

button {
  font: inherit;
}

/* ===================================== */
/* NAVEGACION */
/* ===================================== */
.nav {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 20;
  display: grid;
  width: min(1060px, calc(100% - 32px));
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 9, 16, 0.82);
  padding: 8px;
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.28), 0 0 36px rgba(0, 183, 255, 0.08);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding-right: 12px;
  font-size: 21px;
  font-weight: 900;
}

.brand-logo {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(40, 215, 255, 0.1);
  box-shadow: 0 0 26px rgba(40, 215, 255, 0.18);
}

.brand-logo img {
  width: 132%;
  height: 132%;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(40, 215, 255, 0.72));
}

.nav nav {
  display: flex;
  justify-content: center;
  gap: 4px;
}







.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(125, 238, 255, 0.22);
  border-radius: 10px;
  background: rgba(5, 9, 16, 0.82);
  cursor: pointer;
  place-items: center;
  gap: 5px;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
}








.nav nav a,
.nav-cta {
  border-radius: 6px;
  padding: 12px 13px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.nav nav a:hover,
.nav nav a[aria-current="page"] {
  background: rgba(125, 238, 255, 0.1);
}

.nav-cta {
  background: var(--blue);
  color: #fff;
}

.back-home {
  display: inline-flex;
  width: fit-content;
  min-height: 44px;
  align-items: center;
  border: 1px solid rgba(125, 238, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  padding: 0 18px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  margin-top: 28px;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.back-home:hover,
.back-home:focus-visible {
  border-color: rgba(125, 238, 255, 0.62);
  box-shadow: 0 0 28px rgba(0, 183, 255, 0.18);
  outline: 0;
  transform: translateY(-1px);
}

/* ===================================== */
/* LAYOUT */
/* ===================================== */
.team-page {
  min-height: 100svh;
}

.team-hero {
  display: grid;
  width: min(1220px, calc(100% - 44px));
  min-height: 100svh;
  grid-template-columns: minmax(0, 0.86fr) minmax(420px, 1.14fr);
  align-items: center;
  gap: clamp(34px, 5vw, 72px);
  margin: 0 auto;
  padding: 118px 0 58px;
}

.team-copy {
  position: relative;
  z-index: 2;
}

.kicker {
  margin: 0 0 18px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 720px;
  margin-bottom: 26px;
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.92;
}

.team-copy > p:last-child {
  max-width: 540px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 750;
  line-height: 1.5;
}

/* ===================================== */
/* CARDS EQUIPO */
/* ===================================== */
.team-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  perspective: 1200px;
}

.member-card {
  position: relative;
  display: grid;
  min-height: 250px;
  grid-template-columns: minmax(180px, 0.42fr) minmax(0, 0.58fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(125, 238, 255, 0.18);
  border-radius: 12px;
  background:
    radial-gradient(circle at 82% 14%, rgba(0, 183, 255, 0.16), transparent 16rem),
    linear-gradient(145deg, rgba(10, 20, 32, 0.78), rgba(4, 9, 16, 0.98));
  box-shadow: 0 28px 86px rgba(0, 0, 0, 0.32);
  transform: translateY(18px);
  opacity: 0;
  animation: cardIn 760ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  transition: border-color 240ms ease, box-shadow 240ms ease, transform 240ms ease;
}

.member-card:nth-child(2) {
  animation-delay: 90ms;
}

.member-card:nth-child(3) {
  animation-delay: 180ms;
}

.member-card:nth-child(4) {
  animation-delay: 270ms;
}

.member-card::before {
  position: absolute;
  inset: 10px;
  z-index: 3;
  pointer-events: none;
  border: 1px solid rgba(125, 238, 255, 0.16);
  border-radius: 7px;
  box-shadow: inset 0 0 34px rgba(0, 183, 255, 0.08);
  content: "";
}

.member-card::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 38%, rgba(5, 9, 16, 0.24)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 42%);
  content: "";
}

.member-card:hover {
  border-color: rgba(125, 238, 255, 0.62);
  box-shadow: var(--shadow);
  transform: translateY(-8px) rotateX(2deg) rotateY(-2deg);
}

.member-glow {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 2;
  width: 82px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(0, 183, 255, 0.16);
  box-shadow: inset 0 0 24px rgba(125, 238, 255, 0.16), 0 0 34px rgba(0, 183, 255, 0.14);
  backdrop-filter: blur(8px);
  transition: transform 260ms ease, opacity 260ms ease;
}

.member-card:hover .member-glow {
  transform: translate3d(-10px, 10px, 0) scale(1.08);
  opacity: 0.88;
}

.member-photo {
  position: relative;
  z-index: 2;
  overflow: hidden;
  min-height: 250px;
  margin: 10px;
  border: 1px solid rgba(125, 238, 255, 0.18);
  border-radius: 9px;
  background: #07101b;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

.member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(1.02) contrast(1.04);
  transform: scale(1.01);
  transition: transform 420ms ease, filter 320ms ease;
}

.member-card:nth-child(2) .member-photo img,
.member-card:nth-child(4) .member-photo img {
  object-position: center center;
}

.member-card:hover .member-photo img {
  filter: saturate(1.08) contrast(1.06);
  transform: scale(1.06);
}

.member-info {
  position: relative;
  z-index: 4;
  display: grid;
  align-content: center;
  min-height: 250px;
  padding: 30px 34px;
}

.member-info span {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 14px;
  border: 1px solid rgba(125, 238, 255, 0.34);
  border-radius: 999px;
  background: rgba(5, 9, 16, 0.52);
  padding: 8px 12px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
}

.member-info h2 {
  margin-bottom: 12px;
  color: #fff;
  font-size: clamp(30px, 3vw, 46px);
  line-height: 0.95;
}

.role {
  margin-bottom: 12px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.member-info p:last-child {
  max-width: 420px;
  margin-bottom: 0;
  color: rgba(238, 248, 255, 0.78);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.45;
}

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

/* ===================================== */
/* RESPONSIVE */
/* ===================================== */
@media (max-width: 980px) {
  .team-hero {
    grid-template-columns: 1fr;
    padding-top: 112px;
  }

  .team-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .nav {
    top: 12px;
    width: min(480px, calc(100% - 24px));
    grid-template-columns: 1fr auto;
  }

 



  .menu-toggle {
  display: grid;
}

.nav nav.mobile-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(125, 238, 255, 0.18);
  border-radius: 14px;
  background: rgba(5, 9, 16, 0.96);
  box-shadow: var(--shadow);
}

.nav nav.mobile-menu.is-open {
  display: flex;
}

.nav nav.mobile-menu a {
  padding: 14px;
  border-radius: 10px;
  background: rgba(125, 238, 255, 0.08);
}







  .brand {
    font-size: 17px;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
  }

  .nav-cta {
    padding: 10px 11px;
    font-size: 12px;
  }

  .team-hero {
    width: min(100% - 32px, 540px);
    gap: 34px;
    padding-top: 104px;
  }

  h1 {
    font-size: clamp(48px, 15vw, 68px);
  }

  .team-cards {
    grid-template-columns: 1fr;
  }

  .member-card {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .member-photo {
    min-height: 290px;
  }

  .member-info {
    min-height: auto;
  }

  .member-info {
    padding: 22px;
  }

  .member-info p:last-child {
    font-size: 14px;
  }
}



/* ===================================== */
/* TRABAJOS REALIZADOS */
/* ===================================== */

.works-section {
  width: min(1180px, calc(100% - 32px));
  margin: 80px auto 0;
  padding: 70px 0 20px;
}

.works-header {
  max-width: 720px;
  margin: 0 auto 34px;
  text-align: center;
}

.works-header h2 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: -0.04em;
  color: var(--ink);
}

.works-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.work-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  overflow: hidden;
  border: 1px solid rgba(125, 238, 255, 0.16);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(125, 238, 255, 0.12), rgba(31, 111, 235, 0.06)),
    rgba(8, 13, 24, 0.76);
  box-shadow: var(--shadow);
}





.work-image-flip {
  min-height: 320px;
  perspective: 1200px;
  background: rgba(125, 238, 255, 0.08);
}

.work-image-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 320px;
  transition: transform 0.75s ease;
  transform-style: preserve-3d;
}

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



.work-image-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  backface-visibility: hidden;
}

.work-image-face img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.work-image-back {
  transform: rotateY(180deg);
}





.work-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(26px, 5vw, 54px);
}

.work-content h3 {
  margin: 0 0 14px;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  color: var(--ink);
}

.work-content p {
  margin: 0 0 26px;
  color: var(--muted);
  line-height: 1.7;
}

.work-content a {
  width: fit-content;
  padding: 13px 18px;
  border: 1px solid rgba(125, 238, 255, 0.35);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  background: rgba(125, 238, 255, 0.12);
  box-shadow: 0 0 28px rgba(125, 238, 255, 0.14);
  transition: 0.25s ease;
}

.work-content a:hover {
  transform: translateY(-2px);
  background: rgba(125, 238, 255, 0.2);
}

/* Responsive trabajos */
@media (max-width: 760px) {
  .works-section {
    margin-top: 50px;
    padding-top: 40px;
  }

  .work-card {
    grid-template-columns: 1fr;
    border-radius: 22px;
  }

 .work-image-flip,
.work-image-inner {
  min-height: 220px;
}

  .work-content {
    padding: 24px;
  }

  .work-content a {
    width: 100%;
    text-align: center;
  }
}



/* ===================================== */
/* CONTROLES HEADER */
/* ===================================== */

.nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle,
.language-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(125, 238, 255, 0.2);
  background: rgba(255,255,255,0.05);
  color: inherit;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
}

.language-active-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00d4ff;
  box-shadow: 0 0 10px rgba(0,212,255,.8);
}

.theme-toggle-track {
  width: 32px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255,255,255,.15);
  position: relative;
}

.theme-toggle-thumb {
  position: absolute;
  width: 14px;
  height: 14px;
  top: 2px;
  left: 2px;
  border-radius: 50%;
  background: #7deeff;
}






/* ===================================== */
/* HEADER MOBILE MAS LIMPIO */
/* ===================================== */

@media (max-width: 620px) {
  .nav {
    grid-template-columns: auto 1fr auto;
  }

  .nav-actions {
    justify-self: end;
    gap: 6px;
  }

  .theme-toggle-text {
    display: none;
  }

  .theme-toggle,
  .language-toggle {
    min-height: 34px;
    padding: 6px 9px;
  }

  .theme-toggle-track {
    width: 30px;
    height: 18px;
  }

  .menu-toggle {
    width: 40px;
    height: 40px;
  }
}



/* ===================================== */
/* FIX BOTON TEMA SIN SALTO */
/* ===================================== */

.theme-toggle {
  min-width: 92px;
  justify-content: center;
}

@media (max-width: 620px) {
  .theme-toggle {
    min-width: 44px;
  }
}




/* ===================================== */
/* MODO CLARO EQUIPO */
/* ===================================== */

html[data-theme="light"] {
  --bg: #f6f7f4;
  --bg-soft: #eef1ec;
  --ink: #101217;
  --muted: #68706e;
  --line: rgba(16, 18, 23, 0.12);
  --panel: rgba(255, 255, 255, 0.72);
  --shadow: 0 28px 80px rgba(16, 18, 23, 0.14);
}

html[data-theme="light"] body {
  background:
    radial-gradient(circle at 18% 14%, rgba(0, 183, 255, 0.12), transparent 28rem),
    radial-gradient(circle at 84% 72%, rgba(50, 120, 255, 0.10), transparent 30rem),
    linear-gradient(135deg, #d4e1ea, #c7d6e2 58%, #bccfdd);
  color: var(--ink);
}
html[data-theme="light"] .nav {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(16, 18, 23, 0.12);
  box-shadow: 0 18px 60px rgba(16, 18, 23, 0.12);
}

html[data-theme="light"] .brand,
html[data-theme="light"] .brand strong,
html[data-theme="light"] .nav nav a {
  color: #101217;
}

html[data-theme="light"] .theme-toggle,
html[data-theme="light"] .language-toggle,
html[data-theme="light"] .menu-toggle {
  background: rgba(255, 255, 255, 0.82);
  color: #101217;
  border-color: rgba(16, 18, 23, 0.14);
}

html[data-theme="light"] .menu-toggle span {
  background: #101217;
}

html[data-theme="light"] .team-copy p,
html[data-theme="light"] .works-header p,
html[data-theme="light"] .work-content p {
  color: #68706e;
}

html[data-theme="light"] .team-copy h1,
html[data-theme="light"] .works-header h2,
html[data-theme="light"] .work-content h3 {
  color: #101217;
}

html[data-theme="light"] .member-card,
html[data-theme="light"] .work-card {
  background:
    radial-gradient(circle at 82% 14%, rgba(0, 183, 255, 0.12), transparent 16rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(238, 241, 236, 0.82));
  border-color: rgba(16, 18, 23, 0.12);
  box-shadow: 0 22px 60px rgba(16, 18, 23, 0.12);
}

html[data-theme="light"] .member-info h2 {
  color: #101217;
}

html[data-theme="light"] .member-info p:last-child {
  color: #68706e;
}

html[data-theme="light"] .member-info span,
html[data-theme="light"] .role,
html[data-theme="light"] .kicker {
  color: #008fbd;
}

html[data-theme="light"] .back-home,
html[data-theme="light"] .work-content a {
  color: #101217;
  background: rgba(0, 183, 255, 0.08);
  border-color: rgba(0, 183, 255, 0.22);
}


/* ===================================== */
/* FIX HEADER SIN REACOMODOS */
 /* ===================================== */

.nav-actions {
  width: 170px;
  justify-content: flex-end;
}

@media (max-width: 620px) {
  .nav-actions {
    width: 96px;
  }
}







/* ===================================== */
/* FIX DEFINITIVO BOTONES HEADER */
 /* ===================================== */

.theme-toggle {
  width: 122px;
  justify-content: center;
}

.language-toggle {
  width: 58px;
  justify-content: center;
}

@media (max-width: 620px) {
  .theme-toggle {
    width: 44px;
  }

  .language-toggle {
    width: 50px;
  }
}


/* MENU MOBILE - MODO CLARO */

html[data-theme="light"] .nav nav.mobile-menu {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .nav nav.mobile-menu a {
  color: #0f172a;
}

html[data-theme="light"] .nav nav.mobile-menu a:hover {
  background: rgba(15, 23, 42, 0.06);
}




@media (hover: none) {
  .work-image-flip:hover .work-image-inner {
    transform: none;
  }

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


