/* ============================
   Variables
   ============================ */
:root {
  --bg-0:         #05050d;
  --bg-1:         #09091a;
  --bg-2:         #0e0e24;
  --card:         #111128;
  --card-hover:   #16162e;

  --purple:       #8b5cf6;
  --purple-light: #a78bfa;
  --purple-dark:  #7c3aed;
  --purple-glow:  rgba(139, 92, 246, 0.25);

  --cyan:  #22d3ee;
  --green: #10b981;
  --red:   #ef4444;
  --orange:#f97316;
  --amber: #f59e0b;

  --text:       #e2e8f0;
  --text-dim:   #94a3b8;
  --text-muted: #475569;

  --border:       rgba(139, 92, 246, 0.12);
  --border-hover: rgba(139, 92, 246, 0.35);

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  --r-sm: 6px;
  --r:    10px;
  --r-lg: 16px;

  --shadow:        0 4px 24px rgba(0, 0, 0, 0.5);
  --shadow-purple: 0 4px 32px rgba(139, 92, 246, 0.18);

  --nav-h:    72px;
  --max-w:  1180px;
}

/* ============================
   Reset & Base
   ============================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg-0);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(139,92,246,.32); color: #fff; }

::-webkit-scrollbar        { width: 5px; }
::-webkit-scrollbar-track  { background: var(--bg-0); }
::-webkit-scrollbar-thumb  { background: var(--purple-dark); border-radius: 3px; }

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ============================
   Navigation
   ============================ */
#navbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 999;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  transition: background .3s, border-color .3s;
}
#navbar.scrolled {
  background: rgba(5,5,13,.93);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -.02em;
}
.nav-logo .logo-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--purple-dark), var(--purple-light));
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: var(--shadow-purple);
}
.nav-logo .logo-text span { color: var(--purple-light); }

.nav-links {
  display: flex;
  align-items: center;
  gap: .15rem;
  list-style: none;
}
.nav-links a {
  color: var(--text-dim);
  padding: .45rem .75rem;
  border-radius: var(--r-sm);
  font-size: .9rem;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: rgba(139,92,246,.1); }

.nav-cta {
  background: var(--purple) !important;
  color: #fff !important;
  padding: .45rem 1.2rem !important;
  font-weight: 600 !important;
  border-radius: var(--r-sm) !important;
}
.nav-cta:hover { background: var(--purple-dark) !important; box-shadow: var(--shadow-purple) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .3s;
}

/* ============================
   Hero
   ============================ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
#particles-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(139,92,246,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139,92,246,.04) 1px, transparent 1px);
  background-size: 64px 64px;
  z-index: 0;
}
.hero-radial {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(139,92,246,.12) 0%, transparent 70%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 3rem) 2rem 4rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .9rem;
  background: rgba(139,92,246,.1);
  border: 1px solid var(--border-hover);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--purple-light);
  margin-bottom: 1.75rem;
  letter-spacing: .06em;
}
.hero-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  animation: blink 2s infinite;
  flex-shrink: 0;
}
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:.25; } }

.hero-title {
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -.035em;
  margin-bottom: 1.5rem;
}
.hero-title .gradient {
  background: linear-gradient(120deg, var(--purple-light) 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-typed-wrapper {
  display: inline-block;
  min-width: 300px;
}
#hero-typed {
  color: var(--text);
  border-right: 2px solid var(--purple-light);
  animation: caret .75s step-end infinite;
  padding-right: 4px;
}
@keyframes caret { 0%,100% { border-color: var(--purple-light); } 50% { border-color: transparent; } }

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 540px;
  margin-bottom: 2.5rem;
  line-height: 1.75;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.75rem;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: .92rem;
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  transition: all .22s;
}
.btn-primary {
  background: var(--purple);
  color: #fff;
}
.btn-primary:hover {
  background: var(--purple-dark);
  box-shadow: 0 0 30px var(--purple-glow);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border-hover);
}
.btn-ghost:hover { color: var(--text); border-color: var(--purple); background: rgba(139,92,246,.08); }

.hero-stats {
  display: flex;
  gap: 3rem;
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.hero-stat-num {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: .3rem;
}
.hero-stat-num em { color: var(--purple-light); font-style: normal; }
.hero-stat-label {
  font-size: .78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .1em;
}

/* ============================
   Section Shared
   ============================ */
section { padding: 6rem 0; }

.section-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--purple-light);
  text-transform: uppercase;
  letter-spacing: .18em;
  margin-bottom: .7rem;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -.025em;
  margin-bottom: 1rem;
  line-height: 1.15;
}
.section-sub {
  font-size: 1.05rem;
  color: var(--text-dim);
  max-width: 540px;
  line-height: 1.75;
}

/* ============================
   Services
   ============================ */
#services { background: var(--bg-1); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.service-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: transform .3s, box-shadow .3s, border-color .3s, background .3s;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--purple-dark), var(--purple-light));
  opacity: 0;
  transition: opacity .3s;
}
.service-card:hover { border-color: var(--border-hover); background: var(--card-hover); transform: translateY(-3px); box-shadow: var(--shadow-purple); }
.service-card:hover::before { opacity: 1; }

.service-icon {
  width: 50px; height: 50px;
  background: rgba(139,92,246,.12);
  border: 1px solid var(--border-hover);
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
  color: var(--purple-light);
}
.service-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .65rem; }
.service-card p  { font-size: .88rem; color: var(--text-dim); line-height: 1.7; margin-bottom: 1.25rem; }

.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag {
  font-family: var(--font-mono);
  font-size: .7rem;
  padding: .22rem .55rem;
  background: rgba(139,92,246,.07);
  border: 1px solid rgba(139,92,246,.2);
  border-radius: 4px;
  color: var(--text-dim);
}

/* ============================
   About
   ============================ */
#about .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.about-text .section-sub { margin-bottom: 1.75rem; }

.about-list { list-style: none; display: flex; flex-direction: column; gap: .7rem; margin-bottom: 2rem; }
.about-list li { display: flex; align-items: flex-start; gap: .75rem; font-size: .92rem; color: var(--text-dim); }
.about-list li::before { content: '▸'; color: var(--purple-light); flex-shrink: 0; margin-top: .05em; }

.terminal-window {
  background: #0a0a18;
  border: 1px solid var(--border-hover);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow), var(--shadow-purple);
}
.terminal-head {
  display: flex; align-items: center; gap: .5rem;
  padding: .7rem 1rem;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}
.t-dot { width: 10px; height: 10px; border-radius: 50%; }
.t-dot.r { background: #ff5f57; }
.t-dot.y { background: #febc2e; }
.t-dot.g { background: #28c840; }
.terminal-head-title {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--text-muted);
  margin-left: .4rem;
}
.terminal-body { padding: 1.25rem 1.5rem; font-family: var(--font-mono); font-size: .8rem; line-height: 2.1; }
.t-prompt { color: var(--purple-light); }
.t-cmd    { color: var(--text); }
.t-ok     { color: var(--green); }
.t-warn   { color: var(--amber); }
.t-err    { color: var(--red); }
.t-info   { color: var(--cyan); }
.t-dim    { color: var(--text-muted); }

/* ============================
   Profile — Cybersecurity Cowboy
   ============================ */
#profile { border-top: 1px solid var(--border); }

.profile-inner { max-width: 820px; }

.profile-lead {
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  font-style: italic;
  color: var(--purple-light);
  margin: -.25rem 0 2rem;
  line-height: 1.5;
}

.profile-prose p {
  font-size: 1.02rem;
  color: var(--text-dim);
  line-height: 1.85;
  margin-bottom: 1.25rem;
}
.profile-prose p:last-child { margin-bottom: 0; }

.profile-trade { margin-top: 2.75rem; }
.profile-trade h3 {
  font-family: var(--font-mono);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}
.trade-tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.trade-tags .tag { font-size: .74rem; padding: .3rem .7rem; }

.profile-quote {
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-top: 2.75rem;
  line-height: 1.3;
}

/* ============================
   Hall of Fame Preview
   ============================ */
#hof-preview { background: var(--bg-1); }

.hof-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 2.5rem; gap: 1rem; flex-wrap: wrap;
}

.ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.ref-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.ref-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-purple); transform: translateY(-2px); }

.ref-card-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .9rem;
}
.ref-company { font-weight: 700; font-size: 1rem; }

.badge {
  font-family: var(--font-mono);
  font-size: .68rem;
  padding: .2rem .55rem;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge.bounty   { background: rgba(16,185,129,.1);  color: var(--green);        border: 1px solid rgba(16,185,129,.25);  }
.badge.pentest  { background: rgba(139,92,246,.1);  color: var(--purple-light); border: 1px solid rgba(139,92,246,.25);  }
.badge.redteam  { background: rgba(239,68,68,.1);   color: var(--red);          border: 1px solid rgba(239,68,68,.25);   }
.badge.assessment { background: rgba(34,211,238,.1); color: var(--cyan);        border: 1px solid rgba(34,211,238,.25);  }

.ref-finding { font-size: .88rem; color: var(--text-dim); margin-bottom: .85rem; line-height: 1.55; }
.ref-severity { display: flex; align-items: center; gap: .45rem; font-size: .77rem; color: var(--text-muted); font-family: var(--font-mono); }
.sev-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.sev-dot.critical { background: var(--red); }
.sev-dot.high     { background: var(--orange); }
.sev-dot.medium   { background: var(--amber); }
.sev-dot.low      { background: var(--green); }
.sev-dot.info     { background: var(--cyan); }

.hof-cta { text-align: center; margin-top: 3rem; }

/* ============================
   Contact
   ============================ */
.contact-cta {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}
.contact-cta .section-tag { display: inline-block; }
.contact-cta .section-sub { margin: 0 auto 2.5rem; }

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.75rem;
  background: var(--card);
  border: 1px solid var(--border-hover);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-purple);
  transition: transform .22s, border-color .22s, background .22s, box-shadow .22s;
}
.contact-email:hover {
  transform: translateY(-2px);
  border-color: var(--purple);
  background: var(--card-hover);
  box-shadow: 0 0 34px var(--purple-glow);
}
.contact-email-icon {
  width: 42px; height: 42px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--purple-dark), var(--purple-light));
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1.05rem;
}
.contact-email-addr {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.6vw, 1.35rem);
  font-weight: 500;
  color: var(--text);
  letter-spacing: -.01em;
}
.contact-email-arrow {
  color: var(--purple-light);
  font-size: .9rem;
  transition: transform .22s;
}
.contact-email:hover .contact-email-arrow { transform: translateX(4px); }

.contact-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin-top: 2rem;
}
.contact-meta span {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--text-muted);
}
.contact-meta i { color: var(--purple-light); }

/* ============================
   Footer
   ============================ */
footer {
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 2rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand .nav-logo { margin-bottom: .85rem; }
.footer-brand p { font-size: .88rem; color: var(--text-muted); max-width: 280px; line-height: 1.7; }

.footer-col h4 {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .55rem; }
.footer-col ul a { font-size: .88rem; color: var(--text-dim); transition: color .2s; }
.footer-col ul a:hover { color: var(--purple-light); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.footer-bottom p { font-size: .82rem; color: var(--text-muted); }
.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--purple-light); }

/* ============================
   Hall of Fame (full page)
   ============================ */
.page-hero {
  padding: calc(var(--nav-h) + 3.5rem) 0 4rem;
  background: var(--bg-1);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 80% at 50% 100%, rgba(139,92,246,.1) 0%, transparent 70%);
}

.filter-tabs {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.filter-btn {
  padding: .4rem .9rem;
  border-radius: var(--r-sm);
  font-size: .85rem;
  font-weight: 500;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  cursor: pointer;
  transition: all .2s;
  font-family: var(--font-sans);
}
.filter-btn:hover,
.filter-btn.active {
  background: rgba(139,92,246,.15);
  border-color: var(--border-hover);
  color: var(--purple-light);
}

.hof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.hof-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.75rem;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.hof-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-purple); transform: translateY(-2px); }
.hof-card.hidden { display: none; }

.hof-card-top  { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.hof-company   { font-weight: 700; font-size: 1.05rem; }
.hof-year      { font-family: var(--font-mono); font-size: .72rem; color: var(--text-muted); margin-bottom: 1rem; }
.hof-finding   { font-size: .88rem; color: var(--text-dim); line-height: 1.6; margin-bottom: 1.1rem; }
.hof-meta      { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.hof-cvss      { font-family: var(--font-mono); font-size: .75rem; color: var(--text-muted); }

/* ============================
   Scroll animations
   ============================ */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-up.visible { opacity: 1; transform: none; }

/* Stagger children */
.stagger > * { transition-delay: calc(var(--i, 0) * 80ms); }

/* ============================
   Responsive
   ============================ */
@media (max-width: 960px) {
  #about .container { grid-template-columns: 1fr; gap: 3rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  section { padding: 4rem 0; }
  .container { padding: 0 1.25rem; }

  .nav-links { display: none; flex-direction: column; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(5,5,13,.97);
    backdrop-filter: blur(18px);
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    gap: .25rem;
  }

  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hof-header { flex-direction: column; align-items: flex-start; }
}
