:root{
  --bg:#0b1020;               /* deep navy */
  --bg-2:#0f1428;             /* panel shadow */
  --card:#121832;             /* card */
  --ink:#d6e1ff;              /* text */
  --muted:#8aa0c8;            /* muted text */
  --acc1:#16f2b3;             /* neon green */
  --acc2:#2da8ff;             /* neon blue */
  --grid:#1a2244;             /* grid lines */
  --glow:0 0 24px rgba(45,168,255,.35),0 0 18px rgba(22,242,179,.25);
  --radius:18px;
  --shadow:0 20px 40px rgba(0,0,0,.45);
  --speed:220ms;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0; background: radial-gradient(1200px 800px at 80% -10%, rgba(45,168,255,.10), transparent 60%),
                          radial-gradient(1000px 700px at 10% 0%, rgba(22,242,179,.10), transparent 60%),
                          linear-gradient(180deg, #0a0f1f 0%, #070c18 100%);
  color:var(--ink); font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; line-height:1.6;
  overflow-x:hidden;
}



/* Background grid */
.grid-bg::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .35;
  z-index: -2; /* push under everything */
  background-image: 
    linear-gradient(transparent 95%, var(--grid) 95%), 
    linear-gradient(90deg, transparent 95%, var(--grid) 95%);
  background-size: 60px 60px;
}

/* Chart overlay */
.background {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.chart-bg {
  width: 100%;
  height: 100%;
}

  /* keep grid ::before at z-index:-2 so canvas sits above it but behind content */
#montecarlo-bg{
  position:fixed;
  inset:0;
  width:100%;
  height:100%;
  z-index:-1;          /* behind content, above grid (::before should be -2) */
  pointer-events:none;
  opacity:0.4;        /* overall visibility - tweak as needed */
  mix-blend-mode:screen;
}

@media (prefers-reduced-motion: reduce){
  #montecarlo-bg{ opacity:0.08 }
}




/* Navbar */
.nav{position:sticky; top:0; z-index:50; backdrop-filter: blur(10px); background:rgba(8,12,24,.6); border-bottom:1px solid rgba(255,255,255,.05)}
.nav-wrap{max-width:1100px; margin:0 auto; display:flex; align-items:center; justify-content:space-between; padding:14px 18px}
.brand{display:flex; gap:10px; align-items:center; font-weight:800; letter-spacing:.5px}
.brand-badge{width:36px; height:36px; display:grid; place-items:center; border-radius:10px; background:linear-gradient(135deg, var(--acc1), var(--acc2)); color:#00141b; font-weight:900; box-shadow:var(--glow)}
.brand span{font-family:"JetBrains Mono",monospace}
.links{display:flex; gap:20px}
.links a{color:var(--muted); text-decoration:none; font-weight:600; font-size:.95rem; padding:8px 10px; border-radius:10px}
.links a:hover{color:var(--ink); background:rgba(255,255,255,.04)}
.hamb{display:none; background:none; border:none; color:var(--ink)}
@media (max-width:880px){
  .links{position:fixed; left:0; right:0; top:58px; background:#0a1024; border-bottom:1px solid rgba(255,255,255,.06); display:none; flex-direction:column; padding:12px}
  .links a{padding:12px 10px}
  .hamb{display:block}
  .links.open{display:flex}
}

/* About */
.about{
  margin-top: 2%;
  width: 1100px;
  max-width:95vw;
}

/* Hero */
.hero{min-height:82vh; display:grid; place-items:center; padding:90px 18px 60px}
.hero-inner{max-width:1100px; width:100%; display:grid; grid-template-columns:1.1fr .9fr; gap:30px}
@media (max-width:980px){.hero-inner{grid-template-columns:1fr}}
.title{font-size:clamp(32px,6vw,64px); font-weight:800; line-height:1.05; letter-spacing:.6px; margin:0}
.title .last{background:linear-gradient(90deg,var(--acc1),var(--acc2)); -webkit-background-clip:text; background-clip:text; color:transparent}
.subtitle{margin:12px 0 22px; color:var(--muted); font-weight:600}
.cta-row{display:flex; flex-wrap:wrap; gap:10px}
.btn{border:1px solid rgba(255,255,255,.08); background:linear-gradient(180deg, #121a38, #0f1734); color:var(--ink); padding:10px 14px; border-radius:12px; display:inline-flex; align-items:center; gap:8px; text-decoration:none; font-weight:600; transition:transform var(--speed), box-shadow var(--speed), border-color var(--speed)}
.btn:hover{transform:translateY(-2px); box-shadow:var(--glow); border-color:rgba(255,255,255,.18)}
.cta-primary{background:linear-gradient(135deg, rgba(22,242,179,.1), rgba(45,168,255,.08)); border:1px solid rgba(45,168,255,.25)}
.ticker{margin-top:18px; width: 1100px; max-width:95vw ;border-top:1px solid rgba(255,255,255,.06); border-bottom:1px solid rgba(255,255,255,.06); overflow:hidden; background:rgba(12,18,36,.6);}
.ticker .move{display:flex; gap:40px; padding:10px 0; animation:ticker 30s linear infinite}
.tick{font-family:"JetBrains Mono",monospace; font-size:.9rem}
.up{color:var(--acc1)} .down{color:#ff5e7a}
@keyframes ticker{0%{transform:translateX(0)}100%{transform:translateX(-50%)}}

.profile-block {
  display: flex;
  align-items: center;
  gap: 20px;
}

.profile-pic {
  position:relative;
  right: 200%;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,.1);
  box-shadow: var(--glow);
}

/* Section base */
section{padding:70px 18px}
.wrap{max-width:1100px; margin:0 auto}
.section-title{font-family:"JetBrains Mono",monospace; font-size:clamp(18px,3vw,26px); font-weight:700; margin:0 0 22px; letter-spacing:.3px}
.grid{display:grid; gap:16px}

/* Cards */
.card{background:linear-gradient(180deg,#121832,#0d1530); border:1px solid rgba(255,255,255,.06); border-radius:var(--radius); padding:18px; box-shadow:var(--shadow); transition:transform var(--speed), box-shadow var(--speed), border var(--speed); position:relative}
.card:hover{transform:translateY(-4px); border-color:rgba(45,168,255,.25); box-shadow:var(--glow)}
.muted{color:var(--muted)}

/* Education */
.edu-grid{grid-template-columns:repeat(12,1fr)}
.edu{grid-column:span 12; display:grid; grid-template-columns:2fr 3fr; gap:16px}
.edu h3{margin:.2rem 0 .4rem}
.tagz{display:flex; gap:8px; flex-wrap:wrap}
.tag{font-family:"JetBrains Mono",monospace; font-size:.8rem; padding:6px 10px; border-radius:999px; border:1px solid rgba(255,255,255,.08); background:#0f1734}
@media (max-width:880px){.edu{grid-template-columns:1fr}}

/* Work Experience */
.work-grid{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
.work .more{max-height:0; overflow:hidden; transition:max-height .5s ease}
.work.open .more{max-height:420px}
.toggle{cursor:pointer; font-weight:700; color:var(--acc2)}

/* Volunteer timeline */
.timeline{position:relative; padding-left:26px}
.timeline::before{content:""; position:absolute; left:8px; top:0; bottom:0; width:2px; background:linear-gradient(var(--acc2), var(--acc1))}
.t-item{position:relative; margin:14px 0; padding:12px 14px; border-radius:12px; border:1px solid rgba(255,255,255,.06); background:#101735}
.t-item::before{content:""; position:absolute; left:-6px; top:16px; width:12px; height:12px; border-radius:50%; background:linear-gradient(135deg,var(--acc1),var(--acc2)); box-shadow:0 0 0 4px rgba(45,168,255,.15)}
.t-item .hover{max-height:0; overflow:hidden; transition:max-height .5s ease}
.t-item:hover .hover{max-height:240px}

/* Projects */
.proj-grid{grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}
.proj .head{display:flex; align-items:center; justify-content:space-between; gap:10px}
.pill{padding:4px 10px; border-radius:999px; background:rgba(45,168,255,.1); border:1px solid rgba(45,168,255,.25); font-size:.78rem; font-family:"JetBrains Mono",monospace}
.accordion{max-height:0; overflow:hidden; transition:max-height .55s ease}
.proj.open .accordion{max-height:360px}

/* Skills */
.skill-cats{grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
.bar{height:8px;background:#0b1230; border-radius:999px; overflow:hidden; border:1px solid rgba(255,255,255,.06)}
.bar>span{display:block; height:100%; width:0; background:linear-gradient(90deg,var(--acc1),var(--acc2)); box-shadow:var(--glow)}

/* Reveal */
.reveal{opacity:0; transform:translateY(16px); transition:opacity .6s ease, transform .6s ease}
.reveal.show{opacity:1; transform:none}

/* Footer */
footer{padding:40px 18px; text-align:center; color:var(--muted); border-top:1px solid rgba(255,255,255,.06)}

/* SVG icon base */
.ico{width:16px; height:16px; display:inline-block}
