/* f4n6 Ghost Theme — screen.css */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500&display=swap');

:root {
  --gh-font-heading: 'Space Grotesk', sans-serif;
  --gh-font-body:    'Inter', sans-serif;
  --bg-base:       #0a0c0f;
  --bg-surface:    #0d1017;
  --bg-card:       #111520;
  --bg-card-hover: #141820;
  --bg-prompt:     #070a0d;
  --border:        #1c2130;
  --border-soft:   #161c28;
  --text-primary:  #dde3ee;
  --text-secondary:#8892a4;
  --text-muted:    #4a5568;
  --accent:        #3fb950;
  --accent-dim:    #0d1f12;
  --accent-border: #1a3d20;
  --accent-glow:   rgba(63,185,80,0.08);
  --blue:          #58a6ff;
  --blue-dim:      #051020;
  --blue-border:   #0d2d5e;
  --red:           #f85149;
  --red-dim:       #1a0808;
  --red-border:    #3d1010;
  --amber:         #d29922;
  --amber-dim:     #130d00;
  --amber-border:  #3d2a00;
  --font-mono:     'JetBrains Mono', monospace;
  --font-display:  'Space Grotesk', sans-serif;
  --font-body:     'Inter', sans-serif;
  --radius:        4px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ─── SCANLINE OVERLAY ──────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ─── NAV ───────────────────────────────────────────── */
.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 48px;
  border-bottom: 0.5px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(10,12,15,0.92);
  backdrop-filter: blur(12px);
  z-index: 100;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 3px;
  text-transform: lowercase;
}

.logo-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  margin-left: 1px;
  position: relative;
  top: -2px;
  box-shadow: 0 0 8px var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  transition: color 0.2s;
  letter-spacing: 0.03em;
}

.nav-links a:hover { color: var(--text-primary); }

.nav-links .nav-rss {
  color: var(--accent);
  border: 0.5px solid var(--accent-border);
  padding: 5px 14px;
  border-radius: var(--radius);
  transition: background 0.2s;
}

.nav-links .nav-rss:hover { background: var(--accent-dim); color: var(--accent); }

/* ─── PROMPT BAR ────────────────────────────────────── */
.prompt-bar {
  background: var(--bg-prompt);
  border-bottom: 0.5px solid var(--border);
  padding: 11px 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
}

.prompt-path { color: var(--text-muted); }
.prompt-cmd  { color: var(--accent); }

.prompt-cursor {
  display: inline-block;
  width: 7px;
  height: 13px;
  background: var(--accent);
  animation: blink 1.2s step-end infinite;
  margin-left: 2px;
  border-radius: 1px;
}

@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ─── HERO (featured post) ──────────────────────────── */
.hero {
  padding: 64px 48px 56px;
  border-bottom: 0.5px solid var(--border);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  right: -60px;
  top: -60px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(63,185,80,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.post-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: var(--radius);
  margin-bottom: 18px;
  letter-spacing: 0.02em;
}

.post-tag.green  { color: var(--accent); background: var(--accent-dim); border: 0.5px solid var(--accent-border); }
.post-tag.blue   { color: var(--blue);   background: var(--blue-dim);   border: 0.5px solid var(--blue-border); }
.post-tag.red    { color: var(--red);    background: var(--red-dim);    border: 0.5px solid var(--red-border); }
.post-tag.amber  { color: var(--amber);  background: var(--amber-dim);  border: 0.5px solid var(--amber-border); }

.hero-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 18px;
  letter-spacing: 0.05em;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.25;
  max-width: 720px;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.hero-excerpt {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 580px;
  line-height: 1.65;
  margin-bottom: 24px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.meta-sep { color: var(--border); }

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  border: 0.5px solid var(--accent-border);
  padding: 8px 18px;
  border-radius: var(--radius);
  margin-top: 24px;
  transition: background 0.2s;
}

.read-more:hover { background: var(--accent-dim); }

/* ─── POST GRID ─────────────────────────────────────── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-soft);
}

.post-card {
  background: var(--bg-base);
  padding: 32px 28px 26px;
  transition: background 0.2s;
  display: flex;
  flex-direction: column;
}

.post-card:hover { background: var(--bg-card-hover); }

.card-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 9px;
  border-radius: 2px;
  display: inline-block;
  margin-bottom: 14px;
  letter-spacing: 0.03em;
  align-self: flex-start;
}

.card-tag.blue   { color: var(--blue);   background: var(--blue-dim);   border: 0.5px solid var(--blue-border); }
.card-tag.red    { color: var(--red);    background: var(--red-dim);    border: 0.5px solid var(--red-border); }
.card-tag.amber  { color: var(--amber);  background: var(--amber-dim);  border: 0.5px solid var(--amber-border); }
.card-tag.green  { color: var(--accent); background: var(--accent-dim); border: 0.5px solid var(--accent-border); }

.card-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
  flex: 1;
}

.card-excerpt {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  border-top: 0.5px solid var(--border-soft);
  padding-top: 14px;
  margin-top: auto;
}

.card-read { color: var(--accent); }

/* ─── STATS STRIP ───────────────────────────────────── */
.stats-strip {
  background: var(--bg-prompt);
  border-top: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
  padding: 22px 48px;
  display: flex;
  gap: 40px;
  align-items: center;
}

.stat { font-family: var(--font-mono); }
.stat-num   { font-size: 20px; font-weight: 500; color: var(--blue); }
.stat-label { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.stat-num.green { color: var(--accent); }
.stat-num.amber { color: var(--amber); }

.stat-div {
  width: 0.5px;
  height: 40px;
  background: var(--border);
}

/* ─── PAGINATION ────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 48px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.pagination a {
  color: var(--accent);
  border: 0.5px solid var(--accent-border);
  padding: 8px 18px;
  border-radius: var(--radius);
  transition: background 0.2s;
}

.pagination a:hover { background: var(--accent-dim); }

/* ─── SINGLE POST ───────────────────────────────────── */
.post-header {
  padding: 64px 48px 48px;
  border-bottom: 0.5px solid var(--border);
  max-width: 800px;
}

.post-feature-image {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-bottom: 0.5px solid var(--border);
  filter: brightness(0.85);
}

.post-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 48px;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
  font-family: var(--font-display);
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin: 2rem 0 1rem;
  font-weight: 600;
}

.post-content h2 { font-size: 22px; }
.post-content h3 { font-size: 18px; }

.post-content p {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 1.4rem;
}

.post-content a {
  color: var(--accent);
  border-bottom: 0.5px solid var(--accent-border);
  transition: border-color 0.2s;
}

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

.post-content code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg-card);
  color: var(--accent);
  padding: 2px 7px;
  border-radius: 3px;
  border: 0.5px solid var(--border);
}

.post-content pre {
  background: var(--bg-prompt);
  border: 0.5px solid var(--border);
  border-left: 2px solid var(--accent);
  padding: 20px 24px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1.5rem 0;
}

.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.6;
}

.post-content blockquote {
  border-left: 2px solid var(--accent);
  padding: 12px 20px;
  margin: 1.5rem 0;
  background: var(--accent-dim);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.post-content blockquote p {
  color: var(--text-primary);
  font-style: italic;
  margin: 0;
}

.post-content ul,
.post-content ol {
  color: var(--text-secondary);
  padding-left: 1.5rem;
  margin-bottom: 1.4rem;
}

.post-content li { margin-bottom: 0.4rem; }

.post-content hr {
  border: none;
  border-top: 0.5px solid var(--border);
  margin: 2.5rem 0;
}

.post-content img {
  border-radius: var(--radius);
  border: 0.5px solid var(--border);
  margin: 1.5rem 0;
}

.kg-width-wide {
  position: relative;
  width: 85vw;
  min-width: 100%;
  margin: auto calc(50% - 50vw * 0.85);
}

.kg-width-full {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.kg-image { max-width: 100%; }

.kg-gallery-container { display: flex; flex-direction: column; }
.kg-gallery-row { display: flex; flex-direction: row; justify-content: center; gap: 4px; margin-bottom: 4px; }
.kg-gallery-image img { display: block; width: 100%; height: 100%; object-fit: cover; }

.kg-bookmark-card {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 1.5rem 0;
}
.kg-bookmark-title { font-weight: 500; color: var(--text-primary); margin-bottom: 4px; }
.kg-bookmark-description { font-size: 13px; color: var(--text-muted); }
.kg-bookmark-url { font-family: var(--font-mono); font-size: 11px; color: var(--accent); margin-top: 8px; }

.kg-callout-card {
  display: flex;
  gap: 12px;
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 1.5rem 0;
}
.kg-callout-text { color: var(--text-secondary); font-size: 15px; }

.kg-toggle-card {
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 1.5rem 0;
  background: var(--bg-card);
}
.kg-toggle-heading { font-weight: 500; color: var(--text-primary); }
.kg-toggle-content { color: var(--text-secondary); font-size: 14px; margin-top: 8px; }

.kg-video-card { margin: 1.5rem 0; }
.kg-video-card video { width: 100%; border-radius: var(--radius); }

/* ─── AUTHOR BIO ────────────────────────────────────── */
.author-bio {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 48px 56px;
  border-top: 0.5px solid var(--border);
  padding-top: 40px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.author-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0.5px solid var(--border);
  flex-shrink: 0;
  object-fit: cover;
}

.author-avatar-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0.5px solid var(--accent-border);
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  flex-shrink: 0;
}

.author-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.author-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─── TAG PAGE ──────────────────────────────────────── */
.tag-header {
  padding: 56px 48px 40px;
  border-bottom: 0.5px solid var(--border);
}

.tag-header h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.tag-header p {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

/* ─── FOOTER ────────────────────────────────────────── */
.site-footer {
  border-top: 0.5px solid var(--border);
  padding: 32px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  text-transform: lowercase;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a { color: var(--text-muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }

/* ─── RESPONSIVE ────────────────────────────────────── */
@media (max-width: 900px) {
  .post-grid { grid-template-columns: 1fr 1fr; }
  .site-nav, .hero, .prompt-bar, .stats-strip, .post-content, .post-header, .author-bio, .tag-header, .site-footer { padding-left: 24px; padding-right: 24px; }
}

@media (max-width: 600px) {
  .post-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 26px; }
  .nav-links { display: none; }
  .stats-strip { gap: 20px; flex-wrap: wrap; }
  .site-footer { flex-direction: column; gap: 16px; text-align: center; }
}
