:root {
  --bg-desktop: #e4e1da;
  --paper: #f5f3ee;
  --paper-soft: #ebe8e1;
  --ink: #241f1b;
  --text-2: #59534c;
  --text-3: #777067;
  --line: #b9afa2;
  --accent: #8f2f45;
  --accent-soft: #f4e6e9;
  --font-title: Optima, "Segoe UI", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  --radius: 8px;
  --shadow: 0 18px 48px rgb(36 31 27 / .16), 0 2px 8px rgb(36 31 27 / .08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-desktop: #171716;
    --paper: #252422;
    --paper-soft: #2d2b28;
    --ink: #f1eee8;
    --text-2: #c8c1b7;
    --text-3: #918980;
    --line: #5e554d;
    --accent: #c96a7f;
    --accent-soft: #4a2833;
    --shadow: 0 20px 56px rgb(0 0 0 / .42);
  }
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg-desktop);
  color: var(--ink);
  font: 15px/1.5 var(--font-body);
}
.library { width: min(1120px, calc(100% - 48px)); margin: 0 auto; padding: clamp(3.5rem, 9vw, 7rem) 0 2rem; }
.intro { max-width: 620px; }
.eyebrow { margin: 0 0 .8rem; color: var(--accent); font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
h1 { margin: 0; color: var(--ink); font: 800 clamp(3.1rem, 8vw, 6.5rem)/.9 var(--font-title); letter-spacing: -.06em; }
h1 em { color: var(--accent); font-family: Georgia, serif; font-weight: 400; }
.intro-copy { max-width: 42ch; margin: 1.75rem 0 0; color: var(--text-2); font: 13.5px/1.7 var(--font-body); }

.notebook-shelf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1.2rem, 3vw, 2.6rem); align-items: end; margin-top: clamp(4rem, 9vw, 7rem); }
.notebook { display: block; color: inherit; text-decoration: none; transition: transform 160ms ease, filter 160ms ease; }
.notebook:hover, .notebook:focus-visible { filter: saturate(1.06); transform: translateY(-6px); }
.notebook:focus-visible { outline: 3px solid var(--accent); outline-offset: 8px; }
.notebook-cover { position: relative; display: block; min-height: 370px; overflow: hidden; border: 1px solid rgb(0 0 0 / .28); border-radius: var(--radius); background-image: linear-gradient(180deg, rgb(18 13 11 / .05), rgb(18 13 11 / .76)), var(--cover); background-position: center; background-size: cover; box-shadow: var(--shadow); }
.notebook-cover::after { position: absolute; inset: 0; background: linear-gradient(110deg, rgb(255 255 255 / .18), transparent 32%, rgb(0 0 0 / .12)); content: ""; pointer-events: none; }
.holes { position: absolute; top: 9px; right: 13px; left: 13px; z-index: 1; display: flex; justify-content: space-between; }
.holes i { display: block; width: 14px; height: 14px; border: 2px solid rgb(245 242 233 / .78); border-radius: 50%; background: var(--bg-desktop); box-shadow: 0 1px 2px rgb(0 0 0 / .22); }
.cover-content { position: absolute; right: 22px; bottom: 22px; left: 22px; z-index: 1; display: flex; flex-direction: column; color: #fff; text-shadow: 0 2px 12px rgb(0 0 0 / .38); }
.cover-content small { margin-bottom: 1rem; color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.cover-content strong { font: 700 clamp(1.45rem, 2.6vw, 2.2rem)/.96 var(--font-title); letter-spacing: -.055em; }
.cover-arrow { align-self: flex-end; margin-top: 1.4rem; color: #fff; font-size: 1.8rem; line-height: 1; }

footer { display: flex; justify-content: space-between; gap: 1rem; margin-top: clamp(4rem, 9vw, 7rem); padding-top: 1rem; border-top: 1px solid var(--line); color: var(--text-3); font-size: 11px; }

@media (max-width: 860px) {
  .notebook-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 680px; }
  .notebook-cover { min-height: 330px; }
}
@media (max-width: 540px) {
  .library { width: min(100% - 32px, 420px); padding-top: 3rem; }
  h1 { font-size: clamp(3rem, 17vw, 5rem); }
  .notebook-shelf { grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 3.5rem; }
  .notebook-cover { min-height: 270px; }
  .cover-content { right: 13px; bottom: 15px; left: 13px; }
  .cover-content small { margin-bottom: .6rem; font-size: 8px; }
  .cover-content strong { font-size: 1.3rem; }
  .cover-arrow { margin-top: .75rem; font-size: 1.4rem; }
  .holes { right: 7px; left: 7px; }
  .holes i { width: 9px; height: 9px; border-width: 1px; }
  footer { flex-direction: column; }
}
