/* Shared stylesheet — Hiya Jain
   Palette matches the Mundane Beauty Substack:
   background #FFF7ED, accent #DD5128 */

:root {
  --bg: #fff7ed;
  --ink: #2b2520;
  --accent: #dd5128;
  --muted: #8a7f72;
  --rule: #2b2520;
}

html {
  background-color: var(--bg);
}

body {
  font-family: 'Cardo', 'Palatino Linotype', Palatino, Georgia, serif;
  background-color: var(--bg);
  color: var(--ink);
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 20px 60px;
  line-height: 1.65;
  font-size: 1.05em;
}

/* ---- Masthead ---- */

header {
  text-align: left;
  margin-bottom: 34px;
}

h1.masthead {
  font-size: 2.6em;
  font-weight: normal;
  letter-spacing: 0.02em;
  margin: 0 0 6px;
}

h1.masthead a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: none;
}

nav {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 8px 0;
  margin-top: 14px;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 36px;
}

nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.95em;
  border-bottom: none;
}

nav a.active {
  text-decoration: underline;
  text-underline-offset: 4px;
}

nav a:hover {
  color: var(--accent);
}

/* ---- Body text ---- */

main {
  text-align: left;
}

.section {
  margin-bottom: 22px;
}

h2 {
  font-size: 1em;
  font-weight: normal;
  font-style: italic;
  margin: 30px 0 12px;
}

.work-list {
  list-style: none;
  padding-left: 22px;
  margin: 10px 0 22px;
}

.work-list li {
  margin-bottom: 8px;
  position: relative;
}

.work-list li::before {
  content: "\2022"; /* bullet */
  position: absolute;
  left: -22px;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--accent);
}

.contact {
  margin-top: 26px;
}

.contact p {
  margin: 0;
}

/* ---- Bookshelf ---- */

.shelf {
  margin-bottom: 40px;
}

.shelf h2 {
  font-style: normal;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 16px;
}

.cell {
  position: relative;
  aspect-ratio: 2 / 3;
  background: #f6ecda;
  border: 1px solid #e3d5bc;
  box-shadow: 0 1px 4px rgba(43, 37, 32, 0.12);
}

.cell img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cell .nocover {
  position: absolute;
  inset: 0;
  text-align: center;
  padding: 10px 8px;
  font-size: 12px;
  line-height: 1.45;
  overflow: hidden;
}

.cell .nocover .t {
  display: block;
  font-style: italic;
  margin-bottom: 4px;
}

.cell .nocover .a {
  display: block;
  color: var(--muted);
}

.empty-note,
.shelf-note {
  color: var(--muted);
  font-style: italic;
  font-size: 0.95em;
}

.epigraph {
  margin-top: 56px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  text-align: center;
  color: var(--muted);
  font-size: 0.85em;
}

.goodreads-note {
  color: var(--muted);
  font-size: 0.9em;
}

/* ---- Footer rule ---- */

footer {
  margin-top: 60px;
  border-top: 3px double var(--rule);
  padding-top: 10px;
  font-size: 0.85em;
  color: var(--muted);
}

/* ---- Small screens ---- */

@media (max-width: 600px) {
  body {
    padding: 24px 16px 48px;
  }

  h1.masthead {
    font-size: 2em;
  }

  nav ul {
    gap: 20px;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 10px;
  }
}
