:root {
  --black: #050505;
  --surface: #101010;
  --surface-soft: #181818;
  --white: #f5f5f2;
  --muted: #a8a8a2;
  --line: #292929;
  --blue: #168cff;
  --green: #23f47b;
  --page-width: 1180px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--white);
  background: var(--black);
  font-family: Inter, "Arial Black", Arial, sans-serif;
  font-weight: 800;
}

body.modal-open {
  overflow: hidden;
}

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

button {
  color: inherit;
  font: inherit;
}

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

img,
video {
  max-width: 100%;
}

.eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 12px;
  line-height: 1;
  text-transform: uppercase;
}

/* Inicio */

.home-body {
  min-height: 100vh;
}

.home-screen {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  background: linear-gradient(180deg, #242424 0%, #080808 31%, #080808 69%, #242424 100%);
}

.home-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 180px rgba(0, 0, 0, 0.48);
}

.home-menu {
  position: relative;
  z-index: 1;
  width: min(100%, 650px);
  display: grid;
  justify-items: center;
  transform: translateY(-14px);
}

.avatar-frame {
  position: relative;
  width: clamp(116px, 11vw, 138px);
  aspect-ratio: 1;
  margin: 8px 0 20px;
  padding: 5px;
  background: var(--black);
  border: 4px solid var(--white);
  border-radius: 50%;
  box-shadow:
    0 0 0 3px var(--green),
    0 0 0 7px #151515,
    0 18px 42px rgba(0, 0, 0, 0.58);
}

.avatar-frame::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 8px;
  width: 15px;
  height: 15px;
  background: var(--blue);
  border: 3px solid var(--black);
  border-radius: 50%;
}

.avatar-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 52% 43%;
  border-radius: 50%;
}

.home-menu h1 {
  margin: 0 0 4px;
  font-size: clamp(34px, 3.3vw, 48px);
  line-height: 1;
  text-align: center;
}

.choice-button {
  width: min(100%, 535px);
  min-height: 66px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  padding: 9px 28px;
  color: #050505;
  background: #f0f0ef;
  border-radius: 999px;
  font-size: clamp(24px, 2.1vw, 30px);
  font-weight: 900;
  line-height: 0.83;
  text-align: center;
  transition: transform 180ms ease, background-color 180ms ease;
}

.choice-button:hover,
.choice-button:focus-visible {
  transform: translateY(-3px);
  background: #ffffff;
  outline: 3px solid rgba(255, 255, 255, 0.2);
  outline-offset: 4px;
}

.choice-button span {
  display: block;
}

.portfolio-choice {
  color: var(--blue);
}

/* Portafolio */

.gallery-body {
  min-height: 100vh;
  background: var(--black);
}

.portfolio-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  width: min(calc(100% - 40px), var(--page-width));
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
  background: rgba(5, 5, 5, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: #050505;
  background: var(--green);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 900;
}

.topbar-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 12px;
}

.topbar-links a {
  transition: color 160ms ease;
}

.topbar-links a:hover,
.topbar-links a:focus-visible {
  color: var(--green);
}

.topbar-links .contact-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 16px;
  color: #050505;
  background: var(--white);
  border-radius: 999px;
}

.portfolio-page {
  width: min(calc(100% - 40px), var(--page-width));
  margin: 0 auto;
}

.portfolio-intro {
  min-height: calc(100svh - 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.portfolio-kicker {
  margin: 0;
  color: var(--white);
  font-size: clamp(30px, 4.4vw, 62px);
  line-height: 0.95;
  font-weight: 900;
}

.portfolio-name {
  margin: 6px 0 0;
  color: var(--green);
  font-family: "Great Vibes", "Brush Script MT", "Segoe Script", cursive;
  font-size: clamp(58px, 8vw, 106px);
  font-weight: 400;
  line-height: 0.88;
}

.portfolio-metric {
  margin: 24px 0 0;
  color: var(--white);
  font-size: clamp(25px, 4.2vw, 56px);
  line-height: 1;
}

.portfolio-metric strong {
  color: var(--green);
}

.portfolio-format {
  margin: 12px 0 0;
  color: var(--white);
  font-size: clamp(24px, 3.7vw, 50px);
  line-height: 1;
}

.portfolio-format strong {
  color: var(--blue);
}

.intro-bottom {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(460px, 1.3fr);
  align-items: end;
  gap: 72px;
  margin-top: 58px;
  text-align: left;
}

.intro-copy {
  max-width: 510px;
  margin: 0;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
}

.portfolio-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0;
}

.portfolio-stats div {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.portfolio-stats dt {
  color: var(--blue);
  font-size: 30px;
  line-height: 1;
}

.portfolio-stats dd {
  margin: 8px 0 0;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 400;
}

.category-nav {
  position: sticky;
  top: 64px;
  z-index: 9;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0;
  background: rgba(5, 5, 5, 0.94);
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
  display: none;
}

.category-nav a {
  min-height: 34px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  padding: 0 14px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.category-nav a:hover,
.category-nav a:focus-visible {
  color: #050505;
  background: var(--green);
  border-color: var(--green);
}

.portfolio-section {
  padding: 94px 0 16px;
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 0.55fr);
  align-items: end;
  gap: 48px;
  margin-bottom: 34px;
}

.section-number {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 12px;
}

.section-heading h2,
.photography-heading h2,
.portfolio-contact h2 {
  margin: 0;
  font-size: clamp(34px, 5.2vw, 70px);
  line-height: 0.95;
}

.section-heading > p {
  max-width: 450px;
  margin: 0;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
}

.photography-heading {
  margin-top: 112px;
  padding: 70px 0 0;
  border-top: 1px solid var(--line);
}

.photography-heading h2 {
  max-width: 760px;
  margin-top: 16px;
}

.media-grid {
  display: grid;
  grid-auto-flow: dense;
  gap: 10px;
}

.video-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
}

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

.compact-photo-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.media-card {
  position: relative;
  width: 100%;
  display: block;
  overflow: hidden;
  padding: 0;
  background: var(--surface-soft);
  border: 0;
  border-radius: 4px;
  cursor: zoom-in;
  isolation: isolate;
}

.photo-card,
.video-card {
  aspect-ratio: 2 / 3;
}

.video-card.horizontal {
  grid-column: span 2;
  aspect-ratio: 16 / 9;
}

.media-card img,
.media-card video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 420ms ease, filter 260ms ease;
}

.media-card:hover img,
.media-card:hover video,
.media-card:focus-visible img,
.media-card:focus-visible video {
  transform: scale(1.025);
  filter: brightness(0.72);
}

.media-card:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.media-overlay {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  min-height: 45%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
  pointer-events: none;
}

.media-label {
  max-width: 80%;
  font-size: 12px;
  line-height: 1.15;
  text-align: left;
}

.media-type {
  width: 34px;
  height: 34px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: #050505;
  background: var(--green);
  border-radius: 50%;
  font-size: 8px;
  text-transform: uppercase;
}

.media-error::before {
  content: "Vista previa no disponible";
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 30px;
  color: var(--muted);
  background: var(--surface);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 400;
  text-align: center;
}

.portfolio-contact {
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  margin-top: 120px;
  padding: 80px 0;
  border-top: 1px solid var(--line);
}

.portfolio-contact h2 {
  max-width: 850px;
  margin: 18px 0 38px;
}

.portfolio-contact > a {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 0 22px;
  color: #050505;
  background: var(--green);
  border-radius: 999px;
  font-size: 13px;
}

.portfolio-contact > a span {
  font-size: 18px;
}

.portfolio-footer {
  width: min(calc(100% - 40px), var(--page-width));
  min-height: 84px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  margin: 0 auto;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 11px;
}

.portfolio-footer p {
  margin: 0;
  font-family: Arial, sans-serif;
  font-weight: 400;
}

.portfolio-footer a:first-child {
  color: var(--white);
}

.portfolio-footer a:last-child {
  justify-self: end;
}

/* Modal */

.media-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  grid-template-columns: 58px minmax(0, 1fr) 58px;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  gap: 14px;
  padding: 64px 24px 24px;
  background: rgba(0, 0, 0, 0.96);
}

.media-modal.is-open {
  display: grid;
}

.modal-close,
.modal-arrow {
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--white);
  background: #171717;
  border: 1px solid #303030;
  border-radius: 50%;
  cursor: pointer;
}

.modal-close:hover,
.modal-close:focus-visible,
.modal-arrow:hover,
.modal-arrow:focus-visible {
  color: #050505;
  background: var(--green);
  border-color: var(--green);
  outline: none;
}

.modal-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  font-size: 28px;
  line-height: 1;
}

.modal-arrow {
  width: 46px;
  height: 46px;
  font-size: 19px;
}

.modal-body {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.modal-body img,
.modal-body video {
  max-width: 100%;
  max-height: calc(100svh - 118px);
  display: block;
  background: #000000;
  border-radius: 4px;
}

.modal-caption {
  grid-column: 2;
  margin: 0;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 400;
  text-align: center;
}

/* Curso */

.course-page {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 32px;
  background: linear-gradient(180deg, #242424, #060606 34%, #060606 72%, #242424);
}

.course-page > div {
  max-width: 760px;
  text-align: center;
}

.course-page h1 {
  margin: 16px 0 20px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.9;
}

.course-page p:not(.eyebrow) {
  max-width: 560px;
  margin: 0 auto 28px;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

.course-cta {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  color: #050505;
  background: var(--green);
  border-radius: 999px;
  font-size: 12px;
}

.back-link {
  position: absolute;
  top: 22px;
  left: 22px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
}

@media (max-width: 900px) {
  .intro-bottom {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .video-grid,
  .photo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 640px) {
  .portfolio-topbar,
  .portfolio-page,
  .portfolio-footer {
    width: min(calc(100% - 28px), var(--page-width));
  }

  .portfolio-topbar {
    min-height: 58px;
  }

  .topbar-links {
    gap: 15px;
    font-size: 10px;
  }

  .topbar-links > a:not(.contact-link) {
    display: none;
  }

  .topbar-links .contact-link {
    min-height: 34px;
    padding-inline: 14px;
  }

  .portfolio-intro {
    min-height: calc(92svh - 58px);
    padding: 54px 0 36px;
  }

  .portfolio-kicker {
    font-size: clamp(27px, 8vw, 38px);
  }

  .portfolio-name {
    margin-top: 10px;
    font-size: clamp(54px, 16vw, 74px);
  }

  .portfolio-metric {
    max-width: 360px;
    margin-top: 26px;
    font-size: clamp(24px, 7.4vw, 34px);
    line-height: 1.08;
  }

  .portfolio-format {
    max-width: 360px;
    margin-top: 14px;
    font-size: clamp(23px, 6.8vw, 31px);
    line-height: 1.08;
  }

  .intro-bottom {
    margin-top: 42px;
  }

  .intro-copy {
    font-size: 16px;
  }

  .portfolio-stats {
    gap: 8px;
  }

  .portfolio-stats dt {
    font-size: 24px;
  }

  .category-nav {
    top: 58px;
    margin-inline: -14px;
    padding-inline: 14px;
  }

  .portfolio-section {
    padding-top: 72px;
  }

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

  .section-heading h2,
  .photography-heading h2,
  .portfolio-contact h2 {
    font-size: 38px;
  }

  .media-grid {
    gap: 7px;
  }

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

  .media-overlay {
    padding: 12px;
  }

  .media-label {
    font-size: 10px;
  }

  .media-type {
    width: 30px;
    height: 30px;
    font-size: 7px;
  }

  .photography-heading {
    margin-top: 82px;
    padding-top: 54px;
  }

  .portfolio-contact {
    min-height: 64vh;
    margin-top: 82px;
  }

  .portfolio-footer {
    grid-template-columns: 1fr auto;
    min-height: 72px;
  }

  .portfolio-footer p {
    display: none;
  }

  .media-modal {
    grid-template-columns: 46px minmax(0, 1fr) 46px;
    gap: 6px;
    padding: 58px 8px 18px;
  }

  .modal-arrow {
    width: 38px;
    height: 38px;
  }

  .home-screen {
    padding: 18px;
  }

  .choice-button {
    min-height: 60px;
    padding-inline: 16px;
    font-size: 23px;
  }

  .home-menu h1 {
    font-size: 35px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
