/* books.hamcodes.com — layout and components

   Ported from netizen.hamcodes.com/styles.css. Same structure, same class
   names, so a fix on one site carries to the other by hand. Re-themed onto
   the off-white and maroon palette in tokens.css.

   The page reads off-white. Three surfaces run deep and they are the only
   ones: the header, the hero, and the Bro 2 Bro band into the footer.
   Everything between is paper, on a fine grain, with a maroon glow under
   anything that lifts off it. */

* { box-sizing: border-box; }
::selection { background: rgba(140,28,47,.22); color: inherit; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }

body {
  margin: 0; font-family: var(--body); color: var(--ink); background: var(--ground);
  line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}

/* The paper. One fixed tile of noise over everything, faint enough that you
   read it as texture rather than see it as dots. It sits above the page and
   below the header, and never takes a click. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 3;
  pointer-events: none; opacity: .035; mix-blend-mode: multiply;
  background-image: var(--grain);
}

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.06; margin: 0 0 .4em; letter-spacing: -.022em; }
h1 { font-size: clamp(2.15rem, 5.6vw, 3.7rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.5rem); font-weight: 700; }
p  { margin: 0 0 1rem; }
a  { color: var(--maroon); }
img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
section { padding: clamp(60px, 9vw, 120px) 0; position: relative; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--maroon); color: #fff; padding: 10px 16px; z-index: 100; font-weight: 600; text-decoration: none; }
.skip:focus { left: 0; }
:focus-visible { outline: 2px solid var(--maroon-2); outline-offset: 3px; border-radius: 4px; }
.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }

/* ---------- Icons ---------- */
.ic { width: 1.15em; height: 1.15em; fill: currentColor; flex: 0 0 auto; vertical-align: -.22em; }
.btn .ic { width: 1.2em; height: 1.2em; vertical-align: -.18em; }
.hero-tag .ic { width: 20px; height: 20px; }
.dl-list .tick .ic { width: 16px; height: 16px; }
.gate-success .ic, .dl-peek-label .ic, .mentor-hint .ic { width: 18px; height: 18px; }

/* ---------- Eyebrow, lead, section head ---------- */
.eyebrow {
  font-family: var(--mono); font-weight: 500; font-size: .78rem;
  letter-spacing: .09em; text-transform: uppercase;
  padding: .5em .95em; border-radius: 6px; display: inline-block; margin-bottom: 1.1rem;
  background: var(--maroon-soft); color: var(--maroon);
}
.eyebrow.o { background: rgba(201,150,44,.16); color: var(--gold-ink); box-shadow: inset 0 0 0 1px rgba(201,150,44,.36); }
.eyebrow.t { background: rgba(69,16,28,.10); color: var(--deep); box-shadow: inset 0 0 0 1px rgba(69,16,28,.22); }
.eyebrow.p { background: rgba(174,39,57,.14); color: var(--maroon); box-shadow: inset 0 0 0 1px rgba(174,39,57,.3); }
.eyebrow.bb { background: rgba(246,237,233,.10); color: var(--rose); box-shadow: inset 0 0 0 1px rgba(232,169,178,.3); }
.hero .eyebrow { background: rgba(246,237,233,.10); color: var(--on-dark); box-shadow: inset 0 0 0 1px var(--on-dark-line); }

.lead { font-size: clamp(1.03rem, 1.9vw, 1.22rem); color: var(--ink-2); max-width: 52ch; line-height: 1.62; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.sec-head { max-width: 680px; }
.sec-head.center { margin: 0 auto; }
.note { font-size: .92rem; color: var(--ink-3); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--display); font-weight: 600; font-size: 1rem; letter-spacing: -.008em;
  padding: .85em 1.65em; border-radius: 999px; border: none; cursor: pointer;
  text-decoration: none; transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
  touch-action: manipulation; line-height: 1; -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:active { transform: translateY(0) scale(.98); filter: none; }
.btn-primary { background: var(--maroon); color: #fff; box-shadow: var(--glow); }
.btn-primary:hover { background: var(--maroon-2); color: #fff; }
.btn-orange { background: var(--maroon-2); color: #fff; box-shadow: var(--glow); }
.btn-orange:hover { color: #fff; filter: brightness(1.06); }
.btn-gold { background: var(--gold); color: #2A1B04; box-shadow: 0 14px 30px -10px rgba(201,150,44,.55); }
.btn-gold:hover { color: #2A1B04; }
.btn-teal { background: var(--deep); color: var(--on-dark); box-shadow: 0 14px 32px -10px rgba(69,16,28,.6); }
.btn-teal:hover { color: var(--on-dark); }
.btn-white { background: #fff; color: var(--maroon); box-shadow: 0 14px 34px -12px rgba(0,0,0,.5); }
.btn-white:hover { color: var(--maroon); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--rule); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--maroon); color: var(--maroon); }
.hero .btn-ghost, .brobook .btn-ghost { color: var(--on-dark); box-shadow: inset 0 0 0 1.5px var(--on-dark-line); }
.hero .btn-ghost:hover, .brobook .btn-ghost:hover { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(232,169,178,.8); }
.btn-lg { font-size: 1.04rem; padding: .95em 1.7em; }
@media (hover: hover) { .btn:hover { transform: translateY(-2px); } }

.cta-row, .hero-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(42,12,22,.92);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--on-dark-line);
  transition: background .25s ease, box-shadow .25s ease;
}
.site-header.is-stuck { background: rgba(42,12,22,.97); box-shadow: 0 14px 34px -18px rgba(24,6,12,.85); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: .55rem; font-family: var(--display); font-weight: 700; font-size: 1.12rem; color: var(--on-dark); text-decoration: none; letter-spacing: -.02em; -webkit-tap-highlight-color: transparent; user-select: none; }
.brand img { width: 38px; height: 38px; }
.brand span b { color: var(--rose); }
.nav-links { display: flex; align-items: center; margin-left: auto; gap: clamp(.8rem, 1.5vw, 1.5rem); }
.nav-links a { color: var(--on-dark); text-decoration: none; font-weight: 500; font-size: .94rem; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.nav-links a:not(.btn):hover, .nav-links a[aria-current="page"] { color: var(--rose); }
.nav a.btn { background: var(--maroon-2); color: #fff; padding: .62em 1.25em; font-size: .92rem; box-shadow: 0 10px 24px -6px rgba(174,39,57,.6); margin-left: 1.5rem; flex: 0 0 auto; white-space: nowrap; }
.nav a.btn:hover { background: #C43247; color: #fff; }
@media (max-width: 1180px) and (min-width: 901px) {
  .brand { font-size: 1rem; white-space: nowrap; }
  .brand img { width: 32px; height: 32px; }
  .nav-links { gap: .8rem; }
  .nav-links a { font-size: .86rem; }
  .nav a.btn { margin-left: .9rem; padding: .55em 1em; font-size: .85rem; }
}
/* Phone: the bar becomes two rows instead of hiding the links. */
@media (max-width: 900px) {
  html { scroll-padding-top: 7rem; }
  .nav { flex-wrap: wrap; height: auto; padding: .6rem 0 .5rem; row-gap: .45rem; }
  .brand { flex: 1 1 auto; min-width: 0; }
  .nav-links {
    order: 3; width: 100%; margin-left: 0; gap: .2rem;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    border-top: 1px solid var(--on-dark-line); padding-top: .45rem;
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
            mask-image: linear-gradient(90deg, #000 88%, transparent);
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { white-space: nowrap; font-size: .82rem; padding: .3rem .45rem; }
  .nav a.btn { margin-left: .5rem; }
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(70% 60% at 18% 0%, rgba(174,39,57,.45) 0%, transparent 62%),
    radial-gradient(50% 50% at 92% 88%, rgba(201,150,44,.16) 0%, transparent 60%),
    linear-gradient(165deg, var(--deep) 0%, var(--band) 62%, #1A070E 100%);
  color: var(--on-dark); overflow: hidden;
}
.hero h1 { color: #fff; }
.hero h1 span.hl { color: var(--rose); position: relative; white-space: nowrap; }
.hero .lead { color: var(--on-dark-mute); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 60px); align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

.hero-badges { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.6rem 0 2rem; }
.pill {
  font-family: var(--body); font-weight: 500; font-size: .88rem;
  padding: .52em 1em; border-radius: 999px; display: inline-flex; align-items: center; gap: .45em;
  background: rgba(246,237,233,.08); color: var(--on-dark);
  box-shadow: inset 0 0 0 1px var(--on-dark-line);
}
.pill.p .ic { color: var(--rose); }
.pill.o .ic { color: var(--gold); }
.pill.t .ic { color: var(--rose); }

/* the bot walks alone, with a maroon glow behind it */
.hero-bot { position: relative; display: flex; justify-content: center; align-items: flex-end; padding-bottom: 26px; }
.hero-bot img {
  position: relative; z-index: 2; width: 100%; max-width: 380px; height: auto; display: block;
  filter: drop-shadow(0 22px 40px rgba(0,0,0,.55));
  animation: bot-walk 2.6s ease-in-out infinite; transform-origin: 50% 92%;
}
.hero-bot::before {
  content: ""; position: absolute; left: 50%; top: 8%; transform: translateX(-50%);
  width: 82%; padding-bottom: 82%; border-radius: 50%;
  background: radial-gradient(circle, rgba(174,39,57,.55), rgba(174,39,57,0) 66%);
  filter: blur(14px); z-index: 0;
}
.bot-shadow {
  position: absolute; left: 50%; bottom: 12px; z-index: 1;
  width: 46%; max-width: 190px; height: 20px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,0,0,.6), rgba(0,0,0,0) 70%);
  transform: translateX(-50%); animation: bot-shadow 2.6s ease-in-out infinite;
}
.bot-bubble {
  position: absolute; top: 4px; left: 4%; z-index: 3; white-space: nowrap;
  background: #fff; color: var(--ink); font-family: var(--display); font-weight: 600; font-size: .88rem;
  padding: .55em .9em; border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.5);
  animation: bot-walk 2.6s ease-in-out infinite;
}
.bot-bubble::after { content: ""; position: absolute; left: 16px; bottom: -6px; border: 7px solid transparent; border-top-color: #fff; border-bottom: 0; }
@keyframes bot-walk {
  0%, 100% { transform: translateY(0) rotate(-1.8deg); }
  25%      { transform: translateY(-13px) rotate(0deg); }
  50%      { transform: translateY(0) rotate(1.8deg); }
  75%      { transform: translateY(-13px) rotate(0deg); }
}
@keyframes bot-shadow {
  0%, 50%, 100% { transform: translateX(-50%) scaleX(1);   opacity: .5; }
  25%, 75%      { transform: translateX(-50%) scaleX(.78); opacity: .26; }
}
@media (max-width: 860px) {
  .hero-bot { padding-bottom: 12px; margin-top: 14px; }
  .hero-bot img { max-width: 260px; }
  .bot-bubble { left: 2%; font-size: .8rem; }
}

/* the book shelf, full width under the hero copy */
.hero-shelf { margin-top: clamp(40px, 6vw, 66px); padding-top: clamp(26px, 4vw, 40px); border-top: 1px solid rgba(232,169,178,.18); }
.shelf-label { display: block; text-align: center; margin-bottom: 22px; font-family: var(--mono); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--rose); }
.shelf-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 3vw, 30px); }
.shelf-item { text-decoration: none; color: var(--on-dark); display: flex; flex-direction: column; gap: .1rem; }
.shelf-art {
  display: block; border-radius: 12px; overflow: hidden; margin-bottom: 14px;
  border: 3px solid rgba(255,255,255,.9); background: #fff;
  box-shadow: 0 24px 52px -12px rgba(140,28,47,.7);
  transition: transform .22s ease, box-shadow .22s ease;
}
.shelf-art img { width: 100%; height: auto; display: block; }
.shelf-item b { font-family: var(--display); font-weight: 600; font-size: clamp(1.02rem, 2vw, 1.22rem); color: #fff; letter-spacing: -.015em; }
.shelf-item > span:last-child { font-size: .9rem; color: var(--on-dark-mute); }
@media (hover: hover) {
  .shelf-item:hover .shelf-art { transform: translateY(-6px); box-shadow: 0 32px 66px -12px rgba(174,39,57,.85); }
  .shelf-item:hover b { color: var(--rose); }
}
.shelf-item:focus-visible { outline: 3px solid var(--rose); outline-offset: 5px; border-radius: 10px; }
@media (max-width: 700px) { .shelf-row { grid-template-columns: 1fr; gap: 26px; max-width: 340px; margin: 0 auto; } }

/* ---------- Audience ----------
   The first thing under the hero, and the moment the page turns to paper.
   Deepest of the three paper tones, so it still reads as its own band. */
.audience { background: var(--paper-3); color: var(--ink); padding: clamp(40px, 5vw, 56px) 0; border-bottom: 1px solid var(--rule); }
.audience-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(22px, 3vw, 34px); }
.aud { display: flex; gap: 1rem; align-items: flex-start; }
.aud .ic-box {
  flex: 0 0 48px; width: 48px; height: 48px; border-radius: 11px; display: grid; place-items: center;
  background: var(--maroon-soft); box-shadow: inset 0 0 0 1px var(--maroon-line);
}
.aud .ic-box .ic { width: 26px; height: 26px; color: var(--maroon); }
.aud .ic-box.gold { background: rgba(201,150,44,.18); box-shadow: inset 0 0 0 1px rgba(201,150,44,.42); }
.aud .ic-box.gold .ic { color: var(--gold-ink); }
.aud .ic-box.deep { background: rgba(69,16,28,.10); box-shadow: inset 0 0 0 1px rgba(69,16,28,.22); }
.aud .ic-box.deep .ic { color: var(--deep); }
.aud h3 { font-size: 1.08rem; margin-bottom: .15em; color: var(--ink); }
.aud p { font-size: .93rem; color: var(--ink-2); margin: 0; }
@media (max-width: 760px) { .audience-grid { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- Downloads ---------- */
.downloads { background: linear-gradient(180deg, var(--paper-2) 0%, var(--ground) 100%); }
.dl-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(30px, 5vw, 68px); align-items: center; margin-top: 40px; }
.dl-visual { position: relative; }
.dl-cover { border-radius: 12px; overflow: hidden; box-shadow: var(--glow-lg); border: 1px solid var(--rule); max-width: 330px; }
.dl-cover img { width: 100%; display: block; }
.dl-peek { display: flex; gap: 12px; margin-top: 22px; overflow-x: auto; padding: 6px 4px 14px; scroll-snap-type: x mandatory; }
.dl-peek::-webkit-scrollbar { height: 8px; }
.dl-peek::-webkit-scrollbar-thumb { background: var(--maroon-2); border-radius: 8px; }
.dl-peek img { height: 150px; width: auto; border-radius: 10px; border: 1px solid var(--rule); box-shadow: var(--glow-soft); scroll-snap-align: start; flex: 0 0 auto; }
.dl-peek-label { display: inline-flex; align-items: center; gap: .4rem; font-family: var(--mono); font-size: .78rem; letter-spacing: .04em; color: var(--ink-2); margin-top: 6px; }

.dl-list { list-style: none; padding: 0; margin: 1.2rem 0 1.6rem; display: grid; gap: .6rem; }
.dl-list li { display: flex; align-items: center; gap: .7rem; font-weight: 600; }
.dl-list .tick { width: 24px; height: 24px; border-radius: 50%; background: var(--maroon); color: #fff; display: grid; place-items: center; font-size: .8rem; flex: 0 0 24px; }

.gate { background: #fff; border-radius: var(--radius); box-shadow: var(--glow-soft); border: 1px solid var(--rule); padding: 26px; }
.gate label { display: block; font-family: var(--display); font-weight: 700; font-size: 1rem; margin-bottom: .5rem; }
.gate input[type=email] {
  width: 100%; padding: .95em 1.1em; border-radius: 10px; border: 1.5px solid var(--rule);
  font-size: 1.05rem; font-family: var(--body); margin-bottom: 1rem; transition: border-color .15s;
}
.gate input[type=email]:focus { outline: none; border-color: var(--maroon); }
.gate .btn { width: 100%; justify-content: center; }
.gate small { display: block; color: var(--ink-2); font-size: .82rem; margin-top: .8rem; text-align: center; }
.gate-success { display: none; background: var(--maroon-soft); color: var(--maroon); border-radius: 12px; padding: .8rem 1rem; font-weight: 700; font-size: .95rem; margin-bottom: 1rem; text-align: center; }
.gate-success.show { display: block; }
.unlocked-links { display: none; }
.unlocked-links.show { display: block; animation: fade .4s ease; }
.unlocked-links .dl-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--rule); }
.unlocked-links .dl-row:last-child { border-bottom: none; }
.unlocked-links a { font-weight: 700; text-decoration: none; font-size: .95rem; color: var(--maroon); display: inline-flex; align-items: center; gap: .35rem; }
.unlocked-links a:hover { color: var(--maroon-2); }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 820px) { .dl-grid { grid-template-columns: 1fr; } .dl-visual { text-align: center; } .dl-cover { margin: 0 auto; } }

/* ---------- Books: alternating big rows ---------- */
.books { background: var(--paper); overflow: hidden; }
.books::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 90% 10%, rgba(140,28,47,.09), transparent 42%),
    radial-gradient(circle at 4% 90%, rgba(201,150,44,.10), transparent 44%);
}
.books > .wrap { position: relative; z-index: 1; }
.book-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 70px); align-items: center; padding: clamp(30px, 5vw, 56px) 0; }
.book-row + .book-row { border-top: 1px solid var(--rule); }
.book-row:nth-child(even) .book-media { order: 2; }
.book-media { position: relative; display: flex; justify-content: center; }
.book-media .panel {
  border-radius: 14px; width: 100%; max-width: 440px; display: flex;
  box-shadow: var(--glow-lg); position: relative; overflow: hidden; border: 1px solid var(--rule);
}
.book-media img { width: 100%; height: auto; display: block; }
.book-media .panel::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; z-index: 2; }
.panel.b::after { background: var(--gold); }
.panel.p::after { background: var(--maroon-2); }
.panel.o::after { background: var(--maroon); }
.panel.t::after { background: var(--deep); }
.book-info .tag { font-family: var(--mono); font-weight: 500; font-size: .76rem; letter-spacing: .09em; text-transform: uppercase; }
.book-info .tag.b { color: var(--gold-ink); }
.book-info .tag.p { color: var(--maroon-2); }
.book-info .tag.o { color: var(--maroon); }
.book-info .tag.t { color: var(--deep); }
.book-info h3 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); font-weight: 700; margin: .15em 0 .1em; color: var(--ink); }
.age-badge { display: inline-block; font-family: var(--mono); font-size: .8rem; letter-spacing: .03em; padding: .42em .95em; border-radius: 6px; background: var(--maroon-soft); color: var(--maroon); box-shadow: inset 0 0 0 1px rgba(140,28,47,.24); margin-bottom: 1rem; }
.book-info p { color: var(--ink-2); font-size: 1.05rem; max-width: 42ch; margin-bottom: 1.6rem; }
@media (max-width: 780px) {
  .book-row { grid-template-columns: 1fr; text-align: center; gap: 24px; padding: 40px 0; }
  .book-row:nth-child(even) .book-media { order: 0; }
  .book-info p { margin-left: auto; margin-right: auto; }
  .book-media .panel { max-width: 340px; margin: 0 auto; }
  .book-info .cta-row { justify-content: center; }
}

/* ---------- Blog ---------- */
.blog { background: var(--ground); border-top: 1px solid var(--rule); }
.blog-feed { display: grid; gap: clamp(40px, 5vw, 62px); margin-top: 44px; }
.blog-row-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; padding-bottom: 14px; border-bottom: 1px solid var(--rule); margin-bottom: 26px; }
.blog-row-head .kicker { font-family: var(--mono); font-size: .74rem; letter-spacing: .11em; text-transform: uppercase; display: inline-flex; align-items: center; gap: .55rem; color: var(--ink-2); }
.blog-row-head .kicker::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--accent); flex: 0 0 9px; }
.blog-row-head h3 { margin: .3em 0 0; font-size: clamp(1.25rem, 2.4vw, 1.6rem); }
.blog-row-head .see-all { font-family: var(--display); font-weight: 600; font-size: .93rem; color: var(--accent); text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; padding-bottom: .2rem; }
.blog-row-head .see-all .ic { transition: transform .18s ease; }
@media (hover: hover) { .blog-row-head .see-all:hover .ic { transform: translateX(5px); } }
.blog-row { --accent: var(--maroon); }
.blog-row.net   { --accent: var(--maroon); }
.blog-row.code  { --accent: var(--deep); }
.blog-row.money { --accent: var(--gold-ink); }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post { display: flex; flex-direction: column; text-decoration: none; color: inherit; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-sm); overflow: hidden; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
@media (hover: hover) {
  .post:hover { transform: translateY(-4px); box-shadow: var(--glow-soft); border-color: var(--accent); }
  .post:hover .post-thumb img { transform: scale(1.04); }
}
.post:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.post-thumb { aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-2); border-bottom: 1px solid var(--rule); position: relative; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.post-latest { position: absolute; top: 10px; left: 10px; z-index: 2; font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; background: var(--band); color: var(--rose); padding: .42em .7em; border-radius: 5px; }
.post-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.post-date { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; color: var(--ink-2); }
.post-body b { font-family: var(--display); font-weight: 600; font-size: 1.02rem; line-height: 1.3; letter-spacing: -.015em; color: var(--ink); }
.post-body p { color: var(--ink-2); font-size: .9rem; line-height: 1.55; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-go { margin-top: auto; padding-top: 12px; font-family: var(--display); font-weight: 600; font-size: .9rem; color: var(--accent); display: inline-flex; align-items: center; gap: .4rem; }
.blog-foot { margin-top: clamp(38px, 5vw, 54px); text-align: center; }
.blog-foot .note { color: var(--ink-2); font-size: .9rem; margin: 14px 0 0; }
@media (max-width: 900px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .blog-grid { grid-template-columns: 1fr; } .blog-row-head { flex-direction: column; align-items: flex-start; gap: .6rem; } }

/* ---------- Bro 2 Bro ---------- */
.brobook {
  background:
    radial-gradient(60% 50% at 20% 0%, rgba(174,39,57,.42) 0%, transparent 62%),
    linear-gradient(160deg, #3A0E1A 0%, var(--band) 55%, #170509 100%);
  color: var(--on-dark); overflow: hidden;
}
.brobook h2 { color: #FBF4F1; font-size: clamp(1.9rem, 3.4vw, 2.9rem); }
.brobook .lead { color: var(--on-dark-mute); }
.brobook .note { color: rgba(246,237,233,.5); margin-top: .9rem; }
.brobook-grid { display: grid; gap: clamp(28px, 4vw, 56px); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .brobook-grid { grid-template-columns: 1fr 1.1fr; } }
.brobook-points { list-style: none; margin: 1.4rem 0 1.8rem; padding: 0; }
.brobook-points li { display: flex; align-items: center; gap: .7rem; margin-bottom: .7rem; color: rgba(246,237,233,.88); }
.brobook-points .ic { width: 1.05em; height: 1.05em; color: var(--rose); flex: none; }
.brobook-frame {
  display: block; border-radius: 14px; overflow: hidden; background: #150610;
  box-shadow: 0 40px 84px -28px rgba(0,0,0,.9), inset 0 0 0 1px rgba(246,237,233,.14);
  transform: rotate(-.6deg); transition: transform .35s ease, box-shadow .35s ease;
}
.brobook-frame:hover { transform: rotate(0deg) translateY(-4px); box-shadow: 0 50px 96px -26px rgba(174,39,57,.55), inset 0 0 0 1px rgba(232,169,178,.4); }
.brobook-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: rgba(246,237,233,.06); border-bottom: 1px solid rgba(246,237,233,.10); }
.brobook-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(246,237,233,.22); }
.brobook-url { margin-left: 10px; font-family: var(--mono); font-size: .74rem; letter-spacing: .04em; color: rgba(246,237,233,.6); }
.brobook-frame img { display: block; width: 100%; height: auto; }

/* ---------- Mentorship ----------
   Paper, with the maroon carried by the card rather than by the floor. The
   card is the one inverted surface on the page: deep maroon, white button,
   so the apply CTA still lands hardest. */
.mentor { background: var(--ground); color: var(--ink); overflow: hidden; border-top: 1px solid var(--rule); }
.mentor::before {
  content:""; position:absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(52% 44% at 88% 6%, rgba(201,150,44,.14), transparent 62%),
    radial-gradient(46% 40% at 4% 86%, rgba(140,28,47,.10), transparent 62%);
}
.mentor > .wrap { position: relative; z-index: 1; }
.mentor h2 { color: var(--ink); }
.mentor .lead { color: var(--ink-2); }
.mentor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 64px); align-items: center; position: relative; }
.mentor-features { list-style: none; padding: 0; margin: 1.8rem 0 0; display: grid; gap: 1.1rem; }
.mentor-features li { display: flex; gap: .9rem; align-items: flex-start; }
.mentor-features .ic-box { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 10px; background: var(--maroon-soft); box-shadow: inset 0 0 0 1px var(--maroon-line); display: grid; place-items: center; }
.mentor-features .ic-box .ic { width: 22px; height: 22px; color: var(--maroon); }
.mentor-features b { display: block; font-family: var(--display); font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.mentor-features span { color: var(--ink-2); font-size: .95rem; }
.mentor-card { background: linear-gradient(158deg, var(--deep) 0%, var(--band) 100%); color: var(--on-dark); border-radius: var(--radius); box-shadow: var(--glow-lg); padding: 34px; text-align: center; }
.mentor-card .ic-badge { width: 60px; height: 60px; border-radius: 14px; margin: 0 auto .6rem; background: rgba(246,237,233,.10); box-shadow: inset 0 0 0 1px var(--on-dark-line); display: grid; place-items: center; }
.mentor-card .ic-badge .ic { width: 34px; height: 34px; color: var(--rose); }
.mentor-card h3 { margin: .3em 0; color: #fff; }
.mentor-card p { color: var(--on-dark-mute); font-size: 1rem; }
.mentor-card .btn { width: 100%; justify-content: center; margin-top: .5rem; }
.mentor-card .btn-primary { background: #fff; color: var(--deep); box-shadow: 0 16px 34px -14px rgba(0,0,0,.6); }
.mentor-card .btn-primary:hover { background: var(--on-dark); color: var(--deep); }
.mentor-card .note { font-size: .82rem; color: rgba(246,237,233,.62); margin: 1rem 0 0; }
@media (max-width: 820px) { .mentor-grid { grid-template-columns: 1fr; } }

.mentor-gallery { margin-top: clamp(40px, 6vw, 72px); position: relative; z-index: 1; }
.mentor-gallery-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; gap: 1rem; }
.mentor-gallery-head h3 { color: var(--ink); margin: 0; }
.mentor-hint { display: inline-flex; align-items: center; gap: .4rem; font-family: var(--mono); font-size: .78rem; letter-spacing: .05em; color: var(--gold-ink); white-space: nowrap; }
.mentor-strip {
  display: flex; gap: 20px; overflow-x: auto; overflow-y: hidden;
  padding: 4px 4px 20px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--maroon) var(--paper-2);
}
.mentor-strip::-webkit-scrollbar { height: 10px; }
.mentor-strip::-webkit-scrollbar-track { background: var(--paper-2); border-radius: 999px; }
.mentor-strip::-webkit-scrollbar-thumb { background: var(--maroon); border-radius: 999px; }
.mentor-strip img { height: clamp(300px, 42vw, 460px); width: auto; flex: 0 0 auto; display: block; border-radius: 12px; scroll-snap-align: center; box-shadow: var(--glow-soft); border: 1px solid var(--rule); background: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: #150610; color: var(--on-dark-mute); padding: 60px 0 36px; }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px; align-items: flex-start; }
.foot-brand { display: flex; align-items: center; gap: .6rem; font-family: var(--display); font-weight: 700; color: #fff; font-size: 1.18rem; letter-spacing: -.02em; text-decoration: none; }
.foot-brand img { width: 44px; height: 44px; }
.foot-links { display: flex; gap: 2.2rem; flex-wrap: wrap; }
.foot-links a { color: var(--on-dark-mute); text-decoration: none; font-size: .93rem; font-weight: 500; }
.foot-links a:hover { color: var(--rose); }
.foot-bottom { border-top: 1px solid var(--on-dark-line); margin-top: 36px; padding-top: 24px; font-family: var(--mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(246,237,233,.45); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }

/* ---------- Reader pages ---------- */
.crumbs { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); padding-top: 34px; }
.crumbs a { color: var(--maroon); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.reader { max-width: 760px; margin-inline: auto; padding-inline: 22px; }
.reader-head { padding-block: 48px 10px; }
.reader-body { padding-block: 18px 56px; font-size: 1.1rem; line-height: 1.72; }
.reader-body p { max-width: 62ch; margin-bottom: 1.15rem; }
.reader-body h2 { font-size: 1.5rem; margin: 2.2rem 0 .7rem; }
.reader-body h3 { font-size: 1.2rem; margin: 1.8rem 0 .5rem; }
.reader-body blockquote { margin: 1.6rem 0; padding: .2rem 0 .2rem 1.3rem; border-left: 3px solid var(--maroon); color: var(--ink-2); font-size: 1.15rem; }
.reader-nav { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 8px 56px; max-width: 760px; margin-inline: auto; padding-inline: 22px; }
.reader-nav a { font-size: .92rem; font-weight: 600; color: var(--ink-2); text-decoration: none; background: var(--paper); padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow); border: 1px solid var(--rule); max-width: 46%; }
.reader-nav a:hover { color: var(--maroon); border-color: var(--maroon); }
.reader-nav a span { display: block; font-family: var(--mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }
@media (max-width: 620px) { .reader-nav a { max-width: 100%; flex: 1; } }

/* ---------- Bro contents ---------- */
.bro-toc { display: flex; flex-direction: column; gap: 40px; }
.bro-part .part-no { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--maroon); margin-bottom: 6px; }
.bro-part h2 { font-size: 1.45rem; margin-bottom: 4px; }
.bro-notes { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (max-width: 720px) { .bro-notes { grid-template-columns: 1fr; } }
.bro-notes a { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: baseline; padding: 11px 14px; border-radius: 9px; background: var(--paper); border: 1px solid var(--rule); text-decoration: none; color: var(--ink); font-size: .97rem; line-height: 1.4; }
.bro-notes a:hover { color: var(--maroon); border-color: var(--maroon); }
.bro-notes .n { font-family: var(--mono); font-size: .72rem; color: var(--ink-2); }

/* ---------- Reveal on scroll ----------
   main.js sets .js-reveal on <html> and tags the elements, so the hidden
   state cannot exist unless the script ran. No JS, no IntersectionObserver
   or reduced motion asked for, and every section renders visible. */
.js-reveal [data-reveal] { opacity: 0; transform: translateY(16px); }
.js-reveal [data-reveal].is-in {
  opacity: 1; transform: none;
  transition: opacity .65s ease, transform .65s cubic-bezier(.2,.7,.3,1);
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js-reveal [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ---------- Trust strip (Bro contents hero) ---------- */
.trust { display: flex; gap: 34px; flex-wrap: wrap; font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-mute); }
.trust span strong { display: block; font-family: var(--body); font-size: .92rem; font-weight: 700; letter-spacing: -.005em; text-transform: none; color: #fff; margin-bottom: 3px; }
/* structural wrapper in the ported Bro 2 Bro markup, kept for parity with netizen */
.brobook-copy { min-width: 0; }
