:root{
  --bg:#0d1117;
  --bg-2:#161b22;
  --surface:#1c2128;
  --line:#30363d;
  --line-soft:rgba(255,255,255,.06);
  --text:#e6edf3;
  --muted:#8b949e;
  --green:#3fb950;
  --purple:#a78bfa;
  --blue:#58a6ff;
  --pink:#f778ba;
  --yellow:#e3b341;
  --red:#f85149;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  background:var(--bg);color:var(--text);
  font-family:'JetBrains Mono',monospace;
  font-size:15px;line-height:1.6;
  overflow-x:hidden;
}
.sans{font-family:'Inter',sans-serif;}

/* Scanline / noise overlay */
body::before{
  content:"";position:fixed;inset:0;pointer-events:none;z-index:1000;
  background-image:repeating-linear-gradient(
    0deg,transparent 0,transparent 2px,
    rgba(255,255,255,.012) 2px,rgba(255,255,255,.012) 4px
  );
}
body::after{
  content:"";position:fixed;inset:0;pointer-events:none;z-index:999;
  background:radial-gradient(ellipse at center,transparent 50%,rgba(0,0,0,.4) 100%);
}

/* Top bar (window chrome) */
.topbar{
  position:fixed;top:0;left:0;right:0;z-index:50;
  background:var(--bg-2);border-bottom:1px solid var(--line);
  padding:.55rem 1rem;display:flex;align-items:center;gap:1rem;
  font-size:.82rem;
}
.traffic{display:flex;gap:.45rem;}
.traffic span{
  width:12px;height:12px;border-radius:50%;display:block;
}
.traffic .r{background:#f85149;}
.traffic .y{background:#e3b341;}
.traffic .g{background:#3fb950;}
.tabs{display:flex;gap:.25rem;flex:1;justify-content:center;}
.tab{
  padding:.3rem .9rem;border-radius:6px 6px 0 0;
  color:var(--muted);font-size:.78rem;cursor:pointer;
  border:1px solid transparent;
}
.tab.active{
  background:var(--bg);color:var(--text);
  border-color:var(--line);border-bottom-color:var(--bg);
  margin-bottom:-1px;
}
.tab:hover{color:var(--text);}
.tab .close{margin-left:.5rem;color:var(--muted);}
.topbar .meta{font-size:.75rem;color:var(--muted);}

/* Sidebar (file tree) */
.sidebar{
  position:fixed;top:42px;left:0;bottom:0;width:240px;
  background:var(--bg-2);border-right:1px solid var(--line);
  padding:1rem 0;overflow-y:auto;font-size:.85rem;z-index:40;
}
.sidebar-section{
  padding:.4rem 1rem;color:var(--muted);
  text-transform:uppercase;letter-spacing:.08em;font-size:.7rem;font-weight:600;
}
.file-tree{list-style:none;padding:0;margin:0;}
.file-tree li a{
  display:flex;align-items:center;gap:.5rem;
  padding:.35rem 1rem .35rem 1.5rem;color:var(--muted);
  text-decoration:none;border-left:2px solid transparent;
  transition:all .15s;font-size:.85rem;
}
.file-tree li a:hover{color:var(--text);background:rgba(255,255,255,.03);}
.file-tree li a.active{
  color:var(--text);border-left-color:var(--purple);
  background:rgba(167,139,250,.08);
}
.file-tree .ico{width:14px;font-size:.85rem;}
.file-tree .ico.folder{color:var(--blue);}
.file-tree .ico.md{color:var(--blue);}
.file-tree .ico.js{color:var(--yellow);}
.file-tree .ico.ts{color:var(--blue);}
.file-tree .ico.json{color:var(--yellow);}

/* Main content */
.main{
  margin-left:240px;padding:42px 0 0 0;
}
@media(max-width:992px){
  .sidebar{display:none;}
  .main{margin-left:0;}
}

/* Statusbar */
.statusbar{
  position:fixed;bottom:0;left:0;right:0;z-index:50;
  background:var(--purple);color:#0d1117;
  padding:.25rem 1rem;display:flex;justify-content:space-between;
  font-size:.72rem;font-weight:600;
}
.statusbar .left,.statusbar .right{display:flex;gap:1rem;align-items:center;}

/* Content */
.container-term{
  max-width:1100px;margin:0 auto;padding:2rem 1.5rem 4rem;
}

/* Hero */
.hero{
  padding:3rem 0 4rem;
}
.prompt-line{
  display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;
  color:var(--muted);font-size:.9rem;margin-bottom:.5rem;
  overflow:hidden;
}
.prompt-line .user{color:var(--green);}
.prompt-line .path{color:var(--blue);}
.prompt-line .cmd{color:var(--text);}
.cursor{
  display:inline-block;width:9px;height:1.1em;background:var(--green);
  margin-left:2px;vertical-align:middle;
  animation:blink 1.1s steps(2,start) infinite;
}
@keyframes blink{to{visibility:hidden;}}

h1.hero-name{
  font-family:'Inter',sans-serif;font-weight:700;
  font-size:clamp(2.5rem,6.5vw,4.6rem);
  letter-spacing:-.035em;line-height:1.02;
  margin:1.25rem 0;
}
h1.hero-name .grad{
  background:linear-gradient(90deg,var(--purple),var(--blue));
  -webkit-background-clip:text;background-clip:text;color:transparent;
}
.hero-sub{
  color:var(--muted);max-width:640px;font-size:1rem;line-height:1.7;
}
.hero-sub .kw{color:var(--purple);}
.hero-sub .str{color:var(--green);}

/* ASCII avatar */
.ascii-card{
  background:var(--bg-2);border:1px solid var(--line);border-radius:8px;
  padding:1.25rem;font-size:.7rem;line-height:1.05;
  color:var(--purple);white-space:pre;overflow:auto;
  box-shadow:0 0 30px rgba(167,139,250,.1);
}
.ascii-card .head{
  color:var(--muted);font-size:.72rem;margin-bottom:.75rem;
  padding-bottom:.5rem;border-bottom:1px solid var(--line);
  display:flex;justify-content:space-between;
}

/* Buttons */
.btn-term{
  display:inline-flex;align-items:center;gap:.5rem;
  padding:.6rem 1.1rem;border-radius:6px;
  background:transparent;border:1px solid var(--line);
  color:var(--text);text-decoration:none;font-size:.85rem;font-weight:500;
  transition:all .15s;
}
.btn-term:hover{
  background:var(--surface);border-color:var(--purple);color:var(--text);
  transform:translateY(-1px);
}
.btn-term.primary{
  background:var(--purple);border-color:var(--purple);color:#0d1117;font-weight:600;
}
.btn-term.primary:hover{
  background:#8b6df0;border-color:#8b6df0;color:#0d1117;
}

/* Section wrapper */
.section{
  padding:4rem 0;border-top:1px solid var(--line);
  position:relative;
}
.sec-header{
  display:flex;align-items:center;gap:1rem;margin-bottom:2rem;
  flex-wrap:wrap;
}
.sec-tag{
  font-size:.78rem;color:var(--muted);
  padding:.2rem .55rem;border:1px solid var(--line);border-radius:4px;
}
.sec-tag .hash{color:var(--purple);}
.sec-h2{
  font-family:'Inter',sans-serif;font-weight:700;
  font-size:clamp(1.6rem,3.5vw,2.5rem);letter-spacing:-.025em;margin:0;
}
.sec-comment{
  color:var(--muted);font-size:.85rem;margin-top:.5rem;
}
.sec-comment::before{content:"// ";color:var(--green);}

/* About — JSON style */
.json-card{
  background:var(--bg-2);border:1px solid var(--line);border-radius:8px;
  overflow:hidden;
}
.json-card .file-head{
  background:#0d1117;border-bottom:1px solid var(--line);
  padding:.55rem 1rem;font-size:.78rem;color:var(--muted);
  display:flex;justify-content:space-between;align-items:center;
}
.json-card .file-head .lang{
  background:rgba(167,139,250,.15);color:var(--purple);
  padding:.1rem .5rem;border-radius:3px;font-size:.7rem;
}
.json-body{
  padding:1.5rem 1.75rem;font-size:.92rem;
  counter-reset:line;
}
.json-body .ln{
  display:block;position:relative;padding-left:2.5rem;min-height:1.6em;
  white-space:pre-wrap;
}
.json-body .ln::before{
  counter-increment:line;content:counter(line);
  position:absolute;left:0;color:#444c56;width:2rem;text-align:right;
  user-select:none;
}
.k{color:var(--blue);}
.s{color:var(--green);}
.n{color:var(--yellow);}
.b{color:var(--purple);}
.c{color:var(--muted);font-style:italic;}
.json-body a{color:var(--green);text-decoration:underline;}

/* Skills */
.skill-grid{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:1rem;
}
.skill-card{
  background:var(--bg-2);border:1px solid var(--line);border-radius:8px;
  padding:1.25rem;transition:all .2s;position:relative;
  overflow:hidden;
}
.skill-card::before{
  content:"";position:absolute;top:0;left:0;width:100%;height:2px;
  background:linear-gradient(90deg,var(--purple),var(--blue));
  transform:scaleX(0);transform-origin:left;transition:transform .3s;
}
.skill-card:hover{
  border-color:var(--purple);transform:translateY(-3px);
  box-shadow:0 8px 24px -10px rgba(167,139,250,.3);
}
.skill-card:hover::before{transform:scaleX(1);}
.skill-head{
  display:flex;justify-content:space-between;align-items:center;
}
.skill-name{
  font-family:'Inter',sans-serif;font-weight:600;font-size:1.05rem;color:var(--text);
  margin-bottom: 0;
}
.skill-ext{
  font-size:.72rem;color:var(--muted);background:rgba(255,255,255,.05);
  padding:.15rem .45rem;border-radius:3px;
}

/* Projects */
.project-grid{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:1.25rem;
}
.project-card{
  background:var(--bg-2);border:1px solid var(--line);border-radius:8px;
  overflow:hidden;display:flex;flex-direction:column;
  transition:all .2s;
}
.project-card:hover{
  border-color:var(--purple);transform:translateY(-3px);
  box-shadow:0 8px 32px -8px rgba(167,139,250,.4);
}
.project-head{
  padding:.55rem 1rem;background:#0d1117;border-bottom:1px solid var(--line);
  display:flex;justify-content:space-between;align-items:center;
  font-size:.78rem;color:var(--muted);
}
.project-head .stat{
  display:inline-flex;align-items:center;gap:.4rem;
}
.project-head .stat .dot{
  width:7px;height:7px;border-radius:50%;display:inline-block;
}
.stat.live .dot{background:var(--green);box-shadow:0 0 8px var(--green);}
.stat.wip .dot{background:var(--yellow);}
.stat.archived .dot{background:var(--muted);}
.project-body{padding:1.25rem;flex:1;display:flex;flex-direction:column;}
.project-title{
  font-family:'Inter',sans-serif;font-weight:600;font-size:1.15rem;
  margin-bottom:.5rem;color:var(--text);
}
.project-title .at{color:var(--purple);}
.project-desc{color:var(--muted);font-size:.85rem;line-height:1.6;flex:1;margin-bottom:1rem;}
.tech-row{display:flex;flex-wrap:wrap;gap:.35rem;}
.tech-tag{
  font-size:.7rem;padding:.15rem .55rem;border-radius:3px;
  background:rgba(167,139,250,.1);color:var(--purple);
  border:1px solid rgba(167,139,250,.2);
}
.tech-tag.blue{background:rgba(88,166,255,.1);color:var(--blue);border-color:rgba(88,166,255,.2);}
.tech-tag.green{background:rgba(63,185,80,.1);color:var(--green);border-color:rgba(63,185,80,.2);}

/* Reveal */
.reveal{opacity:0;transform:translateY(20px);transition:opacity .7s,transform .7s;}
.reveal.in{opacity:1;transform:none;}

/* Footer */
footer{
  border-top:1px solid var(--line);padding:2.5rem 0 3rem;
  color:var(--muted);font-size:.85rem;
}
footer a{color:var(--green);text-decoration:none;}
footer a:hover{text-decoration:underline;}

/* Hide scrollbar styling in sidebar */
.sidebar::-webkit-scrollbar{width:6px;}
.sidebar::-webkit-scrollbar-thumb{background:var(--line);border-radius:3px;}

/* Scroll-to-top */
#scroll-top{
  position:fixed;bottom:2.5rem;right:1.5rem;z-index:100;
  width:38px;height:38px;border-radius:6px;
  background:var(--surface);border:1px solid var(--line);
  color:var(--muted);font-size:1rem;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;transition:all .2s;
  opacity:0;pointer-events:none;transform:translateY(8px);
}
#scroll-top.visible{opacity:1;pointer-events:auto;transform:translateY(0);}
#scroll-top:hover{border-color:var(--purple);color:var(--purple);}

@media(max-width:768px){
  .tabs{display:none;}
  h1.hero-name{font-size:2.2rem;}
  .section{padding:3rem 0;}
  .hero{padding:2rem 0 2.5rem;}
  .container-term{padding:1.5rem 1rem 4rem;}
  .prompt-line{flex-wrap:wrap;gap:.25rem;font-size:.8rem;}
  .json-body{padding:1rem 1rem 1rem 3rem;}
  .project-grid{grid-template-columns:1fr;}
  .statusbar{font-size:.65rem;padding:.25rem .75rem;}
  .statusbar .left,.statusbar .right{gap:.5rem;}
  footer{padding:1.5rem 0 2rem;}
}

@media(max-width:480px){
  .skill-grid{grid-template-columns:repeat(2,1fr);}
  .ascii-card{font-size:.62rem;}
  .btn-term{font-size:.8rem;padding:.5rem .85rem;}
  h1.hero-name{font-size:1.9rem;}
}
