/* Tokyo Shelf — pre-modern Japanese bookshop aesthetic */

:root {
  --bg: #f8f3e6;
  --bg-soft: #f2ead4;
  --ink: #1a1612;
  --ink-soft: #4a4338;
  --muted: #7b6f5c;
  --rule: #d8cfb8;
  --accent: #6b3a2a;
  --link: #6b3a2a;
  --link-hover: #2a1308;
  --serif: "Cormorant Garamond", "Hiragino Mincho ProN", "游明朝", "Yu Mincho", "Times New Roman", serif;
  --serif-jp: "Hiragino Mincho ProN", "游明朝", "Yu Mincho", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "Hiragino Kaku Gothic ProN", sans-serif;
}

* { box-sizing: border-box; }

html { font-size: 17px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* HEADER */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--rule);
  max-width: 1100px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border: 1px solid var(--rule);
  background: var(--bg);
}

.brand-name {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
}

.site-nav a {
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--ink-soft);
  text-decoration: none;
  text-transform: lowercase;
  letter-spacing: 0.04em;
}

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

/* MAIN */
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

/* HOME */
.hero {
  margin-bottom: 4rem;
}

.hero-banner {
  margin: 0 0 2rem 0;
  border: 1px solid var(--rule);
}

.hero-banner img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-text h1 {
  font-size: 2.8rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

.tagline {
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink-soft);
  margin: 0 0 1.5rem;
}

.lede {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--ink);
}

/* SECTIONS */
section {
  margin-bottom: 3.5rem;
}

section h2 {
  font-size: 1.5rem;
  margin: 0 0 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
  letter-spacing: 0.02em;
}

/* POSTS LIST */
.posts-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.posts-list-item {
  margin-bottom: 1.5rem;
  border: 1px solid var(--rule);
  background: var(--bg-soft);
}

.posts-list-item a {
  display: flex;
  align-items: stretch;
  text-decoration: none;
  color: var(--ink);
}

.posts-list-thumb {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-right: 1px solid var(--rule);
  background: var(--bg);
}

.posts-list-item > a > div {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  flex: 1;
}

.posts-list-item strong {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
}

.posts-list-sub {
  color: var(--muted);
  font-size: 0.95rem;
  font-style: italic;
}

.posts-list-item a:hover {
  background: var(--bg);
}

/* SUBSCRIBE */
.subscribe-block {
  padding: 1.5rem;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  margin: 3rem 0;
}

.subscribe-block h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.subscribe-block p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

/* ABOUT BLURB */
.about-blurb p {
  color: var(--ink-soft);
}

.about-blurb a {
  color: var(--accent);
}

/* POST */
.post-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1.5rem;
}

.post-header h1 {
  font-size: 2.2rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.post-header .subtitle {
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin: 0 0 0.75rem;
}

.post-header .date {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
}

.post-hero {
  margin: 0 0 1.5rem;
  border: 1px solid var(--rule);
}

.post-hero img {
  display: block;
  width: 100%;
  height: auto;
}

.post-hero figcaption {
  padding: 0.75rem 1rem;
  background: var(--bg-soft);
  font-size: 0.92rem;
  color: var(--ink-soft);
  font-style: italic;
  border-top: 1px solid var(--rule);
}

.post-body figure {
  margin: 2rem 0;
  border: 1px solid var(--rule);
}

.post-body figure img {
  display: block;
  width: 100%;
  height: auto;
}

.post-body figcaption {
  padding: 0.75rem 1rem;
  background: var(--bg-soft);
  font-size: 0.92rem;
  color: var(--ink-soft);
  font-style: italic;
  border-top: 1px solid var(--rule);
}

.post-body h2, .post-body h3 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.post-body h2 {
  font-size: 1.5rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.4rem;
}

.post-body h3 {
  font-size: 1.2rem;
}

.post-body p {
  margin: 0 0 1.2rem;
}

.post-body blockquote {
  margin: 1.5rem 0;
  padding: 0.5rem 1.25rem;
  border-left: 3px solid var(--accent);
  background: var(--bg-soft);
  font-style: italic;
  color: var(--ink-soft);
}

.post-body blockquote em { font-style: normal; }

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  font-family: var(--sans);
}

.post-body th, .post-body td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.post-body th {
  background: var(--bg-soft);
  font-weight: 600;
  color: var(--ink);
}

.post-body code, .post-body pre {
  font-family: "SF Mono", "Monaco", "Consolas", "Courier New", monospace;
  font-size: 0.9rem;
}

.post-body pre {
  background: var(--bg-soft);
  padding: 1rem 1.25rem;
  border: 1px solid var(--rule);
  overflow-x: auto;
  line-height: 1.45;
}

.post-body a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.post-body a:hover { color: var(--link-hover); }

.post-body small {
  color: var(--muted);
  font-size: 0.85rem;
  font-style: italic;
}

.post-body hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2.5rem auto;
  width: 60%;
}

.post-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
}

.post-footer a {
  color: var(--accent);
  text-decoration: none;
}

/* FOOTER */
.site-footer {
  max-width: 720px;
  margin: 4rem auto 0;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

.site-footer p { margin: 0 0 0.5rem; }
.site-footer .legal { font-size: 0.78rem; }

/* MOBILE */
@media (max-width: 640px) {
  html { font-size: 16px; }
  .site-header { flex-direction: column; gap: 1rem; padding: 1rem; }
  .site-nav { gap: 1rem; }
  main { padding: 1.5rem 1rem 3rem; }
  .hero-text h1 { font-size: 2.2rem; }
  .post-header h1 { font-size: 1.8rem; }
  .posts-list-item a { flex-direction: column; }
  .posts-list-thumb { width: 100%; height: 200px; border-right: none; border-bottom: 1px solid var(--rule); }
  .post-body table { font-size: 0.85rem; }
  .post-body th, .post-body td { padding: 0.4rem 0.5rem; }
}
