:root {
  --bg: #0a0a0a;
  --fg: #e8e8e8;
  --muted: #9a9a9a;
  --accent: #00ff88;
  --card: #111;
  --border: #222;
  --shadow: rgba(0,0,0,0.3);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 16px/1.6 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background: var(--bg);
  color: var(--fg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(1100px, 92vw); margin: 0 auto; }

a { color: var(--fg); text-decoration: none; border-bottom: 1px solid transparent; }
a:hover { border-bottom-color: var(--accent); }

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: linear-gradient(to bottom, rgba(10,10,10,0.9), rgba(10,10,10,0.6));
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
}
.brand { font-weight: 700; letter-spacing: 0.5px; font-size: 20px; color: var(--accent); }

.nav a { margin-left: 18px; opacity: 0.9; }
.nav a:hover { opacity: 1; }

.site-footer { border-top: 1px solid var(--border); margin-top: 80px; }
.site-footer .wrap { padding: 40px 0; color: var(--muted); }
.site-footer a { color: var(--muted); }

.hero { padding: 72px 0 30px; text-align: left; }
.headline {
  font-size: clamp(36px, 7vw, 64px);
  line-height: 1.1;
  margin: 0 0 12px 0;
}
.tagline { color: var(--muted); margin: 0 0 18px 0; }

.cta-row { display: flex; gap: 12px; margin-top: 16px; }
.btn {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  border-radius: 8px;
  box-shadow: 0 8px 24px var(--shadow);
}
.btn.secondary { border-color: var(--fg); color: var(--fg); }

.page-title { margin: 28px 0 12px; font-size: 32px; }
.section-title { margin: 40px 0 12px; font-size: 24px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin: 12px 0 8px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, #101010, #0c0c0c);
  padding: 16px;
  box-shadow: 0 6px 18px var(--shadow);
  transition: transform .16s ease, border-color .16s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card h3 { margin: 0 0 8px 0; font-size: 18px; }
.card p { margin: 0 0 10px 0; color: var(--muted); font-size: 14px; }
.card .meta { color: var(--muted); font-size: 12px; }

.filters { margin: 18px 0; }
#work-search {
  width: 100%; max-width: 420px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 10px;
  background: #0e0e0e; color: var(--fg);
}

.prose { max-width: 72ch; }
.prose h1, .prose h2, .prose h3 { margin-top: 24px; }
.prose code { background: #111; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--border); }
.prose pre { background: #111; padding: 12px; border-radius: 8px; overflow: auto; border: 1px solid var(--border); }

.more-link { margin: 6px 0 0; }

/* Glitch effect — subtle */
.glitch {
  position: relative;
  display: inline-block;
  isolation: isolate;
}
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  mix-blend-mode: screen;
  pointer-events: none;
}
.glitch::before { transform: translate(1px, -1px); color: #00ffaa; opacity: .6; clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%); }
.glitch::after { transform: translate(-1px, 1px); color: #00aaff; opacity: .5; clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%); }
@media (prefers-reduced-motion: no-preference) {
  .glitch::before { animation: glitchTop 2.2s infinite linear alternate-reverse; }
  .glitch::after { animation: glitchBot 2.8s infinite linear alternate; }
}
@keyframes glitchTop { 0%{translate:0 0} 50%{translate:1px -2px} 100%{translate:0 0} }
@keyframes glitchBot { 0%{translate:0 0} 50%{translate:-1px 1px} 100%{translate:0 0} }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(8px); transition: opacity .4s ease, transform .4s ease; }
.revealed { opacity: 1; transform: translateY(0); }

/* Small utilities */
.tag { padding: 2px 6px; border: 1px solid var(--border); border-radius: 999px; font-size: 12px; color: var(--muted); }
.meta { color: var(--muted); }

/* Scanline overlay for the hardcore look (very subtle) */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .08;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.02) 0, rgba(255,255,255,0.02) 1px, transparent 1px, transparent 2px);
}
