/* InitialBreach.com — one stylesheet for the whole site.
   Change the colors here and every page follows. */
:root {
  --bg: #0a0a0a;
  --panel: #111111;
  --border: #2a0d10;
  --red: #e01e2b;
  --red-bright: #ff3b47;
  --text: #d6d6d6;
  --dim: #7d7d7d;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, "DejaVu Sans Mono", "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.65;
}

a { color: var(--red-bright); text-decoration: none; }
a:hover, a:focus { color: #fff; text-decoration: underline; }
::selection { background: var(--red); color: #fff; }

.red { color: var(--red-bright); }
.dim { color: var(--dim); }

/* ---------- header / nav ---------- */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.brand { color: #fff; font-weight: 700; font-size: 1.15rem; letter-spacing: 0.02em; }
.brand:hover { text-decoration: none; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.site-header nav a { color: var(--dim); }
.site-header nav a::before { content: "./"; color: var(--red); }
.site-header nav a:hover { color: #fff; text-decoration: none; }

/* highlight the current page (set by <body data-page="...">) */
body[data-page="services"] nav a[href="/services"],
body[data-page="about"]    nav a[href="/about"],
body[data-page="blog"]     nav a[href="/blog"],
body[data-page="contact"]  nav a[href="/contact"] { color: #fff; }

/* ---------- layout ---------- */
main {
  flex: 1;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.site-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--dim);
  font-size: 0.85rem;
  text-align: center;
}

/* ---------- prompt + headings ---------- */
.prompt { color: var(--red-bright); font-weight: 700; white-space: nowrap; }
.prompt-line { margin: 0 0 0.5rem; color: var(--dim); }

h1 { margin: 0 0 1.5rem; color: #fff; font-size: 1.9rem; line-height: 1.25; }
h2 { margin: 2.5rem 0 0.5rem; color: var(--red-bright); font-size: 1.15rem; }
h2::before { content: "## "; color: var(--red); }
p, ul { margin: 0 0 1rem; }
ul { padding-left: 1.25rem; list-style: none; }
ul li::before { content: "-"; color: var(--red); display: inline-block; width: 1.25rem; margin-left: -1.25rem; }
code { color: var(--red-bright); }

.cursor { color: var(--red-bright); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- home: terminal window ---------- */
.home main { display: flex; align-items: center; max-width: 900px; }
.terminal {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--red);
  border-radius: 6px;
  box-shadow: 0 0 40px rgba(224, 30, 43, 0.18);
  overflow: hidden;
}
.terminal-bar {
  padding: 0.45rem 1rem;
  background: var(--red);
  color: #000;
  font-size: 0.85rem;
  font-weight: 700;
}
.terminal-body { padding: 1.5rem 1.25rem 2rem; font-size: 1.05rem; }
.terminal-body p { margin: 0 0 0.35rem; }
.terminal-body .motto {
  margin: 0.5rem 0 1.25rem;
  color: #fff;
  font-size: clamp(1.3rem, 4.2vw, 2.1rem);
  font-weight: 700;
  line-height: 1.3;
}
.terminal-body .ls { margin-bottom: 1rem; }
.terminal-body .ls a { display: inline-block; margin-right: 1.5rem; font-weight: 700; }

/* typing effect, pure CSS: each line appears on a delay, commands "type" */
.line { opacity: 0; animation: show 0.01s linear forwards; }
.typed {
  display: inline-block;
  vertical-align: bottom;
  overflow: hidden;
  white-space: nowrap;
  width: 0;
}
.l1 { animation-delay: 0.3s; }
.l1 .typed { animation: type-motto 1.2s steps(11) 0.7s forwards; } /* "echo $motto" = 11 chars */
.l2 { animation-delay: 2.2s; }
.l3 { animation-delay: 2.9s; }
.l3 .typed { animation: type-ls 0.4s steps(2, end) 3.2s forwards; }
.l4 { animation-delay: 3.7s; }
.l5 { animation-delay: 4.1s; }
@keyframes show { to { opacity: 1; } }
@keyframes type-motto { to { width: 11ch; } }
@keyframes type-ls { to { width: 2ch; } }

@media (prefers-reduced-motion: reduce) {
  .line { opacity: 1; animation: none; }
  .typed, .l1 .typed, .l3 .typed { width: auto; animation: none; }
  .cursor { animation: none; }
}

/* ---------- services ---------- */
.card {
  margin-bottom: 1.25rem;
  padding: 1.25rem 1.25rem 0.5rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
}
.card h2 { margin-top: 0; }

/* ---------- blog ---------- */
.post-list { padding: 0; }
.post-list li { display: flex; flex-wrap: wrap; gap: 0 1.5rem; padding: 0.6rem 0; border-bottom: 1px dashed var(--border); }
.post-list li::before { content: none; }
.post-list time, .post-meta { color: var(--dim); }
.post-meta { margin-top: -1rem; }

/* ---------- contact ---------- */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1.5rem; margin: 0 0 1.5rem; }
.kv dt { color: var(--dim); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.button {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--red);
  color: #fff;
  background: transparent;
}
.button:hover { background: var(--red); color: #000; text-decoration: none; }

@media (max-width: 520px) {
  body { font-size: 15px; }
  h1 { font-size: 1.5rem; }
  .terminal-body { font-size: 0.95rem; }
}
