@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,400;0,700;0,800;1,400&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  --bg: #050508;
  --surface: #0c0c12;
  --surface-2: #13131d;
  --border: #1e1e2e;
  --border-hover: #3d3d5c;
  --text: #c8c8d4;
  --text-dim: #6b6b7b;
  --text-bright: #eeeef2;
  --accent: #00ff9f;
  --accent-dim: #00cc7f;
  --accent-glow: rgba(0, 255, 159, 0.08);
  --danger: #ff3860;
  --mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  --serif: 'Instrument Serif', Georgia, serif;
}

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

/* Noise overlay */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--text-bright); }

::selection { background: var(--accent); color: var(--bg); }

/* Scanline animation */
@keyframes scanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

/* Nav — minimal bar */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(5, 5, 8, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 52px;
  display: flex;
  align-items: center;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-logo {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-bright);
  text-decoration: none;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: var(--text-dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

/* Hero — asymmetric editorial */
.hero {
  padding: 140px 32px 80px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}
.hero::after {
  content: '//';
  position: absolute;
  right: 32px;
  top: 140px;
  font-size: 200px;
  font-weight: 800;
  color: var(--surface-2);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 400;
  font-style: italic;
  color: var(--text-bright);
  line-height: 1.05;
  max-width: 700px;
  margin-bottom: 24px;
  letter-spacing: -1px;
}
.hero h1 span {
  color: var(--accent);
  font-style: normal;
  display: block;
  font-family: var(--mono);
  font-size: clamp(14px, 2vw, 18px);
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-top: 16px;
}
.hero-sub {
  font-size: 13px;
  color: var(--text-dim);
  max-width: 480px;
  margin-top: 20px;
  line-height: 1.8;
}
.hero-sub::before {
  content: '>';
  color: var(--accent);
  margin-right: 8px;
}

/* Status line */
.status-bar {
  max-width: 1200px;
  margin: 0 auto 60px;
  padding: 0 32px;
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}
.status-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Main */
main { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
section { margin-bottom: 80px; }
h2 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--text-dim);
  margin-bottom: 32px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* Intro */
.intro { display: none; } /* Hidden in v2 — info is in hero and cards */

/* Tool cards — terminal window style */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
}
@media (min-width: 768px) {
  .grid { grid-template-columns: 1fr 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0;
  text-decoration: none !important;
  color: inherit;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.card:hover {
  border-color: var(--border-hover);
  background: var(--surface-2);
}
.card:hover::before { opacity: 1; }

/* Card titlebar */
.card-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
}
.card-dots {
  display: flex;
  gap: 5px;
}
.card-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}
.card:hover .card-dots span:nth-child(1) { background: #ff5f56; }
.card:hover .card-dots span:nth-child(2) { background: #ffbd2e; }
.card:hover .card-dots span:nth-child(3) { background: #27c93f; }
.card-titlebar-text {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 11px;
}

/* Card body */
.card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-icon {
  font-size: 28px;
  margin-bottom: 12px;
}
.card-content { flex: 1; }
.card-content h3 {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 8px;
}
.card-content p {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 10px;
  line-height: 1.7;
}
.card-content ul {
  list-style: none;
  padding: 0;
  margin-bottom: 12px;
}
.card-content li {
  font-size: 12px;
  color: var(--text-dim);
  padding: 2px 0;
  padding-left: 16px;
  position: relative;
}
.card-content li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent-dim);
}
.card-content li strong {
  color: var(--text);
}
.card-domain {
  font-size: 11px;
  font-family: var(--mono);
  color: var(--accent);
  opacity: 0.7;
  display: inline-block;
  margin-top: auto;
  padding-top: 8px;
}
.card-domain::before {
  content: '→ ';
}

/* Why section — horizontal strip */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}
@media (max-width: 768px) {
  .why-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .why-grid { grid-template-columns: 1fr; }
}
.why-item {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 24px 20px;
  position: relative;
}
.why-item::before {
  content: attr(data-index);
  font-family: var(--serif);
  font-size: 48px;
  font-style: italic;
  color: var(--surface-2);
  position: absolute;
  top: 12px;
  right: 16px;
  line-height: 1;
}
.why-item h3 {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.why-item p {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.7;
}

/* Footer — stark minimal */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 32px;
  margin-top: 40px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 800;
  color: var(--text-bright);
}
.footer-brand span { color: var(--accent); }
.footer-links { display: flex; gap: 24px; }
.footer-links a {
  color: var(--text-dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
}
.footer-links a:hover { color: var(--accent); }
.footer-copy {
  color: var(--text-dim);
  font-size: 11px;
  width: 100%;
  text-align: center;
  margin-top: 8px;
}

/* Stagger entrance animation */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.card {
  opacity: 0;
  animation: fadeSlideIn 0.5s ease forwards;
}
.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.15s; }
.card:nth-child(4) { animation-delay: 0.2s; }
.card:nth-child(5) { animation-delay: 0.25s; }
.card:nth-child(6) { animation-delay: 0.3s; }
.card:nth-child(7) { animation-delay: 0.35s; }
.card:nth-child(8) { animation-delay: 0.4s; }

/* Glitch effect on card hover */
@keyframes glitch {
  0% { clip-path: inset(40% 0 61% 0); transform: translate(-2px, 2px); }
  20% { clip-path: inset(92% 0 1% 0); transform: translate(2px, -1px); }
  40% { clip-path: inset(43% 0 1% 0); transform: translate(-1px, 3px); }
  60% { clip-path: inset(25% 0 58% 0); transform: translate(3px, 1px); }
  80% { clip-path: inset(54% 0 7% 0); transform: translate(-3px, -2px); }
  100% { clip-path: inset(58% 0 43% 0); transform: translate(0); }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }
