:root {
  --mm-ae-content-width: 76rem;
}

body {
  margin: 0;
}

.mm-ae-site {
  min-height: 100vh;
}


/* Estrutura global — Etapa 6 */
:root {
  --mm-ae-sidebar-width: 15.5rem;
  --mm-ae-shell-gap: clamp(2rem, 5vw, 6rem);
}

.mm-ae-site {
  color: #111;
  background: #fff;
}

.mm-ae-shell {
  min-height: 100vh;
}

.mm-ae-sidebar {
  box-sizing: border-box;
}

.mm-ae-sidebar__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.mm-ae-brand {
  display: inline-flex;
  flex-direction: column;
  gap: 0.12rem;
  color: inherit;
  text-decoration: none;
  line-height: 1.15;
}

.mm-ae-brand__name {
  font-weight: 600;
}

.mm-ae-brand__role {
  font-size: 0.82rem;
  font-weight: 400;
}

.mm-ae-navigation ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mm-ae-navigation__link,
.mm-ae-navigation__sublink {
  color: inherit;
  text-decoration: none;
}

.mm-ae-navigation__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.28rem;
  font-size: 0.94rem;
  font-weight: 400;
  line-height: 1.35;
}

.mm-ae-navigation__item.is-active > .mm-ae-navigation__link {
  font-weight: 700;
}

.mm-ae-navigation__arrow {
  display: inline-block;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1;
  transform-origin: center;
  transition: transform 140ms ease;
}

.mm-ae-navigation__arrow.is-open {
  transform: rotate(90deg);
}

.mm-ae-navigation__sublist {
  margin: 0.3rem 0 0.55rem !important;
  padding-left: 0.85rem !important;
}

.mm-ae-navigation__sublink {
  display: block;
  padding-block: 0.18rem;
  font-size: 0.79rem;
  line-height: 1.3;
}

.mm-ae-nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.65rem 0.4rem;
  border: 0;
  background: transparent;
  color: inherit;
}

.mm-ae-nav-toggle__line {
  display: block;
  width: 100%;
  height: 1px;
  background: currentColor;
}

.mm-ae-nav-toggle__line + .mm-ae-nav-toggle__line {
  margin-top: 0.48rem;
}

.mm-ae-main {
  width: min(100%, var(--mm-ae-content-width));
  margin-inline: auto;
}

.mm-ae-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 2rem;
  width: min(100%, var(--mm-ae-content-width));
  margin-inline: auto;
  padding-block: 2rem;
  font-size: 0.76rem;
  line-height: 1.4;
}

.mm-ae-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
}

.mm-ae-footer a {
  color: inherit;
  text-decoration: none;
}

.mm-ae-footer a:hover,
.mm-ae-footer a:focus-visible,
.mm-ae-navigation a:hover,
.mm-ae-navigation a:focus-visible,
.mm-ae-brand:hover,
.mm-ae-brand:focus-visible {
  text-decoration: none;
}

@media (min-width: 60rem) {
  .mm-ae-shell {
    display: grid;
    grid-template-columns: var(--mm-ae-sidebar-width) minmax(0, 1fr);
    gap: var(--mm-ae-shell-gap);
    width: min(calc(100% - 4rem), 98rem);
    margin-inline: auto;
  }

  .mm-ae-sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    padding-block: 2.1rem;
  }

  .mm-ae-navigation {
    margin-top: clamp(4rem, 12vh, 8rem);
  }

  .mm-ae-content-shell {
    min-width: 0;
    padding-inline: 0 1rem;
  }
}

@media (max-width: 59.99rem) {
  .mm-ae-sidebar {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
  }

  .mm-ae-brand__role {
    display: none;
  }

  .mm-ae-nav-toggle {
    display: block;
  }

  .mm-ae-navigation {
    position: fixed;
    inset: 4.3rem 0 0;
    z-index: 999;
    display: none;
    padding: 2rem 1.25rem 3rem;
    overflow-y: auto;
    background: #fff;
  }

  .mm-ae-navigation.is-open {
    display: block;
  }

  .mm-ae-navigation__link {
    padding-block: 0.52rem;
    font-size: 1.08rem;
  }

  .mm-ae-navigation__sublink {
    padding-block: 0.32rem;
    font-size: 0.9rem;
  }

  .mm-ae-nav-open {
    overflow: hidden;
  }

  .mm-ae-content-shell {
    padding-inline: 1rem;
  }

  .mm-ae-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Trabalhos — Etapa 3 */

.mm-ae-works {
  padding-block: clamp(2rem, 6vw, 6rem);
}

.mm-ae-works-year + .mm-ae-works-year {
  margin-top: clamp(4rem, 9vw, 9rem);
}

.mm-ae-works-year__title {
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
}

.mm-ae-works-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}

.mm-ae-work-card,
.mm-ae-work-card__figure {
  margin: 0;
}

.mm-ae-work-card__image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.mm-ae-works-empty {
  margin: 0;
}

@media (min-width: 48rem) {
  .mm-ae-works-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 75rem) {
  .mm-ae-works-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Lightbox — Etapa 4 */
.mm-ae-work-card__button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: inherit;
  cursor: zoom-in;
}

.mm-ae-work-card__button:focus-visible,
.mm-ae-lightbox button:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 4px;
}

.mm-ae-lightbox[hidden] {
  display: none;
}

.mm-ae-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  opacity: 0;
  transition: opacity 180ms ease;
}

.mm-ae-lightbox.is-open {
  opacity: 1;
}

.mm-ae-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: #fff;
}

.mm-ae-lightbox__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: #fff;
  color: #111;
}

.mm-ae-lightbox__content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  min-height: 100%;
  padding: clamp(4.5rem, 8vw, 6rem) clamp(3.25rem, 7vw, 7rem) clamp(3rem, 6vw, 5rem);
  box-sizing: border-box;
}

.mm-ae-lightbox__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.mm-ae-lightbox__image {
  display: block;
  max-width: 100%;
  max-height: 72vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.mm-ae-lightbox__info {
  align-self: center;
  min-width: 0;
  max-width: 30rem;
}

.mm-ae-lightbox__title {
  margin: 0 0 1.5rem;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 500;
  line-height: 1.25;
}

.mm-ae-lightbox__meta {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
}

.mm-ae-lightbox__meta-row {
  display: grid;
  grid-template-columns: minmax(6.5rem, auto) 1fr;
  gap: 0.75rem;
}

.mm-ae-lightbox__meta dt,
.mm-ae-lightbox__meta dd {
  margin: 0;
}

.mm-ae-lightbox__meta dt {
  font-weight: 500;
}

.mm-ae-lightbox__text {
  margin-top: 1.75rem;
  font-size: 0.92rem;
  line-height: 1.65;
}

.mm-ae-lightbox__text > :first-child {
  margin-top: 0;
}

.mm-ae-lightbox__text > :last-child {
  margin-bottom: 0;
}

.mm-ae-lightbox__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.75rem;
}

.mm-ae-lightbox__thumb {
  width: 3.25rem;
  height: 3.25rem;
  padding: 0;
  overflow: hidden;
  border: 1px solid transparent;
  background: transparent;
  opacity: 0.58;
  cursor: pointer;
  transition: opacity 140ms ease, border-color 140ms ease;
}

.mm-ae-lightbox__thumb:hover,
.mm-ae-lightbox__thumb.is-active {
  opacity: 1;
}

.mm-ae-lightbox__thumb.is-active {
  border-color: #111;
}

.mm-ae-lightbox__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mm-ae-lightbox__close,
.mm-ae-lightbox__nav {
  position: fixed;
  z-index: 3;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111;
  font: inherit;
  cursor: pointer;
}

.mm-ae-lightbox__close {
  top: 1.15rem;
  right: 1.35rem;
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.9rem;
  font-weight: 300;
  line-height: 1;
}

.mm-ae-lightbox__nav {
  top: 50%;
  width: 2.75rem;
  height: 3.5rem;
  transform: translateY(-50%);
  opacity: 0.42;
  font-size: 1.25rem;
  transition: opacity 140ms ease;
}

.mm-ae-lightbox__nav:hover,
.mm-ae-lightbox__nav:focus-visible {
  opacity: 1;
}

.mm-ae-lightbox__nav--prev {
  left: 0.35rem;
}

.mm-ae-lightbox__nav--next {
  right: 0.35rem;
}

@media (min-width: 56rem) {
  .mm-ae-lightbox__content {
    grid-template-columns: minmax(0, 1.65fr) minmax(15rem, 0.65fr);
    gap: clamp(2.5rem, 6vw, 7rem);
  }

  .mm-ae-lightbox__image {
    max-height: calc(100vh - 10rem);
  }
}

@media (max-width: 55.99rem) {
  .mm-ae-lightbox__content {
    align-content: start;
  }

  .mm-ae-lightbox__visual {
    min-height: 48vh;
  }

  .mm-ae-lightbox__image {
    max-height: 62vh;
  }

  .mm-ae-lightbox__info {
    max-width: none;
  }

  .mm-ae-lightbox__nav {
    top: 42vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mm-ae-lightbox,
  .mm-ae-lightbox__thumb,
  .mm-ae-lightbox__nav {
    transition: none;
  }
}

/* Home — Etapa 5 */
.mm-ae-home {
  padding-block: clamp(2rem, 5vw, 5rem);
}

.mm-ae-home-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 2.75rem);
  align-items: start;
}

.mm-ae-home-slot {
  position: relative;
  overflow: hidden;
  background: transparent;
}

.mm-ae-home-slot--vertical {
  aspect-ratio: 3 / 4;
}

.mm-ae-home-slot--horizontal {
  aspect-ratio: 4 / 3;
}

.mm-ae-home-slot__button,
.mm-ae-home-slot__empty {
  display: block;
  width: 100%;
  height: 100%;
}

.mm-ae-home-slot__button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.mm-ae-home-slot__button:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 4px;
}

.mm-ae-home-slot__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 52rem) {
  .mm-ae-home-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .mm-ae-home-slot--vertical,
  .mm-ae-home-slot--horizontal {
    aspect-ratio: auto;
    overflow: visible;
  }

  .mm-ae-home-slot__button {
    height: auto;
  }

  .mm-ae-home-slot__image {
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  .mm-ae-home-slot__empty {
    height: auto;
    min-height: 2rem;
  }
}

/* Ajustes estruturais — Etapa 6.1 */
.mm-ae-navigation__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2rem;
  align-items: center;
}

.mm-ae-navigation__link {
  justify-content: flex-start;
}

.mm-ae-navigation__arrow-button {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.mm-ae-navigation__arrow {
  transform: rotate(0deg);
}

.mm-ae-navigation__item.is-submenu-open .mm-ae-navigation__arrow {
  transform: rotate(90deg);
}

.mm-ae-navigation__subitem.is-active > .mm-ae-navigation__sublink {
  font-weight: 700;
}

.mm-ae-sidebar__footer {
  font-size: 0.72rem;
  line-height: 1.4;
}

.mm-ae-sidebar__signature {
  margin-bottom: 0.65rem;
}

.mm-ae-sidebar__legal {
  display: flex;
  flex-direction: column;
  gap: 0.24rem;
}

.mm-ae-sidebar__legal a {
  color: inherit;
  text-decoration: none;
}

/* A galeria de Trabalhos é contínua: anos ficam apenas na navegação. */
.mm-ae-works {
  padding-block: clamp(2rem, 6vw, 6rem);
}

.mm-ae-works-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.6rem, 3vw, 3.5rem);
  align-items: start;
}

.mm-ae-work-card {
  scroll-margin-top: 2.5rem;
}

.mm-ae-work-card__image {
  width: 100%;
  height: auto;
}

/* Neutraliza a antiga divisão visual por ano. */
.mm-ae-works-year,
.mm-ae-works-year + .mm-ae-works-year,
.mm-ae-works-year__title {
  margin: 0;
}

@media (min-width: 60rem) {
  .mm-ae-sidebar {
    display: flex;
    flex-direction: column;
  }

  .mm-ae-sidebar__footer {
    margin-top: auto;
    padding-top: 2rem;
  }
}

@media (max-width: 74.99rem) and (min-width: 48rem) {
  .mm-ae-works-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 47.99rem) {
  .mm-ae-works-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 59.99rem) {
  .mm-ae-navigation {
    display: none;
    flex-direction: column;
    min-height: calc(100dvh - 4.3rem);
  }

  .mm-ae-navigation.is-open {
    display: flex;
  }

  .mm-ae-navigation__list {
    width: 100%;
  }

  .mm-ae-navigation__row {
    grid-template-columns: minmax(0, 1fr) 2.5rem;
  }

  .mm-ae-sidebar__footer {
    margin-top: auto;
    padding-top: 2.5rem;
  }

  .mm-ae-sidebar__legal {
    gap: 0.4rem;
  }
}

/* Ajustes estruturais — Etapa 6.2 */
.mm-ae-navigation__row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.18rem;
}

.mm-ae-navigation__link {
  flex: 0 0 auto;
}

.mm-ae-navigation__arrow-button {
  flex: 0 0 1.45rem;
  width: 1.45rem;
  height: 1.45rem;
}

.mm-ae-navigation__arrow {
  font-size: 0.95rem;
}

.mm-ae-work-card[hidden] {
  display: none !important;
}

@media (min-width: 60rem) {
  .mm-ae-sidebar__panel {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
  }

  .mm-ae-sidebar__footer {
    margin-top: auto;
  }
}

@media (max-width: 59.99rem) {
  .mm-ae-sidebar__panel {
    position: fixed;
    inset: 4.3rem 0 0;
    z-index: 999;
    display: none;
    flex-direction: column;
    padding: 2rem 1.25rem 1.5rem;
    overflow-y: auto;
    background: #fff;
  }

  .mm-ae-sidebar__panel.is-open {
    display: flex;
  }

  .mm-ae-navigation,
  .mm-ae-navigation.is-open {
    position: static;
    inset: auto;
    z-index: auto;
    display: block;
    min-height: 0;
    padding: 0;
    overflow: visible;
    background: transparent;
  }

  .mm-ae-navigation__row {
    grid-template-columns: none;
    gap: 0.28rem;
  }

  .mm-ae-sidebar__footer {
    display: block;
    margin-top: auto;
    padding-top: 2.5rem;
  }
}


/* Ajustes estruturais — Etapa 6.3 */
/* Estado ativo: o link principal está dentro de .mm-ae-navigation__row. */
.mm-ae-navigation__item.is-active > .mm-ae-navigation__row > .mm-ae-navigation__link {
  font-weight: 700;
}

/* Mantém subcategoria/ano selecionado em bold sem ativar anos por padrão. */
.mm-ae-navigation__subitem.is-active > .mm-ae-navigation__sublink {
  font-weight: 700;
}

@media (min-width: 60rem) {
  /* Aproxima a navegação da assinatura, preservando respiro editorial. */
  .mm-ae-navigation {
    margin-top: clamp(1.82rem, 4.2vh, 2.905rem);
  }
}

@media (max-width: 59.99rem) {
  /* O menu móvel é uma camada independente, sempre acima da Home/conteúdo. */
  .mm-ae-sidebar {
    z-index: 10020;
    background: #fff;
    backdrop-filter: none;
  }

  .mm-ae-sidebar__panel {
    position: fixed;
    inset: 4.15rem 0 0;
    z-index: 10010;
    width: 100%;
    height: calc(100dvh - 4.15rem);
    box-sizing: border-box;
    padding: 1.65rem 1.35rem 1.5rem;
    overflow-y: auto;
    background: #fff;
  }

  .mm-ae-sidebar__panel.is-open {
    display: flex;
  }

  .mm-ae-navigation__list {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
  }

  .mm-ae-navigation__link {
    padding-block: 0.62rem;
    font-size: 1.05rem;
    line-height: 1.3;
  }

  .mm-ae-navigation__row {
    gap: 0.22rem;
  }

  .mm-ae-navigation__arrow-button {
    width: 1.65rem;
    height: 1.65rem;
    flex-basis: 1.65rem;
  }

  .mm-ae-navigation__sublist {
    margin: 0.15rem 0 0.55rem !important;
    padding-left: 0.75rem !important;
  }

  .mm-ae-navigation__sublink {
    padding-block: 0.38rem;
    font-size: 0.92rem;
  }

  /* Legal pertence ao próprio painel, abaixo da navegação, sem sobreposição. */
  .mm-ae-sidebar__footer {
    position: static;
    flex: 0 0 auto;
    margin-top: 2.25rem;
    padding-top: 1.5rem;
  }

  .mm-ae-sidebar__signature {
    margin-bottom: 0.7rem;
  }

  .mm-ae-sidebar__legal {
    gap: 0.45rem;
  }
}

/* Ajuste editorial — Etapa 6.4 */
@media (min-width: 60rem) {
  /* Alinha o início visual da Home ao topo da assinatura Mauricio Mallet. */
  .mm-ae-home {
    padding-top: 2.1rem;
  }
}


/* Ajuste editorial — Etapa 6.5 */
@media (min-width: 60rem) {
  /* Todo o conteúdo principal começa na mesma linha visual da marca lateral. */
  .mm-ae-content-shell {
    padding-top: 2.1rem;
  }

  /* Remove compensações internas específicas para manter Home e Trabalhos alinhados. */
  .mm-ae-home,
  .mm-ae-works {
    padding-top: 0;
  }

  /* Preserva a obra inteira nos destaques, sem corte ou distorção visual. */
  .mm-ae-home-slot__image {
    object-fit: contain;
    object-position: top center;
  }
}

/* Caderno — Etapa 7 */
.mm-ae-notebook-index,
.mm-ae-notebook-single {
  width: 100%;
}

.mm-ae-notebook-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2.5rem, 5vw, 5rem) clamp(2rem, 4vw, 4rem);
  align-items: start;
}

.mm-ae-notebook-card__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.mm-ae-notebook-card__figure {
  margin: 0 0 1rem;
}

.mm-ae-notebook-card__image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.mm-ae-notebook-card__number,
.mm-ae-notebook-single__number {
  display: block;
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  line-height: 1.3;
}

.mm-ae-notebook-card__title {
  margin: 0;
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  font-weight: 400;
  line-height: 1.25;
}

.mm-ae-notebook-single {
  max-width: 58rem;
}

.mm-ae-notebook-single__header {
  max-width: 44rem;
  margin-bottom: clamp(2rem, 4vw, 4rem);
}

.mm-ae-notebook-single__title {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.8rem);
  font-weight: 400;
  line-height: 1.08;
}

.mm-ae-notebook-single__categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.85rem;
  margin-top: 1rem;
  font-size: 0.78rem;
}

.mm-ae-notebook-single__categories a {
  color: inherit;
  text-decoration: none;
}

.mm-ae-notebook-single__hero {
  margin: 0 0 clamp(2rem, 5vw, 5rem);
}

.mm-ae-notebook-single__hero-image {
  display: block;
  max-width: 100%;
  height: auto;
}

.mm-ae-notebook-single__content {
  max-width: 44rem;
  font-size: 1rem;
  line-height: 1.65;
}

.mm-ae-notebook-single__content > :first-child {
  margin-top: 0;
}

.mm-ae-notebook-single__content img,
.mm-ae-notebook-single__content video,
.mm-ae-notebook-single__content iframe {
  max-width: 100%;
}

.mm-ae-notebook-single__content figure {
  margin-inline: 0;
}

@media (max-width: 47.99rem) {
  .mm-ae-notebook-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}
