/* Post list */
.post-list {
  list-style: none;
}

.post-list-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0 24px;
  align-items: baseline;
  padding: 13px 0;
}

.post-list-item time {
  font-size: 15px;
  color: oklch(28% 0.01 50 / 0.72);
  white-space: nowrap;
  font-family: 'Lora', serif;
  padding-top: 2px;
}

.post-list-item a {
  font-size: 23px;
  color: var(--background-color);
  line-height: 1.3;
  border-bottom: none;
  transition: color 0.15s;
}

.post-list-item a:hover {
  color: var(--accent-color);
}

.post-item-tags {
  grid-column: 2;
  margin-top: 4px;
  font-size: 14px;
  color: oklch(28% 0.01 50 / 0.58);
}

/* Tags */
.post-tag {
  display: inline-block;
  font-size: 14px;
  color: var(--accent-color);
  border-bottom: none;
  margin-right: 4px;
}

.post-tag:hover {
  opacity: 0.8;
  border-bottom: none;
}

.tags-footer {
  margin-top: 40px;
}

/* Tag filter notice */
.tag-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  padding: 11px 16px;
  background: var(--background-color);
  border-radius: 4px;
  font-size: 15px;
  color: var(--text-color);
}

.tag-filter-bar[hidden] {
  display: none;
}

.tag-filter-bar strong {
  color: var(--accent-color);
  font-style: normal;
}

.tag-filter-clear {
  font-size: 13px;
  color: oklch(18% 0.01 50 / 0.55);
  border-bottom: none;
  margin-left: auto;
}

.tag-filter-clear:hover {
  color: var(--background-color);
  border-bottom: none;
}

/* Post meta */
.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid oklch(18% 0.01 50 / 0.15);
  font-size: 15px;
  color: oklch(22% 0.01 50);
}

.post-meta .post-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Post content */
.post-content {
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.75;
}

.post-content h2,
.post-content h3,
.post-content h4 {
  font-family: 'Lora', serif;
  color: var(--background-color);
  margin-top: 1.8em;
  margin-bottom: 0.6em;
  line-height: 1.3;
}

.post-content h2 { font-size: 1.5em; }
.post-content h3 { font-size: 1.25em; }

.post-content p { margin-bottom: 1.2em; }

.post-content a {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 2px;
  margin: 2em 0;
  display: block;
  border: 12px solid oklch(91% 0.01 75);
}

.post-content ul,
.post-content ol {
  padding-left: 1.5em;
  margin-top: 0.4em;
  margin-bottom: 1.2em;
  margin-left: 0;
}

.post-content li {
  margin-bottom: 0.4em;
  line-height: 1.7;
}

.post-content blockquote {
  margin: 2.2em 0;
  padding: 24px 28px;
  background: var(--background-color);
  color: oklch(88% 0.008 75);
  font-style: italic;
  line-height: 1.75;
  border-radius: 3px;
}

.post-content blockquote::before {
  content: '\201C';
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3em;
  line-height: 0.55;
  color: var(--accent-color);
  display: block;
  margin-bottom: 12px;
  font-style: normal;
}

.post-content code {
  font-family: 'Courier New', monospace;
  font-size: 0.88em;
  background: oklch(18% 0.01 50 / 0.1);
  padding: 2px 6px;
  border-radius: 3px;
}

.post-content pre {
  background: oklch(18% 0.01 50 / 0.08);
  padding: 20px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.5em 0;
}

.post-content pre code {
  background: none;
  padding: 0;
  font-size: 0.9em;
}

.post-content hr {
  border: none;
  border-top: 1px solid oklch(18% 0.01 50 / 0.2);
  margin: 2em 0;
}

.youtube-embed {
  margin: 2em 0;
  border: 12px solid oklch(91% 0.01 75);
  border-radius: 2px;
  overflow: hidden;
}

/* All posts button at end of post */
.all-posts-btn {
  display: inline-block;
  margin-top: 40px;
  padding: 10px 22px;
  border: 1.5px solid oklch(18% 0.01 50 / 0.3);
  border-bottom: 1.5px solid oklch(18% 0.01 50 / 0.3);
  border-radius: 6px;
  font-size: 15px;
  color: var(--background-color);
  background: transparent;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.all-posts-btn:hover {
  border-color: var(--accent-color);
  border-bottom-color: var(--accent-color);
  background: color-mix(in oklch, var(--accent-color) 7%, transparent);
  color: var(--background-color);
}

/* Post layout — 72ch main column + sidebar */
.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 72ch) 230px;
  gap: 0 56px;
  max-width: calc(72ch + 56px + 230px);
  margin: 0 auto;
  align-items: start;
}

/* Post list — wider than reading column */
.post-list-wrap {
  max-width: min(960px, 92vw);
  margin: 0 auto;
}

/* Post title inside content */
.post-title {
  font-family: 'Lora', serif;
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 700;
  color: var(--background-color);
  line-height: 1.2;
  margin-bottom: 20px;
  padding-top: 8px;
}

/* Image alignment */
img.rightalign {
  float: right !important;
  max-width: 50%;
  width: auto;
  height: auto;
  margin: 0 0 1em 1.5em !important;
  display: block;
  border-radius: 4px;
}

img.leftalign {
  float: left !important;
  max-width: 50%;
  width: auto;
  height: auto;
  margin: 0 1.5em 1em 0 !important;
  display: block;
  border-radius: 4px;
}

.post-content img.img-centre {
  display: block;
  float: none;
  margin: 1.5em auto;
  max-width: 65%;
}

.post-content {
  display: flow-root;
}

/* Post navigation (prev / all / next) */
.post-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: stretch;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid oklch(18% 0.01 50 / 0.15);
}

.post-nav .post-nav-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 18px;
  border: 1.5px solid oklch(18% 0.01 50 / 0.2);
  border-bottom: 1.5px solid oklch(18% 0.01 50 / 0.2);
  border-radius: 6px;
  color: var(--background-color);
  background: transparent;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.post-nav a.post-nav-item:hover {
  border-color: var(--accent-color);
  border-bottom-color: var(--accent-color);
  background: color-mix(in oklch, var(--accent-color) 7%, transparent);
  color: var(--background-color);
}

.post-nav-ghost {
  border-color: transparent !important;
  pointer-events: none;
}

.post-nav .post-nav-all {
  align-self: center;
  text-align: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 15px;
  letter-spacing: 0.06em;
  padding: 12px 20px;
  color: oklch(18% 0.01 50 / 0.55);
  white-space: nowrap;
}

.post-nav a.post-nav-all:hover {
  color: var(--accent-color);
  border-color: var(--accent-color);
  border-bottom-color: var(--accent-color);
}

.post-nav .post-nav-direction {
  display: block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 12px;
  letter-spacing: 0.07em;
  color: var(--accent-color);
  margin-bottom: 5px;
}

.post-nav .post-nav-title {
  font-size: 14px;
  line-height: 1.35;
  color: var(--background-color);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.post-nav .post-nav-next {
  text-align: right;
}

/* ── Sidebar ── */
.post-sidebar {
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.sidebar-block {
  /* no border-top */
}

.sidebar-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: oklch(28% 0.01 50 / 0.38);
  text-transform: uppercase;
  margin-bottom: 9px;
}

.sidebar-date {
  font-family: 'Lora', serif;
  font-size: 16px;
  color: oklch(18% 0.01 50);
}

.sidebar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sidebar-tag {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 0.05em;
  color: var(--accent-color);
  border: 1px solid color-mix(in oklch, var(--accent-color) 32%, transparent);
  border-bottom: 1px solid color-mix(in oklch, var(--accent-color) 32%, transparent);
  padding: 3px 10px;
  border-radius: 3px;
  transition: background 0.2s, border-color 0.2s;
}

.sidebar-tag:hover {
  background: color-mix(in oklch, var(--accent-color) 10%, transparent);
  border-color: color-mix(in oklch, var(--accent-color) 55%, transparent);
  border-bottom-color: color-mix(in oklch, var(--accent-color) 55%, transparent);
}

.sidebar-author {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-avatar {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid var(--accent-color);
  display: block;
}

.sidebar-author-name {
  font-family: 'Lora', serif;
  font-size: 16px;
  font-weight: 700;
  font-style: italic;
  color: oklch(18% 0.01 50);
  margin-bottom: 6px;
  line-height: 1.2;
}

.sidebar-author-bio {
  font-size: 13px;
  line-height: 1.6;
  color: oklch(28% 0.01 50 / 0.68);
  margin-bottom: 10px;
}

.sidebar-social {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.social-link {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 13px;
  letter-spacing: 0.07em;
  color: var(--accent-color);
  border-bottom: none;
  text-transform: uppercase;
  transition: opacity 0.2s;
}

.social-link:hover {
  opacity: 0.7;
  border-bottom: none;
}

/* Mobile */
@media (max-width: 900px) {
  .post-layout {
    grid-template-columns: 1fr;
    max-width: 72ch;
  }

  .post-sidebar {
    /* No border-top */
    padding-top: 36px;
    margin-top: 52px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 32px;
    align-items: flex-start;
  }

  .sidebar-block {
    flex: 1 1 180px;
  }

  /* Date is already in the masthead on mobile */
  .sidebar-block--date {
    display: none;
  }
}

@media (max-width: 768px) {
  .post-nav {
    grid-template-columns: 1fr;
  }

  .post-nav-ghost {
    display: none;
  }

  .post-nav .post-nav-next {
    text-align: left;
  }

  .post-nav .post-nav-all {
    text-align: left;
    border: 1.5px solid oklch(18% 0.01 50 / 0.2);
    border-bottom: 1.5px solid oklch(18% 0.01 50 / 0.2);
    border-radius: 6px;
    padding: 12px 18px;
  }

  .post-list-item {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .post-list-item time {
    font-size: 15px;
    min-width: 0;
  }

  .post-list-item a {
    font-size: 20px;
  }

  .post-meta {
    gap: 10px;
  }

  .post-item-tags {
    grid-column: 1;
    font-size: 13px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-right {
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .post-content img.rightalign,
  .post-content img.leftalign {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 1em 0;
  }

  .post-sidebar {
    flex-direction: column;
  }

  .sidebar-block {
    flex: none;
    width: 100%;
  }
}

/* ── Post masthead ── */
.post-masthead {
  background: var(--background-color);
  padding: 24px var(--gutter) 52px;
}

.post-masthead-inner {
  max-width: calc(72ch + 56px + 230px);
  margin: 0 auto;
}


.post-masthead-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(40px, 5.5vw, 72px);
  line-height: 0.96;
  letter-spacing: 0.01em;
  color: var(--text-color);
  margin-bottom: 32px;
}

.post-masthead-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.post-masthead-date {
  font-family: 'Lora', serif;
  font-size: 17px;
  color: oklch(78% 0.012 75);
}

.post-masthead-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.post-masthead-tags .post-tag {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--accent-color);
  border: 1px solid color-mix(in oklch, var(--accent-color) 35%, transparent);
  border-bottom: 1px solid color-mix(in oklch, var(--accent-color) 35%, transparent);
  padding: 3px 10px;
  border-radius: 3px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.post-masthead-tags .post-tag:hover {
  color: var(--text-color);
  border-color: color-mix(in oklch, var(--accent-color) 70%, transparent);
  border-bottom-color: color-mix(in oklch, var(--accent-color) 70%, transparent);
  background: color-mix(in oklch, var(--accent-color) 10%, transparent);
}

/* ── Blog index masthead ── */
.index-masthead {
  background: var(--background-color);
  padding: 24px var(--gutter) 52px;
}

.index-masthead-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(72px, 10vw, 140px);
  line-height: 0.92;
  letter-spacing: 0.01em;
  color: var(--text-color);
}

/* ── CMS page masthead — large right-aligned title ── */
.page-header .site-nav {
  padding-left: 0;
  padding-right: 0;
}

.page-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  padding: 0 var(--gutter);
  background: var(--background-color);
}

.page-header-left {
  padding-bottom: 52px;
}

.page-header-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(96px, 13.5vw, 210px);
  line-height: 0.86;
  letter-spacing: 0.01em;
  color: var(--text-color);
  text-align: right;
  padding-top: 8px;
  padding-left: 32px;
  max-width: 55vw;
  word-break: break-word;
}

@media (max-width: 768px) {
  .page-header {
    grid-template-columns: 1fr;
  }

  .page-header-left {
    padding-bottom: 0;
  }

  .page-header-title {
    font-size: clamp(56px, 15vw, 80px);
    line-height: 0.92;
    text-align: left;
    padding-left: 0;
    padding-top: 16px;
    padding-bottom: 40px;
    max-width: 100%;
  }
}

/* ── Back to posts button ── */
.back-to-posts {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 52px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 17px;
  letter-spacing: 0.07em;
  color: oklch(18% 0.01 50 / 0.5);
  border: 1.5px solid oklch(18% 0.01 50 / 0.2);
  border-radius: 4px;
  padding: 10px 20px;
  transition: color 0.2s, border-color 0.2s;
}

.back-to-posts:hover {
  color: var(--accent-color);
  border-color: color-mix(in oklch, var(--accent-color) 50%, transparent);
  border-bottom-color: color-mix(in oklch, var(--accent-color) 50%, transparent);
}

/* ── Tags box (index page — filter notice + chip cloud) ── */
.tags-box {
  margin-top: 48px;
  padding: 20px 24px;
  border: 1px solid oklch(18% 0.01 50 / 0.12);
  border-radius: 4px;
}

.tags-box .tag-filter-bar {
  margin-bottom: 16px;
  border-radius: 3px;
}

/* ── Tag cloud ── */
.tags-section {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag-chip {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 15px;
  letter-spacing: 0.05em;
  color: oklch(18% 0.01 50 / 0.4);
  padding: 3px 10px;
  border-radius: 3px;
  border: 1px solid oklch(18% 0.01 50 / 0.16);
  border-bottom: 1px solid oklch(18% 0.01 50 / 0.16);
  transition: color 0.15s, border-color 0.15s;
}

.tag-chip:hover {
  color: var(--accent-color);
  border-color: color-mix(in oklch, var(--accent-color) 40%, transparent);
  border-bottom-color: color-mix(in oklch, var(--accent-color) 40%, transparent);
}

/* ── Enhanced footer ── */
.footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  text-align: left;
  padding: 52px var(--gutter);
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 32px;
  letter-spacing: 0.03em;
  color: oklch(68% 0.015 75);
  line-height: 1;
  border-bottom: none;
}

.footer-logo:hover {
  color: oklch(78% 0.015 75);
  border-bottom: none;
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.footer-nav {
  display: flex;
  gap: 22px;
}

.footer-nav a {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 0.06em;
  color: rgba(252, 244, 218, 0.65);
  border-bottom: none;
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: var(--accent-color);
  border-bottom: none;
}

.footer-rss {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 15px;
  letter-spacing: 0.07em;
  color: oklch(52% 0.01 75);
  border-bottom: none;
  transition: color 0.2s;
}

.footer-rss:hover {
  color: var(--accent-color);
  border-bottom: none;
}

.footer-rss-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ── Post components (stats bar, threads grid) ── */

.post-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 36px;
  margin: 32px 0;
  padding: 18px 0 16px;
  border-top: 1px solid oklch(18% 0.01 50 / 0.18);
  border-bottom: 1px solid oklch(18% 0.01 50 / 0.18);
}

.post-stat strong {
  display: block;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--background-color);
}

.post-stat span {
  display: block;
  margin-top: 5px;
  color: oklch(28% 0.01 50 / 0.55);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.post-threads {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 32px 0;
}

.post-thread {
  padding-top: 14px;
  border-top: 2px solid var(--accent-color);
}

.post-thread h4 {
  margin: 0 0 8px;
  font-family: 'Lora', serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--background-color);
}

.post-thread p {
  margin: 0;
  font-size: 15px !important;
  line-height: 1.6 !important;
  color: oklch(28% 0.01 50 / 0.75);
}

@media (max-width: 600px) {
  .post-threads {
    grid-template-columns: 1fr;
  }
}

/* ── Timeline component ── */

.tl {
  position: relative;
  margin: 32px 0;
  padding-top: 4px;
}

.tl::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 60px;
  width: 1px;
  background: oklch(18% 0.01 50 / 0.18);
  content: '';
}

.tl-entry {
  display: grid;
  grid-template-columns: 48px 36px 1fr;
  min-height: 46px;
  align-items: start;
  color: var(--accent-color);
}

.tl-year {
  padding-top: 4px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
  letter-spacing: -0.03em;
  line-height: 1;
  color: oklch(28% 0.01 50);
}

.tl-mark {
  position: relative;
  min-height: 46px;
}

.tl-mark::before {
  position: absolute;
  top: 10px;
  left: 18px;
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: var(--text-color);
  transform: translateX(-50%);
  content: '';
}

.tl-copy {
  padding-bottom: 14px;
  color: oklch(18% 0.01 50);
}

.tl-copy h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin: 0 0 3px;
  font-family: 'Lora', serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  color: oklch(18% 0.01 50);
}

.tl-copy p {
  margin: 0;
  font-size: 12px !important;
  line-height: 1.4 !important;
  color: oklch(28% 0.01 50 / 0.65);
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.tl-copy p em {
  font-style: normal;
}

.tl-copy p span {
  padding: 0 3px;
  opacity: 0.45;
}

.tl-tag {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid oklch(18% 0.01 50 / 0.28);
  border-bottom: 1px solid oklch(18% 0.01 50 / 0.28);
  border-radius: 999px;
  color: oklch(28% 0.01 50 / 0.55);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
  transform: translateY(-1px);
}

.tl-win {
  color: #af7b22;
  font-size: 14px;
}
