/* ============================================================
   Yuri Roberto — editorial portfolio system
   ============================================================ */

:root {
  --bg: #FAFAF8;
  --ink: #111111;
  --ink-2: #55555A;
  --ink-3: #8A8A90;
  --rule: rgba(17,17,17,0.13);
  --rule-soft: rgba(17,17,17,0.07);
  --live: #4BA84B;

  --pad: clamp(20px, 5vw, 96px);
  --maxw: 1760px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  font-feature-settings: "ss01", "cv05";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.shell { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 26px var(--pad) 0;
  max-width: var(--maxw);
  margin: 0 auto;
}
.mark {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.mark .dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 999px;
  background: var(--ink);
  margin-right: 7px;
  vertical-align: 1px;
}
.menu { display: flex; gap: 22px; flex-wrap: wrap; }
.menu a {
  font-size: 14px;
  text-decoration: none;
  color: var(--ink);
  opacity: 0.55;
  transition: opacity 0.18s ease;
}
.menu a:hover { opacity: 1; }
.menu a[aria-current="page"] { opacity: 0.35; }

/* ---------- intro block ---------- */

.intro {
  display: grid;
  grid-template-columns: 92px minmax(0, 34em);
  gap: 26px;
  padding: clamp(56px, 9vw, 118px) 0 clamp(60px, 10vw, 130px);
}
.intro-photo { width: 92px; height: 92px; border-radius: 999px; overflow: hidden; }
.intro-photo img { width: 100%; height: 100%; object-fit: cover; }
.intro-text {
  font-size: clamp(17px, 2.05vw, 22px);
  line-height: 1.42;
  letter-spacing: -0.015em;
  margin: 0 0 22px;
}
.status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-2);
  margin-bottom: 30px;
}
.status i {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--live);
  display: inline-block;
  font-style: normal;
}
.links { display: flex; flex-direction: column; gap: 5px; }
.links a {
  font-size: 14.5px;
  color: var(--ink-2);
  text-decoration: none;
  width: fit-content;
  transition: color 0.18s ease;
}
.links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 640px) {
  .intro { grid-template-columns: 1fr; gap: 22px; }
  .intro-photo { width: 74px; height: 74px; }
}

/* ---------- big display type ---------- */

.display {
  display: grid;
  grid-template-columns: 45% 1fr;
  padding-bottom: clamp(40px, 7vw, 96px);
}
.display > * { grid-column: 2; }
/* pull the offset in as the viewport narrows, so the display type
   keeps room instead of overflowing its column */
@media (max-width: 1440px) { .display { grid-template-columns: 34% 1fr; } }
@media (max-width: 1180px) { .display { grid-template-columns: 22% 1fr; } }
@media (max-width: 860px) {
  .display { grid-template-columns: 1fr; }
  .display > * { grid-column: 1; }
}
.display h1, .display h2 {
  font-family: "Inter Tight", "Inter", sans-serif;
  font-weight: 500;
  font-size: clamp(52px, 11vw, 172px);
  line-height: 0.87;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  margin: 0;
}
.display .sub {
  font-size: clamp(16px, 2vw, 22px);
  color: var(--ink-2);
  letter-spacing: -0.01em;
  margin: 18px 0 0;
}

/* ---------- project page head ---------- */

.page-head { padding: clamp(46px, 7vw, 96px) 0 clamp(30px, 4vw, 54px); }
.page-h1 {
  font-family: "Inter Tight", "Inter", sans-serif;
  font-weight: 500;
  font-size: clamp(44px, 9.5vw, 132px);
  line-height: 0.88;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  margin: 0 0 clamp(26px, 4vw, 46px);
}
.page-lede {
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.45;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 0 0 30px;
  max-width: 34em;
}

/* ---------- section label ---------- */

.label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--ink-3);
  margin: 0 0 18px;
}

/* ---------- project rows ---------- */

.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }

.entry { padding: clamp(34px, 5vw, 62px) 0 clamp(30px, 4vw, 52px); }
.entry-head {
  display: grid;
  grid-template-columns: 45% 1fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 860px) {
  .entry-head { grid-template-columns: 1fr; gap: 18px; }
}
.entry-name {
  font-family: "Inter Tight", "Inter", sans-serif;
  font-weight: 500;
  font-size: clamp(28px, 3.6vw, 46px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0;
}
.entry-name a { text-decoration: none; }
.entry-name a:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.entry-body { max-width: 40em; }
.entry-body p {
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 24px;
}
.facts { display: flex; flex-wrap: wrap; gap: 30px 44px; }
.fact dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  margin: 0 0 5px;
}
.fact dd { margin: 0; font-size: 14.5px; color: var(--ink); max-width: 22em; }

.entry-media { margin-top: clamp(26px, 4vw, 46px); }
.entry-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  background: #101012;
}
@media (max-width: 640px) {
  .entry-media img { aspect-ratio: 4 / 3; }
}

/* ---------- generic media ---------- */

.media-full { margin: clamp(30px, 5vw, 64px) 0; }
.media-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(12px, 1.6vw, 20px);
  align-items: start;
  margin: clamp(30px, 5vw, 64px) 0;
}
.media-full img, .media-pair img { width: 100%; height: auto; }
figure { margin: 0; }
figcaption {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 10px;
  line-height: 1.45;
}

/* ---------- reading column ---------- */

.read { display: grid; grid-template-columns: 45% 1fr; gap: 28px; }
.read > .read-label { grid-column: 1; }
.read > .read-body { grid-column: 2; max-width: 40em; }
@media (max-width: 860px) {
  .read { grid-template-columns: 1fr; gap: 14px; }
  .read > .read-label, .read > .read-body { grid-column: 1; }
}
.read-body h2 {
  font-family: "Inter Tight", "Inter", sans-serif;
  font-weight: 500;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
}
.read-body h3 {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 30px 0 8px;
}
.read-body p {
  font-size: 15.5px;
  line-height: 1.62;
  color: var(--ink-2);
  margin: 0 0 16px;
}
.read-body p strong, .read-body li strong { color: var(--ink); font-weight: 600; }
.read-body ul { padding-left: 18px; margin: 0 0 16px; }
.read-body li { font-size: 15.5px; line-height: 1.62; color: var(--ink-2); margin-bottom: 10px; }
.read-body code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.87em;
  background: rgba(17,17,17,0.05);
  border-radius: 4px;
  padding: 1px 5px;
}

.block { padding: clamp(44px, 6vw, 84px) 0; }

/* ---------- scope list ---------- */

.scope { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0; }
.scope div {
  padding: 13px 0;
  border-top: 1px solid var(--rule-soft);
  font-size: 14px;
}
.scope div span { color: var(--ink-3); font-size: 12.5px; display: block; margin-top: 3px; }

/* ---------- numbered notes ---------- */

.notes { counter-reset: n; }
.notes > div {
  counter-increment: n;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  padding: 20px 0;
  border-top: 1px solid var(--rule-soft);
}
.notes > div::before {
  content: counter(n, decimal-leading-zero);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  padding-top: 3px;
}
.notes h3, .notes p { grid-column: 2; }
.notes h3 { margin: 0 0 6px; font-size: 15.5px; font-weight: 600; }
.notes p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-2); }

/* ---------- footer ---------- */

.foot {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 30px 0 46px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  color: var(--ink-3);
}
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); }

.back {
  display: inline-block;
  font-size: 14px;
  color: var(--ink-2);
  text-decoration: none;
  margin-top: 8px;
}
.back:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- motion ---------- */

@media (prefers-reduced-motion: no-preference) {

  /* text and blocks rise in — scoped to .js so the page stays
     readable if the script never runs */
  .js [data-reveal] > * {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .js [data-reveal].is-in > * { opacity: 1; transform: none; }

  /* stagger direct children */
  .js [data-reveal] > *:nth-child(2) { transition-delay: 0.07s; }
  .js [data-reveal] > *:nth-child(3) { transition-delay: 0.14s; }
  .js [data-reveal] > *:nth-child(4) { transition-delay: 0.21s; }

  /* display type rises further, slower */
  .js .display[data-reveal] > * {
    transform: translateY(38px);
    transition-duration: 1.05s;
  }

  /* images uncover from the bottom and settle from a slight zoom */
  .entry-media, .media-full, .shot {
    overflow: hidden;
  }
  .js .entry-media img, .js .media-full img, .js .shot img {
    clip-path: inset(100% 0 0 0);
    transform: scale(1.07);
    transition: clip-path 1.15s cubic-bezier(0.22, 1, 0.36, 1),
                transform 1.5s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .js [data-reveal].is-in .entry-media img,
  .js [data-reveal].is-in .media-full img,
  .js [data-reveal].is-in .shot img,
  .js .entry-media[data-reveal].is-in img,
  .js .media-full[data-reveal].is-in img,
  .js .shot[data-reveal].is-in img {
    clip-path: inset(0 0 0 0);
    transform: none;
  }

  /* project name underline grows on hover */
  .entry-name a {
    background-image: linear-gradient(var(--ink), var(--ink));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0% 1px;
    transition: background-size 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    padding-bottom: 2px;
  }
  .entry-name a:hover { background-size: 100% 1px; text-decoration: none; }

  /* the image lifts a touch when its row is hovered */
  .entry-media img { will-change: transform; }
  .entry:hover .entry-media img { transform: scale(1.014); transition-duration: 0.9s; }
}
