/* themaxterone — cybersecurity theme (plain CSS, no build step) */
:root {
  --bg: #07090c;
  --bg-2: #0b0f14;
  --panel: #0f141a;
  --panel-2: #141b23;
  --line: #1e2833;
  --text: #e6edf3;
  --muted: #8b98a5;
  --green: #00ff9c;
  --green-dim: #00c97a;
  --cyan: #39d0ff;
  --red: #ff5370;
  --amber: #ffcb6b;
  --radius: 12px;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --glow: 0 0 0 1px color-mix(in srgb, var(--green) 35%, transparent), 0 8px 40px -12px color-mix(in srgb, var(--green) 35%, transparent);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  background:
    radial-gradient(900px 500px at 85% -10%, color-mix(in srgb, var(--green) 9%, transparent), transparent 60%),
    radial-gradient(700px 400px at -10% 10%, color-mix(in srgb, var(--cyan) 7%, transparent), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: .18;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
}
img { max-width: 100%; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--green) 30%, transparent); }

.wrap { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(820px, 100% - 2.5rem); }
.muted { color: var(--muted); }
.accent { color: var(--green); text-shadow: 0 0 28px color-mix(in srgb, var(--green) 55%, transparent); }
.prompt { color: var(--green); font-family: var(--mono); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--text); font-family: var(--mono); font-weight: 600; }
.brand:hover { text-decoration: none; }
.brand b { color: var(--green); }
.brand img { border-radius: 50%; border: 1px solid var(--green-dim); }
.nav-links { display: flex; align-items: center; gap: 1.6rem; font-family: var(--mono); font-size: .88rem; }
.nav-links a { color: var(--muted); transition: color .15s; }
.nav-links a:hover, .nav-links a.active { color: var(--green); text-decoration: none; }
.nav-cta { border: 1px solid var(--line); padding: .4rem .8rem; border-radius: 8px; color: var(--text) !important; }
.nav-cta:hover { border-color: var(--green); box-shadow: var(--glow); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; width: 42px; height: 38px; cursor: pointer; padding: 0; position: relative; }
.nav-toggle span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--text); transition: transform .2s; }
.nav-toggle span:first-child { top: 14px; }
.nav-toggle span:last-child { top: 22px; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- common ---------- */
.eyebrow { font-family: var(--mono); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--green); margin: 0 0 1rem; display: flex; align-items: center; gap: .6rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
h1, h2, h3 { font-family: var(--mono); line-height: 1.15; letter-spacing: -.02em; margin: 0; }
.lead { color: var(--muted); font-size: 1.1rem; max-width: 60ch; }
.btn { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--mono); font-size: .9rem; font-weight: 600; padding: .8rem 1.3rem; border-radius: 10px; border: 1px solid transparent; transition: transform .15s, box-shadow .15s, border-color .15s; }
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--green); color: #04110b; box-shadow: 0 0 30px -6px color-mix(in srgb, var(--green) 70%, transparent); }
.btn-ghost { border-color: var(--line); color: var(--text); background: var(--panel); }
.btn-ghost:hover { border-color: var(--cyan); }
.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip { font-family: var(--mono); font-size: .74rem; padding: .22rem .6rem; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
a.chip:hover { color: var(--green); border-color: var(--green-dim); text-decoration: none; }
.chip-btn { cursor: pointer; font-size: .8rem; padding: .35rem .8rem; }
.chip-btn:hover { color: var(--text); border-color: var(--muted); }
.chip-btn.active { background: color-mix(in srgb, var(--green) 14%, transparent); border-color: var(--green); color: var(--green); }

/* ---------- hero ---------- */
.hero { padding: clamp(3rem, 8vw, 6.5rem) 0 3rem; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; }
.hero .lead { margin-top: 1.4rem; }
.stats { display: flex; gap: 2.2rem; margin: 2.4rem 0 0; flex-wrap: wrap; }
.stats div { border-left: 2px solid var(--green-dim); padding-left: .9rem; }
.stats dt { font-family: var(--mono); font-size: 1.7rem; font-weight: 700; color: var(--text); }
.stats dd { margin: 0; color: var(--muted); font-size: .82rem; font-family: var(--mono); }

/* ---------- terminal ---------- */
.terminal { background: #05070a; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--glow); }
.terminal-bar { display: flex; align-items: center; gap: .8rem; padding: .65rem .9rem; background: var(--panel); border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: .75rem; color: var(--muted); }
.code-dots { display: inline-flex; gap: 6px; }
.code-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); display: block; }
.code-dots i:nth-child(1) { background: #ff5f56; }
.code-dots i:nth-child(2) { background: #ffbd2e; }
.code-dots i:nth-child(3) { background: #27c93f; }
.terminal-body { padding: 1.1rem 1.2rem 1.4rem; font-family: var(--mono); font-size: .84rem; min-height: 340px; color: var(--green); line-height: 1.7; }
.terminal-body p { margin: 0; white-space: pre-wrap; word-break: break-word; }
.terminal-body p.out { color: var(--text); opacity: .85; }
.terminal-body p.cmd { color: var(--green); }
.terminal-body .err { color: var(--red); }
.cursor { display: inline-block; width: .6em; height: 1.05em; background: var(--green); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- sections & cards ---------- */
.section { padding: 3.5rem 0; }
.section.tight { padding-top: 1rem; }
.section-alt { background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--panel) 70%, transparent), transparent); border-block: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem 1.2rem; margin-bottom: 2rem; }
.section-head .eyebrow { width: 100%; margin: 0; }
.section-head h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.link-more { margin-left: auto; font-family: var(--mono); font-size: .85rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, border-color .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); border-color: var(--green-dim); box-shadow: var(--glow); }
.card[hidden] { display: none; }
.card-media { position: relative; aspect-ratio: 16 / 9; background: #fff; overflow: hidden; border-bottom: 1px solid var(--line); }
.card-media img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform .4s; }
.card:hover .card-media img { transform: scale(1.05); }
.card-badge { position: absolute; top: .7rem; left: .7rem; font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; padding: .2rem .55rem; border-radius: 6px; background: rgba(5, 7, 10, .85); backdrop-filter: blur(6px); }
.badge-box { color: var(--green); border: 1px solid var(--green-dim); }
.badge-tool { color: var(--cyan); border: 1px solid var(--cyan); }
.card-body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: .7rem; flex: 1; }
.card-body h3 { font-size: 1.25rem; }
.card-body h3 a { color: var(--text); }
.card-body h3 a:hover { color: var(--green); text-decoration: none; }
.card-body p { margin: 0; color: var(--muted); font-size: .92rem; }
.card-body .chips { margin-top: auto; padding-top: .4rem; }
.card-meta { display: flex; gap: .5rem; font-family: var(--mono); font-size: .75rem; color: var(--muted); }

.cta-band { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem; padding: 2.2rem; border-radius: 16px; border: 1px solid var(--green-dim); background: linear-gradient(135deg, color-mix(in srgb, var(--green) 10%, var(--panel)), var(--panel)); box-shadow: var(--glow); }
.cta-band h2 { font-size: 1.6rem; }
.cta-band p { margin: .4rem 0 0; color: var(--muted); }

/* ---------- listing page ---------- */
.page-head { padding: 3.5rem 0 1.5rem; }
.page-head h1 { font-size: clamp(2rem, 5vw, 3rem); }
.toolbar { margin-top: 1.8rem; display: grid; gap: 1rem; }
.search { display: flex; align-items: center; gap: .7rem; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: .15rem 1rem; max-width: 460px; font-family: var(--mono); }
.search:focus-within { border-color: var(--green); box-shadow: var(--glow); }
.search input { flex: 1; background: none; border: 0; color: var(--text); font: inherit; padding: .75rem 0; outline: none; }
.empty { text-align: center; color: var(--muted); font-family: var(--mono); padding: 3rem 0; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: 160px 1fr; gap: 2.5rem; align-items: center; }
.avatar { border-radius: 50%; border: 2px solid var(--green); box-shadow: var(--glow); }
.facts { list-style: none; padding: 0; margin: 1.4rem 0 0; font-family: var(--mono); font-size: .92rem; display: grid; gap: .4rem; }

/* ---------- post ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 50; background: transparent; }
.progress > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--green), var(--cyan)); box-shadow: 0 0 12px var(--green); }
.post-head { padding: 3rem 0 1.5rem; border-bottom: 1px solid var(--line); margin-bottom: 2rem; }
.post-head h1 { font-size: clamp(2rem, 5vw, 3.2rem); display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.title-icon { border-radius: 6px; }
.post-head .chips { margin-top: 1rem; }
.crumbs { font-family: var(--mono); font-size: .78rem; color: var(--muted); margin-bottom: 1.5rem; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--green); }
.post-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 3rem; align-items: start; }
.toc { position: sticky; top: 90px; font-size: .85rem; }
.toc-title { font-family: var(--mono); color: var(--green); font-size: .78rem; margin: 0 0 .8rem; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: .35rem .9rem; color: var(--muted); border-left: 2px solid transparent; margin-left: -1px; }
.toc a:hover { color: var(--text); text-decoration: none; }
.toc a.on { color: var(--green); border-left-color: var(--green); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 3rem 0; }
.pager a { display: block; padding: 1rem 1.2rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); font-family: var(--mono); font-size: .95rem; transition: border-color .2s; }
.pager a:hover { border-color: var(--green); text-decoration: none; }
.pager a span { display: block; color: var(--green); font-size: .72rem; margin-bottom: .2rem; }
.pager .right { text-align: right; }

.prose { min-width: 0; font-size: 1.02rem; overflow-wrap: anywhere; }
.prose > * + * { margin-top: 1.1rem; }
.prose h2 { font-size: 1.7rem; margin-top: 3rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line); }
.prose h3 { font-size: 1.3rem; margin-top: 2rem; }
.prose h2, .prose h3 { position: relative; }
.prose h2 .anchor, .prose h3 .anchor { position: absolute; left: -1.3em; color: var(--green-dim); opacity: 0; font-weight: 400; }
.prose h2:hover .anchor, .prose h3:hover .anchor { opacity: 1; text-decoration: none; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--green) 40%, transparent); }
.prose strong { color: var(--amber); }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose img { margin-inline: auto; border-radius: var(--radius); border: 1px solid var(--line); cursor: zoom-in; }
.prose :not(pre) > code { font-family: var(--mono); font-size: .86em; background: var(--panel-2); color: var(--cyan); padding: .12rem .4rem; border-radius: 5px; border: 1px solid var(--line); }
.prose table { width: 100%; border-collapse: collapse; font-size: .9rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: .45rem .7rem; }
.prose blockquote { margin-left: 0; padding-left: 1rem; border-left: 3px solid var(--green); color: var(--muted); }

.code-block { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #05070a; }
.code-head { display: flex; align-items: center; gap: .8rem; padding: .5rem .8rem; background: var(--panel); border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.code-lang { margin-right: auto; text-transform: lowercase; }
.copy-btn { font: inherit; background: none; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: .15rem .6rem; cursor: pointer; }
.copy-btn:hover { color: var(--green); border-color: var(--green-dim); }
.code-block pre { margin: 0; padding: 1rem 1.1rem; overflow-x: auto; font-family: var(--mono); font-size: .8rem; line-height: 1.65; color: #cfe9dc; }
.code-block code { white-space: pre; }
.hljs-keyword, .hljs-built_in, .hljs-literal { color: var(--cyan); }
.hljs-string, .hljs-regexp { color: var(--green); }
.hljs-comment, .hljs-quote { color: #5b6b78; font-style: italic; }
.hljs-number, .hljs-symbol, .hljs-attr { color: var(--amber); }
.hljs-title, .hljs-function, .hljs-name { color: #ff9ee5; }
.hljs-variable, .hljs-params { color: #e6edf3; }

.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(3, 5, 8, .92); display: grid; place-items: center; padding: 1.5rem; cursor: zoom-out; }
.lightbox img { max-height: 92vh; border-radius: var(--radius); border: 1px solid var(--green-dim); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 3rem; padding: 2rem 0; font-family: var(--mono); font-size: .82rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: .8rem 2rem; justify-content: space-between; align-items: center; }
.footer-inner p { margin: 0; }

.notfound { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.notfound .terminal { width: min(560px, 100%); }
.notfound .terminal-body { min-height: 0; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .post-layout { grid-template-columns: 1fr; gap: 1rem; }
  .toc { display: none; }
  .about { grid-template-columns: 1fr; text-align: left; }
  .avatar { width: 110px; height: 110px; }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 0; padding: .6rem 1.25rem 1.2rem; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .7rem 0; width: 100%; }
  .pager { grid-template-columns: 1fr; }
  .grid, .grid-2 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* tool cards: the script icon is dark-on-white, show it as a light glyph on the dark panel */
.card[data-cat="Scripts"] .card-media { background: var(--panel-2); }
.card[data-cat="Scripts"] .card-media img { object-fit: contain; padding: 1.6rem; filter: invert(1) brightness(.9) sepia(1) hue-rotate(95deg) saturate(3); }
