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

:root {
  --bg:       #0d0d0d;
  --bg2:      #141414;
  --bg3:      #1c1c1c;
  --line:     #2a2a2a;
  --muted:    #999;
  --body:     #a8a09a;
  --bright:   #f9f1e6;
  --accent:   #4fe03a;
  --accent2:  #4a9eff;
  --green:    #5cb85c;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--body);
  font-family: 'Roboto Mono', 'Courier New', monospace;
  line-height: 1.7;
  min-height: 100vh;
}

::selection { background: var(--accent); color: #fff; }
a { color: inherit; text-decoration: none; }

body::after {
  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;
}

.wrap { max-width: 860px; margin: 0 auto; padding: 0 clamp(1.2rem, 4vw, 3rem); }

header { border-bottom: 1px solid var(--line); padding: 2.5rem 0 2rem; animation: fadeIn 0.5s ease both; }

.header-inner { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }

.logo-pre { font-size: 0.8rem; color: var(--muted); letter-spacing: 0.06em; margin-bottom: 0.3rem; }
.logo-pre .prompt { color: var(--green); }
.logo-pre .cmd    { color: var(--accent2); }

.site-name { font-family: 'Roboto Mono', monospace; font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 900; color: var(--bright); letter-spacing: -0.03em; line-height: 1; }
.site-name .dot { color: var(--accent); }

.tagline { font-size: 0.9rem; color: var(--muted); margin-top: 0.5rem; font-style: italic; letter-spacing: 0.04em; }

nav { display: flex; flex-direction: column; align-items: flex-end; gap: 0.3rem; font-size: 0.9rem; }
nav a { color: var(--muted); transition: color 0.15s; letter-spacing: 0.05em; }
nav a::before { content: '> '; color: var(--line); transition: color 0.15s; }
nav a:hover { color: var(--bright); }
nav a:hover::before { color: var(--accent); }

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 2rem 0;
  margin-top: 1rem;
}

.featured {
  border-bottom: 1px solid var(--line);
  padding: 3rem 0;
  position: relative;
  overflow: hidden;
  animation: fadeIn 0.5s 0.1s ease both;
}
.featured::before {
  content: "★ NAUJAUSIAS";
  position: absolute;
  top: 1.8rem;
  right: 0;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  opacity: 0.6;
}
.feat-meta {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 1rem;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.feat-meta .tag {
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.1rem 0.45rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
}
.feat-title {
  font-family: "Roboto Mono", monospace;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  color: var(--bright);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 1.2rem;
  max-width: 28ch;
}
.feat-title a {
  transition: color 0.2s;
}
.feat-title a:hover {
  color: var(--accent);
}
.feat-excerpt {
  font-size: 0.9rem;
  color: var(--body);
  max-width: 62ch;
  line-height: 1.8;
  margin-bottom: 1.8rem;
}
.btn-read {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--bg);
  background: var(--bright);
  padding: 0.55rem 1.1rem;
  transition:
  background 0.2s,
  color 0.2s;
}
.btn-read:hover {
  background: var(--accent);
  color: #fff;
}
.btn-read .arr {
  transition: transform 0.2s;
}
.btn-read:hover .arr {
  transform: translateX(4px);
}
.section-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 2.5rem 0 1.5rem;
  animation: fadeIn 0.5s 0.2s ease both;
}
.section-head span {
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  white-space: nowrap;
}
.section-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.post-list {
  list-style: none;
}
.post-item {
  border-bottom: 1px solid var(--line);
  padding: 1.6rem 0;
  display: grid;
  grid-template-columns: 5.5rem 1fr auto;
  gap: 1.5rem;
  align-items: start;
  transition: background 0.15s;
  animation: fadeIn 0.4s ease both;
}
.post-item:hover {
  background: var(--bg2);
  margin-left: -1rem;
  margin-right: -1rem;
  padding-left: 1rem;
  padding-right: 1rem;
}
.p-date {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  padding-top: 0.25rem;
  line-height: 1.4;
}
.p-date .yr {
  display: block;
}
.p-cats {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}
.p-cat {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 0.08rem 0.4rem;
  transition:
  border-color 0.15s,
  color 0.15s;
}
.post-item:hover .p-cat {
  border-color: var(--bg3);
}
.p-title {
  font-family: "Roboto Mono", monospace;
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 700;
  color: var(--bright);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
  transition: color 0.15s;
}
.post-item:hover .p-title {
  color: var(--accent);
}
.p-excerpt {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.65;
  max-width: 60ch;
}
.p-arrow {
  font-size: 1rem;
  color: var(--muted);
  padding-top: 0.2rem;
  transition:
  color 0.15s,
  transform 0.15s;
}
.post-item:hover .p-arrow {
  color: var(--accent);
  transform: translateX(4px);
}
.tags-strip {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.tags-strip-label {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-right: 0.5rem;
  white-space: nowrap;
}
.t {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 0.2rem 0.6rem;
  transition:
  border-color 0.15s,
  color 0.15s;
  cursor: pointer;
}
.t:hover {
  color: var(--bright);
  border-color: var(--bright);
}
.t.active {
  color: var(--accent);
  border-color: var(--accent);
}
.post-item:nth-child(1) {
  animation-delay: 0.25s;
}
.post-item:nth-child(2) {
  animation-delay: 0.32s;
}
.post-item:nth-child(3) {
  animation-delay: 0.39s;
}
.post-item:nth-child(4) {
  animation-delay: 0.46s;
}
.post-item:nth-child(5) {
  animation-delay: 0.53s;
}
.post-item:nth-child(6) {
  animation-delay: 0.6s;
}
@media (max-width: 640px) {
  .post-item {
    grid-template-columns: 1fr auto;
  }
  .p-date {
    display: none;
  }
  .featured::before {
    display: none;
  }
  .header-inner {
    flex-direction: column;
  }
  nav {
    align-items: flex-start;
  }
}

#progress-bar { position: fixed; top: 0; left: 0; height: 2px; width: 0%; background: var(--accent); z-index: 10000; transition: width 0.1s linear; }
.breadcrumb { display: flex; align-items: center; gap: 0.6rem; padding: 1.5rem 0 0; font-size: 0.8rem; letter-spacing: 0.1em; color: var(--muted); }
.breadcrumb a { transition: color 0.15s; }
.breadcrumb a:hover { color: var(--bright); }
.post-header { padding: 2.5rem 0 2.5rem; border-bottom: 1px solid var(--line); animation: fadeIn 0.5s ease both; }
.post-meta-top { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.tag-pill { color: var(--accent); border: 1px solid var(--accent); padding: 0.1rem 0.5rem; font-size: 0.8rem; letter-spacing: 0.14em; transition: background 0.15s, color 0.15s; }
.tag-pill:hover { background: var(--accent); color: #fff; }
.tag-pill.secondary { color: var(--muted); border-color: var(--line); }
.tag-pill.secondary:hover { color: var(--bright); border-color: var(--bright); background: none; }
.post-date-meta { font-size: 0.8rem; color: var(--muted); letter-spacing: 0.08em; }
.post-title { font-family: 'Roboto Mono', monospace; font-size: clamp(2rem, 5.5vw, 3.8rem); font-weight: 900; color: var(--bright); line-height: 1.08; letter-spacing: -0.03em; margin-bottom: 1.4rem; max-width: 22ch; }
.post-lede { font-size: 1rem; color: var(--body); line-height: 1.8; max-width: 60ch; border-left: 2px solid var(--accent); padding-left: 1.2rem; font-style: italic; }
.meta-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.8rem; padding: 1.2rem 0; border-bottom: 1px solid var(--line); font-size: 0.83rem; color: var(--muted); letter-spacing: 0.08em; }
.meta-bar-left { display: flex; gap: 2rem; flex-wrap: wrap; }
.meta-item { display: flex; flex-direction: column; gap: 0.2rem; }
.meta-label { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.14em; }
.meta-value { color: var(--body); }
.post-content { padding: 3rem 0; border-bottom: 1px solid var(--line); animation: fadeIn 0.5s 0.15s ease both; }
.prose { max-width: 68ch; }
.prose p { font-size: 0.95rem; line-height: 1.9; color: var(--body); margin-bottom: 1.5rem; }
.prose p:last-child { margin-bottom: 0; }
.prose h2 { font-family: 'Roboto Mono', monospace; font-size: clamp(1.3rem, 2.5vw, 1.7rem); font-weight: 700; color: var(--bright); letter-spacing: -0.02em; line-height: 1.2; margin: 2.8rem 0 1rem; padding-top: 0.5rem; }
.prose h2::before { content: '## '; color: var(--accent); font-family: 'DM Mono', monospace; font-size: 0.75em; font-weight: 400; }
.prose h3 { font-family: 'Roboto Mono', monospace; font-size: 1.1rem; font-weight: 700; color: var(--bright); margin: 2rem 0 0.8rem; letter-spacing: -0.01em; }
.prose h3::before { content: '### '; color: var(--muted); font-family: 'DM Mono', monospace; font-size: 0.75em; font-weight: 400; }
.prose a { color: var(--accent2); border-bottom: 1px solid rgba(74, 158, 255, 0.3); transition: border-color 0.15s, color 0.15s; }
.prose a:hover { color: var(--bright); border-color: var(--bright); }
.prose strong { color: var(--bright); font-weight: 500; }
.prose blockquote { border-left: 2px solid var(--accent); padding: 0.8rem 0 0.8rem 1.4rem; margin: 2rem 0; background: var(--bg2); }
.prose blockquote p { color: var(--bright); font-style: italic; font-size: 0.95rem; margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 1.5rem; margin-bottom: 1.5rem; }
.prose li { font-size: 0.95rem; color: var(--body); line-height: 1.8; margin-bottom: 0.4rem; }
.prose code { font-family: 'DM Mono', monospace; font-size: 0.82rem; color: var(--green); background: var(--bg3); padding: 0.1rem 0.4rem; border: 1px solid var(--line); }
.prose pre { background: var(--bg2); border: 1px solid var(--line); border-left: 2px solid var(--green); padding: 1.2rem 1.5rem; margin: 1.8rem 0; overflow-x: auto; }
.prose pre code { background: none; border: none; padding: 0; font-size: 0.82rem; color: var(--body); line-height: 1.7; }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 3rem 0; position: relative; }
.prose hr::after { content: '✦'; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--bg); padding: 0 0.8rem; color: var(--muted); font-size: 0.7rem; }
.post-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 2rem 0; border-bottom: 1px solid var(--line); font-size: 0.8rem; }
.post-tags-label { letter-spacing: 0.16em; color: var(--muted); margin-right: 0.3rem; }
.post-nav { display: grid; grid-template-columns: 1fr 1px 1fr; gap: 0; border-bottom: 1px solid var(--line); }
.nav-divider { background: var(--line); }
.post-nav-item { padding: 2rem 0; display: flex; flex-direction: column; gap: 0.5rem; transition: background 0.15s; }
.post-nav-item.prev { padding-right: 2rem; }
.post-nav-item.next { padding-left: 2rem; align-items: flex-end; text-align: right; }
.post-nav-item:hover { opacity: 0.85; }
.nav-dir { font-size: 0.78rem; letter-spacing: 0.18em; color: var(--muted); }
.nav-dir .arr { color: var(--accent); }
.nav-title { font-family: 'Roboto Mono', monospace; font-size: 1rem; font-weight: 700; color: var(--bright); line-height: 1.25; transition: color 0.15s; }
.post-nav-item:hover .nav-title { color: var(--accent); }
.nav-date { font-size: 0.8rem; color: var(--muted); letter-spacing: 0.06em; }
.back-to-top-wrap { display: flex; justify-content: center; padding: 2.5rem 0; border-bottom: 1px solid var(--line); }
#back-to-top { font-family: 'DM Mono', monospace; font-size: 0.85rem; letter-spacing: 0.14em; color: var(--muted); background: none; border: 1px solid var(--line); padding: 0.45rem 1rem; cursor: pointer; transition: color 0.15s, border-color 0.15s; }
#back-to-top:hover { color: var(--bright); border-color: var(--bright); }
@media (max-width: 640px) { .post-title { font-size: clamp(1.8rem, 8vw, 2.8rem); } .post-nav { grid-template-columns: 1fr; } .nav-divider { display: none; } .post-nav-item.next { align-items: flex-start; text-align: left; padding-left: 0; border-top: 1px solid var(--line); } }

footer { border-top: 1px solid var(--line); padding: 2rem 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; font-size: 0.8rem; color: var(--muted); letter-spacing: 0.06em; }
footer a { transition: color 0.15s; }
footer a:hover { color: var(--bright); }
.footer-sig { display: flex; align-items: center; gap: 0.5rem; }
.footer-sig .blink { display: inline-block; width: 7px; height: 13px; background: var(--accent); animation: blink 1.1s step-end infinite; vertical-align: middle; }

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
