:root {
  color-scheme: dark;
  --ink: #050706;
  --ink-2: #0b100d;
  --panel: #111712;
  --cream: #f3ead8;
  --cream-soft: #d8cfbd;
  --muted: #a9a18f;
  --jade: #31cf91;
  --jade-deep: #0d6645;
  --gold: #d5b66f;
  --line: rgba(243, 234, 216, 0.16);
  --glass: rgba(15, 21, 17, 0.72);
  --glass-solid: #101612;
  --danger: #ef9d8d;
  --radius-card: 30px;
  --radius-control: 999px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --z-header: 20;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--ink);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--cream);
  background:
    radial-gradient(circle at 78% 12%, rgba(29, 148, 95, 0.24), transparent 34rem),
    radial-gradient(circle at 10% 72%, rgba(213, 182, 111, 0.12), transparent 31rem),
    linear-gradient(135deg, var(--ink-2), var(--ink) 72%);
  font-family: "Jost", system-ui, sans-serif;
  font-weight: 300;
  line-height: 1.65;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.5), transparent 76%);
}

a { color: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

img { display: block; max-width: 100%; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-control);
  color: var(--ink);
  background: var(--cream);
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.profile-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  padding: max(12px, env(safe-area-inset-top)) 18px 0;
}

.profile-header__inner {
  width: min(1240px, 100%);
  height: 70px;
  margin-inline: auto;
  padding: 7px 10px 7px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(243, 234, 216, 0.14);
  border-radius: var(--radius-control);
  background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.02)), rgba(7, 11, 9, 0.74);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.11), 0 18px 54px rgba(0,0,0,.2);
}

.profile-brand { display: flex; align-items: center; }
.profile-brand img { width: 146px; height: auto; }

.profile-back,
.profile-cta,
.profile-secondary-link {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-control);
  font-weight: 600;
  text-decoration: none;
  transition: transform .25s var(--ease), border-color .25s var(--ease), background-color .25s var(--ease);
}

.profile-back {
  padding: 0 20px;
  border: 1px solid var(--line);
  color: var(--cream-soft);
  font-size: .84rem;
}

.profile-back:hover,
.profile-secondary-link:hover { border-color: rgba(213, 182, 111, .54); }

.profile-back:active,
.profile-cta:active,
.profile-secondary-link:active { transform: scale(.98); }

.profile-shell {
  position: relative;
  width: min(1240px, calc(100% - 36px));
  min-height: calc(100dvh - 162px);
  margin: 32px auto 88px;
  outline: none;
}

.profile-loading,
.profile-hero {
  min-height: min(760px, calc(100dvh - 156px));
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.profile-loading__copy { display: grid; gap: 22px; }

.profile-skeleton {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  background: rgba(255,255,255,.055);
}

.profile-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 22%, rgba(255,255,255,.08) 48%, transparent 74%);
  transform: translateX(-100%);
  animation: profile-shimmer 1.6s var(--ease) infinite;
}

.profile-skeleton--image { min-height: 650px; border-radius: var(--radius-card); }
.profile-skeleton--eyebrow { width: 140px; height: 20px; }
.profile-skeleton--title { width: min(92%, 470px); height: 90px; }
.profile-skeleton--body { width: min(100%, 520px); height: 130px; }
.profile-skeleton--action { width: 210px; height: 54px; border-radius: var(--radius-control); }

@keyframes profile-shimmer { to { transform: translateX(100%); } }

.profile-visual {
  position: relative;
  min-height: min(760px, calc(100dvh - 160px));
  overflow: hidden;
  border: 1px solid rgba(243, 234, 216, 0.18);
  border-radius: var(--radius-card);
  background: var(--glass-solid);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 32px 90px rgba(0,0,0,.36);
}

.profile-visual::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 35%;
  pointer-events: none;
  background: linear-gradient(to top, rgba(4,7,5,.58), transparent);
}

.profile-visual img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}

.profile-visual--fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(49,207,145,.19), rgba(213,182,111,.09)), var(--panel);
}

.profile-visual--fallback img {
  width: min(46%, 240px);
  min-height: auto;
  opacity: .78;
  object-fit: contain;
}

.profile-copy {
  padding-block: 32px;
  animation: profile-enter .72s var(--ease) both;
}

.profile-status {
  width: fit-content;
  margin: 0 0 26px;
  padding: 8px 14px;
  border: 1px solid rgba(49,207,145,.28);
  border-radius: var(--radius-control);
  color: #77e8bc;
  background: rgba(49,207,145,.08);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.profile-status[data-tone="gold"] {
  color: var(--gold);
  border-color: rgba(213,182,111,.32);
  background: rgba(213,182,111,.08);
}

.profile-kicker {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.profile-title {
  max-width: 11ch;
  margin: 0;
  color: var(--cream);
  font-family: "Libre Bodoni", Georgia, serif;
  font-size: clamp(3.4rem, 6.5vw, 6.6rem);
  font-weight: 400;
  letter-spacing: -.055em;
  line-height: .93;
}

.profile-title em {
  display: inline-block;
  padding-bottom: .08em;
  color: var(--gold);
  font-weight: 400;
  line-height: 1.1;
}

.profile-summary {
  max-width: 54ch;
  margin: 30px 0 0;
  color: var(--cream-soft);
  font-size: clamp(1.04rem, 1.45vw, 1.25rem);
}

.profile-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.profile-cta {
  padding: 0 24px;
  color: #07120d;
  background: var(--jade);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 14px 34px rgba(49,207,145,.14);
}

.profile-cta:hover { transform: translateY(-2px); background: #4ad99f; }

.profile-secondary-link {
  padding: 0 22px;
  color: var(--cream);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.035);
}

.profile-facts {
  margin: 40px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.profile-fact {
  padding: 18px 12px 18px 0;
  border-bottom: 1px solid var(--line);
}

.profile-fact:nth-child(even) { padding-left: 22px; border-left: 1px solid var(--line); }
.profile-fact dt { color: var(--muted); font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.profile-fact dd { margin: 5px 0 0; color: var(--cream); font-size: 1.02rem; }

.profile-section {
  margin-top: clamp(90px, 11vw, 150px);
}

.profile-section__heading {
  max-width: 700px;
  margin-bottom: 34px;
}

.profile-section__heading h2 {
  margin: 0;
  color: var(--cream);
  font-family: "Libre Bodoni", Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: 1;
}

.profile-section__heading p { max-width: 56ch; margin: 18px 0 0; color: var(--muted); font-size: 1.05rem; }

.profile-story {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: 24px;
  align-items: stretch;
}

.profile-story__main,
.profile-story__aside,
.profile-final {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.025)), var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  backdrop-filter: blur(22px) saturate(145%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.09);
}

.profile-story__main { padding: clamp(28px, 5vw, 60px); }
.profile-story__main p { margin: 0; color: var(--cream-soft); font-family: "Libre Bodoni", Georgia, serif; font-size: clamp(1.55rem, 3vw, 2.7rem); line-height: 1.26; }
.profile-story__aside { padding: 30px; display: flex; flex-direction: column; justify-content: flex-end; }
.profile-story__aside span { color: var(--muted); font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.profile-story__aside strong { margin-top: 8px; color: var(--gold); font-family: "Libre Bodoni", Georgia, serif; font-size: 2rem; font-weight: 400; }

.profile-milestones {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 40px;
}

.profile-milestone {
  padding: 8px 0 26px;
  border-bottom: 1px solid var(--line);
}

.profile-milestone time { color: var(--gold); font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.profile-milestone h3 { margin: 8px 0 4px; color: var(--cream); font-family: "Libre Bodoni", Georgia, serif; font-size: 1.65rem; font-weight: 400; }
.profile-milestone p { margin: 0; color: var(--muted); }

.profile-cats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.profile-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.profile-gallery__item {
  min-height: 280px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
}

.profile-gallery__item:nth-child(3n + 1) { grid-row: span 2; }
.profile-gallery__item img { width: 100%; height: 100%; min-height: 280px; object-fit: cover; }

.profile-cat-card {
  min-height: 440px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  color: var(--cream);
  background: var(--panel);
  text-decoration: none;
  transition: transform .35s var(--ease), border-color .35s var(--ease);
}

.profile-cat-card:hover { transform: translateY(-5px); border-color: rgba(213,182,111,.48); }
.profile-cat-card img { width: 100%; height: 100%; min-height: 440px; object-fit: cover; transition: transform .7s var(--ease); }
.profile-cat-card:hover img { transform: scale(1.025); }
.profile-cat-card__fallback { width: 100%; min-height: 440px; display: grid; place-items: center; background: linear-gradient(145deg, rgba(49,207,145,.16), rgba(213,182,111,.08)); }
.profile-cat-card__fallback img { width: 160px; height: auto; min-height: auto; object-fit: contain; opacity: .7; }
.profile-cat-card__caption { position: absolute; inset: auto 18px 18px; padding: 16px 18px; border: 1px solid rgba(255,255,255,.12); border-radius: 18px; background: rgba(6,9,7,.76); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.profile-cat-card__caption strong { display: block; font-family: "Libre Bodoni", Georgia, serif; font-size: 1.75rem; font-weight: 400; }
.profile-cat-card__caption span { color: var(--cream-soft); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }

.profile-empty {
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  color: var(--muted);
  background: rgba(255,255,255,.025);
}

.profile-final {
  margin-top: clamp(90px, 11vw, 150px);
  padding: clamp(34px, 6vw, 76px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 30px;
  align-items: end;
}

.profile-final h2 { max-width: 13ch; margin: 0; font-family: "Libre Bodoni", Georgia, serif; font-size: clamp(2.5rem, 5vw, 5rem); font-weight: 400; letter-spacing: -.045em; line-height: 1; }
.profile-final p { max-width: 54ch; margin: 18px 0 0; color: var(--muted); }

.profile-error {
  min-height: calc(100dvh - 230px);
  display: grid;
  place-items: center;
  text-align: center;
}

.profile-error__card {
  width: min(620px, 100%);
  padding: clamp(32px, 7vw, 70px);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--glass-solid);
}

.profile-error__card h1 { margin: 0; font-family: "Libre Bodoni", Georgia, serif; font-size: clamp(2.6rem, 6vw, 4.7rem); font-weight: 400; line-height: 1; }
.profile-error__card p { max-width: 46ch; margin: 22px auto 30px; color: var(--muted); }

.profile-footer {
  width: min(1240px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 max(32px, env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .84rem;
}

.profile-footer p { margin: 0; }

@keyframes profile-enter {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

@media (max-width: 820px) {
  .profile-header { padding-inline: 12px; }
  .profile-header__inner { height: 64px; padding-left: 14px; }
  .profile-brand img { width: 132px; }
  .profile-back { min-height: 42px; padding-inline: 15px; }
  .profile-shell { width: min(100% - 28px, 660px); margin-top: 22px; }
  .profile-loading,
  .profile-hero { min-height: auto; grid-template-columns: 1fr; gap: 24px; }
  .profile-loading__copy { padding: 12px 4px; }
  .profile-skeleton--image { min-height: 0; height: min(88vw, 410px); }
  .profile-visual { min-height: 0; height: min(88vw, 410px); }
  .profile-visual img { min-height: 0; height: 100%; }
  .profile-copy { padding: 10px 4px 0; display: flex; flex-direction: column; }
  .profile-status { order: 1; }
  .profile-kicker { order: 2; }
  .profile-title { order: 3; }
  .profile-actions { order: 4; }
  .profile-summary { order: 5; }
  .profile-facts { order: 6; }
  .profile-title { max-width: 9ch; font-size: clamp(3.2rem, 17vw, 5.4rem); }
  .profile-summary { margin-top: 24px; }
  .profile-story { grid-template-columns: 1fr; }
  .profile-story__aside { min-height: 190px; }
  .profile-milestones { grid-template-columns: 1fr; }
  .profile-cats { grid-template-columns: 1fr; }
  .profile-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-gallery__item:nth-child(3n + 1) { grid-row: auto; }
  .profile-gallery__item:first-child { grid-column: 1 / -1; }
  .profile-cat-card, .profile-cat-card img, .profile-cat-card__fallback { min-height: min(112vw, 540px); }
  .profile-final { grid-template-columns: 1fr; align-items: start; }
  .profile-final .profile-cta { width: 100%; }
}

@media (max-width: 460px) {
  .profile-back { font-size: 0; width: 44px; padding: 0; }
  .profile-back::after { content: "Volver"; font-size: .7rem; }
  .profile-facts { grid-template-columns: 1fr; }
  .profile-fact:nth-child(even) { padding-left: 0; border-left: 0; }
  .profile-actions { display: grid; }
  .profile-cta, .profile-secondary-link { width: 100%; }
  .profile-gallery { grid-template-columns: 1fr; }
  .profile-gallery__item { min-height: min(112vw, 520px); }
  .profile-story__main { padding: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (prefers-reduced-transparency: reduce) {
  .profile-header__inner,
  .profile-story__main,
  .profile-story__aside,
  .profile-final,
  .profile-cat-card__caption {
    background: var(--glass-solid);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media print {
  .profile-header, .profile-footer, .profile-actions, .profile-final { display: none; }
  body { color: #151812; background: #f7f2e8; }
  body::before { display: none; }
  .profile-shell { width: 100%; margin: 0; }
  .profile-title, .profile-section__heading h2, .profile-story__main p { color: #151812; }
  .profile-summary, .profile-fact dd, .profile-section__heading p { color: #34372e; }
}
