/* Variables globales */
:root {
  --black: #1a1a1a;
  --white: #FFFEFB;
  --gray: #888;
  --light-gray: #f5f5f5;
  --dark-bg: #1a1a1a;
  --medium-gray: #aaa;
  --accent-green: #76F84E;
  --accent-magenta: #FF00FF;
  --player-gray: #fdfcfa;
  --player-button: #f7f5f3;
  --player-button-hover: #f2f0ee;
  --player-channel: #f5f3f1;
}

/* Ocultar micrográficos móviles en desktop */
.mobile-micros {
  display: none;
}

/* Reset y base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  line-height: 1.15;
  color: var(--black);
  background: var(--white);
  overflow-x: hidden;
  font-weight: 400;
}

/* Barra de reflexiones inferior */
.reflection-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 40px;
  background: var(--dark-bg);
  z-index: 100;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.reflection-content {
  white-space: nowrap;
  color: var(--medium-gray);
  background: var(--dark-bg);
  font-size: 14px;
  line-height: 1.15;
  animation: scroll-left 60s linear infinite;
  padding-left: 100%;
  padding-top: 14px;
  padding-bottom: 14px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.reflection-close {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--medium-gray);
  font-size: 16px;
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  font-weight: bold;
}

.reflection-close:hover {
  color: var(--white);
}

.reflection-bar.hidden {
  display: none;
}

@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ===== Layout Principal ===== */
.main-container {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* Panel izquierdo - Proyectos - 40.74% pantalla */
.left-projects-panel {
  flex: 0 0 40.74%;
  width: 40.74vw;
  height: calc(100vh - 40px);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 40px 40px 40px 40px;
}

.left-projects-panel::-webkit-scrollbar {
  display: none;
}

/* Panel central - Información complementaria - 29.63% pantalla */
.center-info-panel {
  flex: 0 0 29.63%;
  width: 29.63vw;
  height: calc(100vh - 40px);
  background: var(--white);
  position: relative;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 40px 24px 40px 24px;
}

.center-info-panel::-webkit-scrollbar {
  display: none;
}

/* Panel derecho - Bio y contacto - 29.63% pantalla */
.right-bio-panel {
  flex: 0 0 29.63%;
  width: 29.63vw;
  height: calc(100vh - 40px);
  background: var(--white);
  position: relative;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 40px 24px 40px 24px;
  display: flex;
  flex-direction: column;
}

.right-bio-panel::-webkit-scrollbar {
  display: none;
}

.studio-name {
  font-size: 14px;
  line-height: 1.15;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
  color: var(--black);
}

.bio-section {
  margin-bottom: 12px;
}

.bio-text {
  font-size: 14px;
  line-height: 1.15;
  margin-bottom: 16px;
  color: var(--black);
  font-weight: 400;
}

.bio-text:last-child {
  margin-bottom: 0;
}

.contact-collab {
  font-size: 14px;
  line-height: 1.1;
  margin-bottom: 8px;
  margin-top: 16px;
  color: var(--black);
  font-weight: 400;
}

.contact-section {
  margin-bottom: 16px;
  margin-top: 0;
}

/* CONTACTOS EN DESKTOP - mantener original */
.contact-link {
  display: block;
  font-size: 14px;
  line-height: 1.15;
  color: var(--black);
  text-decoration: none;
  margin-bottom: 4px;
  transition: color 0.3s ease;
  font-weight: 400;
}

.contact-link:hover {
  color: var(--accent-magenta);
}

/* Sección de tiempo - Composición centrada con reloj en el medio */
.time-section {
  margin-top: auto;
  padding-top: 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "date clock weather";
  align-items: end;
  gap: 8px;
}

.time-left {
  grid-area: date;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-self: start;
}

.time-center {
  grid-area: clock;
  display: flex;
  justify-content: center;
  align-items: end;
}

.time-right {
  grid-area: weather;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  justify-self: end;
}

/* MICROGRÁFICOS - Consistencia en 11px */
.update-date {
  font-size: 11px;
  line-height: 1.45;
  color: var(--gray);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0px;
}

.live-clock {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  line-height: 1.15;
  color: var(--gray);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0px;
}

.weather-info {
  font-size: 11px;
  line-height: 1.15;
  color: var(--gray);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.location {
  font-size: 11px;
  line-height: 1.15;
}

.weather-temp {
  font-size: 11px;
  line-height: 1.15;
}

/* Estilos de proyectos */
.project {
  margin-bottom: 80px;
}

.project:first-child {
  margin-top: 0;
}

/* Carrusel de imágenes - ancho ajustado a descripción */
.project-media {
  width: 83.33%;
  margin-bottom: 24px;
  position: relative;
}

.project-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  touch-action: pan-y pinch-zoom;
}

.carousel-track {
  display: flex;
  transition: transform 0.4s ease;
  will-change: transform;
}

.carousel-slide {
  min-width: 100%;
  cursor: pointer;
}

.carousel-slide img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

/* Controles del carrusel */
.carousel-controls {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 16px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-carousel:hover .carousel-controls {
  opacity: 1;
}

.carousel-btn {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  pointer-events: auto;
  border-radius: 50%;
  font-size: 16px;
  color: var(--black);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  position: relative;
}

.carousel-btn:hover {
  background: rgba(26, 26, 26, 0.9);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.carousel-btn:active {
  transform: scale(0.95);
}

.carousel-btn::before {
  content: '';
  width: 10px;
  height: 10px;
  border-left: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transition: all 0.2s ease;
}

.carousel-btn.prev::before {
  transform: rotate(45deg) translateX(1.5px);
}

.carousel-btn.next::before {
  transform: rotate(-135deg) translateX(-1.5px);
}

/* Indicadores de carrusel sutiles */
.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 16px;
  padding: 0;
}

.carousel-dot {
  width: 4.5px;
  height: 4.5px;
  border-radius: 50%;
  background: #d0d0d0;
  cursor: pointer;
  transition: background 0.3s ease;
}

.carousel-dot.active {
  background: var(--black);
}

.carousel-dot:hover:not(.active) {
  background: #a0a0a0;
}

.single-image {
  width: 100%;
  cursor: pointer;
  border-radius: 0;
}

/* Grilla de proyecto - nueva proporción */
.project-info-grid {
  display: grid;
  grid-template-columns: 1fr 5fr;
  gap: 20px;
  align-items: start;
  width: 83.33%;
}

.project-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-number {
  font-size: 14px;
  line-height: 1.15;
  color: var(--black);
  font-weight: 400;
}

.project-category {
  font-size: 14px;
  line-height: 1.15;
  color: var(--gray);
  font-weight: 400;
  font-style: italic;
  margin-top: 4px;
  font-weight: 400;
}

.project-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-title {
  font-size: 14px;
  line-height: 1.15;
  color: var(--black);
  font-weight: 400;
}

.project-description {
  font-size: 13px;
  line-height: 1.15;
  color: var(--black);
  font-weight: 400;
  margin-top: 8px;
}

.project-credits {
  font-size: 14px;
  line-height: 1.15;
  color: var(--gray);
  font-style: italic;
}

/* Estilos del panel de información */
.info-section {
  margin-bottom: 40px;
}

.info-title {
  font-size: 14px;
  line-height: 1.1;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0px;
  margin-bottom: 16px;
  color: var(--black);
}

.info-item {
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.1;
  font-weight: 400;
}

.info-item a {
  color: var(--black);
  text-decoration: none;
  border-bottom: 1.1px solid transparent;
  transition: color 0.3s ease;
  font-weight: 400;
  line-height: 1.1;
}

.info-item a:hover {
  color: var(--accent-magenta);
}

/* En móvil: forzar coherencia con bio */
@media (max-width: 768px) {
  .info-item a {
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1.15 !important;
  }
}

.info-description {
  color: var(--gray);
  font-size: 14px;
  line-height: 1.1;
  margin-top: 2px;
  font-weight: 400;
}

.info-item.compact {
  margin-bottom: 2px !important;
  font-size: 14px;
  line-height: 1.0 !important;
  font-weight: 400;
}

/* Sección de sonido con reproductor integrado */
.sound-section {
  margin-top: 40px;
  margin-bottom: 40px;
}

.sound-label {
  font-size: 14px;
  line-height: 1.15;
  text-transform: none;
  letter-spacing: 0px;
  margin-bottom: 12px;
  color: var(--black);
  font-weight: 400;
}

/* Reproductor Radio del Río */
.sound-player-full {
  width: 100%;
  background: var(--player-gray);
  border-radius: 18px;
  padding: 14px;
  margin-top: 18px;
}

.sound-player-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 32px;
  padding: 0 2px;
}

.sound-controls-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* CORRECCIÓN: Radio Imaginaria con color de la bio */
.sound-brand {
  font-size: 14px;
  line-height: 1.15;
  color: var(--black); /* Mismo color que la bio */
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-right: 6px;
}

.sound-control-btn {
  width: 24px;
  height: 24px;
  background: var(--player-button);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: #a8a29e;
  padding: 0;
  position: relative;
}

.sound-control-btn:hover {
  background: var(--player-button-hover);
}

.sound-control-btn:active {
  transform: scale(0.95);
}

.sound-control-btn svg {
  width: 10px;
  height: 10px;
}

.sound-control-btn.play-btn svg {
  margin-left: 1px;
}

.sound-control-btn.playing {
  background: var(--accent-green) !important;
  color: #000 !important;
}

/* CORRECCIÓN: Remover pseudo-elementos que conflictúan con SVG */
.sound-control-btn.playing::before,
.sound-control-btn.playing::after {
  display: none;
}

.sound-channel-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sound-channel-item {
  background: var(--player-channel);
  border-radius: 12px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  color: #999;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sound-channel-item:hover {
  background: #ececec;
}

.sound-channel-item.selected {
  background: var(--accent-green);
  color: #000;
}

/* CTA final */
.cta-final {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #eee;
  font-size: 14px;
  line-height: 1.15;
  color: var(--black);
  font-weight: 400;
}

/* Lightbox premium con navegación */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 60px;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  backdrop-filter: blur(0px);
}

.lightbox.active {
  display: flex;
  background: rgba(0, 0, 0, 0.92);
  opacity: 1;
  backdrop-filter: blur(8px);
}

.lightbox-content {
  position: relative;
  max-width: 30vw;
  max-height: 30vh;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.7) translateY(40px);
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  opacity: 0;
}

.lightbox.active .lightbox-content {
  transform: scale(1) translateY(0);
  opacity: 1;
  transition-delay: 0.1s;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
  background: #fff;
  display: block;
}

/* Controles de navegación en lightbox */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border-radius: 50%;
  color: #333;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(-50%) scale(0.8);
}

.lightbox.active .lightbox-nav {
  opacity: 1;
  transform: translateY(-50%) scale(1);
  transition-delay: 0.3s;
}

.lightbox-nav:hover:not(:disabled) {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.lightbox-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: translateY(-50%) scale(0.8);
}

.lightbox-nav-prev {
  left: -60px;
}

.lightbox-nav-next {
  right: -60px;
}

.lightbox-nav::before {
  content: '';
  width: 8px;
  height: 8px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transition: all 0.2s ease;
}

.lightbox-nav-prev::before {
  transform: rotate(45deg);
}

.lightbox-nav-next::before {
  transform: rotate(-135deg);
}

.lightbox-close {
  position: absolute;
  top: -80px;
  right: -60px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  color: #333;
  font-size: 18px;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  font-weight: 300;
}

.lightbox.active .lightbox-close {
  opacity: 1;
  transition-delay: 0.3s;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.lightbox-close:active {
  transform: scale(0.95);
}

/* Micrográficos móviles en panel central */
.mobile-micros-center {
  display: none;
}

/* Responsive móvil */
@media (max-width: 768px) {
  body {
    font-size: 12px;
    line-height: 1.15;
  }

  /* Ocultar controles de carrusel en móvil */
  .carousel-controls {
    display: none;
  }

  /* Ocultar lightbox en móvil */
  .lightbox {
    display: none !important;
  }

  /* Deshabilitar click en imágenes en móvil */
  .carousel-slide {
    cursor: default;
  }

  .single-image {
    cursor: default;
  }

  .reflection-bar {
    height: 36px;
  }

  .reflection-content {
    font-size: 10px;
    line-height: 1.15;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .main-container {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }

  .left-projects-panel,
  .center-info-panel,
  .right-bio-panel {
    width: 100%;
    height: auto;
    border: none;
    padding: 24px 16px 30px 16px;
    flex: none;
  }

  .left-projects-panel {
    border-bottom: 1px solid #eee;
    order: 2;
    padding-top: 8px;
  }

  .center-info-panel {
    border-bottom: 1px solid #eee;
    order: 3;
  }

  .right-bio-panel {
    order: 1;
    padding-bottom: 8px;
  }

  /* AJUSTES ESPECÍFICOS PARA CONTACTOS EN MÓVIL */
  .contact-collab {
    margin-bottom: 4px;
    margin-top: 14px;
  }

  .contact-section {
    margin-bottom: 12px;
    margin-top: -2px;
  }

  /* Ocultar micrográficos originales en móvil del panel derecho */
  .right-bio-panel .time-section {
    display: none;
  }

  /* AJUSTE ESPECÍFICO: Subir imagen del primer proyecto */
  .project:first-child {
    margin-top: -20px;
  }

  /* Mostrar micrográficos en panel central - AL FINAL */
  .mobile-micros-center {
    display: block;
    margin-top: 40px;
    margin-bottom: 30px;
    padding-top: 20px;
    padding-bottom: 20px;
    border-top: 1px solid #eee;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas: "date clock weather";
    align-items: end;
    gap: 8px;
  }

  .mobile-micros-center-left {
    grid-area: date;
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-self: start;
    align-items: flex-start;
  }

  .mobile-micros-center-right {
    grid-area: weather;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    justify-self: end;
  }

  .mobile-micros-center-line {
    font-size: 10px;
    line-height: 1.45;
    color: var(--gray);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0px;
  }

  .project-info-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
  }

  .project-media {
    width: 100%;
  }

  .project {
    margin-bottom: 60px;
  }

  .project-left {
    flex-direction: row;
    gap: 16px;
    align-items: baseline;
  }

  .bio-text {
    font-size: 12px;
    line-height: 1.15;
    margin-bottom: 8px;
  }

  .bio-section {
    margin-bottom: 6px;
  }

  .studio-name {
    font-size: 12px;
    line-height: 1.15;
    margin-bottom: 8px;
  }

  .info-section {
    margin-bottom: 16px;
  }

  .info-title {
    font-size: 12px;
    line-height: 1.15;
    margin-bottom: 4px;
  }

  /* TEXTOS DE ENLACES - Igualados exactamente a bio */
  .info-item.compact a {
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1.15 !important;
    color: var(--black);
    text-decoration: none;
    transition: color 0.3s ease;
  }

  .info-item.compact a:hover {
    color: var(--accent-magenta);
  }

  /* Asegurar que todos los textos de info-item sean iguales a bio */
  .info-item {
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1.15 !important;
    margin-bottom: 4px;
  }

  .info-description {
    font-size: 12px;
    line-height: 1.15;
  }

  .project-title {
    font-size: 12px;
    line-height: 1.15;
    font-weight: 400;
  }

  .project-description {
    font-size: 12px;
    line-height: 1.15;
    font-weight: 400;
  }

  .project-number {
    font-size: 12px;
    line-height: 1.15;
    font-weight: 400;
  }

  .project-category {
    font-size: 12px;
    line-height: 1.15;
    font-weight: 400;
  }

  .contact-link {
    font-size: 12px;
    margin-bottom: 0;
    display: inline;
    white-space: nowrap;
    line-height: 1.15;
  }

  .contact-collab {
    font-size: 12px;
  }

  .sound-player-full {
    padding: 6px;
  }

  .sound-channel-item {
    font-size: 12px;
    line-height: 1.15;
    padding: 5px 6px;
  }

  /* CORRECCIÓN MÓVIL: Radio Imaginaria mismo tamaño que bio */
  .sound-brand {
    font-size: 12px;
    color: var(--black);
  }

  .carousel-btn {
    width: 36px;
    height: 36px;
  }

  .time-section {
    padding-top: 16px;
    gap: 8px;
  }

  /* MICROGRÁFICOS EN MÓVIL - 10px */
  .update-date,
  .live-clock,
  .weather-info,
  .location,
  .weather-temp,
  .mobile-micros-center-line {
    font-size: 10px;
    line-height: 1.15;
  }
}