*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --accent: #8c4a3a;
  --text: #1a1a1a;
  --muted: #555;
  --light: #888;
  --bg: #f7f5ef;
  --card-bg: #fff;
  --border: #e1ddd2;

  /* Venue colors */
  --v-nyt: #1a1a1a;
  --v-wsj: #0a4d8c;
  --v-lat: #b8470d;
  --v-avcx: #d4a017;
  --v-slate: #6b2c8c;
  --v-modern: #0d8a7a;
  --v-crucinova: #2e7d4f;
  --v-amazon: #ff9900;
}

body {
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

a:hover {
  text-decoration: underline;
}

/* Header */

.site-header {
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.75rem;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}

.site-header h1 {
  font-family: "Iowan Old Style", "Georgia", "Charter", serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.tagline {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 760px;
}

.tagline em {
  font-style: italic;
  color: var(--text);
}

/* Section headings */

section {
  margin-bottom: 1.5rem;
}

section h2 {
  font-family: ui-sans-serif, -apple-system, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 0.55rem;
}

/* Book */

.book-card {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--v-amazon);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  color: inherit;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  max-width: 520px;
  align-items: center;
}

.book-card:hover {
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(0,0,0,0.14);
  transform: translateY(-3px);
}

.book-cover img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 3px;
}

.book-body h3 {
  font-family: "Iowan Old Style", "Georgia", serif;
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}

.book-body .meta {
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.book-body .venue {
  background: var(--v-amazon);
  color: #1a1a1a;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  display: inline-block;
}

/* Puzzle grid */

.puzzle-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 0.85rem;
}

.puzzle-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.puzzle-card:hover {
  box-shadow: 0 8px 22px rgba(0,0,0,0.16);
  transform: translateY(-3px);
  border-color: #cfcabb;
}

.thumb-link,
.title-link {
  color: inherit;
  text-decoration: none;
  display: block;
}

.thumb-link:hover,
.title-link:hover {
  text-decoration: none;
}

.thumb {
  aspect-ratio: 1 / 1;
  background: #fafafa;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  display: block;
}

.thumb.crossword-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 4.5%;
}

.cg-inner {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(var(--gw, 15), 1fr);
  aspect-ratio: 1 / 1;
  background: #1a1a1a;
  gap: 1.5px;
  padding: 1.5px;
  box-shadow: 1.5px 1.5px 0.5px rgba(0, 0, 0, 0.22);
}

.cg-inner .cw { background: #fff; }
.cg-inner .cb { background: #1a1a1a; }
.cg-inner .cy { background: #ffe97a; }

.info {
  padding: 0.55rem 0.7rem 0.6rem;
  flex: 1;
}

.info h3 {
  font-family: "Iowan Old Style", "Georgia", serif;
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  line-height: 1.2;
}

.venue {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 3px;
  margin-bottom: 0.3rem;
  color: #fff;
  background: var(--light);
  white-space: nowrap;
}

.venue.v-nyt { background: var(--v-nyt); }
.venue.v-wsj { background: var(--v-wsj); }
.venue.v-lat { background: var(--v-lat); }
.venue.v-avcx { background: var(--v-avcx); color: #1a1a1a; }
.venue.v-slate { background: var(--v-slate); }
.venue.v-modern { background: var(--v-modern); }
.venue.v-crucinova { background: var(--v-crucinova); }

.date {
  font-size: 0.82rem;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
}

.venue-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.05rem;
}

.venue-row .venue {
  margin-bottom: 0;
}

.extra-link {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.extra-link:hover {
  text-decoration: underline;
}

/* Other work */

.other-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.other-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 0.7rem 1.1rem 0.75rem;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 1rem;
  align-items: start;
}

.other-thumb {
  width: 88px;
  height: 88px;
  border-radius: 6px;
  overflow: hidden;
  background: #f0ede4;
  border: 1px solid var(--border);
}

.other-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.other-orca .other-thumb img {
  object-position: center;
}

.other-card:hover {
  box-shadow: 0 8px 22px rgba(0,0,0,0.16);
  transform: translateY(-3px);
}

.other-mit { border-left-color: #8a1a1a; }
.other-orca { border-left-color: var(--accent); }

.other-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 0.35rem;
}

.other-card h3 {
  font-family: "Iowan Old Style", "Georgia", serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 0.3rem;
}

.other-card p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
  margin-bottom: 0.45rem;
}

.other-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.other-links a {
  font-size: 0.88rem;
  font-weight: 500;
}

/* Footer */

.site-footer {
  margin-top: 2rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--light);
}
