/* =====================================================
   NADIR HUSSAIN — DATA PIPELINE JOURNEY PORTFOLIO
   Theme: Dark terminal · Cyberpunk data platform
   Fonts: JetBrains Mono + Syne + DM Sans
   ===================================================== */

:root {
  --bg:    #0b0f1a;
  --bg2:   #0f1424;
  --bg3:   #141829;
  --surf:  #1a1f35;
  --surf2: #1f2540;
  --bord:  rgba(255,255,255,0.06);
  --bord2: rgba(0,229,255,0.2);
  --text:  #e8eaf0;
  --text2: #7b82a0;
  --text3: #454d6a;
  --acc:   #00e5ff;
  --acc2:  #7c4dff;
  --g:     #00ff9c;
  --warn:  #ffd740;
  --glow:  0 0 30px rgba(0,229,255,0.2);
  --glow2: 0 0 60px rgba(0,229,255,0.12);
}

/* ── LIGHT THEME ── */
body.light {
  --bg:    #ffffff;
  --bg2:   #f2f4fb;
  --bg3:   #e6e9f5;
  --surf:  #ffffff;
  --surf2: #eef0fa;
  --bord:  rgba(8,12,50,0.1);
  --bord2: rgba(0,80,255,0.45);
  --text:  #060918;
  --text2: #1e2550;
  --text3: #7078a8;
  --acc:   #0050ff;
  --acc2:  #5500ee;
  --g:     #006630;
  --warn:  #b04800;
  --glow:  0 0 28px rgba(0,80,255,0.22);
  --glow2: 0 0 55px rgba(0,80,255,0.1);
}

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}
html{scroll-behavior:smooth;font-size:16px;}
body{
  background:var(--bg);
  color:var(--text);
  font-family:'DM Sans',sans-serif;
  font-weight:300;
  line-height:1.7;
  overflow-x:hidden;
  max-width:100vw;
  cursor:none;
}
a{color:inherit;text-decoration:none;}
img{display:block;max-width:100%;}
ul{list-style:none;}
.mono{font-family:'JetBrains Mono',monospace;}

/* ── CURSOR ── */
.cur-dot,.cur-ring{
  position:fixed;border-radius:50%;
  pointer-events:none;z-index:9999;transition:opacity .3s;
}
.cur-dot{width:5px;height:5px;background:var(--acc);margin-left:-2.5px;margin-top:-2.5px;}
.cur-ring{
  width:28px;height:28px;
  border:1px solid rgba(0,229,255,.5);
  margin-left:-14px;margin-top:-14px;
  transition:width .2s,height .2s,border-color .2s;
}

/* ── LOADER ── */
.loader{
  position:fixed;inset:0;background:var(--bg);
  z-index:10000;display:flex;align-items:center;justify-content:center;
  transition:opacity .6s ease, visibility .6s;
}
.loader.hidden{opacity:0;visibility:hidden;pointer-events:none;}
.loader-inner{display:flex;flex-direction:column;align-items:center;gap:1.5rem;}
.loader-bar{
  width:200px;height:2px;background:var(--surf2);border-radius:2px;overflow:hidden;
}
.loader-bar::after{
  content:'';display:block;height:100%;width:0;
  background:var(--acc);
  animation:load-fill 1.8s ease forwards;
}
@keyframes load-fill{to{width:100%;}}
.loader-text{font-size:.8rem;color:var(--text2);}
.blink{animation:blink .9s step-end infinite;}
@keyframes blink{50%{opacity:0;}}

/* ── NAV ── */
#nav{
  position:fixed;top:0;left:0;right:0;z-index:2001;
  display:flex;align-items:center;justify-content:space-between;
  padding:1.1rem 5%;
  background:rgba(11,15,26,.9);
  backdrop-filter:blur(20px);
  border-bottom:1px solid var(--bord);
  transition:padding .3s;
}
#nav.scrolled{padding:.8rem 5%;}
.nav-logo{
  font-family:'Syne',sans-serif;font-size:1.4rem;font-weight:800;
  letter-spacing:-.02em;
}
.nav-logo .acc{color:var(--acc);}
.nav-list{display:flex;align-items:center;gap:2rem;}
.nl{
  font-size:.82rem;color:var(--text2);
  transition:color .2s;letter-spacing:.04em;
}
.nl:hover{color:var(--text);}
.nav-api-btn{
  font-family:'JetBrains Mono',monospace;
  font-size:.75rem;color:var(--acc) !important;
  border:1px solid rgba(0,229,255,.25);
  padding:.4rem 1rem;border-radius:4px;
  background:rgba(0,229,255,.05);
  transition:background .2s,box-shadow .2s;
}
.nav-api-btn:hover{background:rgba(0,229,255,.12);box-shadow:var(--glow);}
.burger{display:none;flex-direction:column;gap:5px;background:none;border:none;cursor:pointer;}
.burger span{display:block;width:22px;height:1.5px;background:var(--text);transition:.3s;}

/* ── SECTION COMMONS ── */
section{padding:6rem 8%;}
.stage-header{margin-bottom:3rem;}
.stage-tag{
  font-size:.68rem;font-weight:700;color:var(--acc);
  letter-spacing:.2em;text-transform:uppercase;
  margin-bottom:.75rem;
  display:flex;align-items:center;gap:.75rem;
}
.stage-tag::before{content:'';display:inline-block;width:30px;height:1px;background:var(--acc);}
.sec-title{
  font-family:'Syne',sans-serif;
  font-size:clamp(2rem,4vw,3rem);
  font-weight:700;line-height:1.15;
  color:var(--text);
}
.stage-sub{font-size:.78rem;color:var(--text3);margin-top:-2rem;margin-bottom:3rem;}
.acc-txt{color:var(--acc);}
.body-txt{font-size:.93rem;color:var(--text2);line-height:1.8;margin-bottom:.9rem;}
.body-txt strong{color:var(--text);font-weight:500;}

/* ── BUTTONS ── */
.btn-primary{
  display:inline-flex;align-items:center;
  padding:.7rem 1.75rem;
  background:var(--acc);color:#000;
  font-family:'Syne',sans-serif;font-size:.85rem;font-weight:700;
  border-radius:4px;letter-spacing:.02em;
  transition:box-shadow .2s,transform .2s;
}
.btn-primary:hover{box-shadow:0 0 30px rgba(0,229,255,.5);transform:translateY(-2px);}
.btn-ghost{
  display:inline-flex;align-items:center;
  padding:.7rem 1.75rem;
  border:1px solid var(--bord);color:var(--text2);
  font-size:.85rem;border-radius:4px;
  transition:border-color .2s,color .2s;
}
.btn-ghost:hover{border-color:var(--acc);color:var(--text);}

/* ════════════════════
   HERO — 2 COLUMN
════════════════════ */
#hero{
  position:relative;min-height:100vh;
  display:grid;
  grid-template-columns:1.3fr 1fr;
  align-items:center;gap:4rem;
  padding:8rem 8% 5rem;
}
#hero-canvas{position:absolute;inset:0;width:100%;height:100%;z-index:0;opacity:.6;}
.pipeline-bg-text{
  position:absolute;
  top:50%;left:50%;transform:translate(-50%,-50%);
  font-family:'Syne',sans-serif;font-size:clamp(4rem,10vw,9rem);font-weight:800;
  color:rgba(255,255,255,.015);white-space:nowrap;pointer-events:none;z-index:0;
  letter-spacing:.1em;user-select:none;
}

/* COL 1 — PHOTO */
.hero-photo-col{
  position:relative;z-index:1;
  display:flex;flex-direction:column;align-items:center;gap:1.75rem;
}
.hero-photo-wrap{
  position:relative;
  display:flex;align-items:center;justify-content:center;
  width:340px;height:340px;
}
.photo-ring{
  position:absolute;border-radius:50%;border-style:solid;
  animation:spin-ring 20s linear infinite;
}
.ring-outer{
  width:340px;height:340px;
  border:1px solid rgba(0,229,255,.15);
}
.ring-inner{
  width:290px;height:290px;
  border:1px dashed rgba(0,229,255,.08);
  animation-duration:14s;animation-direction:reverse;
}
@keyframes spin-ring{to{transform:rotate(360deg);}}
.hero-photo{
  width:260px;height:260px;
  border-radius:50%;object-fit:cover;object-position:top;
  border:2px solid rgba(0,229,255,.3);
  box-shadow:0 0 60px rgba(0,229,255,.15);
  position:relative;z-index:2;
}
.photo-corner{
  position:absolute;width:20px;height:20px;
  border-color:var(--acc);border-style:solid;z-index:3;
}
.photo-corner-tl{top:14px;left:28px;border-width:2px 0 0 2px;}
.photo-corner-br{bottom:14px;right:28px;border-width:0 2px 2px 0;}

.hero-socials{display:flex;gap:.6rem;flex-wrap:wrap;justify-content:center;}
.social-pill{
  display:flex;align-items:center;justify-content:center;
  width:36px;height:36px;
  border:1px solid var(--bord);border-radius:6px;
  font-size:.68rem;font-weight:700;color:var(--text3);
  transition:border-color .2s,color .2s,box-shadow .2s;
}
.social-pill:hover{border-color:var(--acc);color:var(--acc);box-shadow:0 0 14px rgba(0,229,255,.25);}

/* COL 2 — NAME + DETAILS */
.hero-details-col{position:relative;z-index:1;}
.hero-status-badge{
  display:inline-flex;align-items:center;gap:.5rem;
  border:1px solid rgba(0,255,156,.2);background:rgba(0,255,156,.05);
  padding:.3rem .85rem;border-radius:4px;margin-bottom:1.25rem;
}
.status-dot{
  width:7px;height:7px;border-radius:50%;background:var(--g);
  animation:pulse-g 2s ease-in-out infinite;
}
@keyframes pulse-g{0%,100%{box-shadow:0 0 0 0 rgba(0,255,156,.6);}50%{box-shadow:0 0 0 6px rgba(0,255,156,0);}}
.hero-name{
  font-family:'Syne',sans-serif;
  font-size:clamp(2.8rem,5vw,5rem);
  font-weight:800;line-height:.95;letter-spacing:-.03em;
  color:var(--text);margin-bottom:1rem;
}
.hero-title{font-size:.85rem;color:var(--text2);margin-bottom:.5rem;line-height:1.6;}
.hero-creds{
  font-size:.72rem;color:var(--text3);
  margin-bottom:.75rem;line-height:1.6;
  letter-spacing:.02em;
}
.hero-desc{font-size:.9rem;color:var(--text2);line-height:1.8;margin-bottom:1.75rem;}

.hero-counters{
  display:flex;flex-wrap:wrap;gap:.75rem;
  padding:1.25rem 1.5rem;
  background:var(--surf);border:1px solid var(--bord);border-radius:10px;
  margin-bottom:1.75rem;
}
.hc-item{display:flex;flex-direction:column;flex:1;min-width:70px;}
.hc-top{display:flex;align-items:baseline;gap:2px;}
.hc-num{font-size:1.8rem;font-weight:700;color:var(--acc);line-height:1;}
.hc-lbl{font-size:.65rem;color:var(--text3);margin-top:4px;}

.hero-btns{display:flex;gap:.9rem;flex-wrap:wrap;}

.scroll-down{
  position:absolute;bottom:2rem;left:50%;transform:translateX(-50%);
  display:flex;flex-direction:column;align-items:center;gap:.5rem;z-index:2;
}
.sd-line{
  width:1px;height:40px;
  background:linear-gradient(to bottom,transparent,var(--acc));
  animation:sd 2s ease-in-out infinite;
}
@keyframes sd{0%,100%{opacity:.3;transform:scaleY(.5);}50%{opacity:1;transform:scaleY(1);}}
.sd-text{font-size:.62rem;color:var(--text3);letter-spacing:.12em;text-transform:uppercase;}

/* ════════════════════
   PIPELINE BAND
════════════════════ */
.pipeline-band{
  background:var(--bg2);
  border-top:1px solid var(--bord);
  border-bottom:1px solid var(--bord);
}

/* Horizontal pipeline viz */
.pipeline-horiz{
  padding:2.5rem 8% 1.5rem;
  border-bottom:1px solid var(--bord);
  display:flex;flex-direction:column;gap:1.25rem;
}
.ph-inner{
  display:flex;align-items:center;justify-content:center;
  gap:0;
}
.ph-node{
  display:flex;flex-direction:column;align-items:center;gap:.6rem;
  position:relative;cursor:default;
}
.ph-dot{
  width:14px;height:14px;border-radius:50%;
  border:2px solid var(--text3);background:transparent;
  transition:border-color .3s,box-shadow .3s;
}
.ph-node.active-node .ph-dot{
  border-color:var(--acc);background:var(--acc);
  box-shadow:0 0 14px rgba(0,229,255,.6);
}
.ph-node:not(.active-node) .ph-dot:hover{border-color:var(--bord2);}
.ph-label{
  font-size:.62rem;letter-spacing:.12em;color:var(--text3);
  transition:color .3s;
}
.ph-node.active-node .ph-label{color:var(--acc);font-weight:700;}
.ph-connector{
  flex:1;min-width:60px;max-width:160px;
  height:2px;background:var(--bord);
  position:relative;overflow:hidden;margin-bottom:1.3rem;
}
.ph-flow{
  position:absolute;top:0;left:-100%;
  width:50%;height:100%;
  background:linear-gradient(to right,transparent,var(--acc),transparent);
  animation:ph-flow 2.5s ease-in-out infinite;
}
@keyframes ph-flow{0%{left:-60%;}100%{left:110%;}}
.ph-metrics{
  display:flex;flex-wrap:wrap;gap:2rem;justify-content:center;
  font-size:.72rem;color:var(--text3);
}
.phm{}
.ph-running-dot{
  display:inline-block;width:7px;height:7px;border-radius:50%;
  background:var(--g);margin-right:.4rem;
  animation:pulse-g 2s ease-in-out infinite;
  vertical-align:middle;
}

/* Code ticker */
.code-ticker-wrap{
  overflow:hidden;position:relative;
  background:var(--bg3);
  padding:.7rem 0;
}
.code-ticker-wrap::before,.code-ticker-wrap::after{
  content:'';position:absolute;top:0;bottom:0;width:80px;z-index:2;pointer-events:none;
}
.code-ticker-wrap::before{left:0;background:linear-gradient(to right,var(--bg3),transparent);}
.code-ticker-wrap::after{right:0;background:linear-gradient(to left,var(--bg3),transparent);}
.code-ticker{
  display:flex;align-items:center;gap:1.5rem;
  white-space:nowrap;
  animation:code-scroll 50s linear infinite;
  width:max-content;
}
.ct-snippet{font-size:.72rem;color:var(--text2);}
.ct-sep{color:var(--text3);font-size:.65rem;}

@keyframes code-scroll{
  0%{transform:translateX(0);}
  100%{transform:translateX(-50%);}
}

/* ════════════════════
   PIPELINE PROGRESS
════════════════════ */
.pipeline-progress{
  position:sticky;top:62px;z-index:500;
  background:rgba(11,15,26,.95);
  border-bottom:1px solid var(--bord);
  backdrop-filter:blur(12px);
  padding:.75rem 8%;
}
.pp-track{display:flex;align-items:center;gap:0;}
.pp-stage{
  display:flex;align-items:center;gap:.5rem;
  cursor:pointer;padding:.25rem .5rem;
  transition:opacity .2s;
  text-decoration:none;
}
.pp-dot{
  width:8px;height:8px;border-radius:50%;
  background:var(--surf2);border:1px solid var(--text3);
  transition:background .3s,border-color .3s,box-shadow .3s;
  flex-shrink:0;
}
.pp-label{font-size:.65rem;color:var(--text3);letter-spacing:.06em;transition:color .3s;white-space:nowrap;}
.pp-stage.active .pp-dot{background:var(--acc);border-color:var(--acc);box-shadow:0 0 10px rgba(0,229,255,.5);}
.pp-stage.active .pp-label{color:var(--acc);}
.pp-line{flex:1;height:1px;background:var(--bord);min-width:20px;}

/* ════════════════════
   SOURCE / ABOUT
════════════════════ */
#source{background:var(--bg2);}
.source-grid{display:grid;grid-template-columns:1fr 1.5fr;gap:4rem;align-items:start;}
.source-img-wrap{
  position:relative;
  border:1px solid var(--bord);border-radius:12px;overflow:hidden;
}
.source-img-wrap img{width:100%;filter:grayscale(15%);}
.src-corner{
  position:absolute;width:20px;height:20px;
  border-color:var(--acc);border-style:solid;
}
.src-corner-tl{top:10px;left:10px;border-width:2px 0 0 2px;}
.src-corner-br{bottom:10px;right:10px;border-width:0 2px 2px 0;}

.src-metadata{
  margin-top:1rem;padding:1rem;
  background:var(--bg3);border:1px solid var(--bord);border-radius:8px;
}
.meta-row{
  display:flex;gap:.75rem;
  padding:.3rem 0;border-bottom:1px solid var(--bord);
  font-size:.75rem;
}
.meta-row:last-child{border:none;}
.meta-key{color:var(--text3);min-width:110px;}
.meta-val{color:var(--text2);}

.src-stats{
  display:flex;flex-wrap:wrap;gap:1.5rem;
  padding:1.25rem;background:var(--surf);
  border:1px solid var(--bord);border-radius:8px;
  margin:2rem 0;
}
.ss-item{display:flex;flex-direction:column;}
.ss-num{font-size:1.6rem;font-weight:700;color:var(--acc);line-height:1;}
.ss-lbl{font-size:.7rem;color:var(--text3);margin-top:3px;}

.src-socials{display:flex;flex-wrap:wrap;gap:.75rem;margin-top:1.5rem;}
.ss-link{
  font-size:.78rem;color:var(--acc);
  border:1px solid rgba(0,229,255,.2);
  padding:.35rem .9rem;border-radius:4px;
  transition:background .2s,box-shadow .2s;
}
.ss-link:hover{background:rgba(0,229,255,.08);box-shadow:var(--glow);}

/* ════════════════════
   INGESTION / SKILLS
════════════════════ */
#ingestion{background:var(--bg);}
.stack-layers{display:flex;flex-direction:column;gap:2.5rem;}
.stack-layer{}
.sl-label{
  display:flex;align-items:center;gap:1rem;
  margin-bottom:1rem;
}
.sl-num{font-size:.7rem;color:var(--acc);min-width:24px;}
.sl-name{font-size:.9rem;font-weight:500;color:var(--text);white-space:nowrap;}
.sl-line{flex:1;height:1px;background:var(--bord);}

.sl-tools{display:flex;flex-wrap:wrap;gap:.6rem;}
.tool-chip{
  display:flex;align-items:center;gap:.5rem;
  padding:.45rem 1rem;
  background:var(--surf);border:1px solid var(--bord);border-radius:4px;
  font-size:.8rem;color:var(--text2);
  cursor:default;transition:border-color .2s,color .2s,box-shadow .2s;
  position:relative;
}
.tool-chip:hover{border-color:var(--bord2);color:var(--text);box-shadow:var(--glow);}
.tool-chip.exp{border-color:rgba(0,229,255,.15);color:var(--acc);}
.tc-dot{width:6px;height:6px;border-radius:50%;flex-shrink:0;}

.tool-tooltip{
  position:fixed;
  background:var(--surf2);border:1px solid var(--bord2);
  padding:.5rem 1rem;border-radius:6px;
  font-family:'JetBrains Mono',monospace;font-size:.73rem;color:var(--text);
  pointer-events:none;z-index:2000;opacity:0;
  transition:opacity .15s;white-space:nowrap;
  box-shadow:var(--glow);
}
.tool-tooltip.visible{opacity:1;}

/* ════════════════════
   PROCESSING / PROJECTS
════════════════════ */
#processing{background:var(--bg2);}
.projects-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:1.25rem;
}
.proj-card{
  background:var(--bg3);border:1px solid var(--bord);border-radius:12px;
  overflow:hidden;display:flex;flex-direction:column;
  transition:border-color .3s,transform .3s;
}
.proj-card:hover{border-color:var(--bord2);transform:translateY(-4px);}
.proj-img-wrap{position:relative;height:160px;overflow:hidden;}
.proj-img-wrap img{width:100%;height:100%;object-fit:cover;transition:transform .5s ease;}
.proj-card:hover .proj-img-wrap img{transform:scale(1.06);}
.proj-overlay{
  position:absolute;inset:0;background:rgba(11,15,26,.85);
  display:flex;align-items:center;justify-content:center;
  opacity:0;transition:opacity .3s;
}
.proj-card:hover .proj-overlay{opacity:1;}
.proj-overlay-btn{
  font-size:.75rem;color:var(--acc);border:1px solid var(--acc);
  padding:.4rem 1rem;border-radius:4px;
  background:rgba(0,229,255,.05);
  transition:background .2s;
}
.proj-overlay-btn:hover{background:rgba(0,229,255,.15);}

.proj-body{padding:1.1rem;display:flex;flex-direction:column;flex:1;gap:.5rem;}
.proj-arch{
  display:flex;flex-wrap:wrap;align-items:center;gap:.25rem;
  font-size:.65rem;margin-bottom:.25rem;
}
.pa-node{color:var(--text3);}
.pa-node.acc{color:var(--acc);}
.pa-arr{color:var(--text3);}
.proj-body h3{
  font-family:'Syne',sans-serif;font-size:.85rem;font-weight:600;
  color:var(--text);line-height:1.4;
}
.proj-body p{font-size:.76rem;color:var(--text2);line-height:1.6;flex:1;}
.proj-meta{display:flex;flex-wrap:wrap;gap:.75rem;font-size:.65rem;color:var(--text3);}
.proj-tags{display:flex;flex-wrap:wrap;gap:.3rem;margin-top:.25rem;}
.proj-tags span{
  font-size:.65rem;padding:.2rem .5rem;
  background:var(--surf);border:1px solid var(--bord);
  border-radius:3px;color:var(--text3);
}

/* ════════════════════
   SERVING / TALKS
════════════════════ */
#serving{background:var(--bg);}
.talks-banner{
  display:flex;align-items:center;
  padding:1.5rem 2rem;
  background:var(--surf);border:1px solid var(--bord);border-radius:10px;
  margin-bottom:3rem;flex-wrap:wrap;gap:0;
}
.tb-s{display:flex;flex-direction:column;align-items:center;flex:1;min-width:100px;padding:.5rem;}
.tb-n{font-size:1.8rem;font-weight:700;color:var(--acc);line-height:1;}
.tb-l{font-size:.7rem;color:var(--text3);margin-top:4px;}
.tb-div{width:1px;height:40px;background:var(--bord);}

.talks-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1.25rem;}
.talk-card{
  background:var(--bg3);border:1px solid var(--bord);border-radius:12px;
  overflow:hidden;display:flex;flex-direction:column;
  transition:border-color .3s,transform .3s;
}
.talk-card:hover{border-color:var(--bord2);transform:translateY(-3px);}
.tk-img{height:190px;overflow:hidden;}
.tk-img img{width:100%;height:100%;object-fit:cover;object-position:top;transition:transform .5s;}
.talk-card:hover .tk-img img{transform:scale(1.04);}
.tk-body{padding:1.1rem;display:flex;flex-direction:column;gap:.4rem;flex:1;}
.tk-meta{font-size:.67rem;color:var(--acc);font-weight:600;letter-spacing:.06em;text-transform:uppercase;}
.tk-body h3{font-family:'Syne',sans-serif;font-size:.88rem;font-weight:600;color:var(--text);line-height:1.4;}
.tk-body p{font-size:.76rem;color:var(--text2);line-height:1.6;}
.tk-verify{
  display:inline-flex;align-items:center;gap:.3rem;
  font-size:.68rem;color:var(--acc);
  margin-top:.35rem;opacity:.8;
  transition:opacity .2s;
}
.tk-verify:hover{opacity:1;}

/* ════════════════════
   ANALYTICS / CERTS
════════════════════ */
#analytics{background:var(--bg2);}
.cert-track-wrap{position:relative;overflow:hidden;margin-bottom:1.5rem;}
.cert-scroll{overflow:hidden;}
.cert-inner{
  display:flex;gap:1.25rem;
  animation:cert-loop 55s linear infinite;
  width:max-content;
}
.cert-inner img{
  height:110px;width:auto;border-radius:8px;
  border:1px solid var(--bord);cursor:pointer;
  filter:grayscale(20%);transition:filter .2s,transform .2s;
}
.cert-inner img:hover{filter:none;transform:scale(1.1);}
@keyframes cert-loop{
  0%{transform:translateX(0);}
  100%{transform:translateX(-50%);}
}
.cert-fade-l,.cert-fade-r{
  position:absolute;top:0;bottom:0;width:80px;z-index:2;pointer-events:none;
}
.cert-fade-l{left:0;background:linear-gradient(to right,var(--bg2),transparent);}
.cert-fade-r{right:0;background:linear-gradient(to left,var(--bg2),transparent);}
.cert-note{font-size:.75rem;color:var(--text3);text-align:center;margin-bottom:3rem;}

.ach-grid{display:flex;flex-wrap:wrap;gap:1.25rem;}
.ach-card{
  flex:1;min-width:150px;max-width:220px;
  background:var(--bg3);border:1px solid var(--bord);border-radius:12px;
  padding:1.5rem;display:flex;flex-direction:column;align-items:center;gap:.75rem;
  cursor:pointer;transition:border-color .3s,transform .3s;text-align:center;
}
.ach-card:hover{border-color:var(--bord2);transform:translateY(-3px);}
.ach-card img{width:85px;height:85px;object-fit:contain;filter:drop-shadow(0 0 10px rgba(0,229,255,.1));transition:filter .3s;}
.ach-card:hover img{filter:drop-shadow(0 0 18px rgba(0,229,255,.35));}
.ach-card p{font-size:.73rem;color:var(--text2);line-height:1.4;}

/* ════════════════════
   TERMINAL
════════════════════ */
#terminal{background:var(--bg);}
.terminal-window{
  background:var(--bg3);
  border:1px solid rgba(0,229,255,.2);
  border-radius:12px;overflow:hidden;
  box-shadow:var(--glow2);
  max-width:900px;
}
.term-titlebar{
  display:flex;align-items:center;gap:1rem;
  padding:.75rem 1.25rem;
  background:var(--surf);border-bottom:1px solid var(--bord);
}
.term-dots{display:flex;gap:.5rem;}
.td{width:12px;height:12px;border-radius:50%;}
.td-r{background:#ff5f57;}
.td-y{background:#febc2e;}
.td-g{background:#28c840;}
.term-title{font-size:.72rem;color:var(--text3);flex:1;text-align:center;}
.term-body{
  padding:1.25rem 1.5rem;min-height:180px;
  display:flex;flex-direction:column;gap:.5rem;
}
.term-line{display:flex;flex-wrap:wrap;gap:.5rem;align-items:flex-start;}
.term-prompt{font-size:.8rem;color:var(--g);white-space:nowrap;}
.term-output{font-size:.8rem;}
.term-input-row{
  display:flex;align-items:center;gap:.75rem;
  padding:.75rem 1.5rem;
  border-top:1px solid var(--bord);
}
.term-input{
  flex:1;background:transparent;border:none;outline:none;
  font-size:.82rem;color:var(--text);caret-color:var(--acc);
}
.term-input::placeholder{color:var(--text3);}

/* ════════════════════
   CONTACT / API
════════════════════ */
#contact{background:var(--bg2);}
.api-grid{display:grid;grid-template-columns:1fr 1.2fr;gap:4rem;align-items:start;}
.api-method-badge{
  display:inline-block;
  padding:.3rem .85rem;background:rgba(0,255,156,.1);
  color:var(--g);border:1px solid rgba(0,255,156,.25);
  border-radius:4px;font-size:.75rem;font-weight:700;
  letter-spacing:.1em;margin-bottom:.75rem;
}
.api-url{font-size:1rem;color:var(--acc);margin-bottom:0;}
.api-creds{font-size:.72rem;color:var(--text3);margin-top:.4rem;margin-bottom:0;}
.api-params{
  margin:1.5rem 0;padding:1rem;
  background:var(--bg3);border:1px solid var(--bord);border-radius:8px;
}
.param-row{
  display:flex;gap:1rem;align-items:center;
  padding:.4rem 0;border-bottom:1px solid var(--bord);
  font-size:.74rem;
}
.param-row:last-child{border:none;}
.param-key{color:var(--text);min-width:80px;}
.param-type{color:var(--acc);flex:1;}
.param-req{color:#ff5f57;font-size:.65rem;}
.param-opt{color:var(--text3);font-size:.65rem;}
.direct-links{display:flex;flex-direction:column;gap:.5rem;}
.dl-row{
  display:flex;justify-content:space-between;
  padding:.7rem 1rem;
  background:var(--bg3);border:1px solid var(--bord);border-radius:6px;
  font-size:.8rem;color:var(--text2);
  transition:border-color .2s,color .2s;
}
.dl-row:hover{border-color:var(--bord2);color:var(--text);}
.dl-row span{color:var(--acc);}

.api-request-label{font-size:.72rem;color:var(--text3);margin-bottom:1rem;}
.api-form{display:flex;flex-direction:column;gap:1rem;}
.af-field{display:flex;flex-direction:column;gap:.4rem;}
.af-field label{font-size:.72rem;color:var(--text3);}
.af-field input,.af-field textarea{
  background:var(--bg3);border:1px solid var(--bord);
  color:var(--text);padding:.7rem 1rem;border-radius:6px;
  font-size:.8rem;outline:none;resize:vertical;
  transition:border-color .2s;
}
.af-field input:focus,.af-field textarea:focus{border-color:var(--bord2);}
.af-field input::placeholder,.af-field textarea::placeholder{color:var(--text3);}
.api-submit-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:.75rem;
  padding:.8rem 1.5rem;background:var(--acc);color:#000;
  font-size:.82rem;font-weight:700;border:none;border-radius:6px;
  cursor:pointer;transition:box-shadow .2s,transform .2s;
}
.api-submit-btn:hover{box-shadow:0 0 30px rgba(0,229,255,.5);transform:translateY(-2px);}
.api-response{
  font-size:.78rem;padding:.75rem 1rem;border-radius:6px;
  display:none;border:1px solid;
}
.api-response.success{
  background:rgba(0,255,156,.08);border-color:rgba(0,255,156,.3);color:var(--g);
}
.api-response.error{
  background:rgba(255,95,87,.08);border-color:rgba(255,95,87,.3);color:#ff5f57;
}
.api-submit-btn:disabled{
  opacity:.6;cursor:not-allowed;transform:none;box-shadow:none;
}

/* ── FOOTER ── */
#footer{padding:1.75rem 8%;border-top:1px solid var(--bord);}
.footer-inner{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:1rem;}
.footer-logo{font-size:1rem;font-weight:700;}
.footer-copy{font-size:.75rem;}
.footer-top{font-size:.75rem;transition:opacity .2s;}
.footer-top:hover{opacity:.7;}
.acc-txt{color:var(--acc);}

/* ── THEME TOGGLE ── */
.theme-toggle {
  display:flex;align-items:center;justify-content:center;
  width:38px;height:22px;
  background:var(--surf2);
  border:1px solid var(--bord2);
  border-radius:100px;
  cursor:pointer;padding:0;
  position:relative;
  transition:background .3s,border-color .3s;
  flex-shrink:0;
}
.theme-toggle::before {
  content:'';
  position:absolute;
  left:3px;
  width:16px;height:16px;
  border-radius:50%;
  background:var(--acc);
  transition:transform .3s, background .3s;
  box-shadow:0 0 8px rgba(0,229,255,.4);
}
body.light .theme-toggle::before {
  transform:translateX(16px);
  background:var(--acc);
  box-shadow:0 0 8px rgba(0,80,200,.3);
}
.theme-toggle .tt-icon-dark,
.theme-toggle .tt-icon-light {
  font-size:.6rem;position:absolute;
  transition:opacity .3s;
  pointer-events:none;
}
.theme-toggle .tt-icon-dark  { left:5px;  opacity:1; }
.theme-toggle .tt-icon-light { right:4px; opacity:0; }
body.light .theme-toggle .tt-icon-dark  { opacity:0; }
body.light .theme-toggle .tt-icon-light { opacity:1; }

/* Light mode specific overrides */
body.light #hero-canvas { opacity:.15; }
body.light .pipeline-bg-text { color:rgba(0,10,40,.04); }

/* Nav */
body.light #nav { background:rgba(255,255,255,.95); border-bottom:1px solid var(--bord); }
body.light .nav-logo { color:var(--text); }
body.light .nav-list.open { background:rgba(255,255,255,.99); }
body.light .burger span { background:var(--text); }

/* Loader */
body.light .loader { background:#fff; }
body.light .loader-text { color:var(--text2); }

/* Hero */
body.light .hero-status-badge {
  border-color:rgba(0,135,74,.3);
  background:rgba(0,135,74,.08);
}
body.light .status-dot { background:var(--g); box-shadow:0 0 0 0 rgba(0,135,74,.5); }
body.light .hero-photo { border-color:rgba(0,85,255,.3); box-shadow:0 0 50px rgba(0,85,255,.12); }
body.light .ring-outer { border-color:rgba(0,85,255,.12); }
body.light .ring-inner { border-color:rgba(0,85,255,.07); }
body.light .photo-corner { border-color:var(--acc); }
body.light .social-pill { border-color:var(--bord); color:var(--text3); background:#fff; }
body.light .social-pill:hover { border-color:var(--acc); color:var(--acc); }
body.light .hero-counters { background:var(--bg3); border-color:var(--bord); }
body.light .btn-primary { background:var(--acc); color:#fff; }
body.light .btn-ghost { border-color:var(--bord); color:var(--text2); }
body.light .btn-ghost:hover { border-color:var(--acc); color:var(--acc); }

/* Pipeline band */
body.light .pipeline-band { background:var(--bg2); border-color:var(--bord); }
body.light .pipeline-horiz { border-bottom-color:var(--bord); }
body.light .ph-connector { background:rgba(0,85,255,.12); }
body.light .ph-flow { background:linear-gradient(to right,transparent,var(--acc),transparent); }
body.light .ph-node.active-node .ph-dot {
  border-color:var(--acc); background:var(--acc);
  box-shadow:0 0 12px rgba(0,85,255,.35);
}
body.light .ph-running-dot { background:var(--g); }
body.light .code-ticker-wrap { background:#07091a; border-top:1px solid rgba(255,255,255,0.06); }
body.light .code-ticker-wrap::before { background:linear-gradient(to right,#07091a,transparent); }
body.light .code-ticker-wrap::after  { background:linear-gradient(to left, #07091a,transparent); }
body.light .ct-snippet { color:rgba(200,210,240,0.9); }
body.light .ct-sep { color:rgba(255,255,255,0.2); }

/* Pipeline progress */
body.light .pipeline-progress { background:rgba(255,255,255,.95); border-bottom-color:var(--bord); }

/* Sections — crisp alternation */
body.light #source  { background:var(--bg2); }
body.light #ingestion { background:#ffffff; }
body.light #processing { background:var(--bg2); }
body.light #serving { background:#ffffff; }
body.light #analytics { background:var(--bg2); }
body.light #terminal { background:#ffffff; }
body.light #contact { background:var(--bg2); }
body.light #footer { background:#ffffff; border-top-color:var(--bord); }

/* Boosted card shadows for crisp look */
body.light .proj-card { background:#ffffff; border-color:rgba(8,12,50,0.09); box-shadow:0 2px 20px rgba(8,12,50,0.08),0 1px 4px rgba(8,12,50,0.04); }
body.light .proj-card:hover { border-color:rgba(0,80,255,0.4); box-shadow:0 8px 40px rgba(0,80,255,0.14); }
body.light .talk-card { background:#ffffff; border-color:rgba(8,12,50,0.09); box-shadow:0 2px 20px rgba(8,12,50,0.07); }
body.light .talk-card:hover { border-color:rgba(0,80,255,0.4); box-shadow:0 8px 32px rgba(0,80,255,0.12); }
body.light .ach-card { background:#ffffff; border-color:rgba(8,12,50,0.09); box-shadow:0 2px 14px rgba(8,12,50,0.06); }
body.light .ach-card:hover { border-color:rgba(0,80,255,0.4); box-shadow:0 6px 28px rgba(0,80,255,0.12); }
body.light .src-metadata { background:#f0f3ff; border-color:rgba(0,80,255,0.1); box-shadow:0 2px 12px rgba(8,12,50,0.06); }
body.light .src-stats { background:#f0f3ff; border-color:rgba(0,80,255,0.1); box-shadow:0 2px 10px rgba(8,12,50,0.05); }
body.light .hero-counters { background:#f0f3ff; border-color:rgba(0,80,255,0.15); box-shadow:0 3px 20px rgba(8,12,50,0.08); }
body.light .talks-banner { background:#f0f3ff; border-color:rgba(0,80,255,0.12); box-shadow:0 2px 16px rgba(8,12,50,0.06); }
body.light .pipeline-viz { background:#f0f3ff; border-color:rgba(0,80,255,0.2); box-shadow:0 4px 24px rgba(0,80,255,0.08); }

/* About */
body.light .source-img-wrap { border-color:var(--bord); }
body.light .source-img-wrap img { filter:none; }
body.light .src-corner { border-color:var(--acc); }
body.light .src-metadata { background:var(--bg3); border-color:var(--bord); }
body.light .meta-row { border-bottom-color:var(--bord); }
body.light .meta-key { color:var(--text3); }
body.light .meta-val { color:var(--text2); }
body.light .src-stats { background:var(--bg3); border-color:var(--bord); }
body.light .ss-link { border-color:rgba(0,85,255,.2); color:var(--acc); }
body.light .ss-link:hover { background:rgba(0,85,255,.06); }

/* Skills */
body.light .skill-cat,
body.light .stack-layer { border: none; }
body.light .tool-chip { background:var(--bg3); border-color:var(--bord); color:var(--text2); }
body.light .tool-chip:hover { border-color:var(--bord2); color:var(--text); }
body.light .tool-chip.exp { background:rgba(0,85,255,.07); border-color:rgba(0,85,255,.25); color:var(--acc); }
body.light .tool-tooltip { background:#fff; border-color:var(--bord2); color:var(--text); box-shadow:0 4px 20px rgba(0,0,0,.1); }

/* Projects */
body.light .proj-card { background:#fff; border-color:var(--bord); }
body.light .proj-card:hover { border-color:var(--bord2); box-shadow:0 8px 30px rgba(0,85,255,.08); }
body.light .proj-overlay { background:rgba(255,255,255,.92); }
body.light .proj-overlay-btn { color:var(--acc); border-color:var(--acc); background:rgba(0,85,255,.06); }
body.light .proj-tags span { background:var(--bg3); border-color:var(--bord); color:var(--text3); }
body.light .proj-link { color:var(--acc); }
body.light .pa-node.acc { color:var(--acc); }

/* Talks */
body.light .talks-banner { background:var(--bg3); border-color:var(--bord); }
body.light .tb-div { background:var(--bord); }
body.light .talk-card { background:#fff; border-color:var(--bord); }
body.light .talk-card:hover { border-color:var(--bord2); box-shadow:0 8px 24px rgba(0,85,255,.07); }
body.light .tk-meta { color:var(--acc); }
body.light .tk-verify { color:var(--acc); }

/* Certifications */
body.light .cert-inner img { filter:none; border-color:var(--bord); }
body.light .cert-fade-l { background:linear-gradient(to right,var(--bg2),transparent); }
body.light .cert-fade-r { background:linear-gradient(to left, var(--bg2),transparent); }
body.light .cert-note { color:var(--text3); }
body.light .ach-card { background:#fff; border-color:var(--bord); }
body.light .ach-card:hover { border-color:var(--bord2); box-shadow:0 8px 24px rgba(0,85,255,.07); }
body.light .ach-card img { filter:none; }
body.light .ach-card p { color:var(--text2); }

/* Terminal — always dark regardless of theme */
body.light .terminal-window { background:#07091a; border-color:rgba(0,80,255,.25); box-shadow:0 4px 40px rgba(0,80,255,.1); }
body.light .term-titlebar { background:#0e1120; border-bottom-color:rgba(255,255,255,.07); }
body.light .term-title { color:rgba(255,255,255,.3); }
body.light .term-body { background:#07091a; }
body.light .term-prompt { color:#00ff9c; }
body.light .term-input-row { border-top-color:rgba(255,255,255,.07); background:#07091a; }
body.light .term-input { color:#e8eaf0; caret-color:#00e5ff; }
body.light .term-input::placeholder { color:rgba(255,255,255,.2); }

/* Contact / API */
body.light .api-method-badge { background:rgba(0,135,74,.08); border-color:rgba(0,135,74,.25); color:var(--g); }
body.light .api-url { color:var(--acc); }
body.light .api-params { background:var(--bg3); border-color:var(--bord); }
body.light .param-row { border-bottom-color:var(--bord); }
body.light .param-key { color:var(--text); }
body.light .param-type { color:var(--acc); }
body.light .dl-row { background:var(--bg3); border-color:var(--bord); color:var(--text2); }
body.light .dl-row:hover { border-color:var(--bord2); color:var(--text); }
body.light .dl-row span { color:var(--acc); }
body.light .af-field label { color:var(--text3); }
body.light .af-field input,
body.light .af-field textarea { background:#fff; border-color:var(--bord); color:var(--text); }
body.light .af-field input:focus,
body.light .af-field textarea:focus { border-color:var(--bord2); }
body.light .af-field input::placeholder,
body.light .af-field textarea::placeholder { color:var(--text3); }
body.light .api-submit-btn { background:var(--acc); color:#fff; }

/* Pipeline viz vertical (in sidebar) */
body.light .pipeline-viz { background:#fff; border-color:rgba(0,85,255,.2); }
body.light .pv-node { background:var(--bg3); border-color:var(--bord); }
body.light .pv-node:hover { border-color:var(--bord2); }
body.light .pv-flow::after { background:var(--acc); }
body.light .pvn-icon { color:var(--acc); }

/* Stage headers & misc */
body.light .stage-tag { color:var(--acc); }
body.light .stage-tag::before { background:var(--acc); }
body.light .acc-txt { color:var(--acc); }
body.light .acc-link { color:var(--acc); }
body.light .scroll-down .sd-line { background:linear-gradient(to bottom,transparent,var(--acc)); }

/* Theme toggle in light mode */
body.light .theme-toggle { background:var(--bg3); border-color:rgba(0,85,255,.3); }
.reveal{opacity:0;transform:translateY(24px);transition:opacity .6s ease,transform .6s ease;}
.reveal.vis{opacity:1;transform:none;}
