:root {
  /* Steins;Gate-inspired, desaturated, moody palette */
  --bg: #0d0f0e;        /* near-black, warm tint */
  --fg: #e6e3dc;        /* warm off-white */
  --muted: #a2a59e;     /* desaturated neutral */
  --line: #242724;      /* subtle dividers */
  --accent: #d9934e;    /* burnt orange highlight */
  --teal: #2f5a57;      /* deep teal secondary */
  --maxw: 1000px;
  --radius: 18px;
  --space: 24px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  color: var(--fg);
  background: radial-gradient(1200px 800px at 10% 0%, rgba(47,90,87,0.15), transparent 60%),
              radial-gradient(1000px 700px at 90% 20%, rgba(217,147,78,0.08), transparent 65%),
              linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.02)),
              var(--bg);
  background-attachment: fixed;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.55;
  letter-spacing: 0.01em;
}

/* subtle film grain overlay; very lightweight */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(0deg, rgba(0,0,0,0.03) 0, rgba(0,0,0,0.03) 1px, transparent 1px, transparent 2px),
                    repeating-linear-gradient(90deg, rgba(255,255,255,0.02) 0, rgba(255,255,255,0.02) 1px, transparent 1px, transparent 2px);
  mix-blend-mode: overlay;
  opacity: 0.25;
}

a { color: var(--fg); text-underline-offset: 2px; }
a:hover { color: var(--accent); text-decoration: underline; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 64px 20px; }

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(13,15,14,0.85);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-bottom: 1px dashed var(--line);
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand {
  font-weight: 800; letter-spacing: 0.02em; text-decoration: none;
  /* distinctive, retro-tech heading stack (system-first, no external fetch) */
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Cascadia Code", "JetBrains Mono", "IBM Plex Mono", monospace;
}
.nav a { margin-left: 16px; text-decoration: none; }
.nav a:hover { text-decoration: underline; }

.skip-link {
  position: absolute; left: -9999px;
}
.skip-link:focus {
  left: 10px; top: 10px; background: #fff; color: #000; padding: 8px 12px; border: 1px solid var(--line);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 20px;
  display: flex; align-items: center; justify-content: space-between;
  color: var(--muted);
  font-size: 14px;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 12px 0; }
h1 {
  font-size: clamp(36px, 6vw, 56px);
  letter-spacing: -0.015em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Cascadia Code", "JetBrains Mono", "IBM Plex Mono", monospace;
  background: linear-gradient(180deg, var(--fg), #cfc8b8 60%, var(--fg));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
h2 { font-size: clamp(22px, 3vw, 28px); }
h3 { font-size: 18px; }

p { margin: 0 0 14px 0; }
ul { padding-left: 20px; margin: 0 0 12px 0; }

.hero { padding: 80px 0 40px 0; }
.tagline { color: var(--muted); max-width: 60ch; }

.cta { margin-top: 18px; display: flex; gap: 12px; flex-wrap: wrap; }

.button, .link {
  display: inline-block; padding: 10px 14px; border-radius: var(--radius);
  border: 1px solid var(--accent); text-decoration: none; font-weight: 700;
  color: var(--fg);
}
.button:hover { background: var(--accent); color: #1a1a1a; text-decoration: none; }
.link { border-style: dashed; opacity: 0.9; }
.link:hover { background: rgba(217,147,78,0.12); color: var(--fg); }

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  margin-top: 40px;
}
.card {
  grid-column: span 12;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.02));
}
@media (min-width: 860px) {
  .card { grid-column: span 4; }
}

.lead { font-size: 18px; color: var(--muted); max-width: 72ch; }

.section { padding: 24px 0; border-top: 1px dashed var(--line); margin-top: 24px; }
.section:first-of-type { border-top: none; }

.kicker {
  text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; color: var(--muted); margin-bottom: 6px;
  padding-left: 10px; border-left: 3px solid var(--teal);
}

hr { border: none; border-top: 1px dashed var(--line); margin: 24px 0; }

table { width: 100%; border-collapse: collapse; }
td, th { border: 1px solid var(--line); padding: 10px; text-align: left; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 0.95em; }

/* Subtle glitch hover for brand and buttons */
.brand:hover, .button:hover {
  text-shadow: 0 0 1px rgba(217,147,78,0.35), 0.04em 0 rgba(47,90,87,0.2);
}

/* micro-glitch on brand/links */
.brand, .button, .nav a {
  position: relative;
}
.brand::before, .button::before {
  content: attr(data-glitch);
  position: absolute; left: 0; top: 0;
  color: var(--accent);
  opacity: 0; transform: translate(0,0);
  clip-path: inset(0 0 50% 0);
  pointer-events: none;
}
.brand:hover::before, .button:hover::before {
  opacity: 0.4; transform: translate(1px,-1px);
}

/* Focus visibility for a11y on dark backgrounds */
:focus-visible {
  outline: 2px dashed var(--accent);
  outline-offset: 3px;
}
