/* ==========================================================================
   Josep Rivera — Author Site
   Shared stylesheet. Loaded by every page (index.html, blog/index.html,
   and every blog/*.html post). Keep this file as the single source of
   truth for look & feel — edit here once, every page picks it up.
   ========================================================================== */

:root{
  --ink: #0c0d10;
  --ink-2: #1e2127;
  --ink-3: #14161a;
  --paper: #f2ede2;
  --paper-dim: #cfc7b8;
  --accent: #c79a6b;
  --accent-soft: #8a6a49;
  --hair: #34302a;
  --max: 760px;
}

*{ box-sizing: border-box; }

body{
  margin:0;
  background:
    radial-gradient(1100px 620px at 50% -8%, var(--ink-2), var(--ink) 62%),
    var(--ink);
  background-attachment: fixed;
  color: var(--paper);
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

a{ color: inherit; }

.wrap{
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: 20px;
}

/* ---------- nav ---------- */
header.site{
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: linear-gradient(to bottom, rgba(12,13,16,0.92), rgba(12,13,16,0.75) 80%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(199,154,107,0.14);
}
nav.wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding-block: 16px;
  font-family:"Inter", system-ui, sans-serif;
}
.brand{
  font-family:"Fraunces", Georgia, serif;
  font-weight:600;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-decoration:none;
  color: var(--paper);
}
.navlinks{
  display:flex;
  gap: 24px;
  list-style:none;
  margin:0; padding:0;
}
.navlinks a{
  text-decoration:none;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-dim);
  transition: color .15s ease;
}
.navlinks a:hover{ color: var(--accent); }

/* ---------- hero ---------- */
.hero{
  padding-top: 76px;
  padding-bottom: 56px;
  text-align:center;
}
.eyebrow{
  font-family:"Inter", system-ui, sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}
h1.title{
  font-family:"Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.1rem, 6vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  text-wrap: balance;
}
.hero p.lead{
  max-width: 46ch;
  margin: 0 auto;
  color: var(--paper-dim);
  font-size: 1.05rem;
  font-style: italic;
}
.rule{
  width: 64px;
  height: 1px;
  margin: 30px auto 0;
  background: linear-gradient(to right, transparent, var(--accent-soft), transparent);
  border:0;
}

/* ---------- book ---------- */
section.book{
  padding-block: 40px 64px;
}
.book-card{
  display:grid;
  grid-template-columns: 220px 1fr;
  gap: 36px;
  align-items:start;
}
.book-cover{
  width:100%;
  border-radius: 3px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 18px 40px -12px rgba(0,0,0,0.65),
    0 2px 10px rgba(0,0,0,0.5);
}
.book-info h2{
  font-family:"Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: 1.55rem;
  margin: 0 0 4px;
  line-height:1.2;
}
.book-info .subtitle{
  font-family:"Inter", system-ui, sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}
.book-info p{
  color: var(--paper-dim);
  font-size: 0.98rem;
  margin: 0 0 14px;
}
.book-info p:last-of-type{ margin-bottom: 22px; }

.buy-row{
  display:flex;
  flex-wrap: wrap;
  gap: 12px;
}
.buy{
  font-family:"Inter", system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration:none;
  padding: 11px 20px;
  border-radius: 3px;
  display:inline-flex;
  align-items:center;
  gap: 9px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.buy:hover{ transform: translateY(-1px); }
.buy svg{ width:15px; height:15px; flex:none; }
.buy.amazon{
  background: var(--accent);
  color: #201305;
  box-shadow: 0 6px 18px -8px rgba(199,154,107,0.55);
}
.buy.bn{
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(242,237,226,0.35);
}
.buy.bn:hover{ border-color: var(--accent); color: var(--accent); }

.kind{
  display:inline-block;
  font-family:"Inter", system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--accent);
  padding: 3px 9px;
  border-radius: 2px;
  margin-bottom: 10px;
}

.shelf .book-card + .book-card{
  margin-top: 52px;
  padding-top: 52px;
  border-top: 1px solid var(--hair);
}

@media (max-width: 540px){
  .book-card{ grid-template-columns: 1fr; }
  .book-cover{ max-width: 180px; margin: 0 auto; }
  .book-info{ text-align:center; }
  .buy-row{ justify-content:center; }
}

/* ---------- about ---------- */
section.about{
  padding-block: 8px 64px;
  border-top: 1px solid var(--hair);
}
section.about .eyebrow{ text-align:left; margin-top:44px; }
.about-grid{
  display:grid;
  grid-template-columns: 84px 1fr;
  gap: 24px;
  align-items:start;
}
.monogram{
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--ink-2), var(--ink-3));
  border: 1px solid rgba(199,154,107,0.3);
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:"Fraunces", Georgia, serif;
  font-size: 1.5rem;
  color: var(--accent);
}
.about-grid p{
  color: var(--paper-dim);
  font-size: 0.97rem;
  margin: 0 0 14px;
}
.about-grid p:last-child{ margin-bottom:0; }

@media (max-width: 540px){
  .about-grid{ grid-template-columns: 1fr; text-align:left; }
  .monogram{ margin-bottom: 6px; }
}

/* ---------- footer ---------- */
footer{
  border-top: 1px solid var(--hair);
  padding-block: 28px 40px;
  font-family:"Inter", system-ui, sans-serif;
}
footer .wrap{
  display:flex;
  flex-wrap:wrap;
  gap: 14px;
  align-items:center;
  justify-content:space-between;
}
footer p{
  margin:0;
  font-size: 0.8rem;
  color: var(--paper-dim);
}
footer a{
  font-size: 0.8rem;
  text-decoration:none;
  color: var(--paper-dim);
  border-bottom: 1px solid transparent;
}
footer a:hover{ color: var(--accent); border-color: var(--accent); }

/* ==========================================================================
   Blog — list page + individual post pages.
   New sections, styled to match the rest of the site (same accent, same
   type scale). Nothing above this line needs to change for the blog to work.
   ========================================================================== */

/* ---------- blog index (list of posts) ---------- */
section.blog-page{
  padding-block: 48px 64px;
}
section.blog-page .eyebrow{ text-align:left; }
section.blog-page h1.title{
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  text-align:left;
  margin-bottom: 12px;
}
section.blog-page p.lead{
  text-align:left;
  margin: 0 0 40px;
  max-width: 54ch;
}

.post-list{
  display:flex;
  flex-direction:column;
}
.post-card{
  padding-block: 28px;
  border-top: 1px solid var(--hair);
}
.post-card:first-child{ border-top: none; padding-top: 0; }
.post-date{
  display:block;
  font-family:"Inter", system-ui, sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.post-card h2{
  font-family:"Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: 1.35rem;
  margin: 0 0 10px;
  line-height:1.25;
}
.post-card h2 a{
  text-decoration:none;
  color: var(--paper);
  transition: color .15s ease;
}
.post-card h2 a:hover{ color: var(--accent); }
.post-card p.excerpt{
  color: var(--paper-dim);
  font-size: 0.97rem;
  margin: 0 0 12px;
}
.post-card .read-more{
  font-family:"Inter", system-ui, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-decoration:none;
  color: var(--accent);
  border-bottom: 1px solid transparent;
}
.post-card .read-more:hover{ border-color: var(--accent); }

.empty-note{
  color: var(--paper-dim);
  font-style: italic;
  padding-block: 8px 0;
}

/* ---------- single post page ---------- */
section.post{
  padding-block: 48px 64px;
}
section.post .post-meta{
  text-align:left;
  margin-bottom: 14px;
}
section.post h1.title{
  text-align:left;
  font-size: clamp(1.9rem, 5.5vw, 2.7rem);
  margin-bottom: 28px;
}
.post-body p{
  color: var(--paper-dim);
  font-size: 1.02rem;
  margin: 0 0 18px;
}
.post-body h2{
  font-family:"Fraunces", Georgia, serif;
  font-weight: 500;
  color: var(--paper);
  font-size: 1.3rem;
  margin: 34px 0 14px;
}
.post-body blockquote{
  margin: 24px 0;
  padding-left: 18px;
  border-left: 2px solid var(--accent-soft);
  color: var(--paper);
  font-style: italic;
}
.back-link{
  display:inline-block;
  margin-top: 36px;
  font-family:"Inter", system-ui, sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-decoration:none;
  color: var(--paper-dim);
  border-bottom: 1px solid transparent;
}
.back-link:hover{ color: var(--accent); border-color: var(--accent); }
