/* Homepage redesign — layered on top of style.css */
:root {
  --serif: "Instrument Serif", Georgia, serif;
  --ink-2: #2b2a24;
  --night-2: #231d33;
  --rung: #e9e1cf;
}

.home nav { background: rgba(247, 243, 233, .82); }
.home .nav-link[aria-current="page"] { color: var(--ink); }

/* ---------- Hero ---------- */
.h-hero { position: relative; padding: 96px 0 0; overflow: hidden; }
.h-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px; opacity: .35;
  mask-image: radial-gradient(ellipse 70% 60% at 30% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 30% 30%, #000 20%, transparent 75%);
}
.h-hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(240px, .62fr); gap: 72px; align-items: center; }
.h-kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.h-kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--copper); box-shadow: 0 0 0 4px rgba(167, 94, 53, .15); }
.h-title {
  max-width: none; margin: 26px 0 30px;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(58px, 9.4vw, 132px); line-height: .9; letter-spacing: -.035em;
}
.h-title em { color: var(--green); font-style: italic; }
.h-lede { max-width: 640px; margin: 0; color: var(--ink-2); font-size: clamp(18px, 1.8vw, 21px); line-height: 1.55; }
.h-lede b { font-weight: 600; }
.h-photo { margin: 0; position: relative; width: 100%; max-width: 340px; justify-self: end; }
.h-photo img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 3px; filter: saturate(.92); }
.h-photo figcaption { margin-top: 12px; color: var(--muted); font: 500 11px/1.5 var(--mono); letter-spacing: .04em; }
.h-photo::after { content: ""; position: absolute; top: 14px; left: -14px; right: 14px; bottom: 44px; border: 1px solid var(--copper); border-radius: 3px; z-index: -1; }

.h-proof { position: relative; margin-top: 80px; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); }
.h-proof div { padding: 22px 22px 28px 0; }
.h-proof div + div { padding-left: 22px; border-left: 1px solid var(--line); }
.h-proof b { display: block; font: 400 clamp(30px, 3.4vw, 44px)/1 var(--serif); letter-spacing: -.02em; }
.h-proof span { display: block; margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.45; }

/* ---------- Thesis / ladder ---------- */
.h-thesis { padding: 112px 0 120px; background: var(--night-2); color: #efeadc; }
.h-thesis-head { display: grid; grid-template-columns: .9fr 1.1fr; gap: 72px; align-items: end; margin-bottom: 64px; }
.h-label { color: #f2a57e; font: 500 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.h-thesis h2 { margin: 18px 0 0; font: 400 clamp(42px, 5.6vw, 76px)/.98 var(--serif); letter-spacing: -.03em; }
.h-thesis h2 em { color: #bcd98f; }
.h-thesis-head p { margin: 0; color: #b9b4a6; font-size: 18px; }
.h-thesis-head p strong { color: #efeadc; font-weight: 500; }

.ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: rung 7; }
.rung {
  --w: 100%;
  counter-increment: rung -1;
  display: grid; grid-template-columns: 56px minmax(150px, .5fr) minmax(0, 1.3fr) auto; gap: 24px; align-items: center;
  width: var(--w); margin-left: auto;
  padding: 18px 22px; border: 1px solid rgba(239, 234, 220, .12); border-radius: 3px;
  background: rgba(239, 234, 220, .03);
  transition: background .25s, border-color .25s, transform .25s;
}
.rung:hover { background: rgba(188, 217, 143, .08); border-color: rgba(188, 217, 143, .45); transform: translateX(-4px); }
.rung::before { content: "0" counter(rung); color: #7a766b; font: 500 12px/1 var(--mono); }
.rung h3 { margin: 0; font: 500 19px/1.2 var(--display); letter-spacing: -.01em; }
.rung p { margin: 0; color: #a7a295; font-size: 15px; line-height: 1.45; }
.rung .tag { font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 6px 9px; border-radius: 2px; white-space: nowrap; }
.rung.weak .tag { color: #e6a07a; background: rgba(230, 160, 122, .1); }
.rung.mid .tag { color: #d8c78a; background: rgba(216, 199, 138, .1); }
.rung.strong .tag { color: #bcd98f; background: rgba(188, 217, 143, .12); }
.rung.strong { border-color: rgba(188, 217, 143, .35); }
.rung:nth-child(1) { --w: 100%; }
.rung:nth-child(2) { --w: 95%; }
.rung:nth-child(3) { --w: 90%; }
.rung:nth-child(4) { --w: 85%; }
.rung:nth-child(5) { --w: 80%; }
.rung:nth-child(6) { --w: 75%; }
.ladder-axis { display: flex; justify-content: space-between; margin-top: 18px; color: #7a766b; font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.h-quote { margin: 72px 0 0; padding-left: 28px; border-left: 2px solid #f2a57e; max-width: 860px; font: 400 clamp(26px, 3vw, 38px)/1.2 var(--serif); }
.h-quote em { color: #bcd98f; }

/* ---------- Building ---------- */
.h-section { padding: 112px 0; border-bottom: 1px solid var(--line); }
.h-section-head { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 52px; }
.h-section-head h2 { margin: 14px 0 0; font: 400 clamp(40px, 5vw, 68px)/1 var(--serif); letter-spacing: -.03em; }
.h-section .h-label { color: var(--copper); }
.h-section-head p { max-width: 420px; margin: 0; color: var(--muted); }

.build-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; }
.build {
  position: relative; display: flex; flex-direction: column; min-height: 300px;
  padding: 32px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper-2);
  transition: border-color .2s, transform .2s;
}
a.build:hover { border-color: var(--green); transform: translateY(-3px); }
.build.lead { grid-row: span 2; background: var(--ink); color: #efeadc; border-color: var(--ink); }
.build-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font: 500 11px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.build.lead .build-meta { color: #9f9a8c; }
.status { display: inline-flex; align-items: center; gap: 7px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.status.soon::before { background: #e6a07a; animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.build h3 { margin: 40px 0 12px; font: 400 clamp(30px, 3vw, 40px)/1.02 var(--serif); letter-spacing: -.02em; }
.build.lead h3 { font-size: clamp(40px, 4.4vw, 60px); }
.build p { margin: 0; color: var(--muted); font-size: 15px; }
.build.lead p { color: #b9b4a6; font-size: 17px; max-width: 520px; }
.build .go { margin-top: auto; padding-top: 28px; color: var(--green); font: 600 14px/1 var(--body); }
.build.lead .go { color: #bcd98f; }
.code {
  margin: 30px 0 0; padding: 20px 22px; border-radius: 3px; background: #17132a; color: #cfd8d3;
  font: 400 13px/1.75 var(--mono); overflow-x: auto; white-space: pre;
}
.code .c { color: #6f7a73; }
.code .k { color: #bcd98f; }
.code .w { color: #e6a07a; }

/* ---------- Writing ---------- */
.writing { border-top: 1px solid var(--ink); }
.w-row {
  display: grid; grid-template-columns: 150px minmax(0, 1fr) 40px; gap: 32px; align-items: baseline;
  padding: 28px 0; border-bottom: 1px solid var(--line); transition: padding .2s, background .2s;
}
.w-row:hover { padding-left: 14px; background: var(--paper-2); }
.w-kind { color: var(--copper); font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.w-row h3 { margin: 0 0 6px; font: 400 clamp(24px, 2.4vw, 32px)/1.1 var(--serif); letter-spacing: -.01em; }
.w-row p { margin: 0; color: var(--muted); font-size: 15px; }
.w-arrow { color: var(--green); font: 400 22px/1 var(--mono); text-align: right; transition: transform .2s; }
.w-row:hover .w-arrow { transform: translateX(4px); }

/* ---------- Work with me ---------- */
.h-work { padding: 112px 0; background: var(--paper-3); }
.h-work-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 72px; align-items: start; }
.h-work h2 { margin: 14px 0 18px; font: 400 clamp(40px, 5vw, 64px)/1 var(--serif); letter-spacing: -.03em; }
.h-work .h-label { color: var(--copper); }
.h-work-copy p { margin: 0; color: var(--muted); max-width: 400px; }
.offers { border-top: 1px solid var(--ink); }
.offer {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 32px; align-items: center;
  padding: 28px 0; border-bottom: 1px solid #cfc5b0;
}
.offer-who { grid-column: 1 / -1; color: var(--green); font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.offer h3 { margin: 6px 0 4px; font: 500 22px/1.2 var(--display); letter-spacing: -.015em; }
.offer p { margin: 0; color: var(--muted); font-size: 15px; }
.offer .button { min-height: 44px; white-space: nowrap; }

/* ---------- Footer ---------- */
.h-foot { padding: 72px 0 40px; background: var(--night-2); color: #b9b4a6; }
.h-foot-top { display: flex; justify-content: space-between; align-items: end; gap: 32px; padding-bottom: 48px; border-bottom: 1px solid rgba(239, 234, 220, .12); }
.h-foot-top p { margin: 0; max-width: 620px; color: #efeadc; font: 400 clamp(30px, 3.6vw, 48px)/1.05 var(--serif); letter-spacing: -.02em; }
.h-foot-top p em { color: #bcd98f; }
.h-foot-links { display: flex; flex-wrap: wrap; gap: 10px; }
.h-foot-links a { padding: 10px 14px; border: 1px solid rgba(239, 234, 220, .2); border-radius: 2px; color: #efeadc; font: 500 12px/1 var(--mono); transition: border-color .2s, color .2s; }
.h-foot-links a:hover, .h-foot-links a:focus-visible { border-color: #bcd98f; color: #bcd98f; }
.h-foot-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 24px; font: 500 12px/1.6 var(--mono); color: #7a766b; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .h-hero-grid, .h-thesis-head, .build-grid, .h-work-grid { grid-template-columns: 1fr; gap: 40px; }
  .h-photo { max-width: 320px; }
  .h-proof { grid-template-columns: 1fr 1fr; }
  .h-proof div:nth-child(3) { padding-left: 0; border-left: 0; }
  .h-proof div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .build.lead { grid-row: auto; }
  .rung { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .rung p { grid-column: 2 / -1; }
  .rung, .rung:nth-child(n) { --w: 100%; }
}
@media (max-width: 650px) {
  .h-hero { padding-top: 56px; }
  .h-title { font-size: 58px; }
  .h-proof { margin-top: 56px; }
  .h-proof div, .h-proof div + div { padding: 18px 12px 20px 0; }
  .h-proof div:nth-child(even) { padding-left: 14px; }
  .h-thesis, .h-section, .h-work { padding: 76px 0; }
  .h-section-head { flex-direction: column; align-items: start; }
  .rung { gap: 10px 14px; padding: 16px; }
  .rung .tag { grid-column: 2; justify-self: start; }
  .rung::before { grid-row: span 3; align-self: start; padding-top: 4px; }
  .build { padding: 24px; min-height: 0; }
  .code { font-size: 12px; }
  .w-row { grid-template-columns: 1fr 24px; gap: 10px 16px; }
  .w-kind { grid-column: 1 / -1; }
  .offer { grid-template-columns: 1fr; }
  .offer .button { justify-self: start; }
  .h-foot-top, .h-foot-bottom { flex-direction: column; align-items: start; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .status.soon::before { animation: none; }
}

/* Keep wide children (code block) from stretching grid tracks on small screens */
.build-grid > *, .h-hero-grid > *, .h-work-grid > *, .h-thesis-head > * { min-width: 0; }
.w-kind small { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; letter-spacing: .04em; text-transform: none; }
@media (max-width: 650px) { .w-kind small { display: inline; margin: 0 0 0 10px; } }

/* ---------- Vocabulary ---------- */
.glossary { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.g-item { padding: 30px 28px 32px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 96px; }
.g-item:not(:nth-child(3n+1)) { padding-left: 28px; border-left: 1px solid var(--line); }
.g-item:target { background: var(--paper-2); box-shadow: inset 0 3px 0 var(--copper); }
.glossary dt { position: relative; font: 400 clamp(26px, 2.4vw, 32px)/1.08 var(--serif); letter-spacing: -.015em; }
.g-num { display: block; margin-bottom: 18px; color: var(--copper); font: 500 11px/1 var(--mono); letter-spacing: .08em; }
.g-anchor { margin-left: 8px; color: var(--line); font: 400 18px/1 var(--mono); opacity: 0; transition: opacity .2s, color .2s; }
.g-item:hover .g-anchor, .g-anchor:focus-visible { opacity: 1; }
.g-anchor:hover { color: var(--green); }
.glossary dd { margin: 12px 0 0; }
.glossary dd p { margin: 0 0 16px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.g-link { color: var(--green); font: 600 13px/1 var(--body); }
.g-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.g-link.muted { color: var(--muted); font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
@media (max-width: 900px) {
  .glossary { grid-template-columns: 1fr 1fr; }
  .g-item, .g-item:not(:nth-child(3n+1)) { padding: 26px 22px 28px 0; border-left: 0; }
  .g-item:nth-child(even) { padding-left: 22px; border-left: 1px solid var(--line); }
}
@media (max-width: 650px) {
  .glossary { grid-template-columns: 1fr; }
  .g-item, .g-item:nth-child(even), .g-item:not(:nth-child(3n+1)) { padding: 24px 0; border-left: 0; }
  .g-anchor { opacity: 1; }
}

/* ---------- Interactive ladder ---------- */
.lab { margin-bottom: 28px; }
.lab-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.lab-step { color: #bcd98f; font: 500 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.lab-head p { margin: 0; color: #b9b4a6; font-size: 15px; }
.lab-picks { display: flex; flex-wrap: wrap; gap: 10px; }
.lab-pick {
  padding: 12px 16px; border: 1px solid rgba(239, 234, 220, .2); border-radius: 2px; background: transparent;
  color: #d9d4c6; font: 400 19px/1.2 var(--serif); cursor: pointer; transition: border-color .2s, background .2s, color .2s;
}
.lab-pick:hover { border-color: rgba(188, 217, 143, .6); }
.lab-pick[aria-checked="true"] { border-color: #bcd98f; background: rgba(188, 217, 143, .12); color: #efeadc; }
.lab-pick:focus-visible, .ladder .rung:focus-visible { outline: 2px solid #bcd98f; outline-offset: 3px; }

.lab-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 28px; align-items: start; }
.lab-body .rung { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 6px 16px; padding: 16px 18px; cursor: pointer; }
.lab-body .rung p { grid-column: 2 / -1; font-size: 14px; }
.lab-body .rung.on { background: rgba(188, 217, 143, .14); border-color: #bcd98f; transform: translateX(-6px); }
.lab-body .rung.on h3 { color: #fff; }

.lab-panel {
  position: sticky; top: 96px; padding: 28px; border: 1px solid rgba(239, 234, 220, .16); border-radius: 3px;
  background: rgba(239, 234, 220, .04); transition: border-color .3s;
}
.lab-panel.tier-weak { border-top: 3px solid #e6a07a; }
.lab-panel.tier-mid { border-top: 3px solid #d8c78a; }
.lab-panel.tier-strong { border-top: 3px solid #bcd98f; }
.lab-meter { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-bottom: 22px; }
.lab-meter i { height: 6px; border-radius: 1px; background: rgba(239, 234, 220, .1); transition: background .3s; }
.tier-weak .lab-meter i.lit { background: #e6a07a; }
.tier-mid .lab-meter i.lit { background: #d8c78a; }
.tier-strong .lab-meter i.lit { background: #bcd98f; }
.lab-rung { margin-bottom: 22px; font: 400 clamp(30px, 3vw, 40px)/1 var(--serif); letter-spacing: -.02em; color: #efeadc; }
.lab-col { padding: 16px 0; border-top: 1px solid rgba(239, 234, 220, .12); }
.lab-col span { display: block; margin-bottom: 8px; color: #7a766b; font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.lab-col p { margin: 0; color: #d9d4c6; font-size: 16px; line-height: 1.5; }
.lab-col.breaks p { color: #e6a07a; }
.tier-strong .lab-col.breaks p { color: #b9b4a6; }
.lab-foot { margin: 14px 0 0; padding-top: 16px; border-top: 1px solid rgba(239, 234, 220, .12); color: #9f9a8c; font: 400 italic 18px/1.3 var(--serif); }

@media (max-width: 900px) {
  .lab-body { grid-template-columns: 1fr; }
  .lab-panel { position: sticky; top: 64px; z-index: 2; background: #2c2542; order: -1; }
  .lab-body .rung.on { transform: none; }
}
@media (max-width: 650px) {
  .lab-pick { width: 100%; text-align: left; font-size: 17px; }
  .lab-panel { padding: 18px; }
  .lab-rung { font-size: 26px; margin-bottom: 12px; }
  .lab-meter { margin-bottom: 14px; }
  .lab-col { padding: 10px 0; }
  .lab-col p { font-size: 14px; }
  .lab-foot { display: none; }
}

/* ---------- Newsletter ---------- */
.h-news { padding: 96px 0; border-bottom: 1px solid var(--line); background: var(--paper-2); }
.h-news-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: 64px; align-items: center; }
.h-news .h-label { color: var(--copper); }
.h-news h2 { margin: 14px 0 16px; font: 400 clamp(38px, 4.6vw, 60px)/1 var(--serif); letter-spacing: -.03em; }
.h-news p { max-width: 520px; margin: 0; color: var(--muted); font-size: 17px; }
.h-news-embed { border: 1px solid var(--line); border-radius: 3px; background: #fff; overflow: hidden; }
.h-news-embed iframe { display: block; width: 100%; height: 320px; border: 0; background: #fff; }
@media (max-width: 900px) { .h-news-grid { grid-template-columns: 1fr; gap: 32px; } }
@media (max-width: 650px) { .h-news { padding: 68px 0; } }
