/*
  Kolmn Ghost Blog Skin
  Matches Kolmn Interface System v2: paper, ink, moss, board-grid editorial utility.
*/

@import url("https://api.fontshare.com/v2/css?f[]=clash-display@600,700&f[]=satoshi@400,500,700,800&display=swap");
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap");

:root {
  --ghost-accent-color: #6f7a46 !important;
  --kolmn-ink: #15160f;
  --kolmn-ink-2: #292b22;
  --kolmn-muted: #55584d;
  --kolmn-faint: #8a8d80;
  --kolmn-paper: #f7f3ea;
  --kolmn-paper-2: #fffdf7;
  --kolmn-surface: #fffcf4;
  --kolmn-grid: #ded8ca;
  --kolmn-border: #cfc8b8;
  --kolmn-border-strong: #161713;
  --kolmn-moss: #6f7a46;
  --kolmn-moss-bright: #c4d66e;
  --kolmn-moss-soft: #e8eed2;
  --kolmn-clay: #b8422e;
  --font-display: "Clash Display", "Satoshi", sans-serif;
  --font-body: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

html {
  background: var(--kolmn-paper);
  scroll-behavior: smooth;
}

body {
  background:
    linear-gradient(rgba(222, 216, 202, 0.42) 1px, transparent 1px),
    linear-gradient(90deg, rgba(222, 216, 202, 0.42) 1px, transparent 1px),
    var(--kolmn-paper) !important;
  background-size: 44px 44px;
  color: var(--kolmn-ink);
  font-family: var(--font-body);
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 20% 12%, rgba(196, 214, 110, 0.18), transparent 30rem),
    linear-gradient(180deg, rgba(255, 252, 244, 0.72), rgba(247, 243, 234, 0.92));
}

.viewport {
  position: relative;
  z-index: 1;
}

.outer {
  padding-inline: max(16px, 4vw);
}

.inner {
  max-width: 1180px;
}

.gh-head {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 68px !important;
  border-bottom: 1px solid rgba(22, 23, 19, 0.12);
  background: rgba(247, 243, 234, 0.9) !important;
  color: var(--kolmn-ink) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.gh-head-inner,
.is-head-stacked .gh-head-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  height: 68px;
  gap: 12px;
  padding: 0;
}

.is-head-stacked .gh-head-brand {
  grid-column: 1 !important;
  height: 68px !important;
  justify-self: start;
}

.is-head-stacked .gh-head-menu {
  grid-column: 2 !important;
  grid-row: 1 !important;
  height: 68px !important;
  justify-self: end;
  margin: 0 !important;
}

.is-head-stacked .gh-head-actions {
  grid-column: 3 !important;
  grid-row: 1 !important;
}

.is-head-stacked .gh-head-menu::before,
.is-head-stacked .gh-head-menu::after {
  display: none !important;
}

.gh-head-logo {
  font-family: var(--font-display);
  font-size: 0 !important;
  font-weight: 700;
  color: var(--kolmn-ink) !important;
  white-space: nowrap;
}

.gh-head-logo::after {
  content: "Kolmn Journal";
  font-size: 21px;
  line-height: 1;
}

.gh-head-menu .nav {
  gap: 8px;
}

.gh-head-menu .nav a,
.gh-head-link {
  border-radius: 999px;
  color: var(--kolmn-muted) !important;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  padding: 10px 13px;
}

.gh-head-menu .nav-current a,
.gh-head-menu .nav a:hover,
.gh-head-link:hover {
  background: var(--kolmn-moss-soft);
  color: var(--kolmn-ink) !important;
}

.gh-head-members {
  gap: 8px;
}

.gh-search {
  border: 1px solid rgba(22, 23, 19, 0.14);
  border-radius: 999px;
  color: var(--kolmn-ink) !important;
  transition: background 180ms ease, transform 180ms ease;
}

.gh-search:hover {
  background: var(--kolmn-surface);
  transform: translateY(-1px);
}

.gh-head-button {
  height: 40px;
  border: 1px solid var(--kolmn-border-strong);
  border-radius: 999px !important;
  background: var(--kolmn-ink) !important;
  color: var(--kolmn-paper) !important;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 800;
  padding: 0 18px;
  transition: background 180ms ease, transform 180ms ease;
}

.gh-head-button:hover {
  background: var(--kolmn-moss) !important;
  transform: translateY(-1px);
}

.site-header-cover {
  display: none !important;
}

.site-header-content {
  display: block;
  padding: clamp(42px, 6vw, 76px) 0 clamp(26px, 4vw, 44px) !important;
  background: transparent !important;
  color: var(--kolmn-ink) !important;
  text-align: left;
}

.site-header-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.64fr) minmax(260px, 0.36fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}

.site-header-inner::before {
  display: block;
  max-width: 690px;
  content: "Kolmn Journal";
  font-family: var(--font-display);
  font-size: clamp(46px, 6.6vw, 86px);
  font-weight: 700;
  line-height: 0.95;
  color: var(--kolmn-ink);
}

.site-header-inner::after {
  display: block;
  content: "Field notes on public boards, creator systems, link strategy, and the small pieces of infrastructure that make work easier to share.";
  border-left: 4px solid var(--kolmn-moss);
  color: var(--kolmn-muted);
  font-size: clamp(15px, 1.25vw, 18px);
  font-weight: 500;
  line-height: 1.5;
  padding-left: 18px;
}

.site-description {
  display: none !important;
}

.site-main {
  background: transparent !important;
  padding: 0 0 32px;
}

.post-feed {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 16px !important;
  padding-top: 0 !important;
}

.post-card {
  display: flex !important;
  grid-column: span 4;
  min-height: 250px;
  overflow: hidden;
  border: 1px solid rgba(22, 23, 19, 0.16);
  border-radius: 7px;
  background: var(--kolmn-surface) !important;
  box-shadow: none;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
  word-break: normal;
}

.post-card:hover {
  border-color: rgba(22, 23, 19, 0.42);
  box-shadow: 4px 4px 0 var(--kolmn-ink);
  transform: translate(-2px, -2px);
}

.post-card:first-child {
  grid-column: span 7 !important;
  grid-row: span 2 !important;
  min-height: 520px !important;
  background:
    linear-gradient(rgba(222, 216, 202, 0.26) 1px, transparent 1px),
    linear-gradient(90deg, rgba(222, 216, 202, 0.26) 1px, transparent 1px),
    var(--kolmn-ink) !important;
  background-size: 44px 44px !important;
  color: var(--kolmn-paper) !important;
}

body.home-template .post-feed .post-card:first-child,
body.home-template .post-feed .post-card:first-child.no-image {
  background-color: var(--kolmn-ink) !important;
  background-image:
    linear-gradient(rgba(247, 243, 234, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 243, 234, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 18% 16%, rgba(196, 214, 110, 0.18), transparent 24rem) !important;
  background-size: 44px 44px, 44px 44px, auto !important;
  border-color: var(--kolmn-ink) !important;
}

body.home-template .post-feed .post-card:first-child .post-card-content-link,
body.home-template .post-feed .post-card:first-child .post-card-title {
  color: var(--kolmn-paper) !important;
}

body.home-template .post-feed .post-card:first-child .post-card-excerpt {
  color: rgba(247, 243, 234, 0.74) !important;
}

body.home-template .post-feed .post-card:first-child .post-card-meta,
body.home-template .post-feed .post-card:first-child .post-card-meta * {
  color: rgba(247, 243, 234, 0.62) !important;
}

.post-card:nth-child(2),
.post-card:nth-child(3) {
  grid-column: span 5;
  min-height: 252px;
}

.post-card-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: clamp(20px, 3vw, 30px);
}

.post-card:first-child .post-card-content {
  justify-content: flex-end;
  padding: clamp(26px, 4vw, 42px);
}

.post-card-image-link {
  margin: 0;
  border-bottom: 1px solid rgba(22, 23, 19, 0.14);
}

.post-card-image-link::after {
  padding-bottom: 52%;
}

.post-card-image {
  filter: saturate(0.85) contrast(1.02);
  transition: transform 320ms ease;
}

.post-card:hover .post-card-image {
  transform: scale(1.03);
}

.post-card-content-link {
  color: inherit !important;
}

.post-card-header {
  margin: 0;
}

.post-card-tags {
  min-height: 22px;
  margin: 0 0 16px;
  color: var(--kolmn-moss) !important;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.post-card:first-child .post-card-tags {
  color: var(--kolmn-moss-bright) !important;
}

.post-card-primary-tag::before {
  content: "#";
}

.post-card-title {
  color: inherit !important;
  font-family: var(--font-body);
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.08;
  text-wrap: balance;
}

.post-card:first-child .post-card-title {
  max-width: 640px;
  font-family: var(--font-display);
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 0.98;
}

.post-card-excerpt {
  display: -webkit-box;
  margin-top: 16px;
  color: var(--kolmn-muted);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

.post-card:first-child .post-card-excerpt {
  max-width: 590px;
  color: rgba(247, 243, 234, 0.72) !important;
  font-size: 16px;
  -webkit-line-clamp: 2;
}

.post-card-meta {
  margin-top: auto;
  padding-top: 24px;
  color: var(--kolmn-faint) !important;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
}

.post-card:first-child .post-card-meta,
.post-card:first-child .post-card-meta * {
  color: rgba(247, 243, 234, 0.62) !important;
}

.pagination {
  padding: 36px 0 0;
  color: var(--kolmn-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.article {
  max-width: 780px;
  padding: 0;
}

.article-header {
  margin-bottom: 32px;
  padding: clamp(48px, 8vw, 88px) 0 28px;
  text-align: left;
}

.article-tag a,
.article-tag {
  color: var(--kolmn-moss) !important;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.article-title {
  color: var(--kolmn-ink);
  font-family: var(--font-display);
  font-size: clamp(42px, 7vw, 78px);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 0.98;
  text-wrap: balance;
}

.article-excerpt {
  max-width: 660px;
  color: var(--kolmn-muted);
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.5;
}

.article-byline {
  border-top: 1px solid rgba(22, 23, 19, 0.14);
  margin-top: 28px;
  padding-top: 18px;
}

.author-name,
.byline-meta-content,
.byline-meta-date,
.byline-reading-time {
  font-family: var(--font-mono);
  letter-spacing: 0;
}

.gh-content {
  color: var(--kolmn-ink-2);
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 450;
  line-height: 1.72;
}

.gh-content > h1:first-of-type {
  display: none !important;
}

.gh-content h2,
.gh-content h3,
.gh-content h4 {
  color: var(--kolmn-ink);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.08;
  text-wrap: balance;
}

.gh-content h2 {
  font-size: clamp(30px, 4vw, 44px);
  margin: 56px 0 16px;
}

.gh-content h3 {
  font-size: clamp(24px, 3vw, 32px);
  margin: 40px 0 12px;
}

.gh-content p,
.gh-content ul,
.gh-content ol {
  margin-bottom: 1.2em;
}

.gh-content a {
  color: var(--kolmn-moss) !important;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.gh-content blockquote {
  margin: 32px 0;
  border: 1px solid rgba(22, 23, 19, 0.18);
  border-left: 6px solid var(--kolmn-moss);
  border-radius: 8px;
  background: var(--kolmn-surface);
  color: var(--kolmn-ink);
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  font-style: normal;
  line-height: 1.15;
  padding: 24px;
}

.gh-content :not(pre) > code {
  border: 1px solid rgba(22, 23, 19, 0.12);
  border-radius: 4px;
  background: var(--kolmn-moss-soft);
  color: var(--kolmn-ink);
  font-family: var(--font-mono);
  font-size: 0.86em;
  padding: 0.1em 0.35em;
}

.gh-content pre {
  border: 1px solid rgba(22, 23, 19, 0.18);
  border-radius: 8px;
  background: #161713;
  color: var(--kolmn-paper);
}

.kg-bookmark-card a.kg-bookmark-container {
  border: 1px solid rgba(22, 23, 19, 0.16) !important;
  border-radius: 8px !important;
  background: var(--kolmn-surface) !important;
  box-shadow: none !important;
}

.kg-bookmark-title {
  color: var(--kolmn-ink);
  font-family: var(--font-body);
  font-weight: 800;
}

.kg-bookmark-description,
.kg-bookmark-metadata {
  color: var(--kolmn-muted);
  font-family: var(--font-body);
}

.site-footer {
  margin-top: 56px !important;
  padding: 34px 0 !important;
  background: var(--kolmn-ink) !important;
  color: rgba(247, 243, 234, 0.72) !important;
}

.site-footer .inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  color: inherit;
  font-family: var(--font-mono);
  font-size: 12px;
}

.site-footer a {
  color: rgba(247, 243, 234, 0.78) !important;
}

.site-footer a:hover {
  color: var(--kolmn-moss-bright) !important;
}

.gh-powered-by {
  justify-self: end;
}

@media (max-width: 991px) {
  .gh-head-inner,
  .is-head-stacked .gh-head-inner {
    grid-template-columns: 1fr auto !important;
  }

  .is-head-stacked .gh-head-menu {
    display: none;
  }

  .is-head-stacked .gh-head-actions {
    grid-column: 2 !important;
  }

  .site-header-inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .post-feed {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .post-card,
  .post-card:first-child,
  .post-card:nth-child(2),
  .post-card:nth-child(3) {
    grid-column: span 1 !important;
    min-height: 300px !important;
  }
}

@media (max-width: 767px) {
  .outer {
    padding-inline: 16px;
  }

  #gh-head,
  .gh-head,
  .gh-head-inner,
  .is-head-stacked .gh-head-inner,
  #gh-head .gh-head-brand {
    height: 58px !important;
  }

  .gh-head-logo::after {
    font-size: 16px;
  }

  .gh-head-inner,
  .is-head-stacked .gh-head-inner {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 10px;
  }

  .gh-head-actions .gh-search,
  .gh-search,
  .gh-head-link {
    display: none !important;
  }

  .gh-head-button {
    height: 36px;
    padding-inline: 14px;
  }

  .gh-burger {
    display: block !important;
  }

  .site-header-content {
    padding: 28px 0 24px !important;
  }

  .site-header-inner::before {
    max-width: 10ch;
    font-size: clamp(30px, 9.4vw, 36px);
    line-height: 0.98;
  }

  .site-header-inner::after {
    max-width: 36ch;
    font-size: 14px;
    line-height: 1.45;
    padding-left: 12px;
  }

  .post-feed {
    grid-template-columns: 1fr !important;
  }

  .post-card,
  .post-card:first-child {
    min-height: auto !important;
  }

  .post-card:first-child .post-card-title {
    font-size: clamp(25px, 7.8vw, 30px);
    line-height: 1.06;
  }

  .post-card-content,
  .post-card:first-child .post-card-content {
    padding: 22px;
  }

  .article-header {
    margin-bottom: 22px;
    padding: 34px 0 20px;
  }

  .article-title,
  body.post-template .article-title {
    max-width: 14ch;
    font-size: clamp(30px, 8.6vw, 36px);
    line-height: 1.04;
  }

  .article-excerpt {
    font-size: 16px;
    line-height: 1.5;
  }

  .gh-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .gh-content {
    font-size: 17px;
    line-height: 1.68;
  }

  .site-footer .inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .gh-powered-by {
    justify-self: center;
  }
}
