:root{
  --bg-0:#0a0f1c;
  --bg-1:#0e1526;
  --bg-2:#131c33;
  --panel:#101a30;
  --panel-border:#223154;
  --text-hi:#eaf1fb;
  --text-mid:#9fb0cc;
  --text-low:#5e7093;
  --accent-sky:#4fd1ff;
  --accent-green:#3ee89b;
  --accent-amber:#ffb454;
  --accent-violet:#a78bfa;
  --mono: 'JetBrains Mono', monospace;
  --disp: 'Space Grotesk', sans-serif;
  --body: 'Inter', sans-serif;
}

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

html{scroll-behavior:smooth;}

body{
  background:
    radial-gradient(circle at 15% 0%, rgba(79,209,255,0.10), transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(167,139,250,0.08), transparent 45%),
    var(--bg-0);
  color:var(--text-hi);
  font-family:var(--body);
  line-height:1.6;
  overflow-x:hidden;
}

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

::selection{background:rgba(79,209,255,0.3);color:#fff;}

/* Scanline / grid texture */
.grid-overlay{
  position:fixed;
  inset:0;
  pointer-events:none;
  background-image:
    linear-gradient(rgba(79,209,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,209,255,0.035) 1px, transparent 1px);
  background-size:48px 48px;
  mask-image:radial-gradient(ellipse at 50% 0%, black 0%, transparent 70%);
  z-index:0;
}

.wrap{
  max-width:1100px;
  margin:0 auto;
  padding:0 28px;
  position:relative;
  z-index:1;
}

/* ---------- NAV ---------- */
nav{
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter:blur(14px);
  background:rgba(10,15,28,0.72);
  border-bottom:1px solid rgba(79,209,255,0.12);
}
.nav-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 28px;
  max-width:1100px;
  margin:0 auto;
}
.brand{
  font-family:var(--mono);
  font-size:14px;
  letter-spacing:0.5px;
  color:var(--text-hi);
  display:flex;
  align-items:center;
  gap:8px;
}
.brand .dot{
  width:8px;height:8px;border-radius:50%;
  background:var(--accent-green);
  box-shadow:0 0 8px var(--accent-green);
  animation:pulse 2s infinite ease-in-out;
}
.nav-links{
  display:flex;
  gap:28px;
  font-family:var(--mono);
  font-size:12.5px;
  color:var(--text-mid);
}
.nav-links a{transition:color .2s;}
.nav-links a:hover{color:var(--accent-sky);}
@media (max-width:640px){ .nav-links{display:none;} }

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

/* ---------- HERO ---------- */
header.hero{
  padding:110px 0 90px;
  position:relative;
}
.status-strip{
  font-family:var(--mono);
  font-size:12px;
  color:var(--accent-green);
  display:inline-flex;
  align-items:center;
  gap:8px;
  border:1px solid rgba(62,232,155,0.3);
  background:rgba(62,232,155,0.06);
  padding:6px 14px;
  border-radius:999px;
  margin-bottom:28px;
}
.status-strip .dot{
  width:6px;height:6px;border-radius:50%;background:var(--accent-green);
  box-shadow:0 0 6px var(--accent-green);
}

.hero h1{
  font-family:var(--disp);
  font-weight:700;
  font-size:clamp(2.4rem, 6vw, 4.4rem);
  line-height:1.06;
  letter-spacing:-0.02em;
  color:var(--text-hi);
}
.hero h1 .accent{
  background:linear-gradient(100deg, var(--accent-sky), var(--accent-violet) 70%);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

.hero-sub{
  margin-top:22px;
  max-width:560px;
  color:var(--text-mid);
  font-size:1.05rem;
}

.terminal{
  margin-top:20px;
  font-family:var(--mono);
  font-size:14px;
  color:var(--text-mid);
  display:flex;
  align-items:baseline;
  gap:6px;
}
.terminal .prompt{color:var(--accent-sky);}
.terminal .typed{color:var(--text-hi);}
.terminal .cursor{
  display:inline-block;
  width:8px;height:16px;
  background:var(--accent-sky);
  margin-left:2px;
  animation:blink 1s step-end infinite;
  transform:translateY(2px);
}
@keyframes blink{ 50%{opacity:0;} }

.cta-row{
  display:flex;
  gap:14px;
  margin-top:38px;
  flex-wrap:wrap;
}
.btn{
  font-family:var(--mono);
  font-size:13px;
  padding:12px 22px;
  border-radius:8px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  transition:transform .18s, box-shadow .18s, background .18s;
}
.btn-primary{
  background:linear-gradient(100deg, var(--accent-sky), #2b9fe0);
  color:#04101c;
  font-weight:600;
  box-shadow:0 0 0 1px rgba(79,209,255,0.4), 0 8px 24px -8px rgba(79,209,255,0.5);
}
.btn-primary:hover{ transform:translateY(-2px); box-shadow:0 0 0 1px rgba(79,209,255,0.6), 0 12px 28px -6px rgba(79,209,255,0.65);}
.btn-ghost{
  border:1px solid var(--panel-border);
  color:var(--text-mid);
}
.btn-ghost:hover{ color:var(--text-hi); border-color:var(--accent-sky); transform:translateY(-2px);}

/* ---------- SECTION HEADERS ---------- */
.section{ padding:70px 0; position:relative; }
.section-tag{
  font-family:var(--mono);
  font-size:12px;
  color:var(--accent-sky);
  letter-spacing:1.5px;
  text-transform:uppercase;
  margin-bottom:10px;
}
.section-title{
  font-family:var(--disp);
  font-size:clamp(1.6rem, 3.4vw, 2.3rem);
  font-weight:700;
  color:var(--text-hi);
  margin-bottom:36px;
}

/* ---------- ABOUT ---------- */
.about-grid{
  display:grid;
  grid-template-columns:1.3fr 1fr;
  gap:40px;
  align-items:start;
}
@media (max-width:800px){ .about-grid{grid-template-columns:1fr;} }
.about-grid p{ color:var(--text-mid); margin-bottom:16px; font-size:1rem; }
.about-grid strong{ color:var(--text-hi); font-weight:600; }

.info-card{
  background:var(--panel);
  border:1px solid var(--panel-border);
  border-radius:12px;
  padding:22px 24px;
  font-family:var(--mono);
  font-size:13px;
}
.info-card .row{
  display:flex;
  justify-content:space-between;
  padding:10px 0;
  border-bottom:1px dashed rgba(255,255,255,0.07);
  color:var(--text-mid);
}
.info-card .row:last-child{ border-bottom:none; }
.info-card .row span:last-child{ color:var(--accent-sky); }

/* ---------- SKILLS — service status dashboard ---------- */
.service-panel{
  background:var(--panel);
  border:1px solid var(--panel-border);
  border-radius:14px;
  overflow:hidden;
}
.service-panel-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:16px 22px;
  border-bottom:1px solid var(--panel-border);
  font-family:var(--mono);
  font-size:12px;
  color:var(--text-low);
}
.service-panel-head .lights{ display:flex; gap:6px; }
.service-panel-head .lights span{ width:9px;height:9px;border-radius:50%; }
.l1{background:#ff5f56;} .l2{background:#ffbd2e;} .l3{background:#27c93f;}

.service-grid{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
}
@media (max-width:700px){ .service-grid{grid-template-columns:1fr;} }

.service{
  padding:18px 22px;
  border-bottom:1px solid rgba(255,255,255,0.05);
  border-right:1px solid rgba(255,255,255,0.05);
  display:flex;
  justify-content:space-between;
  align-items:center;
  transition:background .18s;
}
.service:hover{ background:rgba(79,209,255,0.05); }
.service:nth-child(2n){ border-right:none; }

.service-name{
  display:flex;
  align-items:center;
  gap:12px;
  font-family:var(--disp);
  font-weight:600;
  font-size:15px;
  color:var(--text-hi);
}
.service-name .icon{
  width:34px;height:34px;
  border-radius:8px;
  display:flex;align-items:center;justify-content:center;
  font-family:var(--mono);
  font-size:12px;
  font-weight:700;
  flex-shrink:0;
}
.service-meta{
  font-family:var(--mono);
  font-size:11px;
  color:var(--text-low);
  display:flex;
  align-items:center;
  gap:6px;
}
.service-meta .dot{
  width:6px;height:6px;border-radius:50%;
  background:var(--accent-green);
  box-shadow:0 0 6px var(--accent-green);
  animation:pulse 2.4s infinite ease-in-out;
}

/* language strip */
.lang-strip{
  margin-top:26px;
  display:flex;
  gap:14px;
  flex-wrap:wrap;
}
.lang-chip{
  font-family:var(--mono);
  font-size:12.5px;
  color:var(--text-mid);
  border:1px solid var(--panel-border);
  padding:8px 16px;
  border-radius:999px;
  display:flex;
  align-items:center;
  gap:8px;
}
.lang-chip .bar{
  width:60px;height:4px;background:rgba(255,255,255,0.08);
  border-radius:2px;overflow:hidden;
}
.lang-chip .bar i{
  display:block;height:100%;
  background:linear-gradient(90deg, var(--accent-sky), var(--accent-green));
}

/* ---------- CONNECT / CONTACT ---------- */
.connect-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:18px;
}
@media (max-width:800px){ .connect-grid{grid-template-columns:1fr;} }

.connect-card{
  background:var(--panel);
  border:1px solid var(--panel-border);
  border-radius:14px;
  padding:26px;
  position:relative;
  overflow:hidden;
  transition:transform .2s, border-color .2s;
  display:block;
}
.connect-card:hover{
  transform:translateY(-4px);
  border-color:var(--accent-sky);
}
.connect-card .method{
  font-family:var(--mono);
  font-size:11px;
  color:var(--accent-amber);
  text-transform:uppercase;
  letter-spacing:1px;
  margin-bottom:14px;
  display:block;
}
.connect-card .endpoint{
  font-family:var(--disp);
  font-weight:600;
  font-size:1.1rem;
  color:var(--text-hi);
  margin-bottom:6px;
  word-break:break-word;
}
.connect-card .desc{
  font-family:var(--mono);
  font-size:12px;
  color:var(--text-low);
}

/* ---------- FOOTER ---------- */
footer{
  padding:40px 0 60px;
  border-top:1px solid rgba(255,255,255,0.06);
  margin-top:40px;
}
.footer-inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:16px;
  font-family:var(--mono);
  font-size:12px;
  color:var(--text-low);
}

/* reveal on scroll */
.reveal{
  opacity:0;
  transform:translateY(18px);
  transition:opacity .6s ease, transform .6s ease;
}
.reveal.in{
  opacity:1;
  transform:translateY(0);
}

@media (prefers-reduced-motion: reduce){
  *{animation:none !important; transition:none !important;}
}