:root {
  --bg: #eeeeee;
  --paper: #ffffff;
  --ink: #111111;
  --muted: #888888;
  --faint: #aaaaaa;
  --line: #cccccc;
  --accent: #cc0000;
  --sidebar: #666666;
  --max: 1280px;
  --stream-gap: 1.25rem;
  --stream-min: 18.5rem;
  --serif: "Sorts Mill Goudy", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Share", "Gill Sans", "Trebuchet MS", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  border-top: 5px solid #000;
  color: var(--ink);
  font: 18px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid #bbbbbb;
}

a:hover { color: var(--accent); border-bottom-color: #cccccc; }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  letter-spacing: -0.02em;
  line-height: 1.2;
  font-weight: 400;
}

.site-shell {
  max-width: var(--max);
  margin: 0 auto;
  background: var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  letter-spacing: -0.03em;
}

.brand a {
  border: 0;
  color: var(--ink);
}

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

.brand-tag {
  display: block;
  margin: 0.35rem 0 0;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-style: italic;
  color: var(--faint);
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.25rem;
  margin: 0.75rem 0 1.25rem;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
}

.site-nav a {
  border: 0;
  color: var(--ink);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--accent); }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 18rem);
  gap: 0;
  flex: 1;
}

.layout.is-single {
  grid-template-columns: minmax(0, 1.4fr) minmax(16rem, 22rem);
  background: #f3f3f3;
}

.main {
  padding: 1.25rem 1.5rem 3rem;
  min-width: 0;
}

.layout.is-single .main {
  background: var(--paper);
  padding: 1.5rem 2rem 3rem 2.5rem;
}

.sidebar {
  padding: 1.5rem 1.25rem 3rem;
  border-left: 1px solid var(--line);
  font-size: 1rem;
  color: var(--sidebar);
}

.layout.is-single .sidebar {
  border-left: 0;
  background: #f3f3f3;
}

.sidebar h2 {
  margin: 0 0 0.5rem;
  color: var(--sidebar);
  font-size: 1.15rem;
}

.sidebar-brand {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.menu-toggle {
  display: none;
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f7f7;
  cursor: pointer;
}

.menu-toggle:hover { background: #eeeeee; }

.menu-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.menu-toggle-bars,
.menu-toggle-bars::before,
.menu-toggle-bars::after {
  display: block;
  width: 1.1rem;
  height: 2px;
  margin: 0 auto;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
  content: "";
}

.menu-toggle-bars {
  position: relative;
}

.menu-toggle-bars::before,
.menu-toggle-bars::after {
  position: absolute;
  left: 0;
}

.menu-toggle-bars::before { top: -6px; }
.menu-toggle-bars::after { top: 6px; }

.menu-toggle[aria-expanded="true"] .menu-toggle-bars {
  background: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}


.sidebar .site-title-widget {
  margin: 0 0 0.15rem;
}

.sidebar .site-title-widget a {
  border: 0;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 1.55rem;
  line-height: 1.15;
}

.sidebar .about {
  margin: 0 0 1.75rem;
  line-height: 1.5;
}

.sidebar .about a { color: var(--accent); border-color: transparent; }
.sidebar .about a:hover { border-bottom: 1px solid var(--accent); }

.sidebar ul {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
}

.sidebar li { margin: 0 0 0.35rem; }

ul.category-list {
  font-size: 1.15rem;
}

.sidebar .category-list a {
  border: 0;
  color: var(--ink);
}

.sidebar .category-list a:hover { color: var(--accent); }

.sidebar .count { color: var(--faint); }

.search-form {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.search-form input[type="search"] {
  flex: 1;
  min-width: 0;
  border: 1px solid #dddddd;
  border-radius: 6px;
  padding: 0.45rem 0.65rem;
  background: #fafafa;
  font: inherit;
}

.search-form button {
  border: 1px solid #aaaaaa;
  border-radius: 6px;
  background: #eee;
  padding: 0.45rem 0.75rem;
  font: 700 0.75rem/1 var(--sans);
  text-transform: uppercase;
  cursor: pointer;
}

.search-form button:hover { background: #ddd; }

.page-title {
  margin: 0 0 1.25rem;
  color: #333;
  font-size: 1.6rem;
}

.stream {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--stream-min), 1fr));
  gap: var(--stream-gap);
  align-items: start;
}

.card {
  background: var(--paper);
  break-inside: avoid;
}

.card-image {
  border: 0;
  display: block;
  margin-bottom: 0.35rem;
}

.card-image img {
  width: 100%;
  border: 1px solid #999;
  opacity: 0.65;
  transition: opacity 0.2s ease;
}

.card:hover .card-image img,
.card:focus-within .card-image img { opacity: 1; }

.card h2 {
  margin: 0.35rem 0 0.5rem;
  padding: 0 0.75rem;
  font-size: 1.75rem;
}

.card h2 a {
  border: 0;
  color: var(--ink);
}

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

.card-excerpt {
  margin: 0;
  padding: 0 0.75rem 0.25rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.card-more {
  display: inline-block;
  margin: 0.35rem 0.75rem 1rem;
  border: 0;
  color: var(--accent);
  font-size: 0.9rem;
}

.pagination-bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-bottom: 2rem;
  font-family: var(--serif);
}

.pagination-bar a {
  background: #eeeeee;
  border: 0;
  border-radius: 4px;
  padding: 0.45rem 0.8rem;
}

.pagination-bar a:hover { background: #dddddd; color: var(--ink); }

.single-kicker {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: 1.4rem;
}

.single-kicker a {
  border: 0;
  color: #cccccc;
}

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

.single-title {
  margin: 0 0 1rem;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
}

.entry {
  font-size: 1.05rem;
  line-height: 1.65;
  word-wrap: break-word;
}

.entry p,
.entry ul,
.entry ol,
.entry pre,
.entry blockquote { margin: 0 0 1.15rem; }

.entry img {
  border: 1px solid #eeeeee;
  background: #fafafa;
  padding: 4px;
  border-radius: 3px;
  margin: 0.35rem 0 1.25rem;
}

.entry a { word-break: break-word; }

.entry pre {
  overflow: auto;
  background: #1c1917;
  color: #f5f5f4;
  padding: 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

.meta-block {
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid #eeeeee;
  color: var(--faint);
  font-size: 0.95rem;
}

.meta-block a { color: var(--ink); }

.tag-list {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--faint);
}

.prevnext {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.75rem;
  font-family: var(--serif);
}

.comments-panel h3 {
  margin: 0 0 1rem;
  font-size: 1.35rem;
}

.comment {
  border: 1px solid #dddddd;
  border-radius: 6px;
  padding: 0.85rem 1rem;
  margin: 0 0 0.75rem;
  background: #fff;
}

.comment:nth-child(even) { background: #f6f6f6; }

.comment-meta {
  color: var(--faint);
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.comment-form label {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid #cccccc;
  font: inherit;
}

.comment-form button {
  margin-top: 1rem;
  margin-left: 0;
  border: 1px solid #aaaaaa;
  border-radius: 6px;
  background: #eee;
  padding: 0.55rem 1rem;
  font: 700 0.75rem/1 var(--sans);
  text-transform: uppercase;
  cursor: pointer;
}

.comment-form button:hover { background: #ddd; }

.flash {
  margin: 1rem 1.5rem 0;
  padding: 0.75rem 1rem;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  border-radius: 8px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 0.85rem;
}

.gallery-grid a { border: 0; }

.gallery-grid img {
  width: 100%;
  height: 8.5rem;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 2px;
}

.gallery-caption {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem;
  text-align: center;
  color: var(--faint);
  font-size: 0.75rem;
  line-height: 1.55;
}

.site-footer a { color: var(--sidebar); }


.entry .iframe-embed {
  margin: 1.25rem 0;
  max-width: 100%;
  overflow: auto;
}

.entry .iframe-embed iframe {
  max-width: 100%;
  display: block;
  margin: 0 auto;
  border: 0;
}

.entry pre.wp-code {
  overflow: auto;
  background: #1c1917;
  color: #f5f5f4;
  padding: 1rem 1.1rem;
  border-radius: 6px;
  font-size: 0.88rem;
  line-height: 1.45;
  margin: 1.15rem 0;
}

.entry pre.wp-code code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: transparent;
  color: inherit;
  white-space: pre;
}

.entry .wp-gallery {
  display: grid;
  grid-template-columns: repeat(var(--gallery-cols, 3), minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.entry .wp-gallery-item {
  border: 0;
  display: block;
}

.entry .wp-gallery-item img {
  width: 100%;
  height: 9rem;
  object-fit: cover;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fafafa;
  padding: 0;
}

@media (max-width: 900px) {
  .entry .wp-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .layout,
  .layout.is-single {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: -1;
    border-left: 0;
    border-bottom: 1px solid var(--line);
    padding: 0.85rem 1rem 0.85rem;
    background: var(--paper);
    position: sticky;
    top: 0;
    z-index: 40;
  }

  .layout.is-single .sidebar {
    background: var(--paper);
  }

  .sidebar-brand {
    margin-bottom: 0;
  }

  .sidebar .site-title-widget a {
    font-size: 1.25rem;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  ul.category-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem 1rem;
    column-gap: 1rem;
  }

  ul.category-list li {
    margin: 0;
  }

  .sidebar-panel {
    display: none;
    padding: 0.85rem 0 0.35rem;
    border-top: 1px solid var(--line);
    margin-top: 0.85rem;
  }

  .sidebar-panel.is-open {
    display: block;
  }

  body.menu-open {
    overflow: hidden;
  }

  .layout.is-single .main { padding: 1.25rem 1.25rem 2rem; }

  .main { padding: 1rem 1.1rem 2rem; }
}
