/*
Theme Name: Kavi Logs
Theme URI: https://example.invalid/
Author: Kavi
Description: Deep-current archive theme for Kavi Logs. Submarine, IRC, and old-network memory.
Version: 1.0.1
License: GPL-2.0-or-later
Text Domain: kavinotes
*/
:root {
  --abyss: #061015;
  --deep: #0a1b22;
  --hold: #102b33;
  --ink: #e7f6f4;
  --muted: #aaa8c5;
  --quiet: #777590;
  --sonar: #8b7cff;
  --signal: #d8d2ff;
  --gold: #d9b45f;
  --rust: #b76f4a;
  --paper: #dce8e4;
  --paper-ink: #112126;
  --line: #343256;
  --glow: rgba(139, 124, 255, .30);
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", Times, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { background: var(--abyss); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -18rem, rgba(72, 61, 150, .48) 0, transparent 38rem),
    radial-gradient(circle at 15% 42%, rgba(139, 124, 255, .10), transparent 26rem),
    radial-gradient(circle at 90% 72%, rgba(217, 180, 95, .07), transparent 24rem),
    repeating-linear-gradient(180deg, rgba(255,255,255,.018) 0 1px, transparent 1px 7px),
    linear-gradient(180deg, #061015 0%, #03090c 100%);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-thickness: .06em; text-underline-offset: .22em; }
a:hover { color: var(--sonar); }
a:focus-visible { outline: 2px solid var(--signal); outline-offset: 4px; }
.site-shell { width: min(1180px, calc(100% - 42px)); margin: 0 auto; }
.top-rune {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--quiet);
  font: 700 .64rem/1.2 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.top-rune a { color: var(--muted); text-decoration: none; }
.top-rune a:hover { color: var(--signal); }
.site-header {
  padding: 1.55rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.site-brand { color: var(--ink); text-decoration: none; font-size: 1.42rem; letter-spacing: -.035em; }
.site-brand span { color: var(--sonar); font-family: var(--mono); font-size: .88em; letter-spacing: -.055em; }
.site-nav { display: flex; gap: clamp(.9rem, 3vw, 1.55rem); align-items: center; font: 800 .66rem/1 var(--mono); text-transform: uppercase; letter-spacing: .14em; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--signal); }
.home-hero { min-height: 560px; display: grid; grid-template-columns: .86fr 1.14fr; align-items: center; border-bottom: 1px solid var(--line); }
.lantern-field { display: grid; place-items: center; min-height: 520px; }
.lantern-ring {
  width: min(360px, 72vw);
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid rgba(139, 124, 255, .34);
  border-radius: 50%;
  animation: sonar-sweep 6.5s ease-in-out infinite;
}
.lantern-ring::before, .lantern-ring::after { content: ""; position: absolute; border-radius: 50%; }
.lantern-ring::before { inset: 12%; border: 1px dashed rgba(139, 124, 255, .52); animation: slow-spin 18s linear infinite; }
.lantern-ring::after {
  inset: 28%;
  background: radial-gradient(circle, #f2efff 0 3%, #c9c1ff 9%, #8b7cff 24%, rgba(139, 124, 255, .20) 55%, transparent 70%);
  box-shadow: 0 0 90px var(--glow), inset 0 0 48px rgba(216, 210, 255, .24);
  filter: blur(1px);
}
.lantern-ring span {
  z-index: 3;
  max-width: 72%;
  padding: .72rem .9rem;
  border: 1px solid rgba(216, 210, 255, .30);
  border-radius: 999px;
  color: #f7f5ff;
  background: rgba(6, 8, 22, .78);
  box-shadow: 0 0 28px rgba(6, 8, 22, .85);
  text-align: center;
  text-shadow: 0 1px 3px #000;
  font: 800 .60rem/1.7 var(--mono);
  letter-spacing: .22em;
  text-transform: uppercase;
}
@keyframes sonar-sweep { 50% { transform: scale(1.025); box-shadow: 0 0 72px rgba(139, 124, 255, .14); } }
@keyframes slow-spin { to { transform: rotate(360deg); } }
.hero-copy { padding-left: clamp(0rem, 5vw, 4rem); }
.eyebrow { margin: 0 0 .85rem; color: var(--sonar); font: 800 .67rem/1.35 var(--mono); letter-spacing: .18em; text-transform: uppercase; }
.eyebrow .category-link { color: var(--sonar); text-decoration: none; border-bottom: 1px solid transparent; }
.eyebrow .category-link:hover { color: var(--signal); border-bottom-color: currentColor; }
.hero-copy h1, .archive-prologue h2, .featured-main h2, .shelves-head h2, .archive-drawer h2, .single-hero h1, .empty-state h1 { text-wrap: balance; }
.hero-copy h1 { margin: 0; font-size: clamp(3.05rem, 6.6vw, 5.4rem); font-weight: 400; line-height: .92; letter-spacing: -.058em; }
.hero-deck { max-width: 36rem; margin: 1.35rem 0 0; color: #c5c2d8; font-size: 1.05rem; line-height: 1.7; }
.text-link { display: inline-block; margin-top: 1.3rem; padding-bottom: .28rem; border-bottom: 1px solid var(--sonar); color: var(--signal); font: 800 .7rem/1 var(--mono); letter-spacing: .12em; text-decoration: none; text-transform: uppercase; transition: letter-spacing .2s ease; }
.text-link:hover { letter-spacing: .18em; color: var(--signal); }
.archive-prologue { display: grid; grid-template-columns: 12rem 1fr; gap: 2rem; padding: 3.3rem 0 1.2rem; }
.archive-prologue h2 { margin: 0; max-width: 51rem; font-size: clamp(1.9rem, 3.4vw, 2.7rem); font-weight: 400; line-height: 1.12; letter-spacing: -.045em; }
.featured-note { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.featured-main { padding: 2.8rem clamp(2rem, 5vw, 3.4rem) 2.8rem 0; border-right: 1px solid var(--line); }
.featured-main h2 { margin: .9rem 0 1.3rem; font-size: clamp(2.45rem, 4.6vw, 4.05rem); font-weight: 400; line-height: .95; letter-spacing: -.048em; }
.featured-main h2 a, .shelf-row h3 a, .next-note h3 a, .site-brand, .entry-title a { text-decoration: none; }
.featured-main p:not(.eyebrow) { max-width: 38rem; color: #b8b5cd; font-size: 1rem; line-height: 1.7; }
.note-meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.3rem; color: var(--quiet); font: 800 .66rem/1.35 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.note-meta a { color: var(--signal); text-decoration: none; }
.featured-aside { padding: 2.8rem 0 2.8rem clamp(2rem, 5vw, 3.4rem); }
.pull-quote { margin: 0 0 3rem; font-size: clamp(1.5rem, 2.9vw, 1.95rem); line-height: 1.28; }
.pull-quote::before { content: "◌"; color: var(--sonar); font-size: 2.6rem; line-height: 0; vertical-align: -.32rem; margin-right: .42rem; font-family: var(--mono); }
.next-note { padding-top: 1.5rem; border-top: 1px solid var(--line); }
.next-note h3 { margin: .75rem 0 0; font-size: clamp(1.45rem, 2.6vw, 1.85rem); font-weight: 400; line-height: 1.14; }
.reading-shelves { padding: 3.8rem 0; }
.shelves-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.35rem; }
.shelves-head h2 { margin: 0; font-size: clamp(2.2rem, 5vw, 3.1rem); font-weight: 400; line-height: 1; letter-spacing: -.045em; }
.ghost-button { flex: 0 0 auto; border: 1px solid var(--line); padding: .78rem .95rem; color: var(--muted); background: transparent; text-decoration: none; font: 800 .66rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.ghost-button:hover { border-color: var(--sonar); color: var(--signal); }
.shelf-list { border-bottom: 1px solid var(--line); }
.shelf-row { display: grid; grid-template-columns: 9rem 1fr minmax(14rem, .75fr) 2.5rem; gap: 1.4rem; align-items: start; padding: 1.35rem 0; border-top: 1px solid var(--line); }
.shelf-kicker { color: var(--sonar); font: 800 .65rem/1.45 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.shelf-kicker .shelf-category { display: inline-block; color: var(--sonar); text-decoration: none; border-bottom: 1px solid transparent; }
.shelf-kicker .shelf-category:hover { color: var(--signal); border-bottom-color: currentColor; }
.shelf-kicker time { display: block; margin-top: .25rem; color: var(--quiet); }
.shelf-row h3 { margin: 0; font-size: clamp(1.45rem, 2.7vw, 1.9rem); font-weight: 400; line-height: 1.08; letter-spacing: -.03em; }
.shelf-row p { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.55; }
.shelf-row .arrow { justify-self: end; color: var(--sonar); text-decoration: none; transition: transform .18s ease; }
.shelf-row:hover h3 a { color: var(--signal); }
.shelf-row:hover .arrow { transform: translateX(.35rem); }
.archive-drawer { margin: 0 calc(50% - 50vw); padding: 4rem max(24px, calc((100vw - 1180px) / 2)); display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; background: var(--paper); color: var(--paper-ink); }
.archive-drawer .eyebrow { color: #5145bb; }
.archive-drawer h2 { margin: 0; font-size: clamp(2.25rem, 5vw, 3.15rem); font-weight: 400; line-height: 1.04; letter-spacing: -.045em; }
.archive-drawer p:not(.eyebrow) { margin: .8rem 0 0; color: #4c4b60; }
.drawer-links { display: flex; gap: .7rem; flex-wrap: wrap; justify-content: flex-end; }
.drawer-links a { border: 1px solid #112126; padding: .9rem 1rem; color: inherit; text-decoration: none; font: 800 .66rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.drawer-links a:hover { background: #112126; color: #fff; }
.pagination, .post-nav { margin: 2rem 0; color: var(--muted); font: 800 .72rem/1.5 var(--mono); letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.single-note, .empty-state { width: min(790px, 100%); margin: 2.6rem auto 0; }
.single-hero { padding: 3rem 0 2rem; border-bottom: 1px solid var(--line); text-align: center; }
.entry-title { margin: .7rem 0 .8rem; font-size: clamp(2.55rem, 6.8vw, 5.05rem); font-weight: 400; line-height: .96; letter-spacing: -.058em; }
.entry-meta { color: var(--quiet); font: 800 .68rem/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.entry-content { padding: 2rem 0 1rem; color: #e2dfed; }
.entry-content > * { max-width: 100%; }
.entry-content p, .entry-content ul, .entry-content ol { margin: 0 0 1.2rem; }
.entry-content h2, .entry-content h3, .entry-content h4 { margin: 2.1rem 0 .85rem; color: var(--ink); font-weight: 400; line-height: 1.1; letter-spacing: -.03em; }
.entry-content h2 { font-size: clamp(1.85rem, 4vw, 2.5rem); }
.entry-content h3 { font-size: clamp(1.45rem, 3vw, 1.85rem); }
.entry-content blockquote { margin: 1.8rem 0; padding-left: 1.2rem; border-left: 1px solid var(--sonar); color: var(--signal); font-size: 1.18rem; }
.entry-content img { max-width: 100%; height: auto; border-radius: 1rem; }
.entry-content a { color: var(--signal); }
.entry-content code, .entry-content pre { font-family: var(--mono); font-size: .9em; }
.entry-content pre { overflow-x: auto; padding: 1rem; border: 1px solid var(--line); border-radius: .8rem; background: rgba(0, 0, 0, .25); }
.post-nav { width: min(790px, 100%); margin-left: auto; margin-right: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; text-align: left; }
.post-nav div:last-child { text-align: right; }
.post-nav a { color: var(--muted); text-decoration: none; }
.post-nav a:hover { color: var(--signal); }
.page-note .entry-content { color: #e2dfed; }
.page-note .entry-content > p:first-child { color: var(--muted); font-size: 1.05rem; }
.page .linktree-intro { color: var(--muted); font-size: 1.05rem; margin-bottom: 1.6rem; }
.page .linktree-section { margin: 2rem 0 .75rem; color: var(--ink); font-size: clamp(1.45rem, 4vw, 2rem); letter-spacing: -.025em; }
.page .link-card { margin: 1rem 0 1.25rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 18px; background: rgba(139, 124, 255, .06); }
.page .link-card .link-title { margin: 0 0 .45rem; line-height: 1.35; }
.page .link-card .link-title a { display: block; color: var(--signal); font-family: var(--sans); font-weight: 760; letter-spacing: -.01em; }
.page .link-card .link-desc { margin: 0; color: var(--muted); font-size: .96rem; line-height: 1.55; }
.site-footer { padding: 2rem 0 4.2rem; display: flex; justify-content: space-between; gap: 1rem; color: var(--quiet); font: 800 .64rem/1.5 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; scroll-behavior: auto !important; transition-duration: .001ms !important; } }
@media (max-width: 880px) {
  .home-hero { grid-template-columns: 1fr; min-height: auto; }
  .lantern-field { min-height: 330px; }
  .lantern-ring { width: min(280px, 72vw); }
  .hero-copy { padding: 0 0 3rem; }
  .archive-prologue { grid-template-columns: 1fr; gap: .4rem; }
  .featured-note { grid-template-columns: 1fr; }
  .featured-main { border-right: 0; border-bottom: 1px solid var(--line); padding-right: 0; }
  .featured-aside { padding-left: 0; }
  .shelf-row { grid-template-columns: 7rem 1fr 2rem; }
  .shelf-row p { display: none; }
  .archive-drawer { grid-template-columns: 1fr; }
  .drawer-links { justify-content: flex-start; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .site-shell { width: calc(100% - 24px); }
  .top-rune { justify-content: center; text-align: center; }
  .top-rune span { display: none; }
  .site-header { align-items: flex-start; }
  .site-nav { gap: .85rem; font-size: .6rem; }
  .site-brand { font-size: 1.22rem; }
  .hero-copy h1 { font-size: 3.05rem; }
  .archive-prologue h2 { font-size: 1.7rem; }
  .note-meta { display: block; line-height: 2; }
  .shelves-head { display: block; }
  .ghost-button { display: inline-block; margin-top: 1rem; }
  .shelf-row { grid-template-columns: 1fr 2rem; gap: .7rem; }
  .shelf-kicker { grid-column: 1 / -1; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav div:last-child { text-align: left; }
  .site-footer { display: block; line-height: 2; }
}
.site-footer-link { color: inherit; text-decoration: none; display: contents; }
.site-footer-link:hover span { opacity: .75; }
.error404 .empty-state { min-height: 52vh; display: grid; align-content: center; text-align: center; }
.error404 .empty-state p { color: var(--muted); }
