:root {
  --bg: #0a0a0a;
  --fg: #f0f0f0;
  --dim: #666;
  --accent: #c8ff00;
  --accent-dim: #5a7400;
  --line: #1f1f1f;
  --warn: #ff4444;

  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-display: 'Space Grotesk', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* GRAIN OVERLAY */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* SKIP LINK (a11y) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--bg);
  padding: 12px 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
  text-decoration: none;
  z-index: 9999;
}
.skip-link:focus {
  left: 0;
}

/* FOCUS STATES */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* TOP BAR */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 14px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.topbar .left {
  display: flex;
  gap: 24px;
  align-items: center;
}

.topbar .status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

.topbar .right {
  display: flex;
  gap: 24px;
  color: var(--dim);
}

.topbar nav a {
  color: var(--dim);
  text-decoration: none;
  transition: color 0.2s;
}

.topbar nav a:hover {
  color: var(--accent);
}

/* HERO */
.hero {
  min-height: 100vh;
  padding: 120px 32px 60px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
}

.hero-left .meta {
  color: var(--dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 24px;
  display: flex;
  gap: 16px;
  align-items: center;
}

.meta-bracket {
  color: var(--accent);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 32px;
  text-transform: uppercase;
}

.hero h1 .accent {
  color: var(--accent);
  font-style: italic;
}

.hero h1 .strike {
  text-decoration: line-through;
  color: var(--dim);
  font-weight: 500;
}

.hero .lede {
  font-size: 16px;
  line-height: 1.7;
  color: #aaa;
  max-width: 480px;
  margin-bottom: 40px;
}

.hero .lede strong {
  color: var(--fg);
}

.cta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 28px;
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  border: 1px solid var(--fg);
  color: var(--fg);
  background: transparent;
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 700;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.btn:hover {
  background: var(--fg);
  color: var(--bg);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--accent);
}

.btn-primary:hover {
  background: var(--fg);
  color: var(--bg);
  box-shadow: 4px 4px 0 var(--accent);
}

/* HERO RIGHT - terminal card */
.hero-right {
  position: relative;
}

.terminal {
  background: #000;
  border: 1px solid var(--line);
  padding: 0;
  font-size: 12px;
  box-shadow: 8px 8px 0 var(--accent);
  position: relative;
}

.terminal-bar {
  background: #161616;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  color: var(--dim);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots span {
  width: 10px;
  height: 10px;
  background: var(--line);
}

.terminal-body {
  padding: 24px;
  color: #ccc;
  line-height: 1.7;
}

.terminal-body .prompt {
  color: var(--accent);
}

.terminal-body .key {
  color: var(--accent);
}

.terminal-body .str {
  color: #ffae57;
}

.terminal-body .com {
  color: var(--dim);
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--accent);
  vertical-align: middle;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* SECTION DIVIDER */
.section-label {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 32px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--dim);
  background: #0d0d0d;
}

.section-label .num {
  color: var(--accent);
}

/* SERVICES */
.services {
  padding: 80px 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.service {
  padding: 32px;
  border-right: 1px solid var(--line);
  position: relative;
  transition: background 0.2s;
}

.service:last-child {
  border-right: none;
}

.service:hover {
  background: #111;
}

.service:hover .service-num {
  color: var(--accent);
}

.service-num {
  font-size: 11px;
  color: var(--dim);
  margin-bottom: 16px;
  transition: color 0.2s;
}

.service h3 {
  font-family: var(--font-display);
  font-size: 28px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  line-height: 1.1;
}

.service p {
  color: #aaa;
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.service ul {
  list-style: none;
  font-size: 12px;
  color: var(--dim);
}

.service ul li {
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
}

.service ul li::before {
  content: '→ ';
  color: var(--accent);
  margin-right: 8px;
}

/* STACK */
.stack-section {
  padding: 60px 32px;
  border-bottom: 1px solid var(--line);
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 40px;
}

.stack-item {
  border: 1px solid var(--line);
  padding: 24px;
  margin-left: -1px;
  margin-top: -1px;
  transition: all 0.15s;
  cursor: default;
}

.stack-item:hover {
  background: var(--accent);
  color: var(--bg);
  z-index: 1;
  position: relative;
}

.stack-item:hover .stack-cat {
  color: var(--bg);
}

.stack-cat {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--dim);
  letter-spacing: 0.15em;
  margin-bottom: 8px;
}

.stack-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* MANIFESTO */
.manifesto {
  padding: 80px 32px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
}

.manifesto-label {
  font-size: 11px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.manifesto-text {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.manifesto-text .hl {
  background: var(--accent);
  color: var(--bg);
  padding: 0 8px;
}

.manifesto-text .strike {
  text-decoration: line-through;
  color: var(--dim);
}

/* CONTACT */
.contact {
  padding: 80px 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  border-bottom: 1px solid var(--line);
}

.contact h2 {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 80px);
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin-bottom: 24px;
}

.contact h2 .accent {
  color: var(--accent);
}

.contact-lede {
  color: #aaa;
  font-size: 14px;
  line-height: 1.7;
  max-width: 420px;
}

.contact-info {
  border-left: 2px solid var(--accent);
  padding-left: 24px;
}

.contact-row {
  margin-bottom: 24px;
}

.contact-row .label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--dim);
  letter-spacing: 0.15em;
  margin-bottom: 6px;
}

.contact-row .value {
  font-size: 18px;
  color: var(--fg);
}

.contact-row .value-legal {
  font-size: 13px;
  color: #aaa;
}

.contact-row .value a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  transition: color 0.2s;
}

.contact-row .value a:hover {
  color: var(--accent);
}

/* FOOTER */
footer {
  padding: 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  font-size: 11px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

footer .col h4 {
  color: var(--fg);
  margin-bottom: 12px;
  font-size: 11px;
}

footer .col p {
  line-height: 1.8;
}

/* MARQUEE */
.marquee {
  background: var(--accent);
  color: var(--bg);
  padding: 16px 0;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.marquee-track {
  display: inline-block;
  animation: scroll 30s linear infinite;
}

.marquee-track span {
  margin: 0 32px;
}

.marquee-track .dot {
  color: var(--bg);
}

@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .hero, .contact { grid-template-columns: 1fr; }
  .services { grid-template-columns: 1fr; }
  .service { border-right: none; border-bottom: 1px solid var(--line); }
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
  .manifesto { grid-template-columns: 1fr; gap: 16px; }
  footer { grid-template-columns: 1fr; }
  .topbar { padding: 12px 16px; font-size: 10px; }
  .topbar .right { display: none; }
  .hero { padding: 100px 16px 40px; gap: 40px; }
  .services, .stack-section, .manifesto, .contact { padding-left: 16px; padding-right: 16px; }
  .section-label { padding-left: 16px; padding-right: 16px; }
}

/* SCROLL ANIM */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s, transform 0.6s;
}
.fade-up.in {
  opacity: 1;
  transform: translateY(0);
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
  .status-dot { animation: none; }
  .cursor { animation: none; opacity: 1; }
  .fade-up { opacity: 1; transform: none; }
}
