/* =========================================================
   Base escura e quente, um único acento de sinalização.
   ========================================================= */
:root {
  --bg: #11100e;
  --bg-2: #181614;
  --bg-3: #221f1b;
  --text: #ebe5da;
  --soft: #cfc7bb;
  --muted: #9b9187;
  --faint: #665e56;
  --line: rgba(235, 229, 218, 0.11);
  --line-strong: rgba(235, 229, 218, 0.24);
  --accent: #ff5533;
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.mono {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--text);
  color: var(--bg);
  padding: 10px 14px;
}

.skip:focus {
  top: 16px;
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  vertical-align: 0.1em;
}

.dot--live {
  animation: pulse 2.4s var(--ease) infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 85, 51, 0.55);
  }
  70%,
  100% {
    box-shadow: 0 0 0 9px rgba(255, 85, 51, 0);
  }
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.2s, gap 0.3s var(--ease);
}

.arrow-link::after {
  content: '↓';
}

.arrow-link:hover {
  border-color: var(--text);
  gap: 16px;
}

/* =========================================================
   Topo
   ========================================================= */
.top {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s;
}

.top.is-scrolled {
  background: rgba(17, 16, 14, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-color: var(--line);
}

.top__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.top__name {
  margin-right: auto;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.top__nav {
  display: flex;
  gap: 28px;
}

.top__nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.top__nav span {
  color: var(--faint);
  margin-right: 6px;
}

.top__nav b {
  font-weight: 400;
}

.top__nav a:hover,
.top__nav a[aria-current='true'] {
  color: var(--text);
}

.top__nav a[aria-current='true'] span {
  color: var(--accent);
}

.lang {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--faint);
}

.lang button {
  padding: 6px 2px;
  color: var(--faint);
  transition: color 0.2s;
}

.lang button:hover,
.lang button[aria-pressed='true'] {
  color: var(--text);
}

@media (max-width: 900px) {
  .top__nav {
    display: none;
  }
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  padding: 120px 0 40px;
  overflow: hidden;
}

.hero__map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent 8%, #000 62%);
  mask-image: linear-gradient(90deg, transparent 8%, #000 62%);
}

.hero__content {
  position: relative;
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.hero__who {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0;
  color: var(--muted);
}

.hero__who strong {
  color: var(--text);
  font-weight: 500;
}

.hero__title {
  margin: auto 0 0;
  max-width: 17ch;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(38px, 5.4vw, 84px);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.hero__title em {
  font-style: italic;
}

.specs {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 24px 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line-strong);
}

.specs__intro p {
  margin: 0 0 20px;
  max-width: 52ch;
  color: var(--soft);
}

.specs dl {
  margin: 0;
}

.specs dt {
  color: var(--faint);
  margin-bottom: 8px;
}

.specs dd {
  margin: 0;
}

.specs dd small {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.figures {
  list-style: none;
  margin: 0;
  padding: 0;
}

.figures li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.figures strong {
  min-width: 2.2ch;
  color: var(--text);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
}

@media (max-width: 960px) {
  .specs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .specs__intro {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .hero {
    padding-top: 96px;
  }

  .hero__map {
    -webkit-mask-image: linear-gradient(180deg, #000 10%, transparent 75%);
    mask-image: linear-gradient(180deg, #000 10%, transparent 75%);
    opacity: 0.8;
  }

  .specs {
    grid-template-columns: 1fr 1fr;
  }

  .specs dl:last-child {
    grid-column: 1 / -1;
  }
}

/* =========================================================
   Seções
   ========================================================= */
.section {
  padding-top: clamp(96px, 12vw, 168px);
}

/* Cabeçalhos, linha do tempo, empregos e contato dividem a mesma grade de 8 colunas. */
.head,
.arrange,
.job,
.contact__body {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  column-gap: 32px;
}

.head > :first-child,
.arrange > :first-child,
.job > :first-child,
.contact__body > :first-child {
  grid-column: 1 / span 2;
}

.head > :last-child,
.arrange > :last-child,
.contact__body > :last-child {
  grid-column: 3 / -1;
}

.head {
  row-gap: 12px;
  padding-top: 20px;
  margin-bottom: clamp(48px, 6vw, 88px);
  border-top: 1px solid var(--line-strong);
}

.head__num {
  color: var(--muted);
  padding-top: 8px;
}

.head h2 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(40px, 5.4vw, 80px);
  line-height: 1;
  letter-spacing: -0.03em;
}

.head p {
  margin: 0;
  max-width: 54ch;
  color: var(--muted);
  font-size: 17px;
}

.head--bare {
  margin-bottom: 32px;
}

/* Só tem o número: fica na primeira coluna, como nas outras seções. */
.head--bare > .head__num {
  grid-column: 1 / span 2;
}

@media (max-width: 760px) {
  .head,
  .contact__body {
    grid-template-columns: 1fr;
  }

  .head > *,
  .contact__body > * {
    grid-column: 1 / -1 !important;
  }
}

/* ---------- linha do tempo ---------- */
.arrange {
  margin-bottom: 56px;
}

.arrange__labels {
  padding-top: 30px;
}

.arrange__labels span {
  display: flex;
  align-items: center;
  height: 40px;
  padding-right: 16px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.arrange__area {
  position: relative;
  padding-top: 30px;
}

.tick {
  position: absolute;
  top: 0;
  bottom: 0;
  padding-left: 8px;
  border-left: 1px solid var(--line);
  color: var(--faint);
  line-height: 1;
}

.lane {
  position: relative;
  height: 40px;
  border-top: 1px solid var(--line);
}

.lane:last-of-type {
  border-bottom: 1px solid var(--line);
}

.clip {
  position: absolute;
  top: 10px;
  bottom: 10px;
  border-radius: 2px;
  background: var(--bg-3);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transform-origin: left;
  transition: transform 1.2s var(--ease);
}

.clip--now {
  background: var(--accent);
  box-shadow: none;
}

.arrange:not(.is-in) .clip {
  transform: scaleX(0);
}

.arrange__now {
  position: absolute;
  top: 22px;
  bottom: -26px;
  border-left: 1px solid var(--accent);
}

.arrange__now i {
  position: absolute;
  bottom: 0;
  right: 6px;
  color: var(--accent);
  font-style: normal;
  line-height: 1;
}

@media (max-width: 600px) {
  .arrange {
    grid-template-columns: 92px minmax(0, 1fr);
    column-gap: 0;
  }

  .arrange > * {
    grid-column: auto !important;
  }

  .arrange__labels span {
    font-size: 12px;
  }

  .tick {
    padding-left: 4px;
    font-size: 10px;
  }
}

/* ---------- empregos ---------- */
.jobs {
  list-style: none;
  margin: 0;
  padding: 0;
}

.job {
  row-gap: 20px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}

.job:last-child {
  border-bottom: 1px solid var(--line);
}

.job > :nth-child(2) {
  grid-column: 3 / span 3;
}

.job > :last-child {
  grid-column: 6 / -1;
}

.job__when {
  margin: 0;
  color: var(--muted);
}

.job__when .dot {
  margin-left: 2px;
}

.job__when b {
  display: block;
  margin-top: 10px;
  color: var(--accent);
  font-weight: 400;
}

.job h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.job__role {
  margin: 0 0 12px;
  color: var(--soft);
}

.job__summary {
  margin: 0;
  color: var(--muted);
}

.job__projects {
  list-style: none;
  margin: 0;
  padding: 0;
}

.job__projects a {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: color 0.2s;
}

.job__projects li:first-child a {
  padding-top: 4px;
}

.job__projects a::after {
  content: '↓';
  margin-left: auto;
  color: var(--faint);
  transition: color 0.2s, transform 0.3s var(--ease);
}

.job__projects a:hover {
  color: var(--accent);
}

.job__projects a:hover::after {
  color: var(--accent);
  transform: translateY(3px);
}

.job__projects .mono {
  padding-top: 3px;
  color: var(--faint);
}

.job__projects small {
  color: var(--muted);
  font-size: inherit;
}

@media (max-width: 900px) {
  .job {
    grid-template-columns: 1fr;
  }

  .job > * {
    grid-column: 1 / -1 !important;
  }
}

/* ---------- projetos ---------- */
.work {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 5vw, 80px);
  padding: clamp(56px, 7vw, 104px) 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 40px;
}

.work:first-child {
  padding-top: 0;
  border-top: 0;
}

.work:last-child {
  padding-bottom: 0;
}

.work__text {
  position: sticky;
  top: 96px;
  align-self: start;
}

.work__index {
  margin: 0 0 6px;
  color: var(--faint);
}

.work__index span {
  color: var(--text);
}

.work__origin {
  margin: 0 0 16px;
  color: var(--muted);
}

.work__title {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 3.6vw, 54px);
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.work__desc {
  margin: 0 0 28px;
  max-width: 56ch;
  color: var(--soft);
  font-size: 17px;
}

.work__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.work__list li {
  position: relative;
  padding: 12px 0 12px 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.work__list li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 21px;
  width: 5px;
  height: 5px;
  background: var(--faint);
}

.work__more summary {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.work__more summary::-webkit-details-marker {
  display: none;
}

.work__more summary::after {
  content: '+';
}

.work__more[open] summary::after {
  content: '×';
}

.work__more[open] summary {
  color: var(--muted);
}

.work__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
  margin: 28px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line-strong);
}

.work__meta div:last-child {
  grid-column: 1 / -1;
}

.work__meta dt {
  margin-bottom: 4px;
  color: var(--faint);
}

.work__meta dd {
  margin: 0;
  font-size: 14px;
}

/* mídia em pé, escalonada */
.work__media {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  gap: clamp(12px, 2vw, 24px);
}

.phone {
  flex: 0 1 300px;
  min-width: 0;
  margin: 0;
}

.work__media[data-count='2'] .phone:nth-child(2),
.work__media[data-count='3'] .phone:nth-child(2) {
  margin-top: 80px;
}

.work__media[data-count='3'] .phone:nth-child(3) {
  margin-top: 28px;
}

.phone__screen {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 22px;
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

/* Foto mantém a proporção dela; só tela de celular usa 9:16. */
.phone__screen--photo {
  aspect-ratio: auto;
  border-radius: 6px;
}

.phone__screen--photo img {
  position: static !important;
  height: auto !important;
}

.phone__screen img,
.phone__screen video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.phone__screen::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  pointer-events: none;
  transition: box-shadow 0.2s;
}

.phone__screen:hover::after {
  box-shadow: inset 0 0 0 1px var(--text);
}

.phone__screen:hover img,
.phone__screen:hover video {
  transform: scale(1.025);
}

.phone__play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(17, 16, 14, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.phone__play::before {
  content: '';
  position: absolute;
  left: 13px;
  top: 11px;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent var(--text);
}

.phone__screen.is-live .phone__play {
  opacity: 0;
}

.phone figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.work__empty {
  position: relative;
  width: 100%;
  height: clamp(280px, 30vw, 420px);
  display: flex;
  align-items: flex-end;
  padding: 20px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line);
}

.work__empty canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.work__empty p {
  position: relative;
  margin: 0;
  color: var(--muted);
}

@media (max-width: 900px) {
  .work {
    grid-template-columns: 1fr;
  }

  .work__text {
    position: static;
  }

  .work__media {
    justify-content: flex-start;
    margin: 0 calc(var(--gutter) * -1);
    padding: 0 var(--gutter) 4px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }

  .work__media::-webkit-scrollbar {
    display: none;
  }

  .phone {
    flex: 0 0 min(62vw, 280px);
    scroll-snap-align: start;
  }

  .work__media .phone:nth-child(n) {
    margin-top: 0;
  }

  .work__empty {
    height: 240px;
  }
}

/* ---------- stack ---------- */
.stack {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 40px 32px;
}

.stack > :first-child {
  grid-column: 1 / span 5;
}

.stack > :last-child {
  grid-column: 7 / -1;
}

.skill {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px 32px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.skill:last-child {
  border-bottom: 1px solid var(--line);
}

.skill h3 {
  grid-column: span 2;
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.3;
}

.skill p {
  grid-column: 3 / -1;
  margin: 0;
  padding-top: 3px;
  color: var(--soft);
}

.skill span {
  white-space: nowrap;
}

.skill i {
  margin: 0 4px 0 8px;
  color: var(--faint);
  font-style: normal;
}

.facts h3 {
  margin: 0 0 4px;
  color: var(--faint);
}

.facts ul {
  list-style: none;
  margin: 0 0 40px;
  padding: 0;
}

.facts li {
  display: flex;
  flex-direction: column;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.facts li strong {
  font-weight: 500;
}

.facts li span {
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 900px) {
  .stack {
    grid-template-columns: minmax(0, 1fr);
  }

  .stack > * {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 560px) {
  .skill {
    grid-template-columns: minmax(0, 1fr);
  }

  .skill > * {
    grid-column: 1 / -1;
  }
}

/* ---------- fora do expediente ---------- */
.about {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 40px 32px;
  align-items: start;
}

.about__photo {
  grid-column: 1 / span 3;
  margin: 0;
}

.about__photo {
  position: relative;
}

.about__photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 20%;
  border-radius: 4px;
}

/* vídeo curto sobreposto ao canto da foto */
.about__clip {
  position: absolute;
  right: -20px;
  bottom: 28px;
  width: 36%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: 4px solid var(--bg);
  border-radius: 10px;
  background: var(--bg);
  box-shadow: 0 18px 40px rgb(0 0 0 / 0.45);
  cursor: pointer;
}

.about__clip video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__photo figcaption {
  max-width: 58%;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.notes {
  grid-column: 4 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
}

.note {
  padding: 20px 24px 32px 0;
}

.note:nth-child(even) {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.note:nth-child(n + 3) {
  border-top: 1px solid var(--line);
}

.note h3 {
  margin: 0 0 40px;
  color: var(--muted);
}

.note h3 span {
  margin-right: 8px;
  color: var(--faint);
}

.note p {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-weight: 300;
  font-size: 22px;
  line-height: 1.3;
}

.note a {
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 900px) {
  .about {
    grid-template-columns: minmax(0, 1fr);
  }

  .about__photo,
  .notes {
    grid-column: 1 / -1;
  }

  .about__photo {
    max-width: 420px;
  }

  .about__clip {
    right: 12px;
  }
}

@media (max-width: 520px) {
  .notes {
    grid-template-columns: minmax(0, 1fr);
  }

  .note:nth-child(n) {
    padding-left: 0;
    border-left: 0;
  }

  .note + .note {
    border-top: 1px solid var(--line);
  }

  .note h3 {
    margin-bottom: 20px;
  }
}

/* ---------- contato ---------- */
.contact__title {
  margin: 0 0 48px;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(52px, 10vw, 160px);
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.contact__title em {
  font-style: italic;
}

.contact__body {
  row-gap: 24px;
}

.contact__body > p {
  margin: 0;
  color: var(--muted);
}

.contact__mail {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(24px, 3.4vw, 44px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.2s, color 0.2s;
  overflow-wrap: anywhere;
}

.contact__mail:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 32px;
}

.contact__links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.contact__links a:hover {
  color: var(--text);
}

.footer {
  margin-top: clamp(96px, 12vw, 160px);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 20px;
  padding-bottom: 32px;
  color: var(--faint);
  background: linear-gradient(var(--line), var(--line)) var(--gutter) 0 / calc(100% - 2 * var(--gutter)) 1px no-repeat;
}

/* =========================================================
   Visualizador
   ========================================================= */
.viewer {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(12, 11, 10, 0.97);
  color: var(--text);
}

.viewer::backdrop {
  background: transparent;
}

.viewer[open] {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 96px;
  align-items: center;
}

.viewer__stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 100%;
  min-width: 0;
  margin: 0;
  padding: 64px 0 28px;
}

.viewer__stage video,
.viewer__stage img {
  max-height: calc(100dvh - 150px);
  border-radius: 18px;
  background: var(--bg-2);
}

.viewer__stage figcaption {
  display: flex;
  gap: 16px;
  color: var(--soft);
  font-size: 14px;
  text-align: center;
}

.viewer__stage figcaption .mono {
  color: var(--faint);
}

.viewer__close {
  position: absolute;
  top: 20px;
  right: var(--gutter);
  z-index: 1;
  color: var(--muted);
}

.viewer__close:hover {
  color: var(--text);
}

.viewer__nav {
  justify-self: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-size: 18px;
  transition: box-shadow 0.2s;
}

.viewer__nav:hover:not(:disabled) {
  box-shadow: inset 0 0 0 1px var(--text);
}

.viewer__nav:disabled {
  opacity: 0.2;
  cursor: default;
}

@media (max-width: 700px) {
  .viewer[open] {
    grid-template-columns: minmax(0, 1fr);
  }

  .viewer__stage {
    padding: 56px 16px 88px;
  }

  .viewer__stage video,
  .viewer__stage img {
    max-height: calc(100dvh - 200px);
  }

  .viewer__nav {
    position: absolute;
    bottom: 20px;
  }

  .viewer__nav--prev {
    left: calc(50% - 60px);
  }

  .viewer__nav--next {
    right: calc(50% - 60px);
  }
}

/* =========================================================
   Entrada ao rolar
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

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

  .reveal,
  .clip {
    opacity: 1;
    transform: none !important;
    transition: none;
  }

  .dot--live {
    animation: none;
  }
}
