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

:root{
  --bg:#04070d;
  --border:rgba(248,81,73,0.12);
  --border-subtle:rgba(255,255,255,0.05);
  --dim:#3d4f63;
  --muted:#6b7f96;
  --text:#9aafc4;
  --bright:#dde8f4;
  --red:#f85149;
  --red-lo:rgba(248,81,73,0.08);
  --red-glow:rgba(248,81,73,0.25);
  --blue:#79c0ff;
  --mono:'Share Tech Mono',monospace;
  --sans:'Space Grotesk',sans-serif;
  --body:'Inter',sans-serif;
  --max:720px;
  --pad:2rem;
  --nav-h:56px;
}

html,body{height:100%;overflow:hidden}

html[data-theme="day"]{
  --bg:#f4f7fb;
  --border:rgba(15,23,42,0.18);
  --dim:#4b5563;
  --muted:#374151;
  --text:#1f2937;
  --bright:#020617;
  --red:#9f1d16;
  --red-lo:rgba(159,29,22,0.08);
  --red-glow:rgba(159,29,22,0.22);
  --blue:#0f4eb8;
}
html[data-theme="night"]{color-scheme:dark}
html[data-theme="day"]{color-scheme:light}
html[data-theme="day"] #bg-canvas{opacity:.22}
html[data-theme="day"] nav::before{
  content:'';position:absolute;inset:0;
  background:linear-gradient(to bottom,rgba(244,247,251,.85),rgba(244,247,251,0));
  pointer-events:none;z-index:-1;
}

body{
  background:var(--bg);
  color:var(--text);
  font-family:var(--body);
  overflow:hidden;
  line-height:1.6;
  transition:background .3s,color .3s;
  height:100dvh;
  display:flex;
  flex-direction:column;
}

/* ── CANVAS ── */
#bg-canvas{position:fixed;inset:0;z-index:0;pointer-events:none}

/* ── NAV ── */
nav{
  position:fixed;top:0;left:0;right:0;z-index:200;
  height:var(--nav-h);
  border-bottom:1px solid transparent;
}
.nav-inner{
  max-width:1120px;margin:0 auto;
  display:flex;align-items:center;
  height:100%;padding:0 var(--pad);
  gap:2rem;
}
.nav-logo{
  font-family:var(--mono);font-size:.76rem;
  color:var(--red);letter-spacing:.08em;
  display:flex;align-items:center;gap:.4rem;
  flex-shrink:0;
}
.blink{animation:blink 1.1s step-end infinite}
@keyframes blink{50%{opacity:0}}
.nav-links{
  display:flex;gap:1.75rem;list-style:none;
  margin-left:auto;
}
.nav-links a{
  font-family:var(--mono);font-size:.66rem;
  color:var(--dim);text-decoration:none;
  letter-spacing:.1em;text-transform:uppercase;
  transition:color .2s;
}
.nav-links a:hover{color:var(--red)}
.theme-toggle{
  font-family:var(--mono);font-size:.66rem;
  color:var(--dim);background:transparent;
  border:1px solid var(--border);
  padding:.38rem .6rem;
  letter-spacing:.08em;text-transform:uppercase;
  cursor:pointer;
  transition:color .2s,border-color .2s,background .2s;
  white-space:nowrap;
}
.theme-toggle:hover{color:var(--red);border-color:rgba(248,81,73,.35);background:var(--red-lo)}

/* ── HERO ── */
#hero{
  position:relative;z-index:1;
  flex:1;min-height:0;
  display:flex;align-items:center;justify-content:center;
  padding:var(--nav-h) var(--pad) 0;
}
.hero-wrap{
  width:100%;max-width:var(--max);
  display:flex;flex-direction:column;
  gap:0;
}

.hero-eyebrow{
  font-family:var(--mono);font-size:.62rem;
  color:var(--red);letter-spacing:.18em;text-transform:uppercase;
  display:flex;align-items:center;gap:.7rem;
  margin-bottom:.9rem;
  opacity:0;animation:rise .6s .15s forwards;
}
.hero-eyebrow::after{content:'';flex-shrink:0;width:36px;height:1px;background:var(--red)}

h1.hero-name{
  font-family:var(--sans);
  font-size:clamp(2.6rem,8vw,5rem);
  font-weight:700;color:var(--bright);
  line-height:1.0;letter-spacing:-.03em;
  margin-bottom:.35rem;
  opacity:0;animation:rise .6s .28s forwards;
}
h1.hero-name em{
  font-style:normal;color:var(--red);
  position:relative;display:inline-block;
}
h1.hero-name em::after{
  content:'';position:absolute;
  bottom:-2px;left:0;right:0;height:2px;
  background:var(--red);
  box-shadow:0 0 8px var(--red-glow);
}

.hero-sub{
  font-family:var(--mono);font-size:.73rem;
  color:var(--muted);letter-spacing:.03em;
  margin-bottom:.9rem;
  opacity:0;animation:rise .6s .4s forwards;
}

.hero-bio{
  font-size:.9rem;color:var(--text);
  line-height:1.7;font-weight:300;
  margin-bottom:1.1rem;
  opacity:0;animation:rise .6s .52s forwards;
}

.cert-strip{
  display:flex;flex-wrap:wrap;gap:.4rem;
  opacity:0;animation:rise .6s .64s forwards;
}
.cert-badge{
  font-family:var(--mono);font-size:.58rem;
  letter-spacing:.12em;text-transform:uppercase;
  padding:.22rem .6rem;
  border:1px solid rgba(248,81,73,.28);
  color:var(--red);background:var(--red-lo);
}

/* ── GLITCH ── */
.glitch{position:relative;display:inline-block;overflow:hidden}
.glitch:hover::before,.glitch:hover::after{
  content:attr(data-g);
  position:absolute;inset:0;
  color:var(--bright);
  font-family:inherit;font-size:inherit;font-weight:inherit;
}
.glitch:hover::before{left:2px;text-shadow:-2px 0 var(--red);animation:g1 .25s step-end infinite alternate}
.glitch:hover::after{left:-2px;text-shadow:2px 0 var(--blue);animation:g2 .35s step-end infinite alternate}
@keyframes g1{to{clip-path:inset(40% 0 55% 0)}}
@keyframes g2{to{clip-path:inset(12% 0 75% 0)}}

/* ── FOOTER ── */
footer{
  position:relative;z-index:1;
  flex-shrink:0;
  border-top:1px solid var(--border);
}
.footer-inner{
  max-width:1120px;margin:0 auto;
  padding:1rem var(--pad);
  display:flex;align-items:center;
  justify-content:space-between;
  gap:1rem;
  flex-wrap:wrap;
}
.f-copy,.f-note{
  font-family:var(--mono);font-size:.6rem;
  color:var(--dim);letter-spacing:.05em;
}
.f-note em{font-style:normal;color:var(--red)}
.social-links{display:flex;gap:.75rem;align-items:center}
.social-icon{
  color:var(--dim);
  display:grid;place-items:center;
  width:30px;height:30px;
  border:1px solid var(--border);
  transition:color .2s,border-color .2s,background .2s;
  text-decoration:none;
}
.social-icon:hover{color:var(--red);border-color:rgba(248,81,73,.35);background:var(--red-lo)}

/* ── ANIMATIONS ── */
@keyframes rise{
  from{opacity:0;transform:translateY(16px)}
  to{opacity:1;transform:none}
}

/* ── RESPONSIVE ── */
@media(max-width:600px){
  :root{--pad:1.25rem}
  .nav-links{display:none}
  .hero-eyebrow{font-size:.56rem;letter-spacing:.12em}
  .hero-bio{font-size:.85rem}
  .footer-inner{justify-content:center;text-align:center}
  .f-note{display:none}
}

@media(max-height:600px){
  .hero-eyebrow{margin-bottom:.5rem}
  h1.hero-name{font-size:clamp(2rem,6vw,3.5rem);margin-bottom:.25rem}
  .hero-sub{margin-bottom:.5rem}
  .hero-bio{margin-bottom:.6rem}
}
