/* scribnet.io — personal landing page. Same design language as the SE Command Center. */

:root {
  color-scheme: dark;
  --bg: #05070c;
  --surface: rgba(255, 255, 255, 0.032);
  --surface-strong: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --text: #f2f5fa;
  --muted: #9aa4b5;
  --faint: #626b7d;
  --violet: #7c6cff;
  --cyan: #4de1ff;
  --green: #3ddc84;
  --amber: #ffb224;
  --grad: linear-gradient(135deg, var(--violet), var(--cyan));
  --radius: 16px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
::selection { background: rgba(124, 108, 255, 0.35); }

body {
  font-family: var(--font);
  color: var(--text);
  line-height: 1.55;
  padding: 0 1.25rem 3rem;
  background:
    radial-gradient(640px 420px at 12% -4%, rgba(124, 108, 255, 0.28), transparent 62%),
    radial-gradient(760px 480px at 88% 6%, rgba(77, 225, 255, 0.17), transparent 62%),
    radial-gradient(900px 600px at 50% 110%, rgba(124, 108, 255, 0.13), transparent 60%),
    var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1.5px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 90% 55% at 50% 0%, black 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 55% at 50% 0%, black 25%, transparent 78%);
}

/* ---------- hero ---------- */
header { border-bottom: 1px solid var(--border); padding: 4rem 0 2.75rem; margin-bottom: 2.75rem; }
.header-inner { max-width: 1120px; margin: 0 auto; }

.pill {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cyan);
  border: 1px solid rgba(77, 225, 255, 0.28);
  background: rgba(77, 225, 255, 0.07);
  border-radius: 999px; padding: 0.3rem 0.85rem; margin-bottom: 1.25rem;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.55; transform: scale(0.85); } }

h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  font-weight: 800; letter-spacing: -0.035em; line-height: 1.06;
  background: linear-gradient(180deg, #ffffff 30%, #aeb8cc 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
h1 .grad { background: linear-gradient(120deg, var(--violet), var(--cyan), var(--violet)); background-size: 220% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: grad-drift 8s ease-in-out infinite alternate; }
@keyframes grad-drift { to { background-position: 100% center; } }
@media (prefers-reduced-motion: reduce) { h1 .grad { animation: none; } }

.subtitle { color: var(--muted); font-size: 1.05rem; margin-top: 1rem; max-width: 38rem; }

.cta-row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.75rem; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 700; font-size: 0.92rem;
  border-radius: 999px; padding: 0.7rem 1.6rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.btn.primary { background: var(--grad); color: #060913; box-shadow: 0 10px 28px -8px rgba(124, 108, 255, 0.8); }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 14px 36px -8px rgba(124, 108, 255, 1); }
.btn.ghost { border: 1px solid var(--border); color: var(--text); background: var(--surface); backdrop-filter: blur(10px); }
.btn.ghost:hover { transform: translateY(-2px); border-color: rgba(124, 108, 255, 0.5); }
.btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.stats { display: flex; gap: 2.5rem; flex-wrap: wrap; margin-top: 2.5rem; }
.stat { display: flex; flex-direction: column; }
.stat strong { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--faint); font-size: 0.8rem; }

/* ---------- layout ---------- */
main { max-width: 1120px; margin: 0 auto; position: relative; }
section { margin-bottom: 3rem; }
.eyebrow { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--violet); margin-bottom: 0.4rem; }
section h2 { font-size: 1.45rem; font-weight: 750; letter-spacing: -0.02em; margin-bottom: 0.3rem; }
.section-note { color: var(--muted); font-size: 0.93rem; margin-bottom: 1.1rem; }
.section-note a, .now-list a { color: var(--cyan); }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.card {
  position: relative;
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  overflow: hidden;
  opacity: 0; transform: translateY(14px);
}
.card.in { opacity: 1; transform: none; transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.22s ease, box-shadow 0.22s ease; }
.card::after { content: ""; position: absolute; top: 0; left: 10%; right: 10%; height: 1px; background: var(--grad); opacity: 0; transition: opacity 0.22s ease; }
.card:hover { transform: translateY(-3px); border-color: rgba(124, 108, 255, 0.6); box-shadow: 0 18px 50px -12px rgba(124, 108, 255, 0.6); }
.card:hover::after { opacity: 1; }

.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.7rem; }
.card-kicker { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.status { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.status.live { color: var(--green); text-shadow: 0 0 12px rgba(61, 220, 132, 0.6); }
.status.soon { color: var(--amber); }
.status.paused { color: var(--faint); }

.card h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 0.5rem; }
.card p { color: var(--muted); font-size: 0.9rem; }
.card-link { display: inline-block; margin-top: 0.9rem; color: var(--cyan); font-weight: 600; font-size: 0.88rem; text-decoration: none; }
.card-link:hover { text-decoration: underline; }
.card-link.dim { color: var(--faint); }

.tracklist { list-style: none; margin-top: 0.7rem; display: flex; flex-direction: column; gap: 0.3rem; }
.tracklist a { color: var(--muted); text-decoration: none; font-size: 0.88rem; }
.tracklist a:hover { color: var(--cyan); }

/* ---------- about / now ---------- */
.about-grid { display: grid; gap: 1rem; max-width: 44rem; }
.about-grid p { color: var(--muted); }
.now-list { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; margin-bottom: 1.25rem; max-width: 44rem; }
.now-list li { color: var(--muted); padding-left: 1.4rem; position: relative; }
.now-list li::before { content: "→"; position: absolute; left: 0; color: var(--violet); }

/* ---------- footer ---------- */
footer {
  max-width: 1120px; margin: 3.5rem auto 0; padding-top: 1.5rem;
  border-top: 1px solid var(--border); color: var(--faint); font-size: 0.82rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
}
footer .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700; }
.gh-link {
  display: inline-flex; align-items: center; gap: 0.45rem;
  text-decoration: none; color: var(--muted); font-weight: 600; font-size: 0.82rem;
  border: 1px solid var(--border); background: var(--surface);
  padding: 0.45rem 0.95rem; border-radius: 999px; backdrop-filter: blur(10px);
  transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.gh-link svg { width: 1rem; height: 1rem; fill: currentColor; flex: none; }
.gh-link:hover { color: var(--text); border-color: rgba(124, 108, 255, 0.55); transform: translateY(-2px); }
.gh-link:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

@media (max-width: 640px) {
  body { padding: 0 1rem 2.5rem; }
  header { padding: 2.5rem 0 2rem; }
  .cards { grid-template-columns: 1fr; }
  .stats { gap: 1.5rem; }
}

/* ---------- build log timeline ---------- */
.tl { position: relative; margin: 0.5rem 0 0 0.4rem; padding-left: 1.7rem; max-width: 58rem; }
.tl::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, var(--violet), var(--cyan)); opacity: 0.55; }
.tl-item { position: relative; padding: 0 0 1.15rem; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: calc(-1.7rem - 2px); top: 4px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--violet);
  box-shadow: 0 0 12px rgba(124, 108, 255, 0.8); }
.tl-item .d { color: var(--cyan); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.tl-item p { margin: 0.2rem 0 0; font-size: 0.9rem; color: var(--muted); max-width: 52rem; }

/* ---------- prose pages (uses / homelab) ---------- */
.backlink { display: inline-block; margin-bottom: 1.5rem; color: var(--cyan); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.backlink:hover { text-decoration: underline; }
.prose { max-width: 46rem; }
.prose h2 { margin-bottom: 0.6rem; }
.prose h3 { margin: 2rem 0 0.5rem; font-size: 1.08rem; font-weight: 700; letter-spacing: -0.01em; }
.prose p, .prose li { color: var(--muted); font-size: 0.95rem; }
.prose p { margin-bottom: 0.8rem; }
.prose ul { margin: 0.4rem 0 1rem 1.2rem; display: flex; flex-direction: column; gap: 0.4rem; }
.prose a { color: var(--cyan); }
.prose strong { color: var(--text); }
.diary { display: flex; flex-direction: column; gap: 1.4rem; margin-top: 1.5rem; }
.diary-item { border-left: 2px solid rgba(124, 108, 255, 0.5); padding-left: 1.2rem; }
.diary-date { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--violet); margin-bottom: 0.3rem; }
.diary-item h3 { margin: 0 0 0.4rem; font-size: 1.02rem; }
.diary-item p { color: var(--muted); font-size: 0.92rem; margin-bottom: 0.5rem; }
.diary-next { border-left-color: var(--amber); }
.foot-links { display: flex; gap: 1.1rem; }
.foot-links a { color: var(--muted); text-decoration: none; font-weight: 600; }
.foot-links a:hover { color: var(--cyan); }

@media (max-width: 640px) {
  .log-item { grid-template-columns: 1fr; gap: 0.15rem; }
}

/* ---------- build log expander ---------- */
.tl-extra[hidden] { display: none; }
.tl-extra:not([hidden]) .tl-item { animation: tl-in 0.45s ease both; }
.tl-extra:not([hidden]) .tl-item:nth-child(2) { animation-delay: 0.06s; }
.tl-extra:not([hidden]) .tl-item:nth-child(3) { animation-delay: 0.12s; }
.tl-extra:not([hidden]) .tl-item:nth-child(4) { animation-delay: 0.18s; }
.tl-extra:not([hidden]) .tl-item:nth-child(5) { animation-delay: 0.24s; }
@keyframes tl-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .tl-extra:not([hidden]) .tl-item { animation: none; } }
.log-toggle { margin-top: 1.1rem; font: inherit; cursor: pointer; }

/* ---- Site top navigation (sub-pages) ---- */
.topnav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 2.25rem; }
.topnav-brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--text); font-weight: 700; font-size: 0.95rem; letter-spacing: -0.01em; }
.topnav-badge { width: 30px; height: 30px; border-radius: 9px; background: var(--grad); color: #060913; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1rem; box-shadow: 0 6px 18px -6px rgba(124, 108, 255, 0.7); }
.topnav-brand:hover .topnav-badge { filter: brightness(1.12); }
.topnav-links { display: flex; align-items: center; gap: 0.15rem; }
.topnav-links a { color: var(--muted); text-decoration: none; font-size: 0.88rem; font-weight: 600; padding: 0.5rem 0.8rem; border-radius: 999px; transition: color 0.15s ease, background 0.15s ease; }
.topnav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.topnav-links a[aria-current="page"] { color: var(--text); background: rgba(124, 108, 255, 0.16); }
@media (max-width: 560px) {
  .topnav { margin-bottom: 1.75rem; }
  .topnav-links a { padding: 0.5rem 0.6rem; font-size: 0.82rem; }
}
@media (max-width: 420px) {
  .topnav-brand span:last-child { display: none; }
}

/* ---- Five rules / lesson cards (homepage #principles) ---- */
.lesson-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.lesson-card { border: 1px solid var(--border); border-radius: var(--r); padding: 1.1rem 1.15rem; background: rgba(255,255,255,.02); transition: transform .25s ease, border-color .25s ease; }
.lesson-card:hover { transform: translateY(-3px); border-color: rgba(124,108,255,.5); }
.lesson-card .n { font-size: .75rem; color: var(--cyan); letter-spacing: .12em; font-weight: 700; }
.lesson-card h3 { margin: .3rem 0 .4rem; font-size: 1rem; }
.lesson-card p { margin: 0 0 .5rem; color: var(--muted); font-size: .86rem; }
.lesson-card .map { font-size: .82rem; color: var(--text); border-top: 1px solid var(--border); padding-top: .55rem; margin: .55rem 0 0; }
.lesson-card .map b { color: var(--cyan); font-weight: 600; }

/* ---- Workflow prompt packs (/prompts.html) ---- */
.prompt-pack { border: 1px solid var(--border); border-radius: var(--r); padding: 1.6rem; margin: 0 0 2rem; background: rgba(255,255,255,.02); }
.prompt-pack h2 { margin-top: .4rem; }
.prompt-pack .what { color: var(--muted); font-size: .95rem; margin-bottom: 1.2rem; }
.prompt-pack h3 { font-size: 1.05rem; margin: 1.4rem 0 .6rem; }
.prompt-block { background: rgba(0,0,0,.35); border: 1px solid var(--border); border-radius: 12px; padding: 1.1rem 1.2rem; font-size: .85rem; line-height: 1.55; white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text); max-height: 420px; overflow-y: auto; }
.copy-btn { margin-top: .8rem; background: linear-gradient(120deg, var(--violet), var(--cyan)); border: none; color: #0b0b14; font-weight: 700; border-radius: 10px; padding: .6rem 1.2rem; cursor: pointer; font-size: .9rem; }
.copy-btn:active { transform: scale(.97); }
.copy-note { color: var(--muted); font-size: .82rem; margin: .5rem 0 0; }
.safety-check { border-left: 3px solid var(--cyan); padding: .2rem 0 .2rem 1rem; margin: .6rem 0 0 0; list-style: none; }
.safety-check li { color: var(--muted); font-size: .9rem; margin-bottom: .35rem; }
.safety-check li b { color: var(--text); font-weight: 600; }
.howto { color: var(--muted); font-size: .9rem; }
.howto b { color: var(--text); font-weight: 600; }
.lede { color: var(--muted); font-size: 1.05rem; line-height: 1.6; max-width: 62ch; margin-bottom: 1.1rem; }
.lede a, .prompt-pack .what a { color: var(--cyan); }
