/*
Theme Name: Vibe Ops
Theme URI: https://blog.jvslabs.com
Author: JVS Labs
Description: Custom dark ops theme for the Vibe Ops blog. Terminal-native, self-hosted fonts, no page builder.
Version: 1.0.0
License: GPL-2.0-or-later
Text Domain: vibeops
*/

/* ---------- fonts (self-hosted, obviously) ---------- */
@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/jetbrains-mono-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/jetbrains-mono-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('fonts/plex-sans-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('fonts/plex-sans-400-italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('fonts/plex-sans-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --bg: #0b1120;
  --panel: #111a2e;
  --panel-2: #0e1626;
  --line: #1e2a44;
  --text: #c9d4e3;
  --dim: #7e8ca6;
  --orange: #f6a32b;
  --orange-hot: #ffbe55;
  --cyan: #5bc8e8;
  --green: #4cd97b;
  --red: #ff5f56;
  --yellow: #ffbd2e;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --measure: 72ch;
}

/* ---------- base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--orange-hot); text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 2px;
}
::selection { background: var(--orange); color: var(--bg); }

.wrap { max-width: 880px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
.site-head {
  border-bottom: 1px solid var(--line);
  background: rgba(11, 17, 32, 0.92);
}
.site-head .wrap {
  display: flex; align-items: center; gap: 14px;
  padding-top: 18px; padding-bottom: 18px;
}
.site-logo img { width: 40px; height: 40px; display: block; }
.site-title {
  font-family: var(--mono); font-weight: 700; font-size: 1.1rem;
  color: var(--text); letter-spacing: 0.02em;
}
.site-title a { color: var(--text); }
.site-title a:hover { color: var(--orange); text-decoration: none; }
.site-title .tld { color: var(--dim); font-weight: 400; }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; display: flex; gap: 22px; }
.site-nav a {
  font-family: var(--mono); font-size: 0.85rem; color: var(--dim);
}
.site-nav a:hover { color: var(--orange); text-decoration: none; }
.site-nav a::before { content: './'; color: var(--line); }
.site-nav a:hover::before { color: var(--orange); }

/* ---------- terminal hero ---------- */
.hero { padding: 48px 0 8px; }
.term {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.term-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.term-bar .dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-r { background: var(--red); } .dot-y { background: var(--yellow); } .dot-g { background: var(--green); }
.term-bar .term-title {
  margin-left: 10px; font-family: var(--mono); font-size: 0.75rem; color: var(--dim);
}
.term-body {
  padding: 22px 24px 26px;
  font-family: var(--mono); font-size: 0.92rem; line-height: 1.9;
  overflow-x: auto;
}
.term-body .ps1 { color: var(--green); }
.term-body .cmd { color: var(--text); }
.term-body .out { color: var(--dim); display: block; }
.term-body .out b { color: var(--cyan); font-weight: 400; }
.term-body .tagline { color: var(--orange); display: block; margin-top: 2px; }
.cursor {
  display: inline-block; width: 9px; height: 1.1em;
  background: var(--orange); vertical-align: text-bottom;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- prompt-style section headers ---------- */
.prompt-head {
  font-family: var(--mono); font-size: 0.95rem; font-weight: 400;
  color: var(--dim); margin: 56px 0 10px;
}
.prompt-head .ps1 { color: var(--green); }
.prompt-head .cmd { color: var(--text); }

/* ---------- post list ---------- */
.post-list { list-style: none; }
.post-list li {
  padding: 26px 0;
  border-bottom: 1px dashed var(--line);
}
.post-list li:last-child { border-bottom: 0; }
.entry-meta {
  font-family: var(--mono); font-size: 0.78rem; color: var(--cyan);
  display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 6px;
}
.entry-meta .cat { color: var(--dim); }
.entry-meta .cat a { color: var(--dim); }
.entry-meta .cat a:hover { color: var(--orange); }
.post-list h2 {
  font-family: var(--mono); font-size: 1.45rem; line-height: 1.35; font-weight: 700;
  letter-spacing: -0.01em;
}
.post-list h2 a { color: var(--text); }
.post-list h2 a:hover { color: var(--orange); text-decoration: none; }
.post-list .excerpt { color: var(--dim); margin-top: 8px; max-width: var(--measure); }
.post-list .excerpt p { display: inline; }

/* pagination */
.pagination {
  display: flex; gap: 18px; padding: 36px 0 8px;
  font-family: var(--mono); font-size: 0.85rem;
}

/* ---------- single post / page ---------- */
.article { padding: 52px 0 24px; }
.article-head { margin-bottom: 36px; }
.article-head h1 {
  font-family: var(--mono); font-weight: 700;
  font-size: clamp(1.7rem, 4.5vw, 2.4rem);
  line-height: 1.25; letter-spacing: -0.015em;
  max-width: 26ch;
}
.article-head .entry-meta { margin-top: 14px; }
.article-body { max-width: var(--measure); }
.article-body > * + * { margin-top: 1.15em; }
.article-body h2 {
  font-family: var(--mono); font-size: 1.3rem; margin-top: 2em;
  color: var(--orange); letter-spacing: -0.01em;
}
.article-body h2::before { content: '## '; color: var(--line); }
.article-body h3 { font-family: var(--mono); font-size: 1.05rem; margin-top: 1.8em; color: var(--cyan); }
.article-body ul, .article-body ol { padding-left: 1.4em; }
.article-body li { margin-top: 0.45em; }
.article-body li::marker { color: var(--orange); font-family: var(--mono); }
.article-body strong { color: #e8eef7; }
.article-body blockquote {
  border-left: 3px solid var(--orange);
  padding: 4px 0 4px 20px;
  color: var(--dim); font-style: italic;
}
.article-body code {
  font-family: var(--mono); font-size: 0.85em;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 4px; padding: 2px 6px; color: var(--cyan);
}
.article-body pre {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 18px 20px; overflow-x: auto;
  font-size: 0.85rem; line-height: 1.7;
}
.article-body pre code { background: none; border: 0; padding: 0; color: var(--text); }
.article-body img { max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); }
.article-body hr { border: 0; border-top: 1px dashed var(--line); margin: 2.2em 0; }
.article-body a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.article-body a:hover { text-decoration-color: var(--orange-hot); }

/* tags as flags */
.post-tags { margin-top: 44px; font-family: var(--mono); font-size: 0.8rem; }
.post-tags a { color: var(--cyan); margin-right: 12px; }
.post-tags a::before { content: '['; color: var(--dim); }
.post-tags a::after { content: ']'; color: var(--dim); }
.post-tags a:hover { text-decoration: none; color: var(--orange); }

/* prev/next */
.post-nav {
  display: flex; justify-content: space-between; gap: 20px;
  margin-top: 44px; padding-top: 26px; border-top: 1px dashed var(--line);
  font-family: var(--mono); font-size: 0.85rem;
}
.post-nav .nav-label { color: var(--dim); display: block; margin-bottom: 4px; font-size: 0.72rem; }
.post-nav > div { max-width: 46%; }
.post-nav .next { text-align: right; margin-left: auto; }

/* ---------- footer ---------- */
.site-foot {
  margin-top: 72px; border-top: 1px solid var(--line);
  padding: 30px 0 40px;
  font-family: var(--mono); font-size: 0.8rem; color: var(--dim);
}
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: space-between; }
.site-foot .comment::before { content: '# '; color: var(--line); }
.site-foot a { color: var(--dim); }
.site-foot a:hover { color: var(--orange); }

/* ---------- 404 ---------- */
.err-404 { padding: 80px 0; text-align: left; }

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  body { font-size: 17px; }
  .site-head .wrap { flex-wrap: wrap; }
  .site-nav { margin-left: 0; width: 100%; }
  .site-nav ul { gap: 16px; }
  .term-body { font-size: 0.8rem; padding: 16px; }
  .post-list h2 { font-size: 1.2rem; }
  .post-nav { flex-direction: column; }
  .post-nav > div, .post-nav .next { max-width: 100%; text-align: left; }
}

/* wp core niceties */
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.alignwide, .alignfull { max-width: 100%; }
