/* SOB SECURITY - ice glacier light / deep blue dark */
:root {
  --font-mono: 'IBM Plex Mono', 'JetBrains Mono', 'Courier New', monospace;
  --font-sans: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --radius: 10px;
  --term-bg: #0B1F33;
  --term-ink: #CDE6F5;
  --term-green: #5AD48D;
  --term-blue: #6FBEF0;
  --term-dim: #5E7F99;
  --code-bg: #0B1F33;
  --code-ink: #D6E9F7;
}
:root[data-theme="light"] {
  --bg: #EAF3F9;
  --bg-grad: linear-gradient(180deg, #EAF3F9 0%, #DFEDF7 100%);
  --surface: #FFFFFF;
  --surface2: #F4FAFD;
  --ink: #0A2A45;
  --ink-strong: #061E33;
  --muted: #4C6E88;
  --line: #C6DDEB;
  --accent: #0E86C4;
  --accent-strong: #0A6FA6;
  --accent-soft: #D9EEFA;
  --warm: #B4620F;
  --warm-soft: #FBEAD6;
  --shadow: 0 2px 14px rgba(12, 60, 92, 0.08);
  --grid-line: rgba(14, 134, 196, 0.07);
}
:root[data-theme="dark"] {
  --bg: #071427;
  --bg-grad: linear-gradient(180deg, #071427 0%, #0A1B31 100%);
  --surface: #0C2038;
  --surface2: #102A46;
  --ink: #D2E4F3;
  --ink-strong: #F2F9FF;
  --muted: #7FA6C6;
  --line: #1C3B5C;
  --accent: #59B7F0;
  --accent-strong: #8ACEF5;
  --accent-soft: #12304C;
  --warm: #FFB86B;
  --warm-soft: #3A2A18;
  --shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
  --grid-line: rgba(89, 183, 240, 0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); text-decoration: underline; }
img { max-width: 100%; height: auto; border-radius: 8px; }
code, pre { font-family: var(--font-mono); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .inner {
  max-width: 1120px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
}
.logo {
  font-family: var(--font-mono); font-weight: 700; font-size: 15px;
  color: var(--ink-strong); letter-spacing: 0.02em; white-space: nowrap;
}
.logo:hover { text-decoration: none; color: var(--accent); }
.logo .prompt { color: var(--accent); }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; align-items: center; }
.site-nav a {
  font-family: var(--font-mono); font-size: 13px; color: var(--muted);
  padding: 6px 11px; border-radius: 7px;
}
.site-nav a:hover { color: var(--ink-strong); background: var(--accent-soft); text-decoration: none; }
.site-nav a.active { color: var(--accent); background: var(--accent-soft); }
.theme-toggle {
  font-family: var(--font-mono); font-size: 14px; cursor: pointer;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  border-radius: 7px; padding: 6px 11px;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero .inner {
  max-width: 1120px; margin: 0 auto; padding: 84px 24px 72px;
  position: relative; z-index: 1;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}
.hero .promptline {
  font-family: var(--font-mono); font-size: 14px; color: var(--muted);
  margin-bottom: 18px;
}
.hero .promptline .cmd { color: var(--accent); }
.caret {
  display: inline-block; width: 9px; height: 1.15em; background: var(--accent);
  vertical-align: text-bottom; margin-left: 4px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.hero h1 {
  font-family: var(--font-mono); font-weight: 700;
  font-size: clamp(38px, 6vw, 64px); line-height: 1.05;
  letter-spacing: 0.02em; word-spacing: -0.07em; color: var(--ink-strong);
}
.hero .tagline {
  margin-top: 18px; font-size: clamp(17px, 2.4vw, 21px);
  color: var(--muted); max-width: 640px;
}
.hero .cta { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  font-family: var(--font-mono); font-size: 14px; padding: 11px 20px;
  border-radius: 8px; border: 1px solid var(--accent);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn.primary { background: var(--accent); color: var(--bg); }
.btn.primary:hover { background: var(--accent-strong); color: var(--bg); box-shadow: var(--shadow); }
.btn.ghost { color: var(--accent); background: transparent; }
.btn.ghost:hover { background: var(--accent-soft); }

/* ---------- sections ---------- */
main { flex: 1; }
.section { max-width: 1120px; margin: 0 auto; padding: 56px 24px 8px; }
.section-head {
  font-family: var(--font-mono); font-size: 14px; color: var(--muted);
  margin-bottom: 22px;
}
.section-head .cmd { color: var(--accent); }
.section h2 {
  font-family: var(--font-mono); font-size: clamp(22px, 3vw, 30px);
  color: var(--ink-strong); margin-bottom: 8px; letter-spacing: 0.01em;
}
.section .sub { color: var(--muted); max-width: 720px; margin-bottom: 28px; }

/* ---------- cards / grids ---------- */
.grid { display: grid; gap: 18px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
  transition: transform 0.14s ease, border-color 0.14s ease;
  color: var(--ink);
}
.card:hover {
  text-decoration: none; transform: translateY(-3px);
  border-color: var(--accent); color: var(--ink);
}
.card .meta {
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
  display: flex; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap;
}
.card h3 {
  font-family: var(--font-mono); font-size: 17px; line-height: 1.4;
  color: var(--ink-strong); margin-bottom: 8px;
}
.card p { font-size: 14.5px; color: var(--muted); line-height: 1.6; }
.card .go { font-family: var(--font-mono); font-size: 13px; color: var(--accent-strong); margin-top: 12px; display: inline-block; }
.badge {
  font-family: var(--font-mono); font-size: 11px; padding: 3px 9px;
  border-radius: 20px; background: var(--accent-soft); color: var(--accent);
  letter-spacing: 0.04em;
}
.badge.warm { background: var(--warm-soft); color: var(--warm); }

/* ---------- terminal card ---------- */
.terminal {
  background: var(--term-bg); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; margin: 26px 0;
  border: 1px solid var(--line);
}
.terminal-bar {
  display: flex; gap: 8px; padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04); border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.terminal-bar .dot { width: 12px; height: 12px; border-radius: 50%; }
.terminal-bar .dot:nth-child(1) { background: #ff5f56; }
.terminal-bar .dot:nth-child(2) { background: #ffbd2e; }
.terminal-bar .dot:nth-child(3) { background: #27c93f; }
.terminal-body {
  padding: 20px 22px; font-family: var(--font-mono);
  font-size: 14px; line-height: 1.75; color: var(--term-ink);
  overflow-x: auto;
}
.terminal-body .cmd { color: var(--term-green); }
.terminal-body .dim { color: var(--term-dim); }
.terminal-body a { color: var(--term-blue); }
.terminal-body ul { list-style: none; margin: 6px 0; }
.terminal-body li { padding-left: 1.2em; text-indent: -1.2em; }
.terminal-body p { margin: 8px 0; }

/* ---------- article ---------- */
.article { max-width: 800px; margin: 0 auto; padding: 48px 24px 40px; }
.breadcrumb {
  font-family: var(--font-mono); font-size: 13px; color: var(--muted);
  margin-bottom: 22px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.article h1 {
  font-family: var(--font-mono); font-size: clamp(26px, 4vw, 38px);
  line-height: 1.2; color: var(--ink-strong); margin-bottom: 14px;
  letter-spacing: 0.01em;
}
.article .meta {
  font-family: var(--font-mono); font-size: 13px; color: var(--muted);
  display: flex; gap: 12px; align-items: center; margin-bottom: 34px; flex-wrap: wrap;
  padding-bottom: 22px; border-bottom: 1px solid var(--line);
}
.article-body h2 {
  font-family: var(--font-mono); font-size: 23px; color: var(--ink-strong);
  margin: 40px 0 14px; letter-spacing: 0.01em;
}
.article-body h3 {
  font-family: var(--font-mono); font-size: 18px; color: var(--ink-strong);
  margin: 30px 0 10px;
}
.article-body h4 { font-family: var(--font-mono); font-size: 16px; margin: 24px 0 8px; }
.article-body p { margin: 0 0 18px; }
.article-body ul, .article-body ol { margin: 0 0 18px 24px; }
.article-body li { margin-bottom: 6px; }
.article-body strong { color: var(--ink-strong); }
.article-body em { color: var(--muted); }
.article-body blockquote {
  border-left: 3px solid var(--accent); background: var(--surface2);
  padding: 14px 20px; margin: 20px 0; border-radius: 0 8px 8px 0;
  color: var(--muted); font-style: italic;
}
.article-body hr { border: 0; border-top: 1px solid var(--line); margin: 34px 0; }
.article-body img { margin: 18px 0 6px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.article-body figure { margin: 22px 0; }
.article-body pre {
  background: var(--code-bg); color: var(--code-ink);
  padding: 18px 20px; border-radius: 9px; overflow-x: auto;
  font-size: 13.5px; line-height: 1.65; margin: 18px 0;
  border: 1px solid var(--line);
}
.article-body code {
  background: var(--surface2); border: 1px solid var(--line);
  padding: 1px 6px; border-radius: 5px; font-size: 0.88em;
}
.article-body pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.article-body table {
  width: 100%; border-collapse: collapse; margin: 20px 0;
  font-size: 14.5px; display: block; overflow-x: auto;
}
.article-body th {
  font-family: var(--font-mono); font-size: 13px; text-align: left;
  background: var(--surface2); color: var(--ink-strong);
  padding: 10px 14px; border: 1px solid var(--line);
}
.article-body td { padding: 9px 14px; border: 1px solid var(--line); vertical-align: top; }
.article-nav {
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line);
}
.article-nav a {
  font-family: var(--font-mono); font-size: 13px; padding: 9px 15px;
  border: 1px solid var(--line); border-radius: 8px; color: var(--muted);
}
.article-nav a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ---------- page header (categories) ---------- */
.page-head { max-width: 1120px; margin: 0 auto; padding: 56px 24px 6px; }
.page-head .breadcrumb { margin-bottom: 16px; }
.page-head h1 {
  font-family: var(--font-mono); font-size: clamp(28px, 4vw, 40px);
  color: var(--ink-strong); margin-bottom: 12px;
}
.page-head .sub { color: var(--muted); max-width: 720px; }
.page-head .cat-logo {
  max-height: 84px; width: auto; border-radius: 8px; margin-bottom: 22px;
  border: 1px solid var(--line);
}
.post-list { max-width: 1120px; margin: 0 auto; padding: 30px 24px 40px; }
.post-row {
  display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap;
  padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); margin-bottom: 12px; box-shadow: var(--shadow);
  transition: transform 0.12s ease, border-color 0.12s ease; color: var(--ink);
}
.post-row:hover {
  text-decoration: none; transform: translateX(4px);
  border-color: var(--accent); color: var(--ink);
}
.post-row .date {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--muted);
  min-width: 110px; white-space: nowrap;
}
.post-row .title {
  font-family: var(--font-mono); font-size: 15.5px; color: var(--ink-strong);
  flex: 1; min-width: 220px; line-height: 1.5;
}
.post-row .arrow { font-family: var(--font-mono); color: var(--accent); }

/* ---------- footer ---------- */
.site-footer {
  margin-top: 72px; border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
}
.site-footer .inner {
  max-width: 1120px; margin: 0 auto; padding: 30px 24px;
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 13px; color: var(--muted);
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  .hero .inner { padding: 56px 20px 48px; }
  .section, .page-head, .post-list, .article { padding-left: 18px; padding-right: 18px; }
  .site-header .inner { padding: 12px 16px; }
}
