:root {
  --bg: #080a08;
  --bg-2: #0c0f0c;
  --card: #101410;
  --line: #1e241e;
  --line-2: #2a332a;
  --ink: #e8ede8;
  --muted: #7d8a7d;
  --accent: #b6ff3b;
  --accent-dim: #7fae2a;
  --radius: 4px;
  --max: 1080px;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* scanline + grid texture — the hacker substrate */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background-image:
    repeating-linear-gradient(0deg, rgba(182,255,59,.028) 0 1px, transparent 1px 3px),
    linear-gradient(rgba(182,255,59,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(182,255,59,.022) 1px, transparent 1px);
  background-size: 100% 3px, 44px 44px, 44px 44px;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #080a08; }
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-2); }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dim); }

/* blinking terminal caret */
.caret, .caret-sm {
  display: inline-block; width: 8px; height: 1.05em; margin-left: 4px;
  background: var(--accent); vertical-align: text-bottom; animation: blink-caret 1.15s step-end infinite;
}
.caret-sm { width: 6px; height: .9em; margin-left: 2px; }
@keyframes blink-caret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  max-width: var(--max); margin: 0 auto; padding: 13px 24px;
  background: rgba(8,10,8,.86); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-brand { font-weight: 700; font-size: 15px; letter-spacing: -.3px; }
.nav-brand span { color: var(--accent); }
.nav-links { display: flex; gap: 24px; font-size: 13px; color: var(--muted); }
.nav-links a { transition: color .18s; }
.nav-links a::before { content: '/'; color: var(--line-2); margin-right: 3px; }
.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::before { color: var(--accent-dim); }
@media (max-width: 800px) { .nav-links { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius); font-size: 13.5px; font-weight: 500;
  border: 1px solid var(--line-2); background: transparent; color: var(--ink);
  cursor: pointer; font-family: var(--mono); transition: all .18s; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(182,255,59,.05); }
.btn-primary { background: var(--accent); color: #080a08; border-color: var(--accent); font-weight: 700; }
.btn-primary:hover { background: transparent; color: var(--accent); box-shadow: 0 0 22px rgba(182,255,59,.2); }
.btn-ghost { border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--accent); background: transparent; border-color: transparent; }
.btn-sm { padding: 7px 14px; font-size: 12.5px; }

/* ---------- hero ---------- */
.hero { max-width: var(--max); margin: 0 auto; padding: 54px 24px 0; position: relative; z-index: 2; }
.hero-inner { display: grid; grid-template-columns: 1fr auto; gap: 46px; align-items: center; }
@media (max-width: 860px) { .hero-inner { grid-template-columns: 1fr; gap: 30px; } .hero { padding-top: 32px; } }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px;
  padding: 5px 12px; border-radius: var(--radius); border: 1px solid var(--line-2);
  font-size: 12px; color: var(--muted); font-weight: 400;
}
.pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(182,255,59,.5); } 50% { opacity: .5; box-shadow: 0 0 0 5px rgba(182,255,59,0); } }

.hero h1 {
  font-family: var(--sans); font-size: clamp(38px, 7vw, 64px); font-weight: 700;
  letter-spacing: -2.2px; line-height: 1.03;
}
.hero-title {
  font-size: clamp(14px, 2.2vw, 18px); font-weight: 500; color: var(--ink); margin-top: 12px;
}
.prompt { color: var(--accent); font-weight: 700; }
.hero-sub { font-size: 13px; color: var(--muted); margin-top: 8px; letter-spacing: .2px; }
.hero-tagline {
  font-family: var(--sans); font-size: 16.5px; color: #b4c0b4; margin-top: 22px;
  max-width: 580px; line-height: 1.6;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hero-contact { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 22px; font-size: 13px; color: var(--muted); }
.hero-contact a { border-bottom: 1px solid var(--line-2); padding-bottom: 2px; transition: all .18s; }
.hero-contact a:hover { color: var(--accent); border-color: var(--accent); }

.hero-photo { position: relative; }
.hero-photo img {
  width: 232px; height: 232px; border-radius: var(--radius); object-fit: cover;
  filter: grayscale(1) contrast(1.08);
  border: 1px solid var(--line-2);
  transition: filter .4s;
}
.hero-photo:hover img { filter: grayscale(0) contrast(1); }
.hero-photo::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  border-radius: var(--radius);
  background: linear-gradient(180deg, transparent 60%, rgba(182,255,59,.09));
}
@media (max-width: 860px) { .hero-photo img { width: 132px; height: 132px; } }

/* ---------- sections ---------- */
.section { max-width: var(--max); margin: 0 auto; padding: 72px 24px 0; position: relative; z-index: 2; }
.section h2 {
  font-family: var(--sans); font-size: clamp(21px, 3.2vw, 28px); font-weight: 700;
  letter-spacing: -.9px; margin-bottom: 22px; display: flex; align-items: baseline; gap: 10px;
}
.hash { font-family: var(--mono); color: var(--accent); font-weight: 700; font-size: .82em; }
.section-lead { color: var(--muted); font-size: 14px; max-width: 620px; margin: -10px 0 24px; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.chip {
  display: inline-block; padding: 3px 8px; border-radius: 2px; font-size: 11px; font-weight: 400;
  background: transparent; border: 1px solid var(--line-2); color: #9aa89a;
}
.chip::before { content: ''; }
.chip-accent { border-color: var(--accent-dim); color: var(--accent); }

/* ---------- pillars (what I bring) ---------- */
.pillars { display: grid; gap: 0; border-top: 1px solid var(--line); }
.pillar {
  display: grid; grid-template-columns: 54px 1fr; gap: 18px;
  padding: 24px 0; border-bottom: 1px solid var(--line);
  transition: background .25s;
}
.pillar:hover { background: rgba(182,255,59,.018); }
.pillar-idx {
  font-size: 12px; color: var(--accent-dim); font-weight: 700; padding-top: 4px; letter-spacing: .5px;
}
.pillar h3 { font-family: var(--sans); font-size: 19px; font-weight: 600; letter-spacing: -.5px; }
.pillar-line { font-size: 12.5px; color: var(--accent); margin-top: 2px; }
.pillar p { font-family: var(--sans); font-size: 15px; color: #b0bcb0; margin-top: 10px; max-width: 720px; }
@media (max-width: 640px) { .pillar { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- proof (evidence, deliberately quiet) ---------- */
.proofs { display: grid; gap: 14px; }
.proof {
  display: grid; grid-template-columns: auto auto 1fr; gap: 12px; align-items: baseline;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .25s;
}
.proof:hover { border-color: var(--line-2); }
.proof-num {
  font-family: var(--mono); font-size: 15px; font-weight: 700; color: var(--accent);
  background: rgba(182,255,59,.07); padding: 2px 8px; border-radius: 2px; white-space: nowrap;
}
.proof-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; white-space: nowrap; }
.proof p { font-family: var(--sans); font-size: 14.5px; color: #a8b4a8; grid-column: 1 / -1; }
@media (min-width: 780px) { .proof p { grid-column: 3; margin: 0; } }

/* ---------- timeline ---------- */
.timeline { position: relative; }
.job { display: grid; grid-template-columns: 22px 1fr; gap: 16px; padding-bottom: 30px; }
.job-rail { position: relative; display: flex; justify-content: center; padding-top: 8px; }
.job-rail::after { content: ''; position: absolute; top: 20px; bottom: -30px; width: 1px; background: var(--line); }
.job:last-child .job-rail::after { display: none; }
.dot { width: 7px; height: 7px; background: var(--accent); flex: none; box-shadow: 0 0 0 3px rgba(182,255,59,.1); }
.job-top { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.job h3 { font-family: var(--sans); font-size: 18px; font-weight: 600; letter-spacing: -.4px; }
.job-period { font-size: 12px; color: var(--muted); white-space: nowrap; }
.job-meta { font-size: 13px; color: var(--accent); margin-top: 2px; }
.job-blurb { font-family: var(--sans); font-size: 14px; color: #8d998d; margin-top: 8px; }
.job ul { margin-top: 12px; padding-left: 0; list-style: none; display: grid; gap: 6px; }
.job li { font-family: var(--sans); font-size: 14.5px; color: #b0bcb0; padding-left: 16px; position: relative; }
.job li::before { content: '›'; position: absolute; left: 0; color: var(--accent); font-family: var(--mono); }

/* ---------- projects ---------- */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.project {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  transition: border-color .25s, transform .25s;
}
.project:hover { border-color: var(--accent-dim); transform: translateY(-2px); }
.project-top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 9px; }
.project h3 { font-family: var(--sans); font-size: 16.5px; font-weight: 600; letter-spacing: -.3px; }
.project p { font-family: var(--sans); font-size: 14.3px; color: #a8b4a8; }
.project-link { display: inline-block; margin-top: 12px; font-size: 12.5px; color: var(--accent); }
.project-link:hover { text-decoration: underline; }

/* ---------- skills ---------- */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.skill-group h4 { font-size: 11.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); font-weight: 700; }
.skill-group h4::before { content: '> '; color: var(--accent-dim); }

/* ---------- chat ---------- */
.section-chat { padding-bottom: 8px; }
.chat { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.chat-bar {
  display: flex; align-items: center; gap: 7px; padding: 9px 14px;
  background: #0a0d0a; border-bottom: 1px solid var(--line);
}
.dot-r, .dot-y, .dot-g { width: 9px; height: 9px; border-radius: 50%; }
.dot-r { background: #3a2020; } .dot-y { background: #3a3520; } .dot-g { background: #233a20; }
.chat-bar-title { font-size: 11.5px; color: var(--muted); margin-left: 8px; }
.chat-log { padding: 20px; min-height: 220px; max-height: 440px; overflow-y: auto; display: flex; flex-direction: column; gap: 15px; scroll-behavior: smooth; }
.msg { display: flex; gap: 10px; align-items: flex-start; animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.msg-user { flex-direction: row-reverse; }
.avatar {
  width: 26px; height: 26px; border-radius: 2px; flex: none; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700; background: var(--accent); color: #080a08;
}
.msg-user .avatar { background: transparent; border: 1px solid var(--line-2); color: var(--muted); }
.bubble {
  max-width: 78%; padding: 11px 15px; border-radius: var(--radius); font-family: var(--sans);
  font-size: 14.8px; line-height: 1.6; background: #121612; border: 1px solid var(--line);
  white-space: pre-wrap; word-wrap: break-word;
}
.msg-user .bubble { background: rgba(182,255,59,.06); border-color: rgba(182,255,59,.2); }
.bubble a { color: var(--accent); text-decoration: underline; }
.bubble strong { color: #fff; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 5px; height: 5px; background: var(--accent); animation: blink 1.3s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,60%,100% { opacity: .2; } 30% { opacity: 1; } }

.suggests { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 20px 13px; }
.suggest {
  padding: 6px 11px; border-radius: 2px; font-size: 12px; cursor: pointer; font-family: var(--mono);
  background: transparent; border: 1px solid var(--line-2); color: #93a093; transition: all .18s;
}
.suggest::before { content: '? '; color: var(--accent-dim); }
.suggest:hover { border-color: var(--accent); color: var(--accent); }

.chat-form { display: flex; align-items: center; gap: 9px; padding: 13px 16px; border-top: 1px solid var(--line); background: #0a0d0a; }
.form-prompt { color: var(--accent); font-weight: 700; font-size: 15px; }
.chat-form input {
  flex: 1; background: transparent; border: none; padding: 9px 0;
  color: var(--ink); font-family: var(--mono); font-size: 14.5px; outline: none;
}
.chat-form input::placeholder { color: #56604f; }
.chat-form button {
  width: 36px; height: 36px; flex: none; border-radius: var(--radius); border: 1px solid var(--accent);
  background: transparent; color: var(--accent); font-size: 16px; font-weight: 700; cursor: pointer;
  font-family: var(--mono); transition: all .18s;
}
.chat-form button:hover:not(:disabled) { background: var(--accent); color: #080a08; }
.chat-form button:disabled { opacity: .3; cursor: not-allowed; }
.chat-note { padding: 0 20px 15px; font-size: 11.5px; color: #5c665c; }
.chat-note a { color: var(--muted); text-decoration: underline; }

/* ---------- cta / footer ---------- */
.cta { padding-top: 66px; }
.cta-box {
  display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap;
  border: 1px solid var(--line-2); border-radius: var(--radius); padding: 30px;
  background:
    linear-gradient(rgba(182,255,59,.03), rgba(182,255,59,.03)),
    var(--card);
}
.cta-box h2 { margin-bottom: 5px; }
.cta-box p { color: var(--muted); font-size: 14px; }
.cta-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.footer {
  max-width: var(--max); margin: 58px auto 0; padding: 20px 24px 32px;
  border-top: 1px solid var(--line); display: flex; justify-content: space-between;
  font-size: 12px; color: #4f584f; position: relative; z-index: 2; flex-wrap: wrap; gap: 8px;
}

/* ---------- modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px;
  background: rgba(4,6,4,.82); backdrop-filter: blur(5px); animation: fade .2s;
}
.modal[hidden] { display: none; }
.modal-box {
  position: relative; width: 100%; max-width: 410px; background: var(--card);
  border: 1px solid var(--line-2); border-radius: var(--radius); padding: 28px;
}
.modal-box h3 { font-family: var(--sans); font-size: 20px; font-weight: 700; letter-spacing: -.5px; margin-bottom: 7px; }
.modal-box > p { font-family: var(--sans); font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.modal-box form { display: grid; gap: 9px; }
.modal-box input {
  background: #0a0d0a; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 11px 14px;
  color: var(--ink); font-family: var(--mono); font-size: 14px; outline: none; transition: border-color .18s;
}
.modal-box input:focus { border-color: var(--accent); }
.modal-box .btn { margin-top: 3px; }
.modal-x {
  position: absolute; top: 12px; right: 14px; background: none; border: none;
  color: var(--muted); font-size: 24px; cursor: pointer; line-height: 1; transition: color .18s;
}
.modal-x:hover { color: var(--accent); }
.hp { position: absolute !important; left: -9999px !important; }
.gate-err { font-size: 12.5px; color: #ff6b6b; min-height: 18px; }
.gate-ok { color: var(--accent); }
