/*
Theme Name: Kibul Magazine
Theme URI: https://kibul.in
Description: Child theme Blocksy untuk kibul.in — tampilan news magazine modern (sans tebal, hitam-putih, aksen merah).
Author: Homelab Ops
Template: blocksy
Version: 1.0.0
Text Domain: kibul-magazine
*/

/* ==========================================================================
   1. Font
   ========================================================================== */
@font-face {
  font-family: "Archivo";
  src: url("assets/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   2. Design tokens
   ========================================================================== */
:root {
  --kb-ink: #0e0f12;
  --kb-ink-soft: #23252b;
  --kb-muted: #666a73;
  --kb-red: #d21f2b;
  --kb-red-dark: #a5151f;
  --kb-paper: #ffffff;
  --kb-soft: #f6f5f2;
  --kb-line: #e2e1dd;
  --kb-line-strong: #111114;
  --kb-max: 1220px;
  --kb-gap: 28px;
  --kb-radius: 3px;
  --kb-font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  /* Remap Blocksy palette so built-in components follow the new identity */
  --theme-palette-color-1: #d21f2b;
  --theme-palette-color-2: #a5151f;
  --theme-palette-color-3: #23252b;
  --theme-palette-color-4: #0e0f12;
  --theme-palette-color-5: #e2e1dd;
  --theme-palette-color-6: #f6f5f2;
  --theme-palette-color-7: #ffffff;
  --theme-palette-color-8: #ffffff;
}

body {
  --theme-font-family: var(--kb-font);
  --theme-text-color: var(--kb-ink-soft);
  --theme-link-initial-color: var(--kb-ink);
  --theme-link-hover-color: var(--kb-red);
  background-color: var(--kb-paper);
  font-family: var(--kb-font);
  color: var(--kb-ink-soft);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Blocksy prints its own (later) body background rule — outrank it. */
html body {
  background-color: var(--kb-paper);
}

/* ==========================================================================
   3. Base
   ========================================================================== */
.kb-wrap {
  width: 100%;
  max-width: var(--kb-max);
  margin-inline: auto;
  padding-inline: 20px;
}

.kb-wrap--wide {
  max-width: 1340px;
}

h1,
h2,
h3,
h4,
h5,
h6,
.kb-title {
  font-family: var(--kb-font);
  color: var(--kb-ink);
  letter-spacing: -0.018em;
  font-weight: 800;
}

a {
  transition: color 0.15s ease;
}

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

.kb-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.kb-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--kb-red);
  text-decoration: none;
}

.kb-kicker:hover,
.kb-kicker:focus-visible {
  color: var(--kb-red-dark);
}

.kb-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--kb-muted);
}

.kb-meta__dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

/* ==========================================================================
   4. Top bar + header
   ========================================================================== */
.kb-topbar {
  background: var(--kb-ink);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kb-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 36px;
  padding-block: 6px;
}

.kb-topbar__tagline {
  color: #cfd0d4;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-align: center;
}

.kb-topbar a {
  color: #fff;
  text-decoration: none;
}

.kb-topbar a:hover,
.kb-topbar a:focus-visible {
  color: #ff6b73;
}

.kb-topbar__links {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Header shell */
#header.ct-header,
[data-header*="type-1"] .ct-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--kb-paper);
  border-bottom: 1px solid var(--kb-line);
}

[data-header*="type-1"] #header [data-row*="middle"] {
  --height: 84px !important;
  background-color: var(--kb-paper);
  background-image: none;
  --theme-border-top: none;
  --theme-border-bottom: none;
  --theme-box-shadow: none;
}

#header .site-title,
#header .site-title a,
#header [data-id="logo"] .site-title {
  font-family: var(--kb-font) !important;
  font-weight: 900 !important;
  font-size: 30px !important;
  letter-spacing: -0.045em !important;
  text-transform: uppercase;
  color: var(--kb-ink) !important;
  line-height: 1 !important;
}

#header [data-id="logo"] .site-logo-container {
  display: inline-flex;
  align-items: center;
}

#header [data-id="logo"] .site-logo-container img {
  height: 40px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
}

#header .site-title a::after {
  content: ".";
  color: var(--kb-red);
}

/* Main navigation */
#header [data-id="menu"] > ul {
  gap: 4px;
}

#header [data-id="menu"] > ul > li > a {
  position: relative;
  font-family: var(--kb-font) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: var(--kb-ink) !important;
  padding: 10px 9px !important;
  line-height: 1.2 !important;
}

#header [data-id="menu"] > ul > li > a::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 4px;
  height: 3px;
  background: var(--kb-red);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.18s ease;
}

#header [data-id="menu"] > ul > li > a:hover::after,
#header [data-id="menu"] > ul > li.current-menu-item > a::after,
#header [data-id="menu"] > ul > li.current-menu-ancestor > a::after {
  transform: scaleX(1);
}

#header [data-id="menu"] > ul > li.current-menu-item > a {
  color: var(--kb-red) !important;
}

/* Header icons */
#header .ct-toggle,
#header .ct-header-search {
  color: var(--kb-ink);
}

#header .ct-toggle:hover,
#header .ct-header-search:hover {
  color: var(--kb-red);
}

/* Buttons coming from Blocksy */
.ct-button,
.wp-element-button,
button,
input[type="submit"] {
  font-family: var(--kb-font);
}

.ct-button:not(.ct-button-ghost),
.wp-element-button {
  border-radius: var(--kb-radius);
}

/* ==========================================================================
   5. Hero
   ========================================================================== */
.kb-hero {
  padding-top: 26px;
  padding-bottom: 30px;
}

.kb-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
  gap: var(--kb-gap);
}

.kb-hero__lead {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--kb-radius);
  background: var(--kb-ink);
  text-decoration: none;
  min-height: 420px;
}

.kb-hero__lead .kb-pic,
.kb-hero__lead img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: transform 0.4s ease;
}

.kb-hero__lead:hover img {
  transform: scale(1.03);
}

.kb-hero__lead::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.12) 0%,
    rgba(0, 0, 0, 0.3) 32%,
    rgba(0, 0, 0, 0.68) 62%,
    rgba(0, 0, 0, 0.92) 100%
  );
  pointer-events: none;
}

.kb-hero__lead-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  min-height: 420px;
  padding: 30px;
  color: #fff;
}

.kb-hero__lead .kb-kicker {
  color: #ff5a63;
}

.kb-hero__lead-title {
  margin: 0;
  font-size: clamp(1.55rem, 3.1vw, 2.6rem);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.025em;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.kb-hero__lead-excerpt {
  margin: 0;
  max-width: 52ch;
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
}

.kb-hero__lead .kb-meta {
  color: rgba(255, 255, 255, 0.72);
}

.kb-hero__side {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: var(--kb-gap);
  min-width: 0;
}

.kb-hero__item {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 16px;
  align-content: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--kb-line);
  text-decoration: none;
}

.kb-hero__item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.kb-hero__item-media {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--kb-radius);
  background: var(--kb-soft);
}

.kb-hero__item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kb-hero__item-title {
  margin: 6px 0 8px;
  font-size: 1.02rem;
  line-height: 1.24;
  font-weight: 800;
  color: var(--kb-ink);
}

.kb-hero__item:hover .kb-hero__item-title {
  color: var(--kb-red);
}

/* ==========================================================================
   6. Ticker
   ========================================================================== */
.kb-ticker {
  border-top: 1px solid var(--kb-line);
  border-bottom: 1px solid var(--kb-line);
  background: var(--kb-paper);
}

.kb-ticker__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 48px;
  padding-block: 8px;
  overflow: hidden;
}

.kb-ticker__label {
  flex: 0 0 auto;
  background: var(--kb-red);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 2px;
}

.kb-ticker__list {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}

.kb-ticker__list::-webkit-scrollbar {
  display: none;
}

.kb-ticker__list li {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--kb-muted);
}

.kb-ticker__list a {
  color: var(--kb-ink);
  text-decoration: none;
  font-weight: 700;
}

.kb-ticker__list a:hover {
  color: var(--kb-red);
}

.kb-ticker__list li::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--kb-red);
  margin-left: 14px;
}

.kb-ticker__list li:last-child::after {
  display: none;
}

/* ==========================================================================
   7. Home layout + sections
   ========================================================================== */
.kb-home {
  padding-block: 34px 50px;
}

.kb-home__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 44px;
  align-items: start;
}

.kb-sec {
  margin-bottom: 38px;
}

.kb-sec__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--kb-ink);
}

.kb-sec__title {
  position: relative;
  margin: 0;
  padding-left: 14px;
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--kb-ink);
}

.kb-sec__title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.12em;
  bottom: 0.12em;
  width: 3px;
  background: var(--kb-red);
}

.kb-sec__more {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--kb-red);
  text-decoration: none;
}

.kb-sec__more:hover {
  color: var(--kb-red-dark);
  text-decoration: underline;
}

/* ==========================================================================
   8. Cards
   ========================================================================== */
.kb-grid {
  display: grid;
  gap: var(--kb-gap) 22px;
}

.kb-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kb-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kb-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kb-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.kb-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--kb-radius);
  background: var(--kb-soft);
}

.kb-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.kb-card:hover .kb-card__media img {
  transform: scale(1.04);
}

.kb-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
}

.kb-card__title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.012em;
}

.kb-card__title a {
  color: var(--kb-ink);
  text-decoration: none;
}

.kb-card__title a:hover,
.kb-card__title a:focus-visible {
  color: var(--kb-red);
}

.kb-card__excerpt {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--kb-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kb-card--wide {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.kb-card--wide .kb-card__media {
  aspect-ratio: 4 / 3;
}

.kb-card--wide .kb-card__title {
  font-size: 1.3rem;
}

/* Placeholder when a post has no featured image */
.kb-hero__item-media {
  position: relative;
}

.kb-cover {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #17181d 0%, #262830 55%, #0f1014 100%);
}

.kb-cover::before {
  content: "";
  position: absolute;
  left: -12%;
  right: -12%;
  bottom: -58%;
  height: 88%;
  background: var(--kb-accent, #d21f2b);
  opacity: 0.3;
  transform: rotate(-7deg);
}

.kb-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    115deg,
    rgba(255, 255, 255, 0.05) 0 1px,
    transparent 1px 22px
  );
}

.kb-cover__cat {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  background: var(--kb-accent, #d21f2b);
  color: #fff;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 7px;
  border-radius: 1px;
}

.kb-cover__mark {
  position: absolute;
  z-index: 2;
  right: 6px;
  bottom: -18px;
  font-size: 112px;
  font-weight: 900;
  line-height: 0.8;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.26);
  text-transform: uppercase;
}

.kb-cover--hero .kb-cover__mark {
  font-size: 230px;
  bottom: -46px;
  right: 20px;
  -webkit-text-stroke: 3px rgba(255, 255, 255, 0.16);
}

.kb-hero__item-media .kb-cover__mark {
  font-size: 62px;
  bottom: -12px;
}

.kb-noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #16171b 0%, #2a2c33 100%);
  color: rgba(255, 255, 255, 0.9);
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ==========================================================================
   9. Sidebar
   ========================================================================== */
.kb-sidebar {
  display: flex;
  flex-direction: column;
  gap: 30px;
  position: sticky;
  top: 100px;
}

.kb-widget {
  border-top: 3px solid var(--kb-ink);
  padding-top: 14px;
}

.kb-widget__title {
  margin: 0 0 16px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--kb-ink);
}

.kb-pop {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: kbpop;
}

.kb-pop li {
  counter-increment: kbpop;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--kb-line);
}

.kb-pop li:first-child {
  padding-top: 0;
}

.kb-pop li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.kb-pop li::before {
  content: counter(kbpop, decimal-leading-zero);
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--kb-muted);
}

.kb-pop a {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--kb-ink);
  text-decoration: none;
}

.kb-pop a:hover {
  color: var(--kb-red);
}

.kb-pop__meta {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--kb-muted);
}

.kb-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kb-cats a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--kb-line);
  border-radius: 2px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--kb-ink);
  text-decoration: none;
}

.kb-cats a:hover {
  border-color: var(--kb-red);
  color: var(--kb-red);
}

.kb-cats span {
  color: var(--kb-muted);
  font-weight: 600;
}

.kb-widget--dark {
  background: var(--kb-ink);
  color: #fff;
  border-top-color: var(--kb-red);
  padding: 22px;
  border-radius: var(--kb-radius);
}

.kb-widget--dark .kb-widget__title {
  color: #fff;
}

.kb-widget--dark p {
  margin: 0 0 14px;
  font-size: 0.86rem;
  line-height: 1.6;
  color: #c9cad0;
}

.kb-widget--dark .kb-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--kb-red);
  color: #fff;
  padding: 9px 14px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}

.kb-widget--dark .kb-btn:hover {
  background: var(--kb-red-dark);
}

.kb-quote {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

/* ==========================================================================
   10. Archive
   ========================================================================== */
.kb-archive {
  padding-block: 30px 50px;
}

.kb-archive__head {
  border-bottom: 2px solid var(--kb-ink);
  padding-bottom: 18px;
  margin-bottom: 26px;
}

.kb-archive__eyebrow {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--kb-red);
}

.kb-archive__title {
  margin: 0;
  font-size: clamp(1.8rem, 3.4vw, 2.9rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.kb-archive__desc {
  max-width: 68ch;
  margin: 10px 0 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--kb-muted);
}

.kb-archive__desc p {
  margin: 0;
}

.kb-archive__count {
  display: inline-block;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--kb-muted);
}

.kb-archive .kb-grid {
  row-gap: 34px;
}

/* Pagination */
.kb-pagination {
  margin-top: 40px;
  border-top: 1px solid var(--kb-line);
  padding-top: 22px;
}

.kb-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  margin-right: 6px;
  border: 1px solid var(--kb-line);
  border-radius: 2px;
  font-size: 13px;
  font-weight: 800;
  color: var(--kb-ink);
  text-decoration: none;
}

.kb-pagination .page-numbers:hover {
  border-color: var(--kb-red);
  color: var(--kb-red);
}

.kb-pagination .page-numbers.current {
  background: var(--kb-ink);
  border-color: var(--kb-ink);
  color: #fff;
}

.kb-pagination .page-numbers.dots {
  border-color: transparent;
}

/* ==========================================================================
   11. Single article
   ========================================================================== */
.kb-single {
  padding-block: 28px 50px;
}

.kb-single__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 44px;
  align-items: start;
}

.kb-article {
  min-width: 0;
}

.kb-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--kb-muted);
}

.kb-breadcrumb a {
  color: var(--kb-muted);
  text-decoration: none;
}

.kb-breadcrumb a:hover {
  color: var(--kb-red);
}

.kb-article__title {
  margin: 8px 0 0;
  font-size: clamp(1.9rem, 3.6vw, 3.1rem);
  line-height: 1.03;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--kb-ink);
}

.kb-article__deck {
  margin: 16px 0 0;
  font-size: 1.1rem;
  line-height: 1.55;
  font-weight: 400;
  color: var(--kb-muted);
}

.kb-article__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--kb-line);
  border-bottom: 1px solid var(--kb-line);
  padding-bottom: 14px;
}

.kb-byline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kb-byline__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--kb-soft);
  flex: 0 0 auto;
}

.kb-byline__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kb-byline__name {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--kb-ink);
}

.kb-byline__role {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--kb-muted);
}

.kb-article__figure {
  margin: 26px 0 30px;
}

.kb-article__figure img {
  width: 100%;
  border-radius: var(--kb-radius);
}

.kb-article__caption {
  margin-top: 8px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--kb-muted);
}

/* Article body */
.kb-content {
  max-width: 45rem;
  font-size: 1.0625rem;
  line-height: 1.78;
  color: #26282e;
}

.kb-content > figure,
.kb-content > .wp-block-image,
.kb-content > .wp-block-embed,
.kb-content > .wp-block-gallery,
.kb-content > .alignwide {
  max-width: none;
}

.kb-content > * + * {
  margin-top: 1.35em;
}

.kb-content p {
  margin: 0;
}

.kb-content p + p {
  margin-top: 1.35em;
}

.kb-content h2 {
  font-size: 1.55rem;
  line-height: 1.2;
  margin-top: 2em;
  padding-top: 0.2em;
}

.kb-content h3 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin-top: 1.7em;
}

.kb-content h4 {
  font-size: 1.08rem;
  margin-top: 1.5em;
}

.kb-content a {
  color: var(--kb-red);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.kb-content a:hover {
  color: var(--kb-red-dark);
}

.kb-content blockquote {
  margin: 1.8em 0;
  padding: 6px 0 6px 22px;
  border-left: 4px solid var(--kb-red);
  font-size: 1.2rem;
  line-height: 1.55;
  font-weight: 500;
  color: var(--kb-ink);
}

.kb-content blockquote p:last-child {
  margin-bottom: 0;
}

.kb-content ul,
.kb-content ol {
  padding-left: 1.4em;
}

.kb-content li + li {
  margin-top: 0.5em;
}

.kb-content img {
  border-radius: var(--kb-radius);
  height: auto;
}

.kb-content figure {
  margin: 1.8em 0;
}

.kb-content figcaption,
.kb-content .wp-caption-text {
  margin-top: 8px;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--kb-muted);
}

.kb-content iframe,
.kb-content video {
  max-width: 100%;
  border: 0;
}

.kb-content hr {
  margin: 2.2em auto;
  border: 0;
  border-top: 1px solid var(--kb-line);
}

.kb-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.kb-content th,
.kb-content td {
  border: 1px solid var(--kb-line);
  padding: 9px 11px;
  text-align: left;
}

.kb-content th {
  background: var(--kb-soft);
  font-weight: 800;
}

/* Tags + share */
.kb-article__foot {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--kb-line);
}

.kb-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.kb-tags a {
  display: inline-block;
  padding: 5px 9px;
  border: 1px solid var(--kb-line);
  border-radius: 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--kb-muted);
  text-decoration: none;
}

.kb-tags a:hover {
  border-color: var(--kb-red);
  color: var(--kb-red);
}

.kb-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.kb-share__label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--kb-ink);
  margin-right: 4px;
}

.kb-share a,
.kb-share button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--kb-line);
  border-radius: 2px;
  background: #fff;
  font-family: var(--kb-font);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--kb-ink);
  text-decoration: none;
  cursor: pointer;
}

.kb-share a:hover,
.kb-share button:hover {
  border-color: var(--kb-ink);
  background: var(--kb-ink);
  color: #fff;
}

/* Author box */
.kb-author {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  margin-top: 30px;
  padding: 20px;
  background: var(--kb-soft);
  border-left: 4px solid var(--kb-red);
  border-radius: var(--kb-radius);
}

.kb-author__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
}

.kb-author__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kb-author__name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.kb-author__bio {
  margin: 6px 0 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--kb-muted);
}

/* Related */
.kb-related {
  margin-top: 40px;
}

/* Comments (Blocksy markup) */
.kb-article .ct-comments,
.kb-article #comments {
  margin-top: 40px;
  border-top: 3px solid var(--kb-ink);
  padding-top: 20px;
}

.kb-article .comment-respond .comment-reply-title,
.kb-article #comments .comments-title {
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ==========================================================================
   12. Footer
   ========================================================================== */
.kb-footer {
  margin-top: 20px;
  background: var(--kb-ink);
  color: #b9bbc2;
  font-size: 0.88rem;
}

.kb-footer__top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 34px;
  padding: 46px 0 34px;
}

.kb-footer__brand .kb-footer__logo {
  display: inline-block;
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
}

.kb-footer__brand .kb-footer__logo::after {
  content: ".";
  color: var(--kb-red);
}

.kb-footer__brand p {
  margin: 12px 0 0;
  max-width: 34ch;
  line-height: 1.65;
  color: #9fa1a9;
}

.kb-footer__title {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
}

.kb-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.kb-footer li + li {
  margin-top: 9px;
}

.kb-footer a {
  color: #c6c8cf;
  text-decoration: none;
}

.kb-footer a:hover,
.kb-footer a:focus-visible {
  color: #fff;
  text-decoration: underline;
}

.kb-footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: #8f9199;
}

.kb-footer__bar a {
  color: #fff;
}

.kb-footer__social {
  display: flex;
  gap: 12px;
}

/* ==========================================================================
   13. Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .kb-home__grid,
  .kb-single__grid {
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 32px;
  }

  .kb-grid--4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .kb-footer__top {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .kb-hero__grid {
    grid-template-columns: 1fr;
  }

  .kb-hero__lead,
  .kb-hero__lead-body {
    min-height: 360px;
  }

  .kb-hero__side {
    grid-template-rows: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .kb-hero__item {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .kb-home__grid,
  .kb-single__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .kb-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
  }

  .kb-grid--3,
  .kb-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kb-footer__top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
  }
}

@media (max-width: 640px) {
  :root {
    --kb-gap: 20px;
  }

  .kb-wrap {
    padding-inline: 16px;
  }

  .kb-topbar__tagline {
    display: none;
  }

  #header [data-id="logo"] .site-title,
  #header .site-title a,
  #header .site-title {
    font-size: 24px !important;
  }

  .kb-hero {
    padding-top: 18px;
  }

  .kb-hero__lead,
  .kb-hero__lead-body {
    min-height: 300px;
  }

  .kb-hero__lead-body {
    padding: 20px;
  }

  .kb-hero__side {
    grid-template-columns: 1fr;
  }

  .kb-hero__item {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .kb-grid--2,
  .kb-grid--3,
  .kb-grid--4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .kb-sidebar {
    grid-template-columns: minmax(0, 1fr);
  }

  .kb-card--wide {
    grid-template-columns: 1fr;
  }

  .kb-card--wide .kb-card__media {
    aspect-ratio: 16 / 10;
  }

  .kb-article__meta {
    gap: 10px;
  }

  .kb-footer__top {
    grid-template-columns: minmax(0, 1fr);
  }

  .kb-archive__title {
    font-size: 1.9rem;
  }
}

/* ==========================================================================
   14. Accessibility / motion
   ========================================================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
.kb-card__title a:focus-visible {
  outline: 2px solid var(--kb-red);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Hide Blocksy page title/hero on our custom templates to avoid duplicates */
.kb-template .ct-hero,
.kb-template .entry-header .page-title {
  display: none;
}
