/* KNIRV blog layout: mirrors KNIRV.COM's dve theme (globals.css) and the old /blog pages. */
:root {
  --knirv-primary: #3b82f6;
  --knirv-secondary: #0ea5e9;
  --page-bg: #040810;
  --text: #ffffff;
  --text-70: rgba(255, 255, 255, 0.7);
  --text-60: rgba(255, 255, 255, 0.6);
  --text-40: rgba(255, 255, 255, 0.4);
  --card: rgba(255, 255, 255, 0.05);
  --card-hover: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.1);
  --border-20: rgba(255, 255, 255, 0.2);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(59, 130, 246, 0.22), transparent 24%),
    radial-gradient(circle at 82% 8%, rgba(14, 165, 233, 0.16), transparent 20%),
    radial-gradient(circle at 50% 110%, rgba(59, 130, 246, 0.12), transparent 28%),
    linear-gradient(180deg, #03060d 0%, #071020 44%, #03060d 100%);
  background-color: var(--page-bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
::selection { background: rgba(59, 130, 246, 0.24); color: #fff; }
a { color: inherit; }

/* Inside the knirv.com iframe: let the parent page's background show and avoid
   100vh feedback loops with the auto-height iframe. */
html.in-frame body { background: transparent; min-height: 0; }
html.in-frame .site-nav { display: none; }

.site-nav {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(4, 8, 16, 0.86);
  backdrop-filter: blur(18px);
}
.shell { max-width: 80rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .shell { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .shell { padding: 0 2rem; } }
.shell.narrow { max-width: 56rem; }
.nav-row { display: flex; align-items: center; justify-content: space-between; height: 4rem; }
.logo { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.logo-mark {
  width: 2rem; height: 2rem; border-radius: .5rem;
  background: linear-gradient(to bottom right, #3b82f6, #22d3ee);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 10px rgba(59, 130, 246, .4);
}
.logo-mark svg { width: 1rem; height: 1rem; color: #fff; }
.logo-text { font-size: 1.25rem; font-weight: 900; letter-spacing: -0.025em; color: #fff; }
.nav-link { color: var(--text-70); text-decoration: none; font-size: .9rem; }
.nav-link:hover { color: #fff; }

.gradient-text {
  background: linear-gradient(135deg, var(--knirv-primary) 0%, var(--knirv-secondary) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.badge {
  display: inline-flex; align-items: center; border-radius: 9999px;
  padding: .125rem .625rem; font-size: .75rem; font-weight: 600; line-height: 1.25rem;
}
.badge-secondary { background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.8); }
.badge-outline { border: 1px solid var(--border-20); color: var(--text-60); }
.badge-accent { border: 1px solid rgba(59, 130, 246, .5); color: var(--knirv-primary); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border-radius: .375rem; padding: .55rem 1rem; font-size: .875rem; font-weight: 500;
  text-decoration: none; transition: all .2s ease; cursor: pointer;
}
.btn-primary { background: linear-gradient(to right, var(--knirv-primary), var(--knirv-secondary)); color: #fff; }
.btn-primary:hover { background: linear-gradient(to right, var(--knirv-secondary), var(--knirv-primary)); }
.btn-outline { border: 1px solid rgba(59, 130, 246, .5); color: var(--knirv-primary); background: transparent; }
.btn-outline:hover { background: rgba(59, 130, 246, .1); }
.btn-ghost { background: rgba(255,255,255,.1); border: 1px solid var(--border-20); color: rgba(255,255,255,.8); }
.btn-ghost:hover, .btn-ghost.active { background: rgba(255,255,255,.2); }
.btn-ghost.active { background: linear-gradient(to right, var(--knirv-primary), var(--knirv-secondary)); color: #fff; border-color: transparent; }
.meta-line { display: flex; align-items: center; gap: .5rem; color: var(--text-60); font-size: .875rem; }
.meta-line svg { width: 1rem; height: 1rem; }

/* Index */
.hero { padding: 5rem 0; text-align: center; }
.hero h1 { font-size: clamp(3.75rem, 8vw, 4.5rem); font-weight: 700; margin: 0 0 1.5rem; line-height: 1; }
.hero p { font-size: 1.25rem; color: var(--text-70); max-width: 48rem; margin: 0 auto 2rem; line-height: 1.65; }
.hero-points { display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; color: var(--text-60); }
.section { padding: 5rem 0; }
.section.dim { background: rgba(0, 0, 0, 0.2); }
.section-head { text-align: center; margin-bottom: 3rem; }
.section-head h2 { font-size: 1.875rem; font-weight: 700; margin: 1rem 0 0; }
.section-title { font-size: 2.25rem; font-weight: 700; text-align: center; margin: 0 0 4rem; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: .5rem;
  backdrop-filter: blur(16px); overflow: hidden; transition: all .3s ease;
  text-decoration: none; color: inherit; display: block;
}
.card:hover { background: var(--card-hover); }
.emoji-block {
  background: linear-gradient(to bottom right, rgba(59, 130, 246, .2), rgba(14, 165, 233, .2));
  display: flex; align-items: center; justify-content: center;
}
.featured { max-width: 56rem; margin: 0 auto; display: grid; grid-template-columns: 1fr; }
@media (min-width: 768px) { .featured { grid-template-columns: 1fr 1fr; } }
.featured .emoji-block { padding: 3rem; font-size: 6rem; }
.featured .body { padding: 2rem; }
.featured h3 { font-size: 1.5rem; font-weight: 700; margin: 0 0 1rem; line-height: 1.25; }
.featured p { color: var(--text-70); margin: 0 0 1.5rem; line-height: 1.65; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.5rem 0; }
.categories { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; padding: 3rem 0; }
.grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.post-card .emoji-block { padding: 2rem; font-size: 2.25rem; }
.post-card .body { padding: 1.5rem; }
.post-card h3 { font-size: 1.125rem; font-weight: 600; margin: .75rem 0; line-height: 1.25; transition: color .2s; }
.post-card:hover h3 { color: var(--knirv-primary); }
.post-card p {
  color: var(--text-70); font-size: .875rem; margin: 0 0 1rem;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card .small { color: var(--text-60); font-size: .75rem; }
.post-card .tags { margin: 1rem 0; gap: .25rem; }
.post-card .btn { width: 100%; }
.is-hidden { display: none !important; }

/* Post */
.post { padding: 3rem 0; }
.post-header { margin-bottom: 2rem; }
.post-header h1 { font-size: clamp(2.25rem, 5vw, 3rem); font-weight: 700; margin: 0 0 1.5rem; line-height: 1.25; }
.post-header .subtitle { font-size: 1.25rem; color: var(--text-70); margin: 0 0 1.5rem; line-height: 1.65; }
.post-hero-emoji { padding: 3rem; font-size: 6rem; margin-bottom: 2rem; }
.back { margin-bottom: 2rem; }
.post-footer { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
