/* Adi Wirta — Scheme C · Editorial Folio */
:root {
  --bg: #141210;
  --bg-elev: #1a1714;
  --bg-deep: #0e0c0a;
  --gold: #b8956c;
  --gold-soft: rgba(184, 149, 108, 0.55);
  --gold-dim: rgba(184, 149, 108, 0.18);
  --ink: #f2ebe1;
  --ink-muted: #c8c0b4;
  --ink-faint: #8a8278;
  --line: rgba(184, 149, 108, 0.28);
  --line-soft: rgba(242, 235, 225, 0.08);
  --font-display: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --gutter: clamp(1rem, 4vw, 1.5rem);
  --measure-wide: min(1120px, calc(100% - (var(--gutter) * 2)));
  --measure: min(720px, 100%);
  --measure-read: min(38rem, 100%);
  --header-h: 4.25rem;
  --section-y: clamp(3.25rem, 8vw, 5.5rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--safe-top) + 0.85rem);
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: clamp(0.98rem, 0.4vw + 0.92rem, 1.05rem);
  line-height: 1.65;
  color: var(--ink-muted);
  background:
    radial-gradient(ellipse 80% 50% at 15% 0%, rgba(184, 149, 108, 0.07), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 20%, rgba(80, 60, 40, 0.25), transparent 50%),
    linear-gradient(180deg, #161310 0%, var(--bg) 28%, var(--bg-deep) 100%);
  background-attachment: scroll;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

@media (min-width: 960px) {
  body {
    background-attachment: fixed;
  }
}

body.is-nav-open,
body.is-lightbox-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--gold);
  color: var(--bg);
  font-size: 0.9rem;
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  width: var(--measure);
  margin-inline: auto;
}

.wrap--wide {
  width: var(--measure-wide);
}

/* —— Header —— */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  min-height: calc(var(--header-h) + var(--safe-top));
  padding-top: var(--safe-top);
  border-bottom: 1px solid transparent;
  background: linear-gradient(180deg, rgba(14, 12, 10, 0.88), rgba(14, 12, 10, 0.45) 70%, transparent);
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), backdrop-filter 0.35s;
}

.site-header.is-scrolled,
body.is-nav-open .site-header {
  background: rgba(20, 18, 16, 0.94);
  border-bottom-color: var(--line-soft);
  backdrop-filter: blur(12px);
}

.header-inner {
  width: var(--measure-wide);
  height: var(--header-h);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding-inline: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--ink);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-nav {
  display: none;
  margin-left: auto;
  gap: clamp(0.75rem, 1.4vw, 1.35rem);
  flex-wrap: nowrap;
}

.site-nav a {
  position: relative;
  font-size: clamp(0.7rem, 0.85vw, 0.82rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  transition: color 0.25s;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--gold);
}

.site-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.35rem;
  height: 1px;
  background: var(--gold);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: auto;
  flex-shrink: 0;
}

.lang-pill {
  display: inline-flex;
  border: 1px solid var(--line);
  padding: 0.15rem;
}

.lang-btn {
  min-width: 2.4rem;
  min-height: 2rem;
  padding: 0.35rem 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}

.lang-btn.is-active {
  background: var(--gold-dim);
  color: var(--gold);
}

.nav-toggle {
  display: grid;
  place-content: center;
  gap: 0.35rem;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  margin-right: -0.35rem;
}

.nav-toggle-bar {
  display: block;
  width: 1.25rem;
  height: 1px;
  margin-inline: auto;
  background: var(--ink);
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:first-child {
  transform: translateY(0.2rem) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:last-child {
  transform: translateY(-0.2rem) rotate(-45deg);
}

.mobile-nav {
  display: grid;
  gap: 0;
  max-height: min(70vh, 28rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.35rem var(--gutter) calc(1rem + var(--safe-bottom));
  background: var(--bg-elev);
  border-bottom: 1px solid var(--line);
}

.mobile-nav a {
  padding: 0.95rem 0.15rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink);
  border-bottom: 1px solid var(--line-soft);
}

.mobile-nav a:last-child {
  border-bottom: 0;
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.5);
}

@media (min-width: 1100px) {
  .site-nav {
    display: flex;
  }

  .header-tools {
    margin-left: 0;
  }

  .nav-toggle,
  .mobile-nav,
  .nav-backdrop {
    display: none !important;
  }
}

/* —— Hero · compact split —— */
.hero--compact {
  padding: calc(var(--header-h) + var(--safe-top) + 1.75rem) 0 2.25rem;
  border-bottom: 1px solid var(--line-soft);
}

.hero-compact {
  display: grid;
  gap: 1.75rem;
  align-items: center;
}

.hero-info {
  max-width: 28rem;
  order: 2;
}

.hero-photo {
  margin: 0;
  justify-self: center;
  width: min(100%, 18rem);
  order: 1;
}

.hero-org {
  margin: 0 0 0.85rem;
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.hero-given,
.hero-family {
  display: block;
}

.hero-given {
  font-size: clamp(2.35rem, 9vw, 3.6rem);
  color: var(--ink);
}

.hero-family {
  font-size: clamp(2.5rem, 9.5vw, 3.9rem);
  font-style: italic;
  color: var(--gold);
}

.hero-role {
  margin: 1rem 0 0;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.hero-lede {
  margin: 0.9rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(0.98rem, 2.5vw, 1.05rem);
  font-style: italic;
  line-height: 1.55;
  color: var(--ink);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin-top: 0.85rem;
  padding-bottom: 0.15rem;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid var(--gold);
  transition: opacity 0.25s;
}

.hero-cta:hover {
  opacity: 0.75;
}

.hero-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 12%;
  border: 1px solid var(--line);
  filter: sepia(0.12) saturate(0.9) brightness(0.92);
}

@media (min-width: 720px) {
  .hero--compact {
    padding: calc(var(--header-h) + var(--safe-top) + 2.5rem) 0 2.75rem;
  }

  .hero-compact {
    grid-template-columns: minmax(0, 1.05fr) minmax(14rem, 0.85fr);
    gap: clamp(1.75rem, 4vw, 3.5rem);
  }

  .hero-info {
    order: 1;
  }

  .hero-photo {
    order: 2;
    justify-self: end;
    width: 100%;
    max-width: 22rem;
  }
}

@media (min-width: 960px) {
  .hero--compact {
    padding: calc(var(--header-h) + 3rem) 0 3.25rem;
  }

  .hero-compact {
    grid-template-columns: minmax(0, 1.05fr) minmax(16rem, 0.9fr);
    gap: clamp(2rem, 5vw, 4rem);
  }

  .hero-photo {
    max-width: 26rem;
  }

  .hero-given {
    font-size: clamp(3rem, 4.8vw, 4rem);
  }

  .hero-family {
    font-size: clamp(3.2rem, 5.2vw, 4.3rem);
  }
}

/* —— Sections —— */
.section {
  padding: var(--section-y) 0;
  border-top: 1px solid var(--line-soft);
}

.section-label {
  margin: 0 0 0.75rem;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.85rem, 3.5vw, 2.6rem);
  line-height: 1.15;
  color: var(--ink);
}

.section-dek {
  margin: 0;
  max-width: 16rem;
  font-size: 0.95rem;
  color: var(--ink-faint);
}

.section-head {
  margin-bottom: 2.75rem;
}

.section-head--offset {
  max-width: 22rem;
  margin-left: 0;
}

.section-head--slim {
  max-width: 28rem;
}

.section-head-row {
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .section-head-row {
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 2rem;
  }
}

/* —— Sobre —— */
.about-head {
  margin-bottom: 1.75rem;
  max-width: 28rem;
}

.about-lead {
  margin: 0;
  max-width: 46rem;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.1vw, 1.45rem);
  line-height: 1.55;
  color: var(--ink);
}

.about-facts {
  margin: 2rem 0 0;
  padding: 1.35rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 1.15rem 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 480px) {
  .about-facts {
    grid-template-columns: 1fr 1fr;
  }
}

.about-fact {
  margin: 0;
  min-width: 0;
}

.about-fact--wide {
  grid-column: 1 / -1;
}

.about-fact dt {
  margin: 0;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.about-fact dd {
  margin: 0.3rem 0 0;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--ink);
}

.about-text {
  margin: 1.75rem 0 0;
  max-width: 40rem;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--ink-muted);
}

@media (min-width: 720px) {
  .about-facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem 1.75rem;
  }

  .about-fact--wide {
    grid-column: 1 / -1;
    padding-top: 0.35rem;
    border-top: 1px solid var(--line-soft);
  }
}

/* —— Formação —— */
.edu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 960px) {
  .edu-list {
    grid-template-columns: 1.35fr 1fr;
    gap: 2rem;
    align-items: start;
  }
}

.edu-item {
  padding: 1.75rem 0 0;
  border-top: 1px solid var(--line);
}

.edu-index {
  display: block;
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--gold);
  letter-spacing: 0.08em;
}

.edu-school {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.25rem;
  color: var(--ink);
}

.edu-copy p {
  margin: 0;
  color: var(--ink-muted);
}

/* —— Trajetória —— */
.journey-folio {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.journey-row {
  display: grid;
  gap: 0.75rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line-soft);
}

.journey-row--lead {
  padding-top: 0;
  border-top: 0;
}

.journey-row--lead .journey-copy h3 {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
}

.journey-row--lead .journey-copy p {
  font-size: 1.08rem;
  max-width: 40rem;
}

.journey-row:not(.journey-row--lead) {
  max-width: 46rem;
}

@media (min-width: 720px) {
  .journey-row {
    grid-template-columns: 3.5rem 1fr;
    gap: 1.5rem;
  }

  .journey-row:not(.journey-row--lead) {
    margin-left: 3.5rem;
  }
}

.journey-num {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--gold);
  letter-spacing: 0.06em;
}

.journey-copy h3 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.2rem;
  color: var(--ink);
}

.journey-copy p {
  margin: 0;
  color: var(--ink-muted);
}

/* —— Honra —— */
.section--honors {
  background:
    linear-gradient(180deg, transparent, rgba(184, 149, 108, 0.04) 40%, transparent);
}

.honor-strips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.honor-strip {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}

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

.honor-mark {
  color: var(--gold);
  font-family: var(--font-display);
}

.honor-strip p {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-style: italic;
  line-height: 1.5;
  color: var(--ink);
}

/* —— Credenciais —— */
.cert-folio {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem);
}

.cert-spread {
  display: grid;
  gap: 1.25rem;
  align-items: center;
}

@media (min-width: 720px) and (max-width: 899px) {
  .cert-spread {
    gap: 1.5rem;
  }
}

@media (min-width: 900px) {
  .cert-spread {
    grid-template-columns: 0.85fr 1.15fr;
    gap: 3rem;
  }

  .cert-spread--rtl {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .cert-spread--rtl .cert-notation {
    order: 2;
  }

  .cert-spread--rtl .cert-frame-wrap {
    order: 1;
  }
}

.cert-index {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--gold);
  letter-spacing: 0.1em;
}

.cert-name {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  color: var(--ink);
}

.cert-meta {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-faint);
}

.cert-hint {
  margin: 1.25rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.cert-frame-wrap {
  margin: 0;
}

.cert-frame {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  transition: border-color 0.3s, transform 0.45s var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .cert-frame:hover {
    border-color: var(--gold);
    transform: translateY(-3px);
  }
}

.cert-frame:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 3px;
}

.cert-frame img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}

/* —— Filosofia —— */
.section--philo {
  padding-block: var(--section-y);
  background: linear-gradient(180deg, transparent, rgba(184, 149, 108, 0.04), transparent);
}

.philo-head {
  margin-bottom: 2rem;
  max-width: 28rem;
}

.philo-grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.philo-quote {
  margin: 0;
  padding: 0 0 0 1.25rem;
  border-left: 2px solid var(--gold);
}

.philo-quote p {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-style: italic;
  line-height: 1.5;
  color: var(--ink);
}

.philo-quote footer {
  margin-top: 1.15rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-style: normal;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.philo-side {
  padding-top: 0.15rem;
}

.philo-motto {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--gold);
  letter-spacing: 0.02em;
}

.philo-note {
  margin: 0;
  max-width: 28rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-muted);
}

@media (min-width: 860px) {
  .philo-grid {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
  }

  .philo-side {
    padding-left: 1.75rem;
    border-left: 1px solid var(--line-soft);
  }
}

/* —— Footer —— */
.site-footer {
  padding: 2.75rem 0 calc(2rem + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
}

.footer-shell {
  display: grid;
  gap: 2.5rem;
}

.footer-top {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 720px) {
  .footer-top {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}

.footer-brand {
  display: flex;
  gap: 0.9rem;
  align-items: center;
}

.footer-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--ink);
}

.footer-role {
  margin: 0.25rem 0 0;
  font-size: 0.88rem;
  color: var(--ink-faint);
}

.footer-sign {
  margin: 0;
  max-width: 16rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--gold);
  text-align: left;
}

@media (min-width: 720px) {
  .footer-sign {
    text-align: right;
  }
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
}

.footer-copy {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-faint);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.15rem;
}

.footer-nav a {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.footer-nav a:hover {
  color: var(--gold);
}

/* —— Lightbox —— */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: calc(1rem + var(--safe-top)) calc(1rem + var(--safe-right)) calc(1rem + var(--safe-bottom)) calc(1rem + var(--safe-left));
  background: rgba(8, 7, 6, 0.92);
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox-close {
  position: absolute;
  top: calc(0.65rem + var(--safe-top));
  right: calc(0.75rem + var(--safe-right));
  width: 2.75rem;
  height: 2.75rem;
  font-size: 2rem;
  line-height: 1;
  color: var(--ink);
}

.lightbox-figure {
  margin: 0;
  width: min(920px, 100%);
  max-height: calc(100dvh - 4rem - var(--safe-top) - var(--safe-bottom));
}

.lightbox-figure img {
  width: 100%;
  max-height: calc(100dvh - 6rem - var(--safe-top) - var(--safe-bottom));
  height: auto;
  object-fit: contain;
  margin-inline: auto;
  border: 1px solid var(--line);
}

.lightbox-figure figcaption {
  margin-top: 0.85rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

/* —— Responsive polish —— */
@media (max-width: 479px) {
  .honor-strip p {
    font-size: 1rem;
  }

  .edu-school {
    font-size: 1.1rem;
  }

  .footer-brand {
    align-items: flex-start;
  }

  .footer-nav {
    width: 100%;
  }
}

@media (min-width: 480px) and (max-width: 719px) {
  .hero-photo {
    width: min(100%, 20rem);
  }
}

@media (min-width: 720px) and (max-width: 1099px) {
  .site-nav {
    display: none;
  }

  .nav-toggle {
    display: grid;
  }
}
