:root{
  --bg: #07090c;
  --panel: rgba(10,14,18,0.78);
  --panel2: rgba(10,14,18,0.55);
  --text: #cfe7d6;
  --muted: #87a395;
  --dim: #5d756a;
  --accent: #66ff99;
  --accent2: #4bd6ff;
  --warn: #ffcc66;
  --border: rgba(102,255,153,0.14);
  --shadow: rgba(0,0,0,0.55);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
          "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI,
          Roboto, Helvetica, Arial;
  --radius: 16px;
}

html{
  scroll-behavior: smooth;
}

[id]{
  scroll-margin-top: 90px;
}

:target{
  outline: 1px dashed rgba(102,255,153,.25);
  outline-offset: 8px;
  border-radius: 18px;
}

*{ box-sizing:border-box; }
html, body{ height:100%; }

body{
  margin:0;
  background:
    radial-gradient(1200px 800px at 30% 20%, rgba(102,255,153,0.10), transparent 55%),
    radial-gradient(900px 700px at 80% 70%, rgba(75,214,255,0.10), transparent 50%),
    var(--bg);
  color:var(--text);
  font-family:var(--sans);
  line-height:1.5;
  overflow-x:hidden;
}

/* grain */
.grain{
  pointer-events:none;
  position:fixed;
  inset:0;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
  mix-blend-mode:overlay;
  opacity:.18;
}

.wrap{
  max-width:1040px;
  margin:0 auto;
  padding:28px 18px 80px;
}

header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:8px 0 18px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:220px;
}

.sigil img{
  display:block;
  filter:drop-shadow(0 0 6px rgba(102,255,153,.25));
  opacity:.9;
}

@keyframes sweep{
  0%{ transform: translateX(-30%) rotate(20deg); }
  100%{ transform: translateX(30%) rotate(20deg); }
}

.brand h1{
  font-family:var(--mono);
  font-size:18px;
  letter-spacing:.08em;
  margin:0;
  text-transform:uppercase;
}

.nav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content: flex-end;
}

.pill{
  font-family:var(--mono);
  font-size:13px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(10,14,18,.55);
  color:var(--muted);
  text-decoration:none;
  transition:transform .1s ease,border-color .2s ease,color .2s ease;
}

.pill:hover{
  transform:translateY(-1px);
  border-color:rgba(102,255,153,.35);
  color:var(--text);
}

.pill.active{
  color:var(--text);
  border-color:rgba(102,255,153,.45);
  background:rgba(10,14,18,.75);
}

.panel{
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--panel);
  box-shadow:0 18px 50px var(--shadow);
  overflow:hidden;
}

.topbar{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  border-bottom:1px solid rgba(102,255,153,0.10);
  background:rgba(7,9,12,0.55);
  font-family:var(--mono);
  color:var(--dim);
  font-size:13px;
}

.dots{ display:flex; gap:6px; }
.dot{ width:10px; height:10px; border-radius:50%; opacity:.7; }
.dot.r{ background:#ff5f57; }
.dot.y{ background:#febc2e; }
.dot.g{ background:#28c840; }

.terminal{
  padding:16px;
  font-family:var(--mono);
  font-size:13.5px;
}
.out{
  margin: 0 0 12px 0;
  color: var(--muted);
  white-space: pre-wrap;
}
.out b{ color: var(--text); font-weight: 600; }
.out .k{ color: var(--accent2); }

.card{
  padding: 18px; /* slightly more breathing room */
}

/* prevent content hugging edges */
.card > *:first-child{
  margin-top: 0;
}

.card > *:last-child{
  margin-bottom: 0;
}

/* normalize spacing */
.card p{
  margin: 8px 0;
}

.card ul{
  margin: 8px 0;
  padding-left: 20px;
}

.linkrow{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;          /* prevents overlap on small screens */
}

.linkrow .pill{
  display: inline-flex;     /* safer sizing */
}

footer{
  margin-top:26px;
  color:var(--dim);
  font-family:var(--mono);
  font-size:12px;
  display:flex;
  justify-content:space-between;
  gap:10px;
  opacity:.9;
}

footer a{
  color:var(--muted);
  text-decoration:none;
  border-bottom:1px dashed rgba(102,255,153,.22);
}

footer a:hover{ color:var(--text); }

::selection{ background:rgba(102,255,153,.25); }

