*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0e0e0e;
  --bg2: #151515;
  --bg3: #1c1c1c;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.18);
  --text: #e8e6e1;
  --muted: #666;
  --muted2: #444;
  --accent: #b8f0a0;
  --accent2: #7dd860;
  --up: #4ade80;
  --wip: #f59e0b;
  --plan: #555;
  --mono: 'JetBrains Mono', monospace;
}

[data-theme="light"] {
  --bg: #f0ede8;
  --bg2: #e8e4de;
  --bg3: #ddd8d0;
  --border: rgba(0,0,0,0.10);
  --border-hover: rgba(0,0,0,0.22);
  --text: #1a1a1a;
  --muted: #6b6560;
  --muted2: #9a948e;
  --accent: #3a8c20;
  --accent2: #2e7018;
  --up: #1e8c3a;
  --wip: #b87000;
  --plan: #aaa49e;
}

html { background: var(--bg); color: var(--text); font-family: var(--mono); transition: background 0.2s, color 0.2s; }

body {
  min-height: 100vh;
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  visibility: hidden;
}

body.ready { visibility: visible; }

/* scanline overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
  z-index: 999;
}

/* ─── HEADER TOP ─────────────────────────────────── */

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.header-top .header-eyebrow { margin-bottom: 0; }

/* ─── THEME TOGGLE ───────────────────────────────── */

.theme-toggle {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s;
  -webkit-user-select: none;
  user-select: none;
}

.theme-toggle:hover { color: var(--accent); }

/* ─── HEADER ─────────────────────────────────────── */

.header { margin-bottom: 3rem; }

.header-eyebrow {
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.logo {
  font-size: 42px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
}
.logo .tld { color: var(--muted); font-weight: 400; }

.tagline {
  font-size: 12px;
  color: var(--muted);
  margin-top: 0.75rem;
  line-height: 1.6;
}

.phrase {
  display: inline-block;
  font-size: 11px;
  color: var(--muted2);
  margin-top: 0.4rem;
  font-style: italic;
}

/* ─── SECTION ────────────────────────────────────── */

.section { margin-bottom: 2.5rem; }

.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.section-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-line {
  flex: 1;
  height: 0.5px;
  background: var(--border);
}

/* ─── GRID ───────────────────────────────────────── */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}

/* ─── CARD ───────────────────────────────────────── */

.card {
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem 1.2rem 1rem;
  text-decoration: none;
  display: block;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  position: relative;
  overflow: hidden;
}

/* glow overlay */
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(184,240,160,0.04), transparent 60%);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

[data-theme="light"] .card::after {
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(58,140,32,0.06), transparent 60%);
}

.card:hover {
  border-color: var(--border-hover);
  background: var(--bg3);
  transform: translateY(-1px);
}
.card:hover::after { opacity: 1; }

.card-iface {
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--muted2);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.card-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.card-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}

.card-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: 0.9rem;
}

/* ─── STATUS ─────────────────────────────────────── */

.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-up  { background: var(--up);   box-shadow: 0 0 6px var(--up); }
.dot-wip { background: var(--wip); }
.dot-plan { background: var(--plan); }
.s-up   { color: var(--up); }
.s-wip  { color: var(--wip); }
.s-plan { color: var(--plan); }

.card-arrow {
  font-size: 13px;
  color: var(--muted2);
  transition: color 0.15s, transform 0.15s;
}
.card:hover .card-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* ─── BLOCK CURSOR ───────────────────────────────── */

.card-name::after {
  content: 'F';
  margin-left: 2px;
  color: transparent;
  background: transparent;
}
.card:hover .card-name::after {
  animation: block-cur 1s step-end infinite;
}
@keyframes block-cur {
  0%, 100% { color: var(--muted2); background: var(--muted2); }
  50%       { color: transparent;  background: transparent; }
}

/* ─── STUB CARDS ─────────────────────────────────── */

.card-stub { opacity: 0.65; }
.card-stub:hover { opacity: 1; }

.stub-blink { animation: blink-dot 2.5s ease infinite; }
@keyframes blink-dot { 0%,100%{ opacity:1 } 50%{ opacity:0.25 } }

/* ─── FOOTER ─────────────────────────────────────── */

.footer {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 0.5px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-meta {
  font-size: 10px;
  color: var(--muted2);
  line-height: 1.9;
}
.footer-meta span { color: var(--muted); }

.footer-links {
  display: flex;
  gap: 1.25rem;
}
.footer-links a {
  font-size: 10px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--accent); }

/* ─── ANIMATIONS ─────────────────────────────────── */

@keyframes fadein {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ready .header  { animation: fadein 0.4s ease both; }
.ready .section { animation: fadein 0.4s ease both; }
.ready .section:nth-child(2) { animation-delay: 0.05s; }
.ready .section:nth-child(3) { animation-delay: 0.1s; }
.ready .section:nth-child(4) { animation-delay: 0.14s; }
.ready .footer  { animation: fadein 0.4s ease 0.18s both; }

/* ─── BACK LINK ──────────────────────────────────── */

.back-link {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.back-link:hover { color: var(--accent); }
