:root{
  --bg:#050b06;
  --card: rgba(7, 20, 10, .72);
  --card2: rgba(5, 12, 7, .70);
  --text:#d9ffe6;
  --muted:#87b69a;
  --line: rgba(70, 255, 145, .14);
  --brand:#3dff8c;
  --brand2:#1ad36d;
  --shadow: 0 14px 38px rgba(0,0,0,.45);
  --radius: 18px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family: var(--mono);
  background:
    radial-gradient(1200px 700px at 20% 10%, rgba(61,255,140,.12), transparent 55%),
    radial-gradient(900px 600px at 90% 10%, rgba(26,211,109,.10), transparent 55%),
    var(--bg);
  color:var(--text);
  line-height:1.55;
  overflow-x:hidden;
}

a{color:inherit;text-decoration:none}
.container{max-width:1100px;margin:0 auto;padding:24px}

/* FX overlay */
.fx{
  pointer-events:none;
  position:fixed; inset:0;
  background:
    linear-gradient(to bottom, rgba(255,255,255,.045), rgba(0,0,0,0) 18%, rgba(0,0,0,.18)),
    repeating-linear-gradient(
      to bottom,
      rgba(0,0,0,.0) 0px,
      rgba(0,0,0,.0) 2px,
      rgba(0,0,0,.20) 3px
    );
  mix-blend-mode: overlay;
  opacity:.35;
}
body.no-fx .fx{display:none}

/* Matrix canvas */
#matrix{
  position:fixed; inset:0;
  width:100vw; height:100vh;
  z-index:-2;
  opacity:.65;
}

/* NAV */
.nav{
  position:sticky;top:0;z-index:50;
  backdrop-filter: blur(10px);
  background: rgba(5,11,6,.72);
  border-bottom:1px solid var(--line);
}
.nav-inner{
  display:flex;align-items:center;justify-content:space-between;
  gap:12px;
  padding:12px 18px;
  max-width:1100px;margin:0 auto;
}

.brand{
  display:flex;align-items:center;gap:10px;
  font-weight:800;letter-spacing:.2px;
}
.brand-dot{
  width:10px;height:10px;border-radius:999px;
  background: linear-gradient(135deg,var(--brand),var(--brand2));
  box-shadow: 0 0 0 4px rgba(61,255,140,.12), 0 0 28px rgba(61,255,140,.15);
}
.brand-text{font-weight:900}
.brand-badge{
  font-weight:800;
  font-size:12px;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid var(--line);
  color:var(--muted);
  background: rgba(5,12,7,.55);
}

.nav-links{
  display:flex;gap:18px;flex-wrap:wrap;
  color:var(--muted);
  font-weight:700;
  font-size:14px;
}
.nav-link{padding:8px 10px;border-radius:10px}
.nav-link:hover{color:var(--text); background: rgba(61,255,140,.06)}
.nav-link.active{color: var(--text); border:1px solid rgba(61,255,140,.22); background: rgba(61,255,140,.07)}

.nav-actions{display:flex;align-items:center;gap:10px}
.mini-actions{display:flex;gap:10px}

/* Buttons */
.btn{
  display:inline-flex;align-items:center;justify-content:center;
  padding:10px 14px;border-radius:12px;
  border:1px solid rgba(61,255,140,.22);
  background: rgba(7,20,10,.6);
  color:var(--text);
  font-weight:800;
  gap:10px;
  transition: transform .12s ease, border-color .12s ease, background .12s ease, filter .12s ease;
  cursor:pointer;
}
.btn:hover{transform: translateY(-1px);border-color: rgba(61,255,140,.45)}
.btn.primary{
  background: linear-gradient(135deg, rgba(61,255,140,.95), rgba(26,211,109,.85));
  border:0;
  color:#041006;
}
.btn.primary:hover{transform: translateY(-1px) scale(1.01)}
.btn.ghost{
  background: rgba(5,12,7,.45);
}

/* Burger */
.nav-burger{display:none}
.burger-icon{
  width:18px; height:14px; display:inline-flex; flex-direction:column; justify-content:space-between;
}
.burger-icon span{
  display:block;
  height:2px;
  width:100%;
  background: rgba(217,255,230,.85);
  border-radius:2px;
  box-shadow: 0 0 12px rgba(61,255,140,.12);
}

/* Drawer */
.nav-overlay{
  position:fixed; inset:0;
  background: rgba(0,0,0,.55);
  z-index:60;
}
.nav-drawer{
  position:fixed; left:0; top:0;
  height:100vh;
  width:min(320px, 86vw);
  z-index:61;
  background: rgba(5,11,6,.92);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(10px);
  transform: translateX(-102%);
  transition: transform .18s ease;
  box-shadow: 18px 0 40px rgba(0,0,0,.55);
  padding:12px;
}
.nav-drawer.open{transform: translateX(0)}
.drawer-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 8px 14px;
  border-bottom:1px solid var(--line);
}
.drawer-title{display:flex; align-items:center; gap:10px; font-weight:900}
.drawer-links{
  display:flex; flex-direction:column; gap:8px;
  padding:12px 4px;
}
.drawer-links a{
  padding:12px 12px;
  border-radius:12px;
  border:1px solid rgba(61,255,140,.12);
  background: rgba(7,20,10,.35);
}
.drawer-links a:hover{border-color: rgba(61,255,140,.35)}
.drawer-actions{
  display:grid;
  gap:10px;
  padding:10px 4px;
  border-top:1px solid var(--line);
}

/* Layout */
.card{
  background: var(--card);
  border:1px solid rgba(61,255,140,.18);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero{padding:44px 0 18px;}
.hero-grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:22px;
  align-items:stretch;
}
.hero-main{padding:18px}
.hero-side{padding:18px}

@media (max-width: 900px){
  .hero-grid{grid-template-columns:1fr}
}

.terminal-head{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:14px 16px;
  border-bottom:1px solid rgba(61,255,140,.14);
  background: rgba(5,12,7,.55);
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}
.traffic{display:flex;gap:6px}
.t{width:10px;height:10px;border-radius:999px;opacity:.95}
.t.red{background:#ff4d4d}
.t.yellow{background:#ffd24d}
.t.green{background:#3dff8c}
.term-title{font-weight:900;color:rgba(217,255,230,.85); font-size:13px}
.term-right{font-size:13px}
.ok{color: var(--brand); font-weight:900}

.terminal{padding:18px 18px 22px}
.prompt{margin:0 0 10px; color:var(--muted); font-weight:800}
.user,.host,.path{color: var(--brand)}
.cmd{color: var(--text)}
.caret{animation: blink 1s steps(2,end) infinite}
@keyframes blink {50%{opacity:0}}

.headline{
  margin:12px 0 10px;
  font-size:42px;line-height:1.15;
  letter-spacing:-.5px;
}
@media (max-width: 520px){ .headline{font-size:34px} }

.subtitle{margin:0 0 12px}
.kicker{color:var(--muted); font-weight:900}
.role{font-weight:900}

.desc{margin:0 0 12px; color: rgba(217,255,230,.90); font-weight:650}
.muted{color:var(--muted); font-weight:650}
.small{font-size:13px}
.mono{font-family: var(--mono)}

.cta{display:flex;gap:12px;flex-wrap:wrap;margin-top:14px}
.chips{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.chip{
  font-size:12px;font-weight:900;color:var(--muted);
  border:1px solid rgba(61,255,140,.16);
  background: rgba(5,12,7,.45);
  padding:6px 10px;border-radius:999px;
}

.side-top{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; padding:6px 6px 14px;
}
.label{font-size:13px}
.side-title{font-weight:900; font-size:16px}
.pill{
  display:inline-flex;gap:8px;align-items:center;
  padding:6px 10px;border:1px solid rgba(61,255,140,.18);
  border-radius:999px;color:var(--muted);
  background: rgba(5,12,7,.55);
  font-size:13px;font-weight:900;
}
.dot{
  width:7px;height:7px;border-radius:999px;
  background: var(--brand);
  box-shadow: 0 0 16px rgba(61,255,140,.25);
}

.facts{display:grid;gap:10px;padding:10px 6px}
.fact{
  display:flex;justify-content:space-between;gap:12px;
  padding:12px 14px;border-radius:14px;
  background: rgba(5,12,7,.45);
  border:1px solid rgba(61,255,140,.14);
  color:var(--muted);
  font-weight:900;
}
.fact span:last-child{color:var(--text);font-weight:900}

.side-actions{display:flex;gap:10px;flex-wrap:wrap;padding:8px 6px 4px}

section{padding:22px 0}
.section-title{
  display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap;
  margin:10px 0 12px;
}
.section-title h2{margin:0;font-size:24px;letter-spacing:-.2px;font-weight:900}

.grid-3{display:grid;grid-template-columns: repeat(3,1fr);gap:14px;}
.grid-2{display:grid;grid-template-columns: repeat(2,1fr);gap:14px;}
@media (max-width: 900px){
  .grid-3{grid-template-columns:1fr}
  .grid-2{grid-template-columns:1fr}
}

.box{padding:18px}
.box h3{margin:0 0 10px;font-size:16px}
.tags{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.tag{
  font-size:12px;font-weight:900;color:var(--muted);
  border:1px solid rgba(61,255,140,.16);
  background: rgba(5,12,7,.45);
  padding:6px 10px;border-radius:999px;
}

.codebox{
  border:1px solid rgba(61,255,140,.14);
  background: rgba(0,0,0,.20);
  border-radius:14px;
  padding:12px;
  overflow:auto;
}
.codebox pre{margin:0; white-space:pre-wrap}

.split-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}

.skills-grid{
  display:grid;
  grid-template-columns: repeat(2,1fr);
  gap:14px;
}
@media (max-width: 700px){
  .skills-grid{grid-template-columns:1fr}
}
.skill-top{display:flex;justify-content:space-between;gap:10px;margin-bottom:8px}
.skill-name{font-weight:900}
.skill-val{color:var(--muted);font-weight:900}
.bar{
  height:10px;
  border-radius:999px;
  border:1px solid rgba(61,255,140,.18);
  background: rgba(0,0,0,.20);
  overflow:hidden;
}
.bar span{
  display:block;
  height:100%;
  width:0%;
  background: linear-gradient(90deg, rgba(61,255,140,.92), rgba(26,211,109,.75));
  box-shadow: 0 0 22px rgba(61,255,140,.15);
  transition: width 1.1s ease;
}

.proj{padding:18px; display:flex; flex-direction:column; gap:10px}
.proj-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.proj h3{margin:0;font-size:16px}
.proj p{margin:0;color:var(--muted);font-weight:650}
.proj-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:8px}
.pill.mini{font-size:12px;padding:5px 9px}

.contact-list{display:grid;gap:12px}
.contact-item{
  display:flex; justify-content:space-between; gap:12px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(61,255,140,.14);
  background: rgba(5,12,7,.45);
}
.glow-link{color: var(--text)}
.glow-link:hover{color: var(--brand)}
.divider{height:1px;background: rgba(61,255,140,.14);margin:12px 0}

.input{
  width:100%;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid rgba(61,255,140,.16);
  background: rgba(0,0,0,.18);
  color:var(--text);
  outline:none;
  font-weight:700;
}
.input:focus{border-color: rgba(61,255,140,.45)}
textarea.input{min-height:120px;resize:vertical}

.footer{
  padding:22px 0 30px;
  color:var(--muted);
  border-top:1px solid rgba(61,255,140,.14);
  margin-top:12px;
}
.footer-inner{
  display:flex; gap:18px; justify-content:space-between; align-items:flex-start;
  flex-wrap:wrap;
}
.right{text-align:right}
.heart{color: var(--brand)}
.glow{
  text-shadow: 0 0 18px rgba(61,255,140,.22);
}
body.no-glow .glow,
body.no-glow .brand-dot,
body.no-glow .dot,
body.no-glow .bar span{
  text-shadow:none !important;
  box-shadow:none !important;
  filter:none !important;
}

/* Glitch mode (subtle) */
body.glitch .headline{
  position:relative;
}
body.glitch .headline::before,
body.glitch .headline::after{
  content:attr(data-text);
  position:absolute; left:0; top:0;
  width:100%;
  opacity:.35;
  pointer-events:none;
}
body.glitch .headline::before{transform: translate(2px,-1px)}
body.glitch .headline::after{transform: translate(-2px,1px)}

/* Responsive NAV behavior */
@media (max-width: 860px){
  .nav-links{display:none}
  .nav-burger{display:inline-flex}
  .container{padding:18px}
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce){
  *{scroll-behavior:auto}
  .caret{animation:none}
  .bar span{transition:none}
  .nav-drawer{transition:none}
  .btn{transition:none}
}


/* RESPONSIVE */
@media (max-width: 900px){
  .hero-grid{grid-template-columns:1fr}
  .grid-3{grid-template-columns:1fr}
  .grid-2{grid-template-columns:1fr}
  .footer-grid{flex-direction:column; text-align:left}
  .right{text-align:left}
}

@media (max-width: 780px){
  .nav-links{display:none}
  .burger{display:flex}
  .hero h1{font-size:34px}
}

/* MOBILE: remove glitch + glow + heavy FX */
@media (max-width: 780px){
  #btnGlow, #btnGlitch{display:none !important;}
  body{background: var(--bg);}
  .fx{display:none;}
  #matrix{opacity:.10;}

  /* force-disable effects even if toggled */
  body.glow-on .card,
  body.glow-on .btn.primary{
    box-shadow: var(--shadow);
  }
  body.glitch-on .glitch-title::before,
  body.glitch-on .glitch-title::after{
    content:none !important;
    animation:none !important;
  }
}

/* also respect accessibility preferences */
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto}
  #matrix{display:none}
  .fx{display:none}
  body.glitch-on .glitch-title::before,
  body.glitch-on .glitch-title::after{content:none}
}




/* glitch */
/* Whole-page glitch shake */
#app.glitch-shake{
  animation: appShake 0.6s linear both;
  will-change: transform, filter;
}

/* Optional: add a tiny RGB split during shake */
#app.glitch-shake{
  filter: url('#glitchFilter');
}

@keyframes appShake{
  0%   { transform: translate(0,0) rotate(0deg); }
  8%   { transform: translate(-2px, 1px) rotate(-0.2deg); }
  16%  { transform: translate(2px, -1px) rotate(0.2deg); }
  24%  { transform: translate(-3px, 2px) rotate(-0.3deg); }
  32%  { transform: translate(3px, 0px) rotate(0.3deg); }
  40%  { transform: translate(-2px, -2px) rotate(-0.2deg); }
  48%  { transform: translate(2px, 2px) rotate(0.2deg); }
  56%  { transform: translate(-1px, 1px) rotate(-0.15deg); }
  64%  { transform: translate(1px, -1px) rotate(0.15deg); }
  72%  { transform: translate(-2px, 0px) rotate(-0.2deg); }
  80%  { transform: translate(2px, 0px) rotate(0.2deg); }
  88%  { transform: translate(-1px, -1px) rotate(-0.1deg); }
  100% { transform: translate(0,0) rotate(0deg); }
}

/* Optional: quick screen flash */
.glitch-flash{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: rgba(57,255,136,.06);
  mix-blend-mode: screen;
  opacity: 0;
}

.glitch-flash.on{
  animation: flash 0.6s linear both;
}

@keyframes flash{
  0%{opacity:0}
  10%{opacity:.7}
  20%{opacity:.15}
  35%{opacity:.55}
  50%{opacity:.12}
  70%{opacity:.35}
  100%{opacity:0}
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  #app.glitch-shake{ animation: none; filter:none; }
  .glitch-flash.on{ animation:none; opacity:0; }
}
