:root {
  --bg: #0d0d0d;
  --bg2: #141414;
  --bg3: #1a1a1a;
  --border: rgba(255,255,255,0.08);
  --border-bright: rgba(255,255,255,0.15);
  --text: #e8e8e0;
  --muted: #888880;
  --dim: #555550;
  --accent: #f5a623;
  --accent2: #ff6b6b;
  --green: #4ade80;
  --code-bg: #111;
  --mono: 'JetBrains Mono', 'Courier New', monospace;
  --sans: 'Outfit', 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* Atmosphere */
.scanlines {
  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: 100;
}
.noise {
  position: fixed;
  inset: -200%;
  width: 400%;
  height: 400%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.018;
  pointer-events: none;
  z-index: 99;
  animation: drift 20s linear infinite;
}
@keyframes drift { to { transform: translate(10%, 10%); } }

/* Layout */
.shell { width: min(1080px, 92vw); margin: 0 auto; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(13,13,13,0.9);
  backdrop-filter: blur(12px);
  padding: 14px 0;
}
.site-header .shell { display: flex; justify-content: space-between; align-items: center; }

.brand {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0;
}
.prompt { color: var(--accent); }
.brand-name { color: var(--text); }
.cursor-blink { color: var(--accent); margin-left: 1px; }

nav { display: flex; gap: 20px; align-items: center; }
nav a {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.15s;
}
nav a:hover { color: var(--text); }
nav .nav-gh {
  color: var(--accent);
  border: 1px solid rgba(245,166,35,0.3);
  padding: 4px 10px;
  border-radius: 4px;
  transition: background 0.15s, border-color 0.15s;
}
nav .nav-gh:hover { background: rgba(245,166,35,0.08); border-color: var(--accent); }

/* Hero */
.hero { padding: 80px 0 60px; }
.hero-tag {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-tag::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--accent);
}

h1 {
  font-family: var(--sans);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}
.accent { color: var(--accent); }

.hero-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 640px;
  line-height: 1.75;
  margin-bottom: 32px;
}

.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 48px; }
.btn-primary {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #0d0d0d;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 11px 22px;
  border-radius: 6px;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-icon { font-size: 1.1rem; }
.btn-ghost {
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--muted);
  text-decoration: none;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-bright);
  transition: color 0.15s, border-color 0.15s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--text); }

/* Terminal window */
.terminal-window {
  border: 1px solid var(--border-bright);
  border-radius: 10px;
  overflow: hidden;
  max-width: 640px;
  font-family: var(--mono);
  font-size: 0.85rem;
}
.term-bar {
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green  { background: #28c840; }
.term-title {
  margin-left: auto;
  color: var(--dim);
  font-size: 0.78rem;
  margin-right: auto;
  transform: translateX(-12px);
}
.term-body {
  background: #0a0a0a;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.term-body p { margin: 0; }
.term-prompt { color: var(--accent); margin-right: 8px; }
.term-cmd { color: var(--text); }
.term-out { color: var(--muted); padding-left: 18px; }
.term-ok { color: var(--green); }
.term-out.dim { color: var(--dim); }

/* Sections */
.section { padding: 72px 0; border-top: 1px solid var(--border); }

h2 {
  font-family: var(--sans);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 36px;
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.section-num {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0.05em;
}

h3 {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

p { color: var(--muted); }
.dim-text { color: var(--muted); font-size: 0.92rem; }

code {
  font-family: var(--mono);
  font-size: 0.82em;
  background: rgba(255,255,255,0.06);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--text);
}

/* Problem grid */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--border);
}
.problem-card {
  background: var(--bg2);
  padding: 28px 26px;
  transition: background 0.2s;
}
.problem-card:hover { background: var(--bg3); }
.card-icon {
  font-size: 1.6rem;
  color: var(--accent);
  margin-bottom: 14px;
  line-height: 1;
}
.problem-card h3 { color: var(--text); margin-bottom: 10px; }

/* Script table */
.script-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.script-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.82rem;
}
.script-table thead th {
  background: var(--bg3);
  color: var(--muted);
  text-align: left;
  padding: 12px 16px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.72rem;
  border-bottom: 1px solid var(--border);
}
.script-table tbody tr { border-bottom: 1px solid var(--border); }
.script-table tbody tr:last-child { border-bottom: none; }
.script-table tbody td {
  padding: 12px 16px;
  vertical-align: top;
  color: var(--muted);
}
.script-table tbody td:first-child { color: var(--accent); white-space: nowrap; }
.script-table tbody tr:hover td { background: rgba(255,255,255,0.02); }
.tag.none {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--dim);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 3px;
}

/* Employment types */
.emp-types { margin-top: 36px; }
.emp-types h3 { margin-bottom: 8px; }
.type-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.type-badge {
  font-family: var(--mono);
  font-size: 0.82rem;
  border: 1px solid var(--border-bright);
  padding: 6px 12px;
  border-radius: 5px;
  color: var(--muted);
  background: var(--bg2);
}
.type-badge code { background: none; padding: 0; color: var(--accent); }

/* Workflows */
.workflow-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 36px;
}
@media (max-width: 640px) { .workflow-grid { grid-template-columns: 1fr; } }

.workflow-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  background: var(--bg2);
}
.workflow-card h3 {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.flow-list {
  list-style: none;
  counter-reset: flow;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.flow-list li {
  counter-increment: flow;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.82rem;
}
.flow-list li::before {
  content: counter(flow);
  font-size: 0.7rem;
  color: var(--dim);
  min-width: 16px;
  text-align: right;
}
.step-note { color: var(--dim); font-size: 0.78rem; }

.find-ids { margin-top: 36px; }
.find-ids h3 { margin-bottom: 8px; }
.find-ids .dim-text:last-child { margin-top: 10px; }

/* Code block */
.code-block {
  font-family: var(--mono);
  font-size: 0.83rem;
  background: #0a0a0a;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  color: #c8c8c0;
  overflow-x: auto;
  line-height: 1.7;
  margin-top: 12px;
  white-space: pre;
}

/* Install rules */
.rules-grid { display: flex; flex-direction: column; gap: 0; margin-top: 32px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.rule {
  display: flex;
  gap: 20px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  align-items: flex-start;
}
.rule:last-child { border-bottom: none; }
.rule-num {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  background: rgba(245,166,35,0.08);
  border: 1px solid rgba(245,166,35,0.2);
  padding: 3px 8px;
  border-radius: 4px;
  min-width: fit-content;
  margin-top: 3px;
}
.rule strong { display: block; color: var(--text); margin-bottom: 6px; }
.rule p { font-size: 0.9rem; }

/* About */
.about-section { padding: 60px 0 80px; }
.about-inner {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px 36px;
  background: var(--bg2);
}
.about-inner > p { font-size: 1rem; color: var(--muted); }
.about-inner a { color: var(--accent); text-decoration: none; }
.about-inner a:hover { text-decoration: underline; }
.about-links { display: flex; gap: 20px; margin-top: 18px; flex-wrap: wrap; }
.about-links a {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: color 0.15s, border-color 0.15s;
}
.about-links a:hover { color: var(--text); border-color: var(--text); text-decoration: none; }

/* Footer */
.site-footer {
  padding: 20px 0;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--dim);
  display: flex;
  gap: 10px;
  align-items: center;
}
.site-footer a { color: var(--dim); text-decoration: none; }
.site-footer a:hover { color: var(--muted); }
.footer-sep { color: var(--border-bright); }

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 600px) {
  .site-header .shell { flex-direction: column; gap: 12px; align-items: flex-start; }
  nav { gap: 14px; }
  h1 { font-size: 2.2rem; }
  .about-inner { padding: 22px; }
}
