/* ============================================================
   0x15 — Web3 Security Researcher
   Palette derived from avatar: near-black navy, electric cyan,
   ice-blue glow, subtle magenta neon.
   ============================================================ */

:root {
  --bg: #05080f;
  --bg-raised: #0a0f1a;
  --bg-card: #0b111e;
  --border: rgba(94, 226, 255, 0.12);
  --border-hover: rgba(94, 226, 255, 0.45);
  --text: #e6edf7;
  --text-muted: #8a94a8;
  --cyan: #5ee2ff;
  --cyan-dim: #38b6d8;
  --ice: #bfe9ff;
  --magenta: #ff5c8a;
  --glow-cyan: rgba(94, 226, 255, 0.35);
  --font-body: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html { scroll-behavior: smooth; }

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

.mono { font-family: var(--font-mono); }
.muted { color: var(--text-muted); }
.accent { color: var(--cyan); }

.accent-gradient {
  background: linear-gradient(100deg, var(--cyan) 0%, var(--ice) 55%, var(--cyan-dim) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.container {
  width: min(1100px, 92vw);
  margin-inline: auto;
}

/* ---------- Background FX ---------- */

.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(94, 226, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 226, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 75%);
}

.bg-glow {
  position: absolute;
  top: -30vh;
  left: 50%;
  transform: translateX(-50%);
  width: 90vw;
  height: 70vh;
  background: radial-gradient(ellipse at center, rgba(56, 132, 200, 0.16) 0%, transparent 65%);
}

.neon-strip {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  opacity: 0.35;
}

.strip-left {
  left: 4vw;
  background: linear-gradient(180deg, transparent 0%, var(--magenta) 35%, transparent 80%);
}

.strip-right {
  right: 4vw;
  background: linear-gradient(180deg, transparent 5%, var(--cyan) 45%, transparent 90%);
}

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 8, 15, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
  text-shadow: 0 0 18px var(--glow-cyan);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--cyan); }

.nav-cta {
  padding: 0.4rem 1rem;
  border: 1px solid var(--border-hover);
  border-radius: 6px;
  color: var(--cyan) !important;
  font-size: 0.85rem !important;
  transition: box-shadow 0.2s, background 0.2s;
}

.nav-cta:hover {
  background: rgba(94, 226, 255, 0.08);
  box-shadow: 0 0 20px var(--glow-cyan);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--cyan);
  transition: transform 0.25s, opacity 0.25s;
}

/* ---------- Hero ---------- */

.hero {
  padding: clamp(4rem, 10vh, 7rem) 0 4rem;
  text-align: center;
}

.hero-eyebrow {
  color: var(--cyan-dim);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  margin-bottom: 1.25rem;
}

.hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.hero-handle {
  font-family: var(--font-mono);
  font-size: clamp(3.5rem, 10vw, 6.5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--ice);
  text-shadow:
    0 0 12px var(--glow-cyan),
    0 0 45px rgba(94, 226, 255, 0.25),
    0 0 90px rgba(94, 226, 255, 0.15);
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
}

.hero-desc {
  max-width: 620px;
  margin: 1.75rem auto 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.25rem;
  flex-wrap: wrap;
}

/* Glitch effect on hover */
.glitch { position: relative; display: inline-block; }

.glitch::before,
.glitch::after {
  /* empty alt text keeps screen readers from announcing the handle 3×;
     plain fallback first for browsers without the alt syntax */
  content: attr(data-text);
  content: attr(data-text) / "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.glitch:hover::before {
  opacity: 0.8;
  color: var(--magenta);
  animation: glitch-shift 0.35s steps(2) infinite;
}

.glitch:hover::after {
  opacity: 0.8;
  color: var(--cyan);
  animation: glitch-shift 0.35s steps(2) infinite reverse;
}

@keyframes glitch-shift {
  0%   { transform: translate(-3px, 1px); clip-path: inset(20% 0 55% 0); }
  50%  { transform: translate(3px, -1px); clip-path: inset(60% 0 15% 0); }
  100% { transform: translate(-2px, 2px); clip-path: inset(35% 0 40% 0); }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.85rem 1.9rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.25s, background 0.25s;
}

.btn-primary {
  background: linear-gradient(120deg, var(--cyan) 0%, var(--cyan-dim) 100%);
  color: #04121a;
  box-shadow: 0 0 24px var(--glow-cyan);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(94, 226, 255, 0.55);
}

.btn-ghost {
  border: 1px solid var(--border-hover);
  color: var(--cyan);
  background: transparent;
}

.btn-ghost:hover {
  background: rgba(94, 226, 255, 0.08);
  box-shadow: 0 0 20px var(--glow-cyan);
  transform: translateY(-2px);
}

/* ---------- Stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 4rem;
}

.stat {
  background: var(--bg-raised);
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.stat-num {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  color: var(--cyan);
  text-shadow: 0 0 20px var(--glow-cyan);
  line-height: 1;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.langs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
}

.langs .dot { color: var(--cyan-dim); }

/* ---------- Sections ---------- */

.section { padding: 5.5rem 0 1rem; }

.section-head { margin-bottom: 2.5rem; }

.section-eyebrow {
  color: var(--cyan-dim);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
}

.section-head h2,
.cta h2 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 600;
  line-height: 1.2;
}

.section-foot {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}

/* ---------- Cards ---------- */

.card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 34px rgba(94, 226, 255, 0.12);
  transform: translateY(-3px);
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.card-org {
  color: var(--cyan-dim);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.8rem;
}

.card-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
}

.card-featured {
  margin-bottom: 1.5rem;
  padding: 2.25rem;
  background:
    radial-gradient(ellipse 60% 120% at 85% -20%, rgba(94, 226, 255, 0.09) 0%, transparent 60%),
    var(--bg-card);
  border-color: rgba(94, 226, 255, 0.25);
}

.card-featured h3 { font-size: 1.6rem; }

.card-badge {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--magenta);
  border: 1px solid rgba(255, 92, 138, 0.4);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  margin-bottom: 1.1rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ice);
  background: rgba(94, 226, 255, 0.07);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
}

.tag-hot {
  color: var(--magenta);
  background: rgba(255, 92, 138, 0.08);
  border-color: rgba(255, 92, 138, 0.3);
}

/* ---------- Track Record table ---------- */

.table-wrap {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow-x: auto;
  background: var(--bg-card);
}

.record-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.record-table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan-dim);
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.record-table td {
  padding: 0.85rem 1.25rem;
  font-size: 0.92rem;
  color: var(--text);
  border-bottom: 1px solid rgba(94, 226, 255, 0.05);
}

.record-table td:first-child { color: var(--text-muted); font-size: 0.82rem; }
.record-table td:nth-child(3) { color: var(--text-muted); }
.record-table td:last-child { color: var(--text-muted); font-size: 0.88rem; }

.record-table tbody tr { transition: background 0.15s; }
.record-table tbody tr:hover { background: rgba(94, 226, 255, 0.04); }
.record-table tbody tr:last-child td { border-bottom: none; }

.rank-top {
  color: var(--cyan) !important;
  text-shadow: 0 0 12px var(--glow-cyan);
  font-weight: 600;
}

.record-table tr.extra { display: none; }
.record-table.expanded tr.extra { display: table-row; }

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 3.5rem;
  align-items: center;
}

.about-body p { color: var(--text-muted); margin-bottom: 1.1rem; }
.about-body strong { color: var(--text); }

.avatar-frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(94, 226, 255, 0.3);
  box-shadow:
    0 0 40px rgba(94, 226, 255, 0.15),
    0 0 120px rgba(94, 226, 255, 0.07);
}

.avatar-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.avatar-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(5, 8, 15, 0.55) 100%);
}

.platforms { margin-top: 1.75rem; }

.platforms-label {
  color: var(--cyan-dim);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem !important;
}

.platform-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.platform-badges a {
  font-size: 0.82rem;
  color: var(--ice);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.95rem;
  background: rgba(94, 226, 255, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s, color 0.2s;
}

.platform-badges a:hover {
  border-color: var(--border-hover);
  color: var(--cyan);
  box-shadow: 0 0 16px rgba(94, 226, 255, 0.15);
}

/* ---------- CTA ---------- */

.cta {
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: clamp(2.5rem, 6vw, 4.5rem) 2rem;
  background:
    radial-gradient(ellipse 70% 130% at 50% -30%, rgba(94, 226, 255, 0.1) 0%, transparent 60%),
    var(--bg-card);
  margin-bottom: 4rem;
}

.cta p {
  max-width: 540px;
  margin: 1.25rem auto 0;
  color: var(--text-muted);
}

.cta .hero-actions { margin-top: 2rem; }

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links { display: flex; gap: 1.5rem; }

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--cyan); }

/* ---------- Reveal animations ---------- */

/* Hidden state only applies when JS is running (html.js set inline in <head>),
   so content stays visible if scripts are blocked or fail to load. */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .glitch:hover::before, .glitch:hover::after { animation: none; opacity: 0; }
}

/* Keyboard focus visibility */
a:focus-visible,
button:focus-visible,
.table-wrap:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-media { max-width: 300px; margin-inline: auto; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }

  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: center;
    gap: 0;
    background: rgba(5, 8, 15, 0.97);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    /* visibility keeps hidden links out of the keyboard tab order */
    visibility: hidden;
    transition: max-height 0.3s ease, visibility 0.3s;
  }

  .nav-links.open {
    /* rem-based cap grows with user font-size settings */
    max-height: min(30rem, calc(100vh - 64px));
    overflow-y: auto;
    visibility: visible;
  }

  .nav-links li { width: 100%; text-align: center; }
  .nav-links a { display: block; padding: 1rem; }
  .nav-cta { border: none; }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .stats { grid-template-columns: repeat(2, 1fr); }
  .cards-grid { grid-template-columns: 1fr; }
  .card-featured { padding: 1.75rem; }
  .neon-strip { display: none; }
}
