:root{
  --bg: #070A12;
  --bg2:#0B1020;
  --card: rgba(255,255,255,.06);
  --card2: rgba(255,255,255,.08);
  --border: rgba(255,255,255,.10);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.65);
  --shadow: 0 18px 50px rgba(0,0,0,.35);
  --radius: 18px;
  --radius2: 26px;
  --accent1: #7C3AED;
  --accent2: #22D3EE;
  --good: #34D399;
  --warn: #FBBF24;
}

[data-theme="light"]{
  --bg: #F7F7FB;
  --bg2:#FFFFFF;
  --card: rgba(20,20,20,.05);
  --card2: rgba(20,20,20,.06);
  --border: rgba(20,20,20,.10);
  --text: rgba(10,10,10,.90);
  --muted: rgba(10,10,10,.60);
  --shadow: 0 18px 50px rgba(0,0,0,.12);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: radial-gradient(1200px 600px at 15% 10%, rgba(124,58,237,.25), transparent 50%),
              radial-gradient(900px 500px at 80% 20%, rgba(34,211,238,.22), transparent 55%),
              linear-gradient(180deg, var(--bg), var(--bg2));
  color: var(--text);
  overflow-x:hidden;
}

.bg-noise{
  pointer-events:none;
  position:fixed;
  inset:0;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  opacity:.3;
}

.container{ width:min(1150px, 92%); margin:0 auto; }

.header{
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,0));
  border-bottom:1px solid rgba(255,255,255,.06);
}
[data-theme="light"] .header{
  background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,.40));
  border-bottom:1px solid rgba(0,0,0,.06);
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 0;
  gap:18px;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color:var(--text);
  font-weight:800;
  letter-spacing:.2px;
}
.brand-dot{
  width:12px;height:12px;border-radius:99px;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  box-shadow: 0 0 0 6px rgba(124,58,237,.18);
}

.nav{
  display:flex;
  gap:18px;
  align-items:center;
}
.nav a{
  text-decoration:none;
  color:var(--muted);
  font-weight:600;
  font-size:14px;
  padding:8px 10px;
  border-radius:12px;
  transition:.2s ease;
}
.nav a:hover{ color:var(--text); background: var(--card); }

.header-actions{
  display:flex;
  gap:10px;
  align-items:center;
}

.icon-btn{
  border:1px solid var(--border);
  background: var(--card);
  color:var(--text);
  border-radius:14px;
  padding:10px 12px;
  cursor:pointer;
  transition:.2s ease;
}
.icon-btn:hover{ transform: translateY(-1px); background: var(--card2); }

.burger{ display:none; }

.btn{
  border:1px solid var(--border);
  background: transparent;
  color:var(--text);
  border-radius:14px;
  padding:10px 14px;
  cursor:pointer;
  font-weight:700;
  text-decoration:none;
  display:inline-flex;
  gap:10px;
  align-items:center;
  justify-content:center;
  transition:.2s ease;
}
.btn:hover{ transform: translateY(-1px); background: var(--card); }

.btn-primary{
  border:none;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color: #081018;
  box-shadow: 0 10px 30px rgba(34,211,238,.14);
}
.btn-primary:hover{ filter:saturate(1.15); }

.btn-ghost{
  background: var(--card);
}

.mobile-nav{
  display:none;
  border-top:1px solid rgba(255,255,255,.06);
  padding:10px 0 16px;
}
.mobile-nav a{
  display:block;
  padding:12px 4%;
  text-decoration:none;
  color:var(--muted);
  font-weight:700;
}
.mobile-nav a:hover{ color:var(--text); background: var(--card); }

.hero{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:30px;
  padding:48px 0 10px;
  align-items:center;
}

.pill{
  display:inline-flex;
  border:1px solid var(--border);
  background: var(--card);
  padding:8px 12px;
  border-radius:999px;
  color: var(--muted);
  font-weight:700;
  font-size:13px;
}

.hero-title{
  font-size: clamp(34px, 4.2vw, 56px);
  margin: 16px 0 12px;
  line-height:1.05;
}
.grad{
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.hero-sub{
  color: var(--muted);
  font-size: 16px;
  line-height:1.6;
  max-width: 58ch;
}

.hero-actions{ display:flex; gap:12px; margin:18px 0 12px; flex-wrap:wrap; }

.quick-links{ display:flex; gap:10px; flex-wrap:wrap; margin:12px 0 0; }
.quick-links a{
  border:1px solid var(--border);
  background: var(--card);
  padding:10px 12px;
  border-radius:14px;
  color: var(--text);
  text-decoration:none;
  font-weight:800;
  font-size:13px;
  transition:.2s ease;
}
.quick-links a:hover{ transform: translateY(-1px); background: var(--card2); }

.hero-badges{ display:flex; gap:10px; flex-wrap:wrap; margin-top:14px; }
.badge{
  border:1px solid var(--border);
  background: rgba(0,0,0,.18);
  padding:10px 12px;
  border-radius:14px;
  font-weight:800;
  color: var(--muted);
}

.glass-card{
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  padding:16px;
  position:relative;
  overflow:hidden;
}
.card-top{
  display:flex;
  align-items:center;
  gap:10px;
  justify-content:space-between;
  margin-bottom:10px;
}
.card-title{ font-weight:900; letter-spacing:.3px; }
.chip{
  font-size:12px;
  font-weight:900;
  border:1px solid var(--border);
  background: var(--card);
  padding:6px 10px;
  border-radius:999px;
}
.pulse{
  width:10px;height:10px;border-radius:99px;
  background: var(--good);
  box-shadow: 0 0 0 8px rgba(52,211,153,.14);
  animation: pulse 1.8s infinite;
  margin-right:auto;
}
@keyframes pulse{
  0%{ transform:scale(1); opacity:1; }
  70%{ transform:scale(1.2); opacity:.6; }
  100%{ transform:scale(1); opacity:1; }
}
.terminal{
  border-radius: 16px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.28);
  padding:14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
}
.line{ padding:6px 0; color: rgba(255,255,255,.82); }
.muted{ color: rgba(255,255,255,.55); }
[data-theme="light"] .terminal{
  background: rgba(0,0,0,.06);
}
[data-theme="light"] .muted{ color: rgba(0,0,0,.55); }
[data-theme="light"] .line{ color: rgba(0,0,0,.82); }

.card-bottom{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:10px;
  margin-top:12px;
}
.mini{
  border:1px solid var(--border);
  background: var(--card);
  border-radius:16px;
  padding:10px;
}
.mini-label{ color: var(--muted); font-weight:800; font-size:12px; }
.mini-value{ font-weight:900; font-size:14px; margin-top:4px; }

.floating{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
  justify-content:flex-end;
}
.float-item{
  border:1px solid var(--border);
  background: var(--card);
  padding:10px 12px;
  border-radius:14px;
  font-weight:900;
  color: var(--muted);
}

.section{ padding: 54px 0; }
.section-head h2{ margin:0; font-size:28px; }
.section-head p{ margin:8px 0 0; color: var(--muted); max-width: 70ch; }

.grid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:14px;
  margin-top:18px;
}
.card{
  border:1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  padding:16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.10);
  transition:.2s ease;
}
.card:hover{ transform: translateY(-2px); background: var(--card2); }

.card h3{ margin: 0 0 6px; }
.card p{ margin: 0 0 12px; color: var(--muted); line-height:1.6; }
.bullets{ padding-left: 18px; margin: 0; color: var(--muted); }
.bullets li{ margin: 7px 0; font-weight:700; }

.stats{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:12px;
}
.stat{
  border:1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  border-radius: var(--radius);
  padding:14px;
}
.stat .num{ font-size:26px; font-weight:950; }
.stat .lbl{ color: var(--muted); font-weight:800; margin-top:4px; }

.projects-toolbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin-top:16px;
}
.tabs{ display:flex; gap:10px; flex-wrap:wrap; }
.tab{
  border:1px solid var(--border);
  background: var(--card);
  padding:10px 12px;
  border-radius:999px;
  cursor:pointer;
  font-weight:900;
  color: var(--muted);
  transition:.2s ease;
}
.tab.active{
  background: linear-gradient(135deg, rgba(124,58,237,.22), rgba(34,211,238,.18));
  color: var(--text);
}
.searchbox input{
  border:1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius:14px;
  padding:10px 12px;
  min-width: 260px;
  outline:none;
}
.searchbox input::placeholder{ color: var(--muted); }

.featured{
  margin-top:16px;
  border:1px solid var(--border);
  background: linear-gradient(135deg, rgba(124,58,237,.18), rgba(34,211,238,.12));
  border-radius: var(--radius2);
  padding:16px;
  box-shadow: var(--shadow);
  display:none;
}
.featured.show{ display:block; }
.featured .top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.featured h3{ margin:0; }
.featured p{ margin:10px 0 12px; color: var(--muted); max-width: 75ch; }
.pills{ display:flex; gap:8px; flex-wrap:wrap; }
.pills .pill2{
  border:1px solid var(--border);
  background: var(--card);
  padding:8px 10px;
  border-radius:999px;
  font-weight:900;
  color: var(--muted);
  font-size:12px;
}

.projects-grid{ grid-template-columns: repeat(3, 1fr); }
.project-card .meta{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}
.project-card .title{ font-weight:950; margin: 4px 0 6px; }
.project-card .desc{ color: var(--muted); margin:0 0 10px; line-height:1.55; }
.project-card .tags{ display:flex; gap:8px; flex-wrap:wrap; }
.tag{
  font-size:12px;
  font-weight:900;
  border:1px solid var(--border);
  background: var(--card);
  padding:6px 10px;
  border-radius:999px;
  color: var(--muted);
}

.about{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:16px;
}
.about p{ color: var(--muted); line-height:1.7; }
.about-points{
  display:flex; gap:10px; flex-wrap:wrap; margin-top:12px;
}
.point{
  border:1px solid var(--border);
  background: var(--card);
  padding:10px 12px;
  border-radius:14px;
  font-weight:900;
  color: var(--muted);
}
.callout{
  border:1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius2);
  padding:16px;
  box-shadow: var(--shadow);
}
.callout-title{ font-weight:950; margin-bottom:8px; }
.callout ol{ margin:0; padding-left: 18px; color: var(--muted); font-weight:800; }
.callout li{ margin:10px 0; }

.contact{
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap:16px;
  margin-top:18px;
}
.contact-card{
  border:1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius2);
  padding:16px;
  box-shadow: var(--shadow);
}
.contact-row{
  display:flex;
  justify-content:space-between;
  padding:10px 0;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.contact-row .label{ color: var(--muted); font-weight:900; }
.divider{ height:1px; background: rgba(255,255,255,.06); margin: 12px 0; }

form input, form textarea{
  width:100%;
  border:1px solid var(--border);
  background: rgba(0,0,0,.12);
  color: var(--text);
  border-radius:14px;
  padding:12px;
  outline:none;
  margin:8px 0;
}
[data-theme="light"] form input, [data-theme="light"] form textarea{
  background: rgba(0,0,0,.04);
}
.two{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}
.hint{ color: var(--muted); font-weight:700; font-size:12px; margin: 8px 0 0; }

.contact-side{ display:flex; flex-direction:column; gap:12px; }
.glass-note{
  border:1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  border-radius: var(--radius2);
  padding:16px;
  box-shadow: var(--shadow);
}
.glass-note h3{ margin:0 0 8px; }
.glass-note p{ margin:0 0 12px; color: var(--muted); line-height:1.65; }

.channels{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.channel{
  border:1px dashed var(--border);
  background: var(--card);
  padding:12px 12px;
  border-radius:14px;
  font-weight:950;
  color: var(--muted);
}
.channel a{ color: var(--text); text-decoration:none; }

.footer{
  padding: 26px 0 40px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}
.footer a{ color: var(--muted); text-decoration:none; font-weight:900; }
.footer a:hover{ color: var(--text); }
.brand.small{ font-size:14px; }

/* Modal */
.modal{
  position:fixed;
  inset:0;
  display:none;
  z-index:80;
}
.modal.show{ display:block; }
.modal-backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
}
.modal-card{
  position:relative;
  width:min(720px, 92%);
  margin: 6vh auto 0;
  border:1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.04));
  border-radius: var(--radius2);
  padding:16px;
  box-shadow: var(--shadow);
}
.modal-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}
.modal-tags{ display:flex; gap:8px; flex-wrap:wrap; margin-top:6px; }
.modal-card p{ color: var(--muted); line-height:1.65; }
.modal-card ul{ color: var(--muted); font-weight:800; }
.modal-actions{ display:flex; gap:10px; flex-wrap:wrap; }
.toast{
  margin-top:10px;
  display:none;
  border:1px solid var(--border);
  background: var(--card);
  padding:10px 12px;
  border-radius:14px;
  font-weight:900;
}
.toast.show{ display:block; }

/* Reveal animations */
.reveal{ opacity:0; transform: translateY(10px); transition: .5s ease; }
.reveal.show{ opacity:1; transform: translateY(0); }

/* Responsive */
@media (max-width: 980px){
  .hero{ grid-template-columns: 1fr; }
  .projects-grid{ grid-template-columns: repeat(2, 1fr); }
  .about{ grid-template-columns: 1fr; }
  .contact{ grid-template-columns: 1fr; }
  .stats{ grid-template-columns: repeat(2, 1fr); }
  .grid{ grid-template-columns: 1fr; }
  .nav{ display:none; }
  .burger{ display:inline-flex; }
  .mobile-nav{ display:none; }
  .mobile-nav.show{ display:block; }
}
@media (max-width: 520px){
  .projects-grid{ grid-template-columns: 1fr; }
  .two{ grid-template-columns: 1fr; }
  .searchbox input{ min-width: 180px; width: 100%; }
}