:root {
  --bg-main: #06080c;
  --bg-card: #0a0d13;
  --bg-card-hover: #0b0f16;
  --bg-footer: #04060a;
  --border-subtle: #161c26;
  --border-card: #1a212c;
  --border-active: #2a3340;
  --border-chip: #232b37;
  --text-main: #eef1f5;
  --text-muted: #8b95a5;
  --text-dim: #5d6878;
  --text-secondary: #a9b2c0;
  --accent-cyan: #19d3e6;
  --accent-red: #e0103f;
  --accent-red-hover: #ff2d5e;
  --gh-font-heading: 'Archivo', sans-serif;
  --gh-font-body: 'IBM Plex Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg-main);
  color: var(--text-main);
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: var(--accent-cyan); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: #ffffff; }
button { font-family: inherit; }
img { max-width: 100%; }
::selection { background: var(--accent-red); color: #ffffff; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #06080c; }
::-webkit-scrollbar-thumb { background: #1a212c; border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: #2a3340; }

.font-archivo { font-family: 'Archivo', sans-serif; }
.font-mono { font-family: 'JetBrains Mono', monospace; }
.font-plex { font-family: 'IBM Plex Sans', system-ui, sans-serif; }

.wrap { max-width: 1280px; margin: 0 auto; padding-left: 28px; padding-right: 28px; }

/* ---------- Glitch text ---------- */
@keyframes rnR {
  0%, 82%, 100% { transform: translate(-0.035em, 0); clip-path: inset(0 0 0 0); }
  84% { transform: translate(-0.09em, -0.02em); clip-path: inset(18% 0 58% 0); }
  86% { transform: translate(0.04em, 0.01em); clip-path: inset(62% 0 8% 0); }
  88% { transform: translate(-0.11em, 0); clip-path: inset(38% 0 36% 0); }
  90% { transform: translate(-0.02em, 0); clip-path: inset(0 0 80% 0); }
  92% { transform: translate(-0.06em, 0.01em); clip-path: inset(0 0 0 0); }
  94% { transform: translate(-0.035em, 0); }
}
@keyframes rnC {
  0%, 82%, 100% { transform: translate(0.035em, 0); clip-path: inset(0 0 0 0); }
  84% { transform: translate(0.1em, 0.02em); clip-path: inset(55% 0 20% 0); }
  86% { transform: translate(-0.05em, 0); clip-path: inset(5% 0 70% 0); }
  88% { transform: translate(0.08em, -0.01em); clip-path: inset(30% 0 45% 0); }
  90% { transform: translate(0.02em, 0); clip-path: inset(75% 0 0 0); }
  92% { transform: translate(0.06em, 0); clip-path: inset(0 0 0 0); }
  94% { transform: translate(0.035em, 0); }
}
@keyframes rnW {
  0%, 83%, 100% { transform: none; opacity: 1; }
  85% { transform: translate(0.025em, 0) skewX(-6deg); }
  87% { transform: translate(-0.02em, 0); opacity: 0.85; }
  89% { transform: translate(0.015em, 0) skewX(4deg); }
  91% { transform: none; opacity: 1; }
}
@keyframes rnBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes rnScan { 0% { transform: translateY(-10vh); } 100% { transform: translateY(110vh); } }

.glitch-wrapper { position: relative; display: inline-block; white-space: nowrap; }
.glitch-wrapper .glitch-red,
.glitch-wrapper .glitch-cyan {
  position: absolute; left: 0; top: 0; white-space: nowrap; pointer-events: none;
}
.glitch-wrapper .glitch-red { color: var(--accent-red); transform: translate(-0.035em, 0); animation: rnR 3.4s steps(1) infinite; }
.glitch-wrapper .glitch-cyan { color: var(--accent-cyan); transform: translate(0.035em, 0); animation: rnC 3.4s steps(1) infinite; }
.glitch-wrapper .glitch-main { position: relative; color: #ffffff; display: inline-block; animation: rnW 3.4s steps(1) infinite; }

/* ---------- Scanline overlay ---------- */
.scanline-overlay { position: fixed; inset: 0; pointer-events: none; z-index: 99; }
.scanline-overlay .lines {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.018) 0 1px, transparent 1px 3px);
}
.scanline-overlay .beam {
  position: absolute; left: 0; right: 0; top: 0; height: 12vh;
  background: linear-gradient(180deg, transparent, rgba(25,211,230,0.035), transparent);
  animation: rnScan 7s linear infinite;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(6,8,12,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.site-header .inner {
  max-width: 1280px; margin: 0 auto; padding: 14px 28px;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.logo-link { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-link .rn-mark { font-weight: 900; font-size: 28px; letter-spacing: -0.02em; line-height: 1; }
.logo-link .rn-label { font-size: 12px; font-weight: 700; letter-spacing: 0.22em; color: var(--text-main); }

.main-nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1 1 auto; }
.main-nav a {
  padding: 8px 12px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted); border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.main-nav a:hover { color: #ffffff; }
.main-nav a.active { color: #ffffff; border-bottom-color: var(--accent-cyan); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.subscribe-cta {
  padding: 9px 16px; background: var(--accent-red); color: #ffffff;
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  border: none; cursor: pointer; transition: background 0.15s ease;
}
.subscribe-cta:hover { background: var(--accent-red-hover); color: #fff; }
.admin-link {
  padding: 7px 10px; border: 1px solid var(--border-chip); border-radius: 2px;
  font-size: 12px; color: var(--text-muted); transition: all 0.15s ease;
}
.admin-link:hover { color: var(--accent-cyan); border-color: var(--accent-cyan); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border-card); background: var(--bg-footer); margin-top: auto; }
.site-footer .inner {
  max-width: 1280px; margin: 0 auto; padding: 48px 28px;
  display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; align-items: flex-end;
}
.footer-brand { display: flex; flex-direction: column; gap: 12px; }
.footer-brand .rn-mark { font-weight: 900; font-size: 44px; line-height: 1; letter-spacing: -0.02em; }
.footer-brand .tagline { font-size: 12px; letter-spacing: 0.3em; color: var(--accent-cyan); }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }
.footer-meta { font-size: 11px; color: #6b7686; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.footer-meta a { color: var(--text-muted); border: 1px solid var(--border-active); border-radius: 2px; padding: 4px 10px; transition: all 0.15s ease; }
.footer-meta a:hover { color: var(--accent-cyan); border-color: var(--accent-cyan); }

/* ---------- Hero ---------- */
.hero { padding: 72px 28px 40px; }
.hero .prompt { font-size: 13px; color: var(--text-muted); display: flex; gap: 8px; align-items: center; }
.hero .prompt .dollar { color: var(--accent-cyan); }
.hero .cursor { display: inline-block; width: 8px; height: 15px; background: var(--accent-cyan); animation: rnBlink 1s steps(1) infinite; }
.hero h1 { margin: 22px 0 0; font-weight: 900; font-size: clamp(52px, 10.5vw, 164px); line-height: 0.88; letter-spacing: -0.035em; }
.hero .sub-row { margin-top: 22px; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.hero .kicker { font-weight: 700; font-size: 15px; letter-spacing: 0.5em; color: var(--accent-cyan); }
.hero .lede { margin: 0; max-width: 440px; color: var(--text-secondary); font-size: 17px; line-height: 1.55; }

/* ---------- Featured card ---------- */
.featured-card { padding: 24px 28px 72px; }
.featured-card .grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  border: 1px solid var(--border-card); background: var(--bg-card);
}
.thumb {
  display: block; position: relative; aspect-ratio: 16/9;
  background: repeating-linear-gradient(135deg, #0c1119 0 12px, #0f1520 12px 24px);
  text-decoration: none;
}
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb .thumb-label { position: absolute; left: 16px; top: 16px; font-size: 11px; letter-spacing: 0.14em; color: #6b7686; }
.thumb .play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 84px; height: 84px; border-radius: 50%; background: var(--accent-red);
  display: flex; align-items: center; justify-content: center; box-shadow: -5px 0 0 var(--accent-cyan);
}
.thumb .play::after { content: ''; width: 0; height: 0; border-left: 26px solid #fff; border-top: 16px solid transparent; border-bottom: 16px solid transparent; margin-left: 7px; }
.thumb .dur-badge { position: absolute; right: 14px; bottom: 14px; padding: 4px 8px; background: #000; font-size: 12px; color: #fff; }

.featured-info { padding: 36px; display: flex; flex-direction: column; gap: 18px; justify-content: center; max-width: 620px; }
.chip-row { display: flex; gap: 10px; align-items: center; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; }
.chip-featured { background: var(--accent-cyan); color: var(--bg-main); padding: 4px 8px; font-weight: 700; }
.chip-meta { color: var(--text-muted); }
.featured-info h2 { margin: 0; font-weight: 800; font-size: clamp(28px, 3vw, 40px); line-height: 1.05; letter-spacing: -0.02em; }
.featured-info p { margin: 0; color: var(--text-secondary); font-size: 16px; line-height: 1.6; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.btn-primary { padding: 12px 18px; background: var(--accent-red); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; border: none; cursor: pointer; }
.btn-primary:hover { background: var(--accent-red-hover); color: #fff; }
.btn-outline { padding: 12px 18px; border: 1px solid var(--border-active); color: var(--text-main); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; background: transparent; }
.btn-outline:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); }

/* ---------- Post grid ---------- */
.section { max-width: 1280px; margin: 0 auto; padding: 0 28px 80px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-bottom: 1px solid var(--border-card); padding-bottom: 14px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h3 { margin: 0; font-weight: 800; font-size: 28px; letter-spacing: -0.01em; }
.section-head a { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-cyan); }
.section-head a:hover { color: #fff; }

.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 36px 28px; }
.post-card { display: flex; flex-direction: column; gap: 14px; text-align: left; text-decoration: none; transition: opacity 0.15s ease; }
.post-card:hover { opacity: 0.86; }
.post-card .thumb-mini { display: block; position: relative; aspect-ratio: 16/9; background: repeating-linear-gradient(135deg, #0c1119 0 10px, #0f1520 10px 20px); border: 1px solid var(--border-card); }
.post-card .thumb-mini img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-card .thumb-mini .dur-badge { position: absolute; right: 10px; bottom: 10px; padding: 3px 7px; background: #000; font-size: 11px; color: #fff; }
.post-card .meta-row { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); display: flex; gap: 8px; flex-wrap: wrap; }
.post-card .meta-row .code { color: var(--accent-cyan); }
.post-card .post-title { font-weight: 700; font-size: 21px; line-height: 1.18; letter-spacing: -0.01em; color: var(--text-main); }
.post-card .post-excerpt { font-size: 15px; line-height: 1.55; color: #a3acba; }

/* ---------- Category explorer ---------- */
.cat-explorer { border-top: 1px solid var(--border-card); border-bottom: 1px solid var(--border-card); }
.cat-explorer .grid { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.cat-explorer a { padding: 44px 28px; border-right: 1px solid var(--border-card); display: flex; flex-direction: column; gap: 14px; text-align: left; text-decoration: none; transition: background 0.15s ease; }
.cat-explorer a:hover { background: var(--bg-card-hover); }
.cat-explorer .cat-count { font-size: 11px; letter-spacing: 0.16em; color: var(--text-muted); }
.cat-explorer .cat-name { font-weight: 900; font-size: 64px; line-height: 0.9; letter-spacing: -0.03em; text-transform: uppercase; }
.cat-explorer .cat-desc { font-size: 15px; line-height: 1.55; color: #a3acba; max-width: 340px; }
.cat-explorer .cat-explore { font-size: 12px; color: var(--accent-cyan); letter-spacing: 0.12em; }

/* ---------- Newsletter ---------- */
.newsletter { max-width: 1280px; margin: 0 auto; padding: 80px 28px; }
.newsletter .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 32px; align-items: center; }
.newsletter .eyebrow { font-size: 12px; letter-spacing: 0.18em; color: var(--accent-red-hover); text-transform: uppercase; }
.newsletter h3 { margin: 12px 0 0; font-weight: 800; font-size: clamp(30px, 3.6vw, 46px); line-height: 1.02; letter-spacing: -0.02em; }
.newsletter form { display: flex; gap: 0; border: 1px solid var(--border-active); }
.newsletter input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; padding: 16px 18px; color: var(--text-main); font-size: 14px; }
.newsletter button { padding: 16px 20px; background: var(--text-main); color: var(--bg-main); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; border: none; cursor: pointer; transition: background 0.15s ease; }
.newsletter button:hover { background: var(--accent-cyan); }

/* ---------- Article page ---------- */
.video-bar { background: #000; border-bottom: 1px solid var(--border-card); }
.video-bar .inner { max-width: 1280px; margin: 0 auto; padding: 24px 28px; }
.video-frame { position: relative; aspect-ratio: 16/9; max-height: 72vh; margin: 0 auto; background: repeating-linear-gradient(135deg, #0a0e15 0 12px, #0d121b 12px 24px); }
.video-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-frame .label { position: absolute; left: 18px; top: 16px; font-size: 11px; letter-spacing: 0.14em; color: #6b7686; }
.video-frame .play-big { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 96px; height: 96px; border-radius: 50%; background: var(--accent-red); display: flex; align-items: center; justify-content: center; box-shadow: -6px 0 0 var(--accent-cyan); }
.video-frame .play-big::after { content: ''; width: 0; height: 0; border-left: 30px solid #fff; border-top: 18px solid transparent; border-bottom: 18px solid transparent; margin-left: 8px; }

.article-body { max-width: 1280px; margin: 0 auto; padding: 48px 28px 80px; }
.back-link { font-size: 12px; letter-spacing: 0.12em; color: var(--text-muted); text-transform: uppercase; }
.back-link:hover { color: var(--accent-cyan); }
.article-meta { margin-top: 22px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.article-meta .code { color: var(--accent-cyan); }
.article-body h1.title { margin: 16px 0 0; max-width: 980px; font-weight: 900; font-size: clamp(36px, 5.2vw, 72px); line-height: 0.98; letter-spacing: -0.03em; }
.article-excerpt { margin: 22px 0 0; max-width: 760px; font-size: 20px; line-height: 1.55; color: var(--text-secondary); }

.article-content {
  margin-top: 56px; max-width: 760px; font-size: 18px; line-height: 1.75; color: #d3d9e2;
}
.article-content h2 { margin: 48px 0 16px; font-weight: 800; font-size: 30px; line-height: 1.1; letter-spacing: -0.015em; color: #fff; }
.article-content h3 { margin: 36px 0 14px; font-weight: 700; font-size: 24px; color: #fff; }
.article-content p { margin: 0 0 24px; }
.article-content img { border: 1px solid var(--border-card); margin: 24px 0; }
.article-content a { text-decoration: underline; }
.article-content pre {
  background: var(--bg-card); border: 1px solid var(--border-card); margin: 24px 0; border-radius: 2px;
  overflow: auto; padding: 20px 16px; font-family: 'JetBrains Mono', monospace; font-size: 14px; line-height: 1.7; color: #d3d9e2;
}
.article-content code { font-family: 'JetBrains Mono', monospace; }
.article-content blockquote { margin: 32px 0; padding: 22px 24px; background: var(--bg-card-hover); border: 1px solid var(--border-card); border-left: 3px solid var(--accent-cyan); color: #d3d9e2; }
.kg-width-wide { max-width: 1040px; margin-left: calc(50% - 520px); }
.kg-width-full { max-width: 100vw; margin-left: calc(50% - 50vw); }
.kg-width-wide img, .kg-width-full img { width: 100%; }

.related-section { margin-top: 88px; border-top: 1px solid var(--border-card); padding-top: 28px; max-width: 1280px; }
.related-section h3 { margin: 0 0 28px; font-weight: 800; font-size: 26px; }

/* ---------- Tag / category archive ---------- */
.archive-hero { padding: 72px 28px 32px; }
.archive-hero .path { font-size: 13px; color: var(--text-muted); }
.archive-hero .path .slash { color: var(--accent-cyan); }
.archive-hero h1 { margin: 16px 0 0; font-weight: 900; font-size: clamp(72px, 16vw, 240px); line-height: 0.85; letter-spacing: -0.04em; text-transform: uppercase; }
.archive-hero p { margin: 24px 0 0; max-width: 560px; font-size: 18px; line-height: 1.55; color: var(--text-secondary); }

.post-list { border-top: 1px solid var(--border-active); max-width: 1280px; margin: 0 auto; padding: 0 28px 96px; }
.post-list-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px 32px; align-items: center; padding: 26px 0; border-bottom: 1px solid var(--border-card); text-decoration: none; transition: background 0.15s ease; }
.post-list-row:hover { background: var(--bg-card-hover); }
.post-list-row .meta-col { display: flex; flex-direction: column; gap: 6px; font-size: 12px; letter-spacing: 0.12em; color: var(--text-muted); text-transform: uppercase; font-family: 'JetBrains Mono', monospace; }
.post-list-row .meta-col .code { color: var(--accent-cyan); font-weight: 700; }
.post-list-row .title-col { grid-column: span 2; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.post-list-row .title-col .title { font-weight: 800; font-size: 24px; line-height: 1.15; letter-spacing: -0.01em; color: var(--text-main); font-family: 'Archivo', sans-serif; }
.post-list-row .title-col .excerpt { font-size: 15px; line-height: 1.5; color: #a3acba; }
.post-list-row .tags-col { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; font-family: 'JetBrains Mono', monospace; }
.post-list-row .tags-col .tagchip { padding: 4px 8px; border: 1px solid var(--border-active); color: #c3cad5; }

/* ---------- Generic page ---------- */
.page-content { max-width: 760px; margin: 0 auto; padding: 72px 28px 96px; font-size: 18px; line-height: 1.75; color: #d3d9e2; }
.page-content h1 { font-weight: 900; font-size: clamp(40px, 6vw, 72px); letter-spacing: -0.03em; margin: 0 0 24px; font-family: 'Archivo', sans-serif; }

/* ---------- About (template) ---------- */
.about-grid { max-width: 1280px; margin: 0 auto; padding: 72px 28px 96px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 56px; align-items: start; }
.about-photo { position: relative; max-width: 480px; }
.about-photo img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--border-card); background: var(--bg-card); }
.about-photo::after { content: ''; position: absolute; left: -8px; bottom: -8px; right: 8px; top: 8px; border: 1px solid var(--accent-cyan); z-index: -1; }
.about-info { display: flex; flex-direction: column; gap: 24px; }
.about-info .prompt { font-size: 13px; color: var(--text-muted); }
.about-info .prompt .dollar { color: var(--accent-cyan); }
.about-info h1 { margin: 0; font-weight: 900; font-size: clamp(48px, 7vw, 96px); line-height: 0.9; letter-spacing: -0.035em; font-family: 'Archivo', sans-serif; display: flex; flex-direction: column; }
.about-info p { margin: 0; font-size: 18px; line-height: 1.6; color: var(--text-secondary); }
.stack-label { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; }
.stack-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.stack-chips span { padding: 6px 10px; border: 1px solid var(--border-active); font-size: 12px; color: #c3cad5; font-family: 'JetBrains Mono', monospace; }
.social-list { border-top: 1px solid var(--border-card); }
.social-list a { display: flex; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--border-card); color: var(--text-main); font-size: 14px; font-family: 'JetBrains Mono', monospace; }
.social-list a:hover { color: var(--accent-cyan); }
.social-list a .handle { color: var(--text-muted); }

/* ---------- Pagination ---------- */
.pagination { max-width: 1280px; margin: 0 auto; padding: 0 28px 80px; display: flex; justify-content: center; gap: 16px; font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
.pagination a { padding: 10px 16px; border: 1px solid var(--border-active); color: var(--text-main); }
.pagination a:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); }

/* ---------- Koenig Editor Cards (Galleries, Bookmarks, Callouts) ---------- */
.kg-gallery-container { display: flex; flex-direction: column; max-width: 1040px; width: 100%; margin: 32px 0; }
.kg-gallery-row { display: flex; flex-direction: row; justify-content: center; }
.kg-gallery-image img { display: block; margin: 0; width: 100%; height: 100%; object-fit: cover; }
.kg-gallery-row:not(:first-of-type) { margin-top: 16px; }
.kg-gallery-image:not(:first-of-type) { margin-left: 16px; }

.kg-bookmark-card { width: 100%; margin: 32px 0; }
.kg-bookmark-container {
  display: flex; color: var(--text-main); text-decoration: none;
  background: var(--bg-card); border: 1px solid var(--border-card);
  border-radius: 2px; overflow: hidden; transition: border-color 0.15s ease;
}
.kg-bookmark-container:hover { border-color: var(--accent-cyan); color: var(--text-main); }
.kg-bookmark-content { display: flex; flex-direction: column; flex-grow: 1; padding: 20px 24px; text-align: left; }
.kg-bookmark-title { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 17px; line-height: 1.3; color: #ffffff; }
.kg-bookmark-description { margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kg-bookmark-metadata { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 12px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }
.kg-bookmark-icon { width: 18px; height: 18px; }
.kg-bookmark-author { font-weight: 600; color: var(--text-main); }
.kg-bookmark-publisher { opacity: 0.8; }
.kg-bookmark-thumbnail { position: relative; min-width: 33%; max-height: 100%; }
.kg-bookmark-thumbnail img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; margin: 0; }

.kg-callout-card { display: flex; padding: 20px 24px; border-radius: 2px; margin: 32px 0; border: 1px solid var(--border-card); background: var(--bg-card-hover); border-left: 3px solid var(--accent-cyan); }
.kg-callout-emoji { font-size: 20px; line-height: 1.4; margin-right: 14px; }
.kg-callout-text { font-size: 16px; line-height: 1.6; color: #d3d9e2; }

@media (max-width: 640px) {
  .featured-info { padding: 24px; }
  .hero { padding: 48px 20px 28px; }
}
