/* Sobre mí page (/sobre-mi): about text + photo carousel */

/* arrows show on hover (or keyboard focus) where there is a mouse; touch screens never show them, they swipe */
@media (hover: hover) {
  .carousel__btn { opacity: 0; transition: opacity 0.2s ease, transform 0.15s ease; }
  .carousel:hover .carousel__btn,
  .carousel__btn:focus-visible { opacity: 1; }
}

.about__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 72px;
  align-items: start;
}
.about__photos {
  position: sticky;
  top: calc(var(--header-h, 80px) + 24px);
}

/* one photo per view; swipe (or the arrows / dots) moves to the next */
.carousel { position: relative; }
.carousel:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.carousel__track {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--stripe);
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__slide { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.carousel__slide img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.carousel__btn {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 3px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--accent);
}
.carousel__btn[hidden] { display: none; }
.carousel__btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.carousel__btn--prev { left: 12px; }
.carousel__btn--next { right: 12px; }
.carousel__dots { display: flex; justify-content: center; gap: 4px; margin-top: 10px; }
.carousel__dots[aria-hidden] { display: none; } /* until the script builds the dots */
.carousel__dot {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  position: relative;
}
.carousel__dot::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--line);
  transition: background 0.2s ease, transform 0.2s ease;
}
.carousel__dot.is-on::after { background: var(--ink); transform: scale(1.25); }
.about__copy { max-width: 62ch; }
.about__copy .section__title { margin-bottom: 28px; }
.about__title { font-size: clamp(32px, 3.6vw, 46px); }
.about__copy p:not(.eyebrow) {
  margin: 0 0 18px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
}
.about__copy .about__close {
  margin-top: 28px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.3;
  color: var(--ink);
}

@media (max-width: 999px) {
  .about__inner { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .about__photos { position: static; max-width: 560px; }
}
@media (max-width: 640px) {
  .about__photos { max-width: none; }
  .carousel__btn { display: none; } /* swipe and dots on phones */
  .about__copy p:not(.eyebrow) { font-size: 16px; }
}

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