/* Fonts are served from this site (no Google request) */
@font-face {
  font-family: 'Anton';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/anton-latin.woff2") format('woff2');
}
@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/quicksand-latin.woff2") format('woff2');
}
@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/quicksand-latin.woff2") format('woff2');
}
@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/quicksand-latin.woff2") format('woff2');
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 300;
  font-stretch: 100%;
  font-display: swap;
  src: url("fonts/roboto-latin.woff2") format('woff2');
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url("fonts/roboto-latin.woff2") format('woff2');
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url("fonts/roboto-latin.woff2") format('woff2');
}

/* Shared styles for the Ivan Debel site: black masthead, paper-toned book sections, dark author band. One deliberate dark/yellow look carried over from the original site. */
:root {
  color-scheme: dark;
  --ink: #0b0b0b;
  --ink-2: #1a1a1a;
  --gold: #f2d81c;
  --paper: #f7f7f5;
  --text-dark: #1b1b1b;
  --text-light: #e8e8e6;
  --muted-light: #a9a9a4;
  --rule: #2c2c2a;
  --font-display: "Anton", Impact, "Arial Narrow", sans-serif;
  --font-head: "Quicksand", "Trebuchet MS", sans-serif;
  --font-body: "Roboto", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;
}
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { background: var(--ink); color: var(--text-light); font: 16px/1.65 var(--font-body); }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

.note { background: #fff4c2; color: #3a2e00; font: 13px/1.45 var(--font-body); text-align: center; padding: 8px var(--gutter); }

header.top { background: var(--ink); border-bottom: 1px solid var(--rule); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 14px; }
.logo img { display: block; height: 44px; width: auto; }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; }
nav li + li { border-left: 1px solid #444; }
nav a { display: block; padding: 2px 14px; font: 500 12px/1.6 var(--font-head); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: var(--muted-light); }
nav a:hover { color: #fff; }

.banner { position: relative; aspect-ratio: 1536 / 550; max-width: 100%; background: #121212; overflow: hidden; }
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; animation: fade 18s infinite; }
.banner img:nth-child(1) { opacity: 1; animation-delay: 0s; }
.banner img:nth-child(2) { animation-delay: 6s; }
.banner img:nth-child(3) { animation-delay: 12s; }
@keyframes fade { 0% { opacity: 0 } 4% { opacity: 1 } 33% { opacity: 1 } 37% { opacity: 0 } 100% { opacity: 0 } }
@media (prefers-reduced-motion: reduce) {
  .banner img { animation: none; }
  .banner img:nth-child(1) { opacity: 1; }
}

.books { background: var(--paper) url("img/paper.webp") center / cover; color: var(--text-dark); padding-block: clamp(32px, 6vw, 64px); }
.books .wrap { max-width: 1280px; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: clamp(24px, 3vw, 40px); align-items: start; }
.books .shelf { margin-top: 8px; }
.shelf img { display: block; width: 100%; height: auto; }
.titles { display: grid; gap: 32px; }
.book { min-width: 0; }
.book h2 { margin: 0 0 8px; line-height: 0; }
.book h2 img { max-width: 100%; height: auto; width: 400px; }
.book p { margin: 0 0 10px; font: 400 17px/1.65 var(--font-head); max-width: 34em; }
.buy { display: inline-block; margin-top: 4px; font: 600 13px/1 var(--font-head); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; color: var(--gold); background: var(--ink); padding: 11px 16px; border-radius: 4px; }
.buy:hover { background: #2a2a2a; }

.author { background: var(--ink-2) url("img/dark.webp") center / cover; padding-block: clamp(40px, 7vw, 72px); }
.author .wrap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(28px, 4vw, 48px); align-items: end; justify-items: start; text-align: left; }
.author .bio { order: -1; display: block; }
.author .bio .face { display: block; }
@media (min-width: 821px) { .author .contact { margin-bottom: -8px; } } /* -8px puts the email baseline on the photo's bottom edge */
.contact h2 { margin: 0 0 6px; font: 400 26px/1.2 var(--font-display); letter-spacing: .04em; color: var(--gold); }
.contact p { margin: 0 0 14px; color: var(--muted-light); }
.email { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.email code { font: 500 17px/1.4 var(--font-body); color: #fff; background: none; padding: 0; border: 0; }
.email button { font: 500 13px/1 var(--font-body); color: var(--ink); background: var(--gold); border: 0; border-radius: 4px; padding: 10px 14px; cursor: pointer; }
.bio { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 24px; align-items: start; }
.bio .face { width: 130px; height: auto; border-radius: 0; }
.bio h2 { margin: 0 0 10px; line-height: 0; }
.bio h2 img { width: 220px; max-width: 100%; height: auto; }
.bio p { margin: 0 0 14px; font-weight: 300; max-width: 60ch; }

footer { background: #000; color: #8d8d88; font-size: 12px; text-align: center; padding-block: 18px; }
footer p { margin: 4px 0; }

@media (max-width: 820px) {
  .books .wrap, .author .wrap { grid-template-columns: minmax(0, 1fr); }
  nav a { padding-inline: 10px; }
}
@media (max-width: 460px) {
  .bio { grid-template-columns: minmax(0, 1fr); }
  .logo img { height: 36px; }
}

/* Home: "read more" link under each short blurb */
.more-link { font: 600 13px/1 var(--font-head); letter-spacing: .08em; text-transform: uppercase; color: var(--text-dark); text-underline-offset: 4px; }
.more-link:hover { color: #000; }

/* Books page */
nav a[aria-current="page"] { color: #fff; }
.page-head { background: var(--ink); padding-block: clamp(28px, 5vw, 48px); border-bottom: 1px solid var(--rule); }
.page-head h1 { margin: 0; font: 400 clamp(34px, 6vw, 56px)/1.05 var(--font-display); letter-spacing: .04em; color: var(--gold); text-wrap: balance; }
.page-head p { margin: 10px 0 0; color: var(--muted-light); max-width: 60ch; }
.catalog { background: var(--paper) url("img/paper.webp") center / cover; color: var(--text-dark); padding-block: clamp(32px, 6vw, 64px); }
.catalog .wrap { display: grid; gap: clamp(40px, 7vw, 72px); }
.entry { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; scroll-margin-top: 96px; }
.entry + .entry { border-top: 1px solid #d8d8d2; padding-top: clamp(40px, 7vw, 72px); }
.entry .cover { width: 100%; height: auto; }
.entry h2 { margin: 0 0 6px; line-height: 0; }
.entry h2 img { width: 340px; max-width: 100%; height: auto; }
.entry .meta { margin: 0 0 14px; font: 500 12px/1.4 var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: #6a6a64; }
.entry p { margin: 0 0 12px; font: 400 17px/1.7 var(--font-head); max-width: 62ch; }
.entry .pending { font-size: 14px; color: #6a6a64; font-style: italic; }
@media (max-width: 640px) {
  .entry { grid-template-columns: minmax(0, 1fr); }
  .entry .cover { width: 200px; }
}
.entry .toggle { display: block; margin: 0 0 16px; padding: 0; background: none; border: 0; cursor: pointer; font: 600 13px/1.4 var(--font-head); letter-spacing: .08em; text-transform: uppercase; color: var(--text-dark); text-decoration: underline; text-underline-offset: 4px; }
.entry .toggle:hover { color: #000; }

/* Author page */
.profile { background: var(--ink-2) url("img/dark.webp") center / cover; padding-block: clamp(36px, 6vw, 72px); }
.profile .wrap { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.profile .portrait { width: 100%; height: auto; border-radius: 6px; box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.profile-text h2 { margin: 0 0 18px; line-height: 0; }
.profile-text h2 img { width: 300px; max-width: 100%; height: auto; }
.profile-text p { margin: 0 0 16px; font: 300 18px/1.75 var(--font-body); max-width: 60ch; }
.profile-text .buy { margin-top: 8px; background: var(--gold); color: var(--ink); }
.profile-text .buy:hover { background: #fff; }
.profile .portrait { align-self: start; }
.profile-text { align-self: stretch; display: flex; flex-direction: column; align-items: flex-start; }
.profile-text .profile-contact { margin-top: auto; margin-bottom: -8px; padding-top: 24px; } /* -8px puts the email baseline on the photo's bottom edge */
.profile-text .profile-contact h2 { margin: 0 0 6px; line-height: 1.2; }
.profile-text .profile-contact p { margin: 0 0 14px; font: inherit; }
.bio-more { display: inline-block; margin-top: 4px; font: 600 13px/1 var(--font-head); letter-spacing: .08em; text-transform: uppercase; color: var(--gold); text-underline-offset: 4px; }
@media (max-width: 720px) {
  .profile .wrap { grid-template-columns: minmax(0, 1fr); }
  .profile .portrait { width: 260px; }
}
.email-link { color: inherit; text-decoration: none; }
.email-link:hover code, .email-link:focus-visible code { color: var(--gold); text-decoration: underline; text-underline-offset: 4px; }
