:root {
  --bg: #f7f6f3;
  --text: #1b1d20;
  --muted: #5c626b;
  --line: #ddd8d0;
  --link: #123a72;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

.wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(247, 246, 243, 0.95);
}

.site-header .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 64px;
}

.brand {
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}

nav a {
  margin-left: 14px;
  color: var(--text);
  text-decoration: none;
}

.icon-headphones {
  width: 15px;
  height: 15px;
  vertical-align: -2px;
  margin-right: 3px;
}

main.wrap {
  padding-top: 28px;
  padding-bottom: 24px;
}

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

h1, h2, h3 {
  line-height: 1.25;
}

.post-list {
  list-style: none;
  padding: 0;
}

.post-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}


.post-list span,
.meta {
  color: var(--muted);
  font-size: 14px;
}

.post-list-desc {
  width: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
}

.post-header {
  position: relative;
}

.post-date {
  margin-bottom: 0.5rem;
}

.reading-time {
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
  margin-top: 0.75rem;
  margin-bottom: 0;
}

@media (min-width: 640px) {
  .post-date {
    position: absolute;
    top: 0;
    right: 0;
    margin-bottom: 0;
  }
}

.subtitle {
  font-size: 1.15rem;
  color: var(--muted);
  margin-top: -0.5rem;
  margin-bottom: 0.25rem;
  line-height: 1.5;
}

.home-profile {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.home-profile-photo,
.home-profile h1 {
  display: block;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.home-profile .connect-links {
  text-align: left;
}

.home-profile-photo {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid var(--line);
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.8);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: min(400px, 85vw);
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

blockquote {
  margin: 2rem 0;
  padding: 0 0 0 1.25rem;
  border-left: 3px solid var(--line);
  color: var(--muted);
  font-style: italic;
}

blockquote cite {
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  font-size: 0.9em;
}

.post-image {
  margin: 2rem 0;
}

.post-image > img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid var(--line);
}

.post-image .lightbox img {
  max-width: 90vw;
  max-height: 90vh;
}

.content .series-links {
  margin-top: 5rem;
}

.post-image figcaption {
  font-style: italic;
  color: var(--muted);
  margin-top: 0.75rem;
  font-size: 0.9em;
  text-align: left !important;
}

.image-pair {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  justify-content: flex-start;
  margin: 2rem 0;
}

@media (max-width: 600px) {
  .image-pair {
    flex-direction: column;
    align-items: center;
  }
}

.image-pair figure {
  margin: 0;
}

.image-pair figure > img {
  height: 200px;
  width: auto;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid var(--line);
}

.image-pair figcaption {
  font-style: italic;
  color: var(--muted);
  margin-top: 0.5rem;
  font-size: 0.9em;
}

.post-video {
  margin: 2rem 0;
}

.post-video > video {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.post-video figcaption {
  font-style: italic;
  color: var(--muted);
  margin-top: 0.75rem;
  font-size: 0.9em;
  text-align: left !important;
}

.content img {
  max-width: 100%;
  height: auto;
}

.content > p:first-child img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.connect-links {
  font-size: 14px;
  color: var(--muted);
}

.connect-links a {
  color: var(--muted);
}

.connect-links a:hover {
  color: var(--link);
}

.post-song {
  margin-top: 4rem;
  padding-top: 0;
  font-size: 14px;
  color: var(--muted);
}

.post-song a {
  color: var(--muted);
}

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

.post-song-note {
  margin-right: 0.35em;
}

.series-num {
  color: var(--muted);
  font-weight: 400;
  margin-right: 0.15em;
}

.series-hint {
  color: var(--muted);
  font-size: 14px;
  margin-top: -0.5em;
}

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 3rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.post-nav-prev,
.post-nav-next {
  text-decoration: none;
}

.post-nav-next {
  margin-left: auto;
}

.gallery {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  margin: 1.5rem 0;
}

.gallery figure {
  flex: 0 0 auto;
  width: 280px;
  margin: 0;
  scroll-snap-align: start;
}

.gallery img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
  cursor: pointer;
}

.gallery .lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border: none;
  cursor: default;
}

.gallery figcaption {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.4;
}

@media (min-width: 640px) {
  .gallery figure {
    width: 320px;
  }
  .gallery img {
    height: 420px;
  }
}

.page-header-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.category-filter {
  font-family: inherit;
  font-size: 14px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
}

.category-filter:focus {
  outline: 1px solid var(--link);
  border-color: var(--link);
}

.tag-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0.5rem;
}

.tag-chip {
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
}

.tag-chip:hover {
  border-color: var(--muted);
  color: var(--text);
}

.tag-chip.active {
  border-color: var(--link);
  color: var(--link);
}

.podcast-search {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 6px 10px;
  margin-top: 0.5rem;
}

.podcast-search:focus {
  outline: 1px solid var(--link);
  border-color: var(--link);
}

.podcast-search::placeholder {
  color: var(--muted);
}

.podcast-group h2 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  margin-top: 2rem;
  margin-bottom: 0;
  font-weight: 600;
}

.podcast-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.podcast-list li {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  align-items: flex-start;
}

.podcast-thumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--line);
}

.podcast-info {
  min-width: 0;
}

.podcast-host {
  color: var(--muted);
  font-size: 14px;
}

.podcast-host::before {
  content: "\00b7 ";
}

.podcast-desc {
  color: var(--muted);
  font-size: 14px;
  margin: 2px 0 0;
  line-height: 1.5;
}

.site-footer {
  color: var(--muted);
  font-size: 14px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.site-footer p {
  margin: 0;
}
