/* Just Being Mercedes — one screen, no scroll on desktop.
   Palette pulled from her photos: powder denim (the knit top), espresso, nameplate gold. */
:root {
  --ground: #e3e8ec;
  --ground-2: #d5dde4;
  --ink: #24160f;
  --muted: #54443a;
  --gold: #8a5d17;
  --gold-soft: #c69a4c;
  --denim: #34506e;
  --frame: #f6f1ea;
  --display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Jost", "Futura", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #141b24; --ground-2: #1c2632; --ink: #f3eae0; --muted: #c4b6a8;
    --gold: #deb05a; --gold-soft: #8a6a33; --denim: #a9bfd6; --frame: #232e3b;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #141b24; --ground-2: #1c2632; --ink: #f3eae0; --muted: #c4b6a8;
  --gold: #deb05a; --gold-soft: #8a6a33; --denim: #a9bfd6; --frame: #232e3b;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
figure { margin: 0; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

/* ---------- desktop / tablet: the magazine cover ---------- */
.cover {
  display: grid;
  grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
  height: 100svh;
  min-height: 560px;
}
.hero { position: relative; overflow: hidden; background: var(--ground-2); }
.hero-link { display: block; height: 100%; cursor: zoom-in; }
.hero img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 22%;
  animation: settle 1.1s cubic-bezier(.2,.7,.2,1) both;
}
.copy {
  display: flex; flex-direction: column; justify-content: space-between;
  gap: clamp(.9rem, 2.2vh, 1.6rem);
  padding: clamp(1.5rem, 4.5vh, 3.25rem) clamp(1.5rem, 4.5vw, 4.5rem);
  min-width: 0;
}
.eyebrow {
  margin: 0; display: flex; gap: .7em;
  font: 500 .78rem/1 var(--sans); letter-spacing: .24em; text-transform: uppercase;
  color: var(--denim);
}
.name {
  margin: 0; font-weight: 400; line-height: .9;
  display: flex; flex-direction: column;
  text-wrap: balance;
  animation: rise .9s .15s cubic-bezier(.2,.7,.2,1) both;
}
.name-lead {
  font: 500 clamp(.95rem, 1.6vw, 1.35rem)/1 var(--sans);
  letter-spacing: .42em; text-transform: uppercase; color: var(--muted);
  padding-left: .2em;
}
.name-script {
  font-family: var(--display); font-style: italic; font-weight: 400;
  font-size: clamp(4rem, min(10.5vw, 17vh), 10.5rem);
  letter-spacing: -.02em; margin-left: -.06em;
  color: var(--gold);
  /* the nameplate: a hairline of gold under the name */
  background: linear-gradient(var(--gold-soft), var(--gold-soft)) 0 100% / 3.2em 1px no-repeat;
  padding-bottom: .12em;
}
.bio {
  margin: 0; max-width: 34em;
  font-size: clamp(.95rem, 1.05vw + .35vh, 1.12rem); line-height: 1.62;
  color: var(--ink);
}
/* Gallery: one row of up to 5 small tiles; 6-8 photos fall into a 4-across grid. */
.gallery {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(.5rem, 1vw, .8rem);
  width: min(100%, 36rem);
}
.gallery:has(li:nth-child(6)) { grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(100%, 26rem); }
.tile {
  display: block; position: relative; aspect-ratio: 4 / 5;
  border: 4px solid var(--frame);
  box-shadow: 0 1px 0 rgba(36, 22, 15, .08), 0 8px 18px -12px rgba(36, 22, 15, .4);
  transition: transform .2s ease;
}
.tile img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.tile:hover { transform: translateY(-2px) rotate(-1deg); }
.tile:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Lightbox: CSS only. Hidden until its id is the URL #target. */
.lb {
  position: fixed; inset: 0; z-index: 10;
  display: none; place-items: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px));
}
.lb:target { display: grid; animation: lb-in .25s ease-out both; }
.lb-backdrop { position: absolute; inset: 0; background: rgba(20, 14, 10, .86); cursor: zoom-out; }
.lb-frame {
  position: relative; margin: 0; display: flex; flex-direction: column; align-items: center; gap: .6rem;
  max-width: min(100%, 1100px);
}
.lb-full {
  width: auto; height: auto; max-width: 100%; max-height: calc(100svh - 7.5rem);
  border: 6px solid #f6f1ea; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .6);
}
.lb-frame figcaption { font: italic 400 1rem/1.2 var(--display); color: #f3eae0; }
.lb-close {
  position: absolute; top: max(14px, env(safe-area-inset-top, 0px)); right: 16px;
  display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: .5rem 1rem;
  font: 500 .78rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase;
  color: #f3eae0; text-decoration: none; background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(243, 234, 224, .45); border-radius: 999px;
}
.lb-close span { font-size: 1.3rem; letter-spacing: 0; line-height: 0; }
.lb-close:hover, .lb-close:focus-visible { background: rgba(0, 0, 0, .6); outline: 2px solid #deb05a; outline-offset: 2px; }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.links { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.75rem; }
.links svg {
  width: 1.3rem; height: 1.3rem; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.links svg .dot { fill: currentColor; }
.collab {
  display: inline-flex; align-items: center; gap: .7rem;
  text-decoration: none; color: var(--ink);
  padding: .55rem 1rem .55rem .8rem; border: 1px solid var(--gold-soft); border-radius: 999px;
  transition: background-color .2s, color .2s;
}
.collab > span { display: flex; flex-direction: column; line-height: 1.2; }
.collab .label { font: 500 .68rem/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.collab .addr { font-size: .92rem; user-select: all; overflow-wrap: anywhere; }
.collab:hover { background: var(--frame); }
.links ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.25rem; flex-wrap: wrap; }
.links ul a {
  display: inline-flex; align-items: center; gap: .45rem;
  font: 500 .8rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none; color: var(--denim);
  padding-block: .4rem;
}
.links ul a:hover span { text-decoration: underline; text-underline-offset: .3em; text-decoration-color: var(--gold-soft); }

@keyframes settle { from { transform: scale(1.05); } to { transform: none; } }
@keyframes rise { from { transform: translateY(14px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- short desktop windows: tighten ---------- */
@media (min-width: 761px) and (max-height: 760px) {
  .bio { font-size: .95rem; line-height: 1.5; }
}

/* ---------- phone: photo on top, cover lines below ---------- */
@media (max-width: 760px) {
  .cover { display: block; height: auto; min-height: 0; }
  .hero { height: 44svh; min-height: 300px; }
  .hero img { object-position: 50% 18%; }
  .copy { padding: 1.1rem 16px 1.5rem; gap: .85rem; justify-content: flex-start; }
  .eyebrow { font-size: .68rem; }
  .name { flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: .1em .5em; margin-top: -.2rem; }
  .name-lead { font-size: .72rem; letter-spacing: .3em; padding-left: 0; flex-basis: 100%; }
  .name-script { font-size: clamp(3rem, 15vw, 4.2rem); }
  .bio { font-size: .9rem; line-height: 1.5; }
  .gallery {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: max-content;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
    margin-inline: -16px; padding: 4px 16px 10px; scroll-padding-inline: 16px;
  }
  .gallery, .gallery:has(li:nth-child(6)) { width: auto; }
  .gallery li { scroll-snap-align: start; }
  .tile { height: 112px; }
  .links { gap: .75rem 1.1rem; }
  .collab { width: 100%; }
  .links ul { gap: .4rem 1.1rem; }
}
