/* home.css: homepage layout on top of site.css. */

/* ---------- first screen: the deck's title-slide composition ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: var(--s-6); align-items: center; padding-block: var(--s-6) var(--s-6); }
.hero-text { display: grid; gap: var(--s-4); align-content: center; }
.hero h1 { font-size: clamp(3rem, 6vw, 5.2rem); }
.hero .lede { max-width: 34ch; font-size: clamp(1.3rem, 2.1vw, 1.65rem); line-height: 1.4; color: var(--ink); }
.hero .avail { color: var(--ink-2); max-width: 46ch; margin: 0; padding-top: var(--s-3); border-top: 1px solid var(--hair); }
.hero .links { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin: 0; font-size: 1.1rem; }
.hero-fig .frame { padding: clamp(10px, 1.6vw, 18px); }
.hero-fig img { width: 100%; max-height: min(640px, calc(100vh - 300px)); min-height: 320px; object-fit: contain; }
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: var(--s-5); padding-block: var(--s-5); }
  .hero-fig { max-width: 520px; }
}

/* ---------- section heads ---------- */
.sec { padding-block: var(--s-6) 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; padding-bottom: var(--s-2); border-bottom: 1px solid var(--ink); }
.sec-head p { margin: 0; color: var(--muted); }

/* ---------- selected work: three feature rows ---------- */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--s-6); align-items: start; padding-block: var(--s-6); border-bottom: 1px solid var(--hair); }
.feature:nth-of-type(even) .feature-fig { order: 2; }
.feature-fig { display: block; border: 1px solid var(--hair); padding: clamp(8px, 1.4vw, 16px); background: var(--paper); }
.feature-fig img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
.feature-fig:hover { border-color: var(--faint); }
.feature-text { display: grid; gap: var(--s-3); align-content: start; }
.feature-text .label { margin: -0.4rem 0 0; }
.feature-text h3 { order: -1; }
.feature-text h3 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
.feature-text h3 a { text-decoration: none; }
.feature-text h3 a:hover { text-decoration: underline; text-decoration-color: var(--red); }
.feature-text > p { color: var(--ink-2); margin: 0; max-width: 52ch; }
.facts { margin: 0; display: grid; }
.facts div { display: grid; grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr); gap: var(--s-3); padding-block: 0.65rem; border-top: 1px solid var(--hair); }
.facts div:last-child { border-bottom: 1px solid var(--hair); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; color: var(--ink); }
.facts .lim { color: var(--red-ink); }
/* the third feature breaks the image/text alternation: text across the top, figure full width below */
.feature.wide { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
.feature.wide .feature-fig { order: 2; }
.feature.wide .feature-fig img { aspect-ratio: auto; max-height: 420px; margin-inline: auto; }
.feature.wide .feature-text { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--s-6); }
.feature.wide .feature-text > * { grid-column: 1; }
.feature.wide .feature-text .facts { grid-column: 2; grid-row: 1 / span 4; align-self: start; }
@media (max-width: 900px) {
  .feature.wide .feature-text { grid-template-columns: minmax(0, 1fr); }
  .feature.wide .feature-text .facts { grid-column: 1; grid-row: auto; }
  .feature { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); padding-block: var(--s-5); }
  .feature:nth-of-type(even) .feature-fig { order: 0; }
}
@media (max-width: 480px) { .facts div { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; } }

/* ---------- more projects: a ruled list, not a card grid ---------- */
.more { list-style: none; margin: 0; padding: 0; }
.more li { border-bottom: 1px solid var(--hair); }
.more a { display: grid; grid-template-columns: 96px minmax(0, 1fr) minmax(0, 14rem); gap: var(--s-4); align-items: center; padding-block: var(--s-3); text-decoration: none; }
.more img { width: 96px; height: 72px; object-fit: cover; border: 1px solid var(--hair); }
.more .t { font-size: 1.3rem; color: var(--ink); display: block; }
.more .d { color: var(--ink-2); display: block; margin-top: 0.15rem; }
.more .c { color: var(--muted); text-align: right; font-size: 1rem; }
.more a:hover .t { color: var(--red-ink); }
@media (max-width: 760px) {
  .more a { grid-template-columns: 72px minmax(0, 1fr); gap: var(--s-3); }
  .more img { width: 72px; height: 56px; }
  .more .c { grid-column: 2; text-align: left; }
}

/* ---------- writing ---------- */
.essay-row { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--s-6); align-items: center; padding-block: var(--s-5); border-bottom: 1px solid var(--hair); }
.essay-row img { width: 100%; border: 1px solid var(--hair); }
.essay-row h3 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin: 0.4rem 0 0.8rem; }
.essay-row h3 a { text-decoration: none; }
.essay-row p { color: var(--ink-2); max-width: 54ch; }
.queue-home { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr); gap: var(--s-4); padding-block: var(--s-4); color: var(--ink-2); }
.queue-home ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.queue-home .k { color: var(--muted); }
@media (max-width: 760px) { .essay-row, .queue-home { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); } }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--s-6); padding-top: var(--s-5); align-items: start; }
.about-grid .prose p { color: var(--ink-2); max-width: 60ch; }
@media (max-width: 900px) { .about-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); } }

/* short laptop screens: keep the hero, including its links, inside the first viewport */
@media (min-width: 901px) and (max-height: 820px) {
  .hero { padding-block: var(--s-5) var(--s-5); }
  .hero-text { gap: var(--s-3); }
  .hero h1 { font-size: clamp(3rem, 5vw, 4.4rem); }
  .hero .lede { font-size: 1.3rem; }
  .hero-fig img { max-height: calc(100vh - 290px); min-height: 0; }
}
.feature.wide .feature-fig img { mix-blend-mode: multiply; }
