:root {
  --ink: #111312;
  --ink-soft: #181b19;
  --paper: #eee9de;
  --muted: #aaa99f;
  --line: rgba(238, 233, 222, .14);
  --sage: #8e9e8b;
  --copper: #b7835d;
  --blue: #718c99;
  --max: 1180px;
  --measure: 70ch;
  --space: clamp(4rem, 9vw, 8rem);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 400 1rem/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .28;
  background: radial-gradient(circle at 75% 0, rgba(113,140,153,.14), transparent 33%), radial-gradient(circle at 10% 90%, rgba(183,131,93,.1), transparent 35%);
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .25em; }
a:hover { color: #fff; }
img { display: block; max-width: 100%; }
p { margin: 0 0 1.25rem; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; line-height: 1.07; text-wrap: balance; }
h1 { font-size: clamp(3.4rem, 10vw, 7.8rem); letter-spacing: -.045em; }
h2 { font-size: clamp(2.2rem, 5vw, 4rem); letter-spacing: -.025em; }
h3 { font-size: clamp(1.55rem, 3vw, 2.2rem); }

.skip-link { position: fixed; top: .75rem; left: .75rem; z-index: 100; transform: translateY(-180%); background: var(--paper); color: var(--ink); padding: .65rem 1rem; }
.skip-link:focus { transform: none; }
:focus-visible { outline: 2px solid #d3ad8c; outline-offset: 4px; }
.wrap { width: min(calc(100% - 2.5rem), var(--max)); margin-inline: auto; }
.site-header { position: relative; z-index: 20; border-bottom: 1px solid var(--line); background: rgba(17,19,18,.9); }
.nav-shell { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { font: 1.15rem/1 var(--serif); text-decoration: none; letter-spacing: .02em; }
.nav-list { display: flex; align-items: center; gap: clamp(1.2rem, 3vw, 2.5rem); margin: 0; padding: 0; list-style: none; }
.nav-list a { color: var(--muted); font-size: .78rem; font-weight: 650; letter-spacing: .14em; text-decoration: none; text-transform: uppercase; }
.nav-list a[aria-current="page"], .nav-list a:hover { color: var(--paper); }
.nav-toggle { display: none; border: 1px solid var(--line); background: transparent; color: var(--paper); padding: .55rem .7rem; font: inherit; }

.eyebrow { color: var(--copper); font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.hero { min-height: min(760px, calc(100vh - 74px)); display: grid; align-items: center; padding-block: var(--space); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, .5fr); gap: clamp(2rem, 8vw, 8rem); align-items: end; }
.hero h1 span { display: block; margin-top: .7rem; color: var(--muted); font: 600 clamp(.85rem, 1.8vw, 1.15rem)/1.2 var(--sans); letter-spacing: .22em; text-transform: uppercase; }
.hero-copy { max-width: 34rem; }
.hero-copy p { color: #d1cec4; font: clamp(1.15rem, 2vw, 1.45rem)/1.55 var(--serif); }
.button { display: inline-block; margin-top: 1rem; border: 1px solid rgba(238,233,222,.35); padding: .8rem 1.05rem; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-decoration: none; text-transform: uppercase; transition: background .2s, color .2s; }
.button:hover { background: var(--paper); color: var(--ink); }
.section { position: relative; padding-block: var(--space); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 2rem; margin-bottom: clamp(2rem, 5vw, 4rem); }
.section-head p { max-width: 33rem; color: var(--muted); }
.books-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.book-card { position: relative; isolation: isolate; min-height: 510px; overflow: hidden; border: 1px solid var(--line); padding: clamp(1.5rem, 4vw, 3rem); display: flex; flex-direction: column; }
.book-card::before, .book-card::after { content: ""; position: absolute; z-index: -1; pointer-events: none; }
.book-card.tech { background: linear-gradient(145deg, #182126, #101313 70%); }
.book-card.tech::before { inset: 0; opacity: .22; background-image: linear-gradient(rgba(113,140,153,.35) 1px, transparent 1px), linear-gradient(90deg, rgba(113,140,153,.35) 1px, transparent 1px); background-size: 40px 40px; mask-image: linear-gradient(to bottom left, #000, transparent 65%); }
.book-card.tech::after { width: 210px; height: 210px; right: -50px; top: -50px; border: 1px solid rgba(140,174,190,.35); border-radius: 50%; box-shadow: 0 0 0 24px rgba(140,174,190,.035), 0 0 0 52px rgba(140,174,190,.025); }
.book-card.stone { background: linear-gradient(155deg, #292720, #151513 72%); }
.book-card.stone::before { inset: 0; opacity: .45; background: repeating-linear-gradient(164deg, transparent 0 31px, rgba(183,131,93,.09) 32px, transparent 33px 57px); }
.book-card.stone::after { right: 7%; bottom: -115px; width: 75%; height: 270px; background: linear-gradient(150deg, transparent 49%, rgba(183,131,93,.28) 50%, #22221d 51%); transform: rotate(-5deg); }
.book-card h3 { min-height: 3.21em; max-width: 12ch; margin: 1.2rem 0 2.2rem; font-size: clamp(2rem, 4vw, 3.3rem); }
.book-card .description { max-width: 52ch; color: #d3d0c7; }
.book-card .meta { margin-top: auto; padding-top: 2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.book-card .text-link { align-self: flex-start; margin-top: 1rem; font-size: .85rem; font-weight: 700; }
.placeholder { border-left: 2px solid var(--copper); padding-left: 1rem; color: #d5bba5 !important; font-style: italic; }
.split { display: grid; grid-template-columns: .7fr 1.3fr; gap: clamp(2rem, 8vw, 8rem); }
.prose { max-width: var(--measure); color: #d3d0c7; font-size: clamp(1.05rem, 1.6vw, 1.2rem); }
.text-link { color: var(--paper); text-decoration-color: var(--copper); }

.page-hero { padding-block: clamp(4.5rem, 11vw, 9rem); border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 14ch; font-size: clamp(3.2rem, 8vw, 7rem); }
.page-hero .lede { max-width: 45rem; margin-top: 2rem; color: #d1cec4; font: clamp(1.15rem, 2vw, 1.45rem)/1.55 var(--serif); }
.page-hero.tech-atmosphere { background-image: linear-gradient(90deg, transparent 49.8%, rgba(113,140,153,.08) 50%); background-size: 58px 58px; }
.page-hero.stone-atmosphere { background: radial-gradient(ellipse at 80% 110%, rgba(183,131,93,.22), transparent 45%); }
.book-facts { display: flex; flex-wrap: wrap; gap: .75rem 2.5rem; margin-top: 2.5rem; padding: 1.25rem 0; border-block: 1px solid var(--line); color: var(--muted); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(230px, .65fr); gap: clamp(3rem, 9vw, 8rem); }
.content-grid h2 { margin-bottom: 1.5rem; font-size: clamp(2rem, 4vw, 3.1rem); }
.content-grid section + section { margin-top: 4rem; }
.theme-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.theme-list li { padding: .8rem 0; border-bottom: 1px solid var(--line); color: #d3d0c7; }
.character-list { display: grid; gap: 1rem; }
.character { border: 1px solid var(--line); padding: clamp(1.25rem, 3vw, 2rem); background: rgba(238,233,222,.025); }
.character h3 { margin-bottom: .75rem; font-size: clamp(1.35rem, 2.5vw, 1.8rem); }
.character p:last-child { margin-bottom: 0; }
.character-role { color: var(--copper); font-size: .7rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.aside-note { border-top: 2px solid var(--copper); padding-top: 1.25rem; }
.aside-note h2 { font: 700 .72rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.aside-note p { color: var(--muted); }
.portrait { min-height: 430px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(145deg, #232725, #151716); }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait-placeholder { max-width: 18rem; padding: 2rem; text-align: center; color: var(--muted); }
.portrait-placeholder strong { display: block; margin-bottom: .75rem; color: var(--paper); font-family: var(--serif); font-size: 1.5rem; font-weight: 400; }
.contact-card { max-width: 760px; border: 1px solid var(--line); padding: clamp(1.5rem, 5vw, 3.5rem); background: var(--ink-soft); }
.email { display: inline-block; margin: 1.5rem 0; font: clamp(1.25rem, 4vw, 2.3rem)/1.2 var(--serif); overflow-wrap: anywhere; }
.not-found { min-height: calc(100vh - 150px); display: grid; place-items: center; text-align: center; }
.not-found h1 { font-size: clamp(5rem, 18vw, 12rem); color: rgba(238,233,222,.12); }
.not-found h2 { margin-top: -2rem; }
.site-footer { position: relative; padding-block: 2rem; color: var(--muted); font-size: .78rem; }
.footer-grid { display: flex; justify-content: space-between; gap: 1.5rem; }

@media (max-width: 760px) {
  .nav-shell { flex-wrap: wrap; padding-block: 1rem; }
  .nav-list { width: 100%; flex-wrap: wrap; gap: 1rem 1.5rem; }
  .js .nav-shell { min-height: 74px; padding-block: 0; }
  .js .nav-toggle { display: inline-block; }
  .js .nav-list { display: none; position: absolute; top: 74px; left: 0; right: 0; width: auto; padding: 1.5rem; flex-direction: column; align-items: flex-start; background: #171918; border-bottom: 1px solid var(--line); }
  .js .nav-list.is-open { display: flex; }
  .hero-grid, .books-grid, .split, .content-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .hero-grid { align-items: start; }
  .section-head, .footer-grid { align-items: flex-start; flex-direction: column; }
  .book-card { min-height: 480px; }
  .book-card h3 { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
