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

:root{
  --bg:#050505;
  --bg2:#0a0a0a;
  --panel:#111;
  --panel2:#0d0d0d;
  --red:#ff2a2a;
  --red2:#ff4d4d;
  --text:#f5f5f5;
  --muted:#b9b9b9;
  --line:rgba(255,50,50,.22);
  --glow:0 0 18px rgba(255,30,30,.28),0 0 42px rgba(255,0,0,.14);
  --max:1280px;
}

html{scroll-behavior:smooth}

body{
  font-family:Arial,Helvetica,sans-serif;
  background:
    radial-gradient(circle at 50% 14%, rgba(255,0,0,.08), transparent 22%),
    radial-gradient(circle at 50% 40%, rgba(255,0,0,.05), transparent 30%),
    linear-gradient(180deg,#020202 0%,#080808 45%,#040404 100%);
  color:var(--text);
  overflow-x:hidden;
  min-height:100vh;
}

a{color:inherit;text-decoration:none}
img{display:block;max-width:100%}

.noise,.scanlines,.bg-grid,.bg-vignette{
  position:fixed;
  inset:0;
  pointer-events:none;
}

.bg-grid{
  z-index:0;
  background:
    linear-gradient(rgba(255,0,0,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,0,0,.07) 1px, transparent 1px);
  background-size:48px 48px;
  opacity:.35;
  animation:gridMove 20s linear infinite;
}

.noise{
  z-index:1;
  opacity:.06;
  background-image:
    radial-gradient(rgba(255,255,255,.18) 0.6px, transparent 0.6px),
    radial-gradient(rgba(255,0,0,.1) 0.6px, transparent 0.6px);
  background-size:7px 7px, 9px 9px;
  background-position:0 0, 2px 3px;
}

.scanlines{
  z-index:2;
  opacity:.09;
  background:repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,.03) 0px,
    rgba(255,255,255,.03) 1px,
    transparent 2px,
    transparent 4px
  );
}

.bg-vignette{
  z-index:3;
  box-shadow:inset 0 0 220px rgba(0,0,0,.92), inset 0 0 80px rgba(255,0,0,.05);
}

.topbar{
  position:sticky;
  top:0;
  z-index:50;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:18px 24px;
  background:rgba(0,0,0,.78);
  border-bottom:1px solid var(--line);
  backdrop-filter:blur(8px);
}

.brand{
  display:flex;
  flex-direction:column;
  line-height:1;
}

.brand-mark{
  font-size:2rem;
  font-weight:900;
  letter-spacing:.22em;
  color:var(--red);
  text-shadow:0 0 10px rgba(255,40,40,.9), 0 0 24px rgba(255,0,0,.35);
}

.brand-sub{
  margin-top:5px;
  font-size:.66rem;
  text-transform:uppercase;
  letter-spacing:.35em;
  color:#b7a7a7;
}

.nav{
  display:flex;
  align-items:center;
  gap:24px;
  flex-wrap:wrap;
  justify-content:center;
}

.nav a{
  position:relative;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-size:.92rem;
  color:#e4e4e4;
}

.nav a::after{
  content:"";
  position:absolute;
  left:0;
  bottom:-6px;
  width:0;
  height:1px;
  background:var(--red);
  box-shadow:0 0 10px var(--red);
  transition:width .25s ease;
}

.nav a:hover::after{width:100%}

.login-btn,
.cta,
.submit-btn{
  border:none;
  color:#fff;
  cursor:pointer;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.12em;
}

.login-btn{
  padding:12px 18px;
  background:linear-gradient(180deg, rgba(255,40,40,.22), rgba(45,0,0,.7));
  border:1px solid rgba(255,80,80,.8);
  box-shadow:var(--glow);
}

main,
.hero,
.terminal-band,
.panel-section,
.split-section,
.bottom-banner{
  position:relative;
  z-index:5;
}

.hero,
.terminal-band,
.panel-section,
.split-section,
.bottom-banner{
  width:min(calc(100% - 36px), var(--max));
  margin-inline:auto;
}

.hero{
  min-height:calc(100vh - 88px);
  display:grid;
  grid-template-columns:1.05fr .95fr;
  align-items:center;
  gap:24px;
  padding:50px 0 28px;
  overflow:hidden;
}

.hero-copy{
  position:relative;
  z-index:8;
  max-width:700px;
}

.eyebrow{
  margin-bottom:16px;
  color:#ff9f9f;
  font-size:.82rem;
  letter-spacing:.38em;
  text-transform:uppercase;
}

.hero h1{
  font-size:clamp(2.8rem, 6vw, 5.7rem);
  line-height:.92;
  letter-spacing:.12em;
}

.glitch{
  position:relative;
  display:inline-block;
  color:#fff;
  text-shadow:0 0 16px rgba(255,255,255,.08), 0 0 28px rgba(255,40,40,.28), 0 0 58px rgba(255,0,0,.2);
}

.glitch::before,
.glitch::after{
  content:attr(data-text);
  position:absolute;
  inset:0;
  pointer-events:none;
}

.glitch::before{
  transform:translate(2px,-1px);
  color:rgba(255,40,40,.55);
  clip-path:polygon(0 0,100% 0,100% 45%,0 38%);
}

.glitch::after{
  transform:translate(-2px,1px);
  color:rgba(255,255,255,.25);
  clip-path:polygon(0 58%,100% 52%,100% 100%,0 100%);
}

.hero-text{
  margin-top:22px;
  color:#d0d0d0;
  line-height:1.75;
  max-width:640px;
}

.hero-actions{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  margin-top:30px;
}

.cta{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:180px;
  padding:15px 22px;
  border:1px solid rgba(255,75,75,.78);
}

.cta.primary{
  background:linear-gradient(180deg, rgba(255,30,30,.24), rgba(35,0,0,.72));
  box-shadow:var(--glow);
}

.cta.ghost{
  background:rgba(255,255,255,.02);
}

.hero-visual{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:560px;
  z-index:7;
}

.hero-visual::before{
  content:"";
  position:absolute;
  width:760px;
  height:760px;
  border-radius:50%;
  background:radial-gradient(circle,
    rgba(255,0,0,.32) 0%,
    rgba(255,0,0,.12) 28%,
    rgba(0,0,0,.86) 68%
  );
  filter:blur(70px);
  z-index:1;
}

.hero-visual::after{
  content:"";
  position:absolute;
  width:420px;
  height:420px;
  border-radius:50%;
  background:radial-gradient(circle,
    rgba(255,0,0,.88) 0%,
    rgba(255,0,0,.18) 42%,
    transparent 72%
  );
  filter:blur(38px);
  z-index:2;
}

.image-frame{
  position:relative;
  width:min(100%, 520px);
  aspect-ratio:1/1;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:4;
}

.image-glow{
  position:absolute;
  inset:12%;
  border-radius:50%;
  background:radial-gradient(circle, rgba(255,50,50,.28), transparent 68%);
  filter:blur(26px);
  z-index:1;
}

.hero-img{
  position:relative;
  z-index:3;
  width:min(100%, 470px);
  object-fit:contain;
  mix-blend-mode:screen;
  filter:
    brightness(1.18)
    contrast(1.22)
    saturate(1.08)
    drop-shadow(0 0 26px rgba(255,40,40,.65))
    drop-shadow(0 0 86px rgba(255,0,0,.28));
  animation:floatY 4.5s ease-in-out infinite;
}

.hero-triangle{
  position:absolute;
  left:56%;
  top:50%;
  transform:translate(-50%,-50%);
  width:0;
  height:0;
  border-left:270px solid transparent;
  border-right:270px solid transparent;
  border-bottom:470px solid rgba(255,20,20,.10);
  filter:blur(8px);
  z-index:1;
}

.hero-triangle.core{
  border-left:220px solid transparent;
  border-right:220px solid transparent;
  border-bottom:390px solid rgba(255,35,35,.18);
  filter:blur(34px);
  z-index:2;
}

.hero-camera{
  position:absolute;
  top:12%;
  width:104px;
  height:58px;
  border-radius:10px;
  background:linear-gradient(180deg, #1a1a1a, #0d0d0d);
  border:1px solid rgba(255,70,70,.2);
  box-shadow:var(--glow);
  z-index:3;
}

.hero-camera::before{
  content:"";
  position:absolute;
  top:-14px;
  left:18px;
  width:44px;
  height:14px;
  border-radius:8px 8px 0 0;
  background:#151515;
  border:1px solid rgba(255,70,70,.16);
  border-bottom:none;
}

.camera-left{left:6%;transform:rotate(-14deg)}
.camera-right{right:6%;transform:rotate(14deg)}

.camera-lens{
  position:absolute;
  right:12px;
  top:50%;
  transform:translateY(-50%);
  width:28px;
  height:28px;
  border-radius:50%;
  background:radial-gradient(circle at 30% 30%, rgba(255,255,255,.12), rgba(255,30,30,.6) 40%, #090909 68%);
  box-shadow:0 0 14px rgba(255,40,40,.42);
}

.hero-status{
  grid-column:1 / -1;
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:16px;
  margin-top:4px;
}

.status-card{
  padding:16px 18px;
  background:linear-gradient(180deg, rgba(20,20,20,.92), rgba(10,10,10,.96));
  border:1px solid rgba(255,55,55,.18);
  box-shadow:0 0 22px rgba(255,20,20,.08);
}

.status-label{
  display:block;
  color:#aaaaaa;
  font-size:.72rem;
  letter-spacing:.24em;
  text-transform:uppercase;
}

.status-value{
  display:block;
  margin-top:10px;
  font-size:.95rem;
  letter-spacing:.08em;
}

.pulse{
  color:#ff8c8c;
  text-shadow:0 0 12px rgba(255,60,60,.55);
  animation:pulse 1.8s infinite;
}

.terminal-band{margin-top:8px}

.terminal-shell,
.panel-card,
.split-panel,
.about-box{
  background:linear-gradient(180deg, rgba(18,18,18,.94), rgba(9,9,9,.98));
  border:1px solid rgba(255,55,55,.18);
  box-shadow:0 0 30px rgba(255,0,0,.08), inset 0 0 0 1px rgba(255,255,255,.02);
}

.terminal-shell{
  border-radius:18px;
  overflow:hidden;
}

.terminal-top{
  display:flex;
  align-items:center;
  gap:8px;
  padding:14px 18px;
  border-bottom:1px solid rgba(255,55,55,.16);
  background:linear-gradient(180deg, rgba(255,30,30,.07), rgba(0,0,0,.1));
}

.term-dot{
  width:10px;
  height:10px;
  border-radius:50%;
  background:rgba(255,80,80,.7);
  box-shadow:0 0 10px rgba(255,40,40,.4);
}

.term-title{
  margin-left:8px;
  font-size:.86rem;
  letter-spacing:.12em;
  color:#d8b8b8;
}

.terminal-body{
  padding:18px 22px 22px;
  font-family:"Courier New", monospace;
  color:#ffd0d0;
  line-height:1.9;
}

.prompt{
  color:var(--red);
  margin-right:8px;
}

.typing{
  white-space:nowrap;
  overflow:hidden;
  border-right:1px solid rgba(255,90,90,.55);
  width:0;
  animation:typing 3.8s steps(28,end) 1s forwards, caret 1s step-end infinite;
}

.panel-section{padding-top:88px}

.section-head{
  margin-bottom:24px;
}

.section-head h2{
  font-size:clamp(1.9rem, 4vw, 3rem);
  letter-spacing:.04em;
}

.project-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:22px;
}

.panel-card{
  position:relative;
  min-height:250px;
  padding:24px;
  border-radius:18px;
  overflow:hidden;
  transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.panel-card::before{
  content:"";
  position:absolute;
  inset:-20%;
  background:linear-gradient(135deg, transparent 30%, rgba(255,40,40,.08) 50%, transparent 70%);
  transform:translateX(-60%);
  transition:transform .5s ease;
}

.panel-card:hover::before{transform:translateX(18%)}

.panel-card:hover{
  border-color:rgba(255,85,85,.36);
  box-shadow:0 0 34px rgba(255,20,20,.14);
}

.card-tag{
  display:inline-block;
  color:#ff9f9f;
  font-size:.72rem;
  letter-spacing:.24em;
  text-transform:uppercase;
}

.panel-card h3{
  margin:18px 0 12px;
  font-size:1.5rem;
}

.panel-card p{
  color:#c9c9c9;
  line-height:1.72;
  margin-bottom:24px;
}

.card-link{
  text-transform:uppercase;
  letter-spacing:.16em;
  font-size:.84rem;
  border-bottom:1px solid rgba(255,70,70,.62);
  padding-bottom:4px;
}

.split-section{
  display:grid;
  grid-template-columns:1.4fr .8fr;
  gap:22px;
  padding-top:88px;
}

.split-panel{
  padding:24px;
  border-radius:18px;
}

.research-list{
  display:grid;
  gap:18px;
}

.research-item{
  display:grid;
  grid-template-columns:60px 1fr;
  gap:14px;
  align-items:start;
  padding:14px 0;
  border-top:1px solid rgba(255,255,255,.05);
}

.research-item:first-child{border-top:none}

.index{
  width:48px;
  height:48px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:var(--red);
  border:1px solid rgba(255,65,65,.34);
  box-shadow:0 0 16px rgba(255,30,30,.14);
}

.research-item h3{
  margin-bottom:8px;
  font-size:1.14rem;
}

.research-item p{
  color:#c9c9c9;
  line-height:1.7;
}

.mini-terminal{
  height:100%;
  border:1px solid rgba(255,55,55,.16);
  background:linear-gradient(180deg,#0d0d0d,#090909);
}

.mini-header{
  padding:12px 14px;
  border-bottom:1px solid rgba(255,55,55,.12);
  color:#efb8b8;
  font-family:"Courier New", monospace;
}

.mini-body{
  padding:16px 14px;
  font-family:"Courier New", monospace;
  color:#ffd0d0;
  line-height:1.85;
}

.about-section{
  padding-bottom:90px;
}

.about-box{
  padding:28px;
  border-radius:18px;
}

.about-box p{
  color:#d2d2d2;
  line-height:1.88;
  font-size:1.02rem;
}

.bottom-banner{
  margin-bottom:34px;
  border:1px solid rgba(255,55,55,.28);
  background:
    linear-gradient(180deg, rgba(30,0,0,.68), rgba(7,7,7,.96)),
    radial-gradient(circle at 50% 50%, rgba(255,30,30,.18), transparent 48%);
  box-shadow:0 0 36px rgba(255,10,10,.08), inset 0 0 26px rgba(255,20,20,.05);
  overflow:hidden;
}

.bottom-banner::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(90deg, transparent, rgba(255,60,60,.07), transparent);
  transform:translateX(-100%);
  animation:bannerSweep 4.8s linear infinite;
}

.banner-content{
  position:relative;
  z-index:1;
  padding:34px 24px;
  text-align:center;
}

.banner-kicker{
  display:block;
  color:#ff9b9b;
  text-transform:uppercase;
  letter-spacing:.3em;
  font-size:.74rem;
}

.banner-content p{
  margin:12px 0 10px;
  font-size:1.2rem;
}

.github-link{
  display:inline-block;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.12em;
  padding-bottom:4px;
  border-bottom:1px solid rgba(255,80,80,.75);
  text-shadow:0 0 10px rgba(255,40,40,.2);
}

.modal{
  position:fixed;
  inset:0;
  z-index:100;
  display:none;
  align-items:center;
  justify-content:center;
}

.modal.open{display:flex}

.modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.78);
  backdrop-filter:blur(6px);
}

.modal-panel{
  position:relative;
  z-index:1;
  width:min(92vw, 430px);
  padding:24px;
  border-radius:18px;
  background:linear-gradient(180deg, rgba(20,20,20,.98), rgba(10,10,10,.98));
  border:1px solid rgba(255,60,60,.26);
  box-shadow:0 0 38px rgba(255,10,10,.16);
}

.modal-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.modal-top h2{
  font-size:1.35rem;
  letter-spacing:.14em;
}

.close-btn{
  border:none;
  background:transparent;
  color:#fff;
  font-size:1.8rem;
  cursor:pointer;
}

.modal-copy{
  color:#bdbdbd;
  line-height:1.7;
  margin:10px 0 18px;
}

.login-form{
  display:grid;
  gap:14px;
}

.login-form label{
  display:grid;
  gap:8px;
}

.login-form span{
  color:#ffd0d0;
  font-size:.84rem;
  text-transform:uppercase;
  letter-spacing:.16em;
}

.login-form input{
  width:100%;
  padding:14px;
  background:#0a0a0a;
  color:#fff;
  border:1px solid rgba(255,70,70,.22);
  outline:none;
}

.login-form input:focus{
  border-color:rgba(255,90,90,.72);
  box-shadow:0 0 0 3px rgba(255,50,50,.08);
}

.submit-btn{
  padding:15px 16px;
  border:1px solid rgba(255,85,85,.8);
  background:linear-gradient(180deg, rgba(255,30,30,.25), rgba(30,0,0,.74));
  box-shadow:var(--glow);
}

.login-hint{
  color:#9d9d9d;
  font-size:.85rem;
}

.login-message{
  min-height:1.2em;
  color:#ffd2d2;
}

@keyframes floatY{
  0%,100%{transform:translateY(0)}
  50%{transform:translateY(-10px)}
}

@keyframes pulse{
  0%,100%{opacity:1}
  50%{opacity:.65}
}

@keyframes gridMove{
  from{transform:translate3d(0,0,0)}
  to{transform:translate3d(48px,48px,0)}
}

@keyframes typing{
  from{width:0}
  to{width:100%}
}

@keyframes caret{
  50%{border-color:transparent}
}

@keyframes bannerSweep{
  to{transform:translateX(100%)}
}

@media (max-width:1020px){
  .hero{
    grid-template-columns:1fr;
    text-align:center;
    min-height:auto;
    padding-top:40px;
  }

  .hero-copy{
    margin-inline:auto;
  }

  .hero-text{
    margin-inline:auto;
  }

  .hero-actions{
    justify-content:center;
  }

  .hero-visual{
    min-height:480px;
  }

  .hero-triangle{
    left:50%;
    top:54%;
  }

  .camera-left,.camera-right{
    display:none;
  }

  .hero-status,
  .project-grid,
  .split-section{
    grid-template-columns:1fr;
  }
}

@media (max-width:780px){
  .topbar{
    flex-wrap:wrap;
    justify-content:center;
    padding:16px 18px;
  }

  .nav{
    gap:16px;
  }

  .hero,
  .terminal-band,
  .panel-section,
  .split-section,
  .bottom-banner{
    width:min(calc(100% - 20px), var(--max));
  }

  .hero h1{
    font-size:clamp(2.2rem, 12vw, 4rem);
  }

  .hero-visual{
    min-height:380px;
  }

  .hero-visual::before{
    width:540px;
    height:540px;
  }

  .hero-triangle{
    border-left:170px solid transparent;
    border-right:170px solid transparent;
    border-bottom:300px solid rgba(255,20,20,.10);
  }

  .hero-triangle.core{
    border-left:140px solid transparent;
    border-right:140px solid transparent;
    border-bottom:240px solid rgba(255,35,35,.18);
  }

  .hero-img{
    width:min(100%, 340px);
  }
}