/* diogo.site + blog.diogo.site — visual personal platform. */
:root {
  --paper: #f7f3ec;
  --paper-2: #eef7f6;
  --sheet: #fffaf2;
  --sheet-2: #ffffff;
  --ink: #102033;
  --ink-soft: #26384d;
  --muted: #637083;
  --line: rgba(25, 42, 64, .13);
  --line-strong: rgba(25, 42, 64, .22);
  --blue: #2457d6;
  --blue-2: #143a92;
  --teal: #0f8a83;
  --teal-soft: #dff5f2;
  --amber: #c47917;
  --rose: #c76554;
  --shadow: 0 32px 90px -58px rgba(16, 32, 51, .70);
  --sans: Aptos, Inter, "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.66;
  background:
    radial-gradient(circle at 8% -8%, rgba(36,87,214,.16), transparent 30rem),
    radial-gradient(circle at 98% 5%, rgba(15,138,131,.18), transparent 34rem),
    radial-gradient(circle at 70% 38rem, rgba(196,121,23,.11), transparent 28rem),
    linear-gradient(180deg, #fbf7ef 0, #f7f3ec 32rem, #f8faf8 100%);
}
a { color: var(--blue-2); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--teal); }
:focus-visible { outline: 3px solid rgba(36,87,214,.28); outline-offset: 3px; border-radius: 8px; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -200vw; top: 0; background: var(--ink); color: #fff; padding: .55rem .9rem; z-index: 40; }
.skip:focus-visible { left: .75rem; top: .75rem; }

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .82rem clamp(1rem, 4vw, 2.2rem);
  border-bottom: 1px solid rgba(16,32,51,.10);
  background: rgba(255,250,242,.78);
  backdrop-filter: blur(16px) saturate(1.08);
}
.brand {
  color: var(--ink);
  text-decoration: none;
  font-size: clamp(1.02rem, 1vw + .65rem, 1.28rem);
  font-weight: 760;
  letter-spacing: -.025em;
  white-space: nowrap;
}
.brand:hover { color: var(--blue-2); }
.site-head nav { display: flex; align-items: center; justify-content: flex-end; gap: .22rem; min-width: 0; }
.site-head nav a {
  padding: .38rem .64rem;
  border-radius: 999px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 720;
  white-space: nowrap;
}
.site-head nav a:hover { background: rgba(36,87,214,.08); color: var(--blue-2); }
.site-head nav a.is-active { background: var(--teal-soft); color: #0c3f42; }
.site-main { width: min(100%, 76rem); margin: 0 auto; padding: clamp(1.2rem, 3vw, 3.2rem) clamp(.95rem, 3vw, 2rem) 4rem; }
.site-foot { width: min(100%, 76rem); margin: 0 auto; padding: 1.1rem clamp(.95rem, 3vw, 2rem) 2.4rem; color: var(--muted); font-size: .8rem; border-top: 1px solid var(--line); }

/* General prose */
.page:not(.page-home), .post, .blog-head, .blog-year { max-width: 62rem; margin-left: auto; margin-right: auto; }
.md h1, .page h1, .post-head h1 {
  margin: 0 0 .9rem;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.04;
  letter-spacing: -.045em;
}
.md h2 { margin: 2rem 0 .6rem; font-size: clamp(1.45rem, 2vw, 1.9rem); line-height: 1.15; letter-spacing: -.03em; }
.md h3 { margin: 1.35rem 0 .45rem; font-size: 1.05rem; line-height: 1.25; }
.md p { margin: .72rem 0; }
.md ul, .md ol { padding-left: 1.35rem; }
.md li { margin: .24rem 0; }
.md li::marker { color: var(--teal); }
.md blockquote { margin: 1rem 0; padding: .25rem 0 .25rem 1rem; border-left: 4px solid var(--amber); color: var(--muted); }
.md code { font-family: var(--mono); font-size: .86em; background: rgba(36,87,214,.07); border: 1px solid var(--line); border-radius: 5px; padding: .04em .32em; }
.md pre { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1rem; overflow-x: auto; font-size: .86rem; line-height: 1.5; }
.md pre code { background: none; border: 0; padding: 0; }
.md img, .md video { max-width: 100%; height: auto; border-radius: 16px; }
.md hr { border: 0; border-top: 1px solid var(--line-strong); margin: 1.8rem 0; }
.md table { border-collapse: collapse; width: 100%; font-size: .92rem; }
.md th, .md td { border: 1px solid var(--line); padding: .4rem .6rem; text-align: left; }
.md th { background: rgba(15,138,131,.07); }

/* Homepage */
.page-home { max-width: none; }
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(18rem, .88fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: stretch;
  margin: .2rem 0 clamp(1.3rem, 3vw, 2rem);
}
.hero-copy {
  position: relative;
  overflow: hidden;
  min-height: 31rem;
  padding: clamp(1.35rem, 4vw, 3rem);
  border-radius: 34px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255,250,242,.96), rgba(238,247,246,.86)),
    radial-gradient(circle at 90% 0%, rgba(36,87,214,.16), transparent 23rem);
  box-shadow: var(--shadow);
}
.hero-copy::after {
  content: "";
  position: absolute;
  right: -7rem;
  bottom: -8rem;
  width: 24rem;
  height: 24rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(36,87,214,.13), rgba(15,138,131,.08) 38%, transparent 70%);
  pointer-events: none;
}
.eyebrow {
  margin: 0 0 .8rem !important;
  color: #0f766e;
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .17em;
  text-transform: uppercase;
}
.home-hero h1 {
  position: relative;
  z-index: 1;
  max-width: 11.5ch;
  margin: 0;
  font-size: clamp(3rem, 7.2vw, 6.4rem);
  line-height: .93;
  letter-spacing: -.07em;
  font-weight: 820;
}
.lede {
  position: relative;
  z-index: 1;
  max-width: 43rem;
  margin: 1.2rem 0 0 !important;
  color: var(--ink-soft);
  font-size: clamp(1.03rem, 1vw + .82rem, 1.34rem);
  line-height: 1.6;
}
.signal-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: 1.3rem;
}
.signal-row span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: .18rem .64rem;
  border-radius: 999px;
  border: 1px solid rgba(36,87,214,.12);
  background: rgba(255,255,255,.62);
  color: #314155;
  font-size: .84rem;
  font-weight: 720;
}
.hero-visual { display: grid; grid-template-rows: 1fr auto; gap: 1rem; min-width: 0; }
.portrait-card, .hero-badge {
  border: 1px solid var(--line);
  border-radius: 34px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 25px 80px -62px rgba(16,32,51,.8);
  overflow: hidden;
}
.portrait-card { position: relative; min-height: 25rem; }
.portrait-card img { width: 100%; height: 100%; min-height: 25rem; object-fit: cover; display: block; filter: saturate(1.02) contrast(1.02); }
.portrait-card figcaption {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  padding: .76rem .9rem;
  border-radius: 20px;
  background: rgba(255,250,242,.82);
  backdrop-filter: blur(14px);
  color: var(--ink-soft);
  font-size: .88rem;
  line-height: 1.35;
}
.hero-badge { padding: 1rem 1.05rem; }
.hero-badge strong { display: block; font-size: .92rem; letter-spacing: -.01em; }
.hero-badge span { display: block; margin-top: .25rem; color: var(--muted); font-size: .9rem; line-height: 1.45; }

.home-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .8rem;
  margin: 0 0 clamp(2rem, 4vw, 3rem);
}
.home-strip article, .work-card, .visual-card, .note-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,255,255,.76);
  box-shadow: 0 18px 54px -48px rgba(16,32,51,.72);
}
.home-strip article { padding: 1rem; min-width: 0; }
.home-strip img { width: 2.4rem; height: 2.4rem; object-fit: contain; display: block; margin-bottom: .7rem; }
.home-strip h2 { margin: 0 0 .25rem; font-size: .98rem; line-height: 1.2; letter-spacing: -.02em; }
.home-strip p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.52; }
.section-kicker {
  display: inline-flex;
  margin: 0 0 .8rem;
  color: #0f766e;
  font-family: var(--mono);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.showcase-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, .75fr);
  gap: 1rem;
  align-items: start;
}
.work-stack { display: grid; gap: .9rem; }
.work-card {
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1.15rem;
}
.work-card.featured { padding: 1.3rem; }
.work-logo {
  width: 4.2rem;
  height: 4.2rem;
  object-fit: contain;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  padding: .45rem;
}
.work-card h3 { margin: 0 0 .36rem; font-size: clamp(1.14rem, 1vw + .9rem, 1.45rem); line-height: 1.2; letter-spacing: -.03em; }
.work-card p { margin: 0; color: #314155; line-height: 1.6; }
.inline-link { display: inline-flex; margin-top: .65rem; font-weight: 760; text-decoration: none; border-bottom: 1px solid rgba(20,58,146,.28); }
.inline-link:hover { border-color: var(--teal); }
.visual-stack { display: grid; gap: 1rem; }
.visual-card { overflow: hidden; }
.visual-card img { width: 100%; display: block; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 0; }
.visual-card figcaption { margin: 0; padding: .85rem .95rem; color: var(--muted); font-size: .88rem; line-height: 1.45; }
.note-card { padding: 1rem 1.05rem; background: linear-gradient(135deg, rgba(255,255,255,.82), rgba(223,245,242,.7)); }
.note-card h2 { margin: 0 0 .35rem; font-size: 1.05rem; letter-spacing: -.02em; }
.note-card p { margin: 0; color: var(--ink-soft); font-size: .92rem; line-height: 1.52; }

/* Backward-compatible classes from earlier home drafts. */
.hero { padding: 1.5rem; border: 1px solid var(--line); border-radius: 26px; background: rgba(255,255,255,.72); box-shadow: var(--shadow); }
.focus-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .8rem; margin: 1rem 0 2rem; }
.focus-grid article { padding: 1rem; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.76); }
.focus-grid span { color: var(--teal); font-family: var(--mono); font-size: .72rem; font-weight: 900; }
.focus-grid h2 { margin: .35rem 0 .25rem; font-size: .98rem; }
.focus-grid p { margin: 0; color: var(--muted); font-size: .9rem; }
.contacts { display: grid; grid-template-columns: 7rem 1fr; gap: .35rem .85rem; }
.contacts dt { font-weight: 850; color: var(--blue-2); }
.contacts dd { margin: 0; }

/* Blog */
.blog-head {
  margin-top: .3rem;
  margin-bottom: 1.4rem;
  padding: clamp(1.15rem, 3vw, 1.7rem);
  border-radius: 28px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.78);
  box-shadow: 0 20px 65px -55px rgba(16,32,51,.7);
}
.blog-head h1 { font-size: clamp(2rem, 4vw, 3.25rem); margin: 0 0 .25rem; letter-spacing: -.045em; line-height: 1.02; }
.blog-head p { margin: 0; color: var(--muted); }
.feed { font-size: .86rem; }
.blog-year h2 { margin: 1.7rem 0 .65rem; color: #0f766e; font-family: var(--mono); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }
.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.post-list li { display: grid; grid-template-columns: 6.4rem 1fr; gap: .85rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.72); }
.post-list time { color: var(--muted); font-family: var(--mono); font-size: .75rem; padding-top: .16rem; }
.post-list a { font-weight: 800; text-decoration: none; border-bottom: 1px solid rgba(20,58,146,.24); }
.post-list a:hover { border-color: var(--teal); }
.abstract { margin: .18rem 0 0; color: var(--muted); font-size: .9rem; }
.lang-tag { margin-left: .35rem; padding: .02rem .35rem; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); font-family: var(--mono); font-size: .66rem; vertical-align: 1px; }
.post-head { margin: .3rem 0 1.4rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line-strong); }
.post-head p { margin: .3rem 0 0; color: var(--muted); font-size: .88rem; }

@media (min-width: 92rem) {
  .site-main, .site-foot { width: min(100%, 84rem); }
  .home-hero h1 { font-size: clamp(4.5rem, 5.2vw, 6.7rem); }
}
@media (max-width: 62rem) {
  .home-hero, .showcase-grid { grid-template-columns: 1fr; }
  .hero-copy { min-height: auto; }
  .home-hero h1 { max-width: 13ch; }
  .hero-visual { grid-template-columns: minmax(0, 1fr); }
  .portrait-card { min-height: 21rem; }
  .portrait-card img { min-height: 21rem; }
  .home-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 42rem) {
  body { font-size: 16px; }
  .site-head { position: static; display: block; padding: .78rem .85rem .58rem; }
  .brand { display: inline-block; margin-bottom: .45rem; }
  .site-head nav { justify-content: flex-start; gap: .18rem; overflow-x: auto; padding-bottom: .18rem; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .site-head nav::-webkit-scrollbar { display: none; }
  .site-head nav a { padding: .3rem .48rem; font-size: .82rem; }
  .site-main { padding: 1rem .78rem 3rem; }
  .site-foot { padding-left: .78rem; padding-right: .78rem; }
  .home-hero { gap: .78rem; }
  .hero-copy { border-radius: 26px; padding: 1.25rem; }
  .home-hero h1 { max-width: 11.6ch; font-size: clamp(2.75rem, 17vw, 4rem); letter-spacing: -.065em; }
  .lede { font-size: 1rem; line-height: 1.55; }
  .signal-row span { font-size: .78rem; }
  .portrait-card, .hero-badge, .home-strip article, .work-card, .visual-card, .note-card { border-radius: 20px; }
  .portrait-card, .portrait-card img { min-height: 18rem; }
  .home-strip { grid-template-columns: 1fr; }
  .work-card { grid-template-columns: 3.4rem minmax(0, 1fr); padding: .95rem; }
  .work-logo { width: 3.4rem; height: 3.4rem; border-radius: 14px; }
  .post-list li { grid-template-columns: 1fr; gap: .06rem; }
  .contacts { grid-template-columns: 1fr; }
}
@media (max-width: 24rem) {
  .home-hero h1 { font-size: 2.35rem; }
  .work-card { grid-template-columns: 1fr; }
  .work-logo { width: 3rem; height: 3rem; }
}

/* ==================================================================
   Extensions: self-hosted type, galleries, logbook strip, CTA band.
   Same cream/blue language as above.
   ================================================================== */

/* PT Sans, self-hosted (OFL) — the site's long-standing voice. */
@font-face {
  font-family: "PT Sans";
  src: url("/assets/fonts/PT-Sans/PT-Sans_Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "PT Sans";
  src: url("/assets/fonts/PT-Sans/PT-Sans_Italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "PT Sans";
  src: url("/assets/fonts/PT-Sans/PT-Sans_Bold.woff2") format("woff2");
  font-weight: 600 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "PT Sans";
  src: url("/assets/fonts/PT-Sans/PT-Sans_Bold-Italic.woff2") format("woff2");
  font-weight: 600 800; font-style: italic; font-display: swap;
}
body, button, input, select, textarea {
  font-family: "PT Sans", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ------------------------------------------------ post media basics */
.md video { display: block; margin: 1rem auto; background: #000; }
.md p > img:only-child { display: block; margin: 1rem auto; }

/* ------------------------------------------------------- galleries
   Markup from Markdown::galleries(). Without JS: a swipeable strip.
   With JS (.is-enhanced): one slide at a time + controls.            */
.gallery {
  margin: 1.3rem 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 18px 60px -50px rgba(16, 32, 51, .65);
  padding: .65rem;
}
.gallery:not(.is-enhanced) {
  display: flex; gap: .65rem; overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.gallery:not(.is-enhanced) .gallery-slide {
  flex: 0 0 min(86%, 34rem);
  scroll-snap-align: center;
}
.gallery-slide { margin: 0; }
.gallery-slide img {
  width: 100%; max-height: 58vh; object-fit: contain;
  border-radius: 14px; background: #0e1620;
}
.gallery-slide figcaption {
  margin: .4rem .2rem 0;
  color: var(--muted); font-size: .85rem; line-height: 1.4;
  text-align: center;
}
.gallery.is-enhanced { outline-offset: 4px; }
.gallery.is-enhanced .gallery-slide { display: none; }
.gallery.is-enhanced .gallery-slide.is-active { display: block; }
.gallery-nav {
  display: flex; align-items: center; justify-content: center;
  gap: .6rem; margin-top: .55rem; flex-wrap: wrap;
}
.gallery-btn {
  width: 2.1rem; height: 2.1rem;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: #fff; color: var(--ink-soft);
  font-size: 1.15rem; line-height: 1; cursor: pointer;
}
.gallery-btn:hover { background: rgba(36, 87, 214, .08); color: var(--blue-2); }
.gallery-dots { display: inline-flex; gap: .32rem; }
.gallery-dot {
  width: .56rem; height: .56rem; padding: 0;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: #fff; cursor: pointer;
}
.gallery-dot.is-active { background: var(--teal); border-color: var(--teal); }
.gallery-count {
  font-family: var(--mono); font-size: .72rem; color: var(--muted);
  min-width: 3.2rem; text-align: center;
}
.gallery.is-single { padding: 0; border: 0; background: none; box-shadow: none; }
.gallery.is-single .gallery-slide img { max-height: none; background: none; }

/* -------------------------------------------- home: logbook strip */
.home-logbook { margin: 2.4rem 0 0; }
.home-logbook-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; margin-bottom: .8rem;
}
.logbook-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: .9rem;
}
.logbook-card {
  padding: 1rem 1.05rem;
  border: 1px solid var(--line); border-radius: 20px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 16px 55px -48px rgba(16, 32, 51, .6);
  transition: transform .14s ease, box-shadow .14s ease;
}
.logbook-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 60px -44px rgba(16, 32, 51, .7);
}
.logbook-card time {
  font-family: var(--mono); font-size: .72rem; color: var(--muted);
}
.logbook-card h3 { margin: .3rem 0 .3rem; font-size: 1.02rem; line-height: 1.3; letter-spacing: -.02em; }
.logbook-card h3 a { text-decoration: none; color: var(--ink); }
.logbook-card h3 a:hover { color: var(--blue-2); }
.logbook-card p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }

/* ------------------------------------------------- home: CTA band */
.home-cta {
  margin: 2.6rem 0 .4rem;
  padding: clamp(1.2rem, 3vw, 1.7rem);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.2rem; flex-wrap: wrap;
  border-radius: 26px;
  border: 1px solid rgba(20, 58, 146, .22);
  background:
    radial-gradient(circle at 8% 0%, rgba(36, 87, 214, .12), transparent 22rem),
    linear-gradient(135deg, rgba(255, 255, 255, .9), rgba(223, 245, 242, .75));
  box-shadow: var(--shadow, 0 24px 80px -55px rgba(16, 32, 51, .55));
}
.home-cta h2 { margin: 0 0 .3rem; font-size: clamp(1.25rem, 2vw, 1.6rem); letter-spacing: -.03em; }
.home-cta p { margin: 0; color: var(--ink-soft); max-width: 38rem; }
.home-cta-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.btn-primary, .btn-ghost {
  display: inline-block; padding: .62rem 1.05rem;
  border-radius: 999px; text-decoration: none;
  font-weight: 760; font-size: .95rem; white-space: nowrap;
}
.btn-primary {
  background: var(--blue, #2457d6); color: #fff;
  box-shadow: 0 10px 26px -14px rgba(36, 87, 214, .7);
}
.btn-primary:hover { background: var(--blue-2, #143a92); color: #fff; }
.btn-ghost {
  border: 1px solid var(--line-strong); color: var(--ink-soft); background: #fff;
}
.btn-ghost:hover { border-color: var(--blue, #2457d6); color: var(--blue-2, #143a92); }

@media (max-width: 42rem) {
  .home-cta { flex-direction: column; align-items: stretch; text-align: left; }
  .gallery:not(.is-enhanced) .gallery-slide { flex-basis: 92%; }
}

@media print {
  .site-head, .site-foot, .home-cta, .gallery-nav { display: none; }
  .gallery.is-enhanced .gallery-slide { display: block; }
  body { background: #fff; }
}

/* Graceful fallbacks for engines without clamp() — modern browsers keep
   the fluid values declared earlier; older ones get these constants. */
@supports not (padding: clamp(1px, 1vw, 2px)) {
  .site-main { padding: 1.8rem 1.25rem 4rem; }
  .site-foot { padding: 1.1rem 1.25rem 2.4rem; }
  .hero-copy { padding: 1.5rem; }
  .home-cta  { padding: 1.4rem; }
}

/* Keep the portrait sane when the hero stacks into one column. */
@media (max-width: 62rem) {
  .portrait-card img { max-height: 30rem; }
}
@media (max-width: 42rem) {
  .portrait-card img { max-height: 24rem; }
}


/* Final homepage polish: remove talk aside and fix portrait card rendering. */
.showcase-grid {
  grid-template-columns: minmax(0, 1fr);
}
.visual-stack {
  display: none !important;
}
.work-stack {
  width: 100%;
  max-width: 64rem;
  margin-inline: auto;
}
@media (min-width: 68rem) {
  .work-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .work-card.featured {
    grid-column: 1 / -1;
  }
}
.portrait-card {
  min-height: 0;
  display: block;
}
.portrait-card img {
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 18%;
}
@media (max-width: 62rem) {
  .portrait-card,
  .portrait-card img {
    min-height: 0;
  }
  .portrait-card img {
    max-height: none;
    aspect-ratio: 4 / 5;
  }
}
@media (max-width: 42rem) {
  .portrait-card,
  .portrait-card img {
    min-height: 0;
  }
}
