:root{
  --bg: #0b1220;
  --panel: rgba(255,255,255,.06);
  --panel2: rgba(255,255,255,.08);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.70);
  --muted2: rgba(255,255,255,.55);
  --line: rgba(255,255,255,.12);
  --brand: #7c3aed;
  --brand2: #22c55e;
  --shadow: 0 18px 50px rgba(0,0,0,.38);
  --radius: 18px;
  --max: 1120px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

:root[data-theme="light"]{
  --bg: #f6f7fb;
  --panel: rgba(0,0,0,.05);
  --panel2: rgba(0,0,0,.07);
  --text: rgba(0,0,0,.88);
  --muted: rgba(0,0,0,.62);
  --muted2: rgba(0,0,0,.48);
  --line: rgba(0,0,0,.10);
  --shadow: 0 18px 50px rgba(0,0,0,.12);
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  background: radial-gradient(900px 500px at 20% 10%, rgba(124,58,237,.22), transparent 60%),
              radial-gradient(900px 500px at 80% 0%, rgba(34,197,94,.16), transparent 55%),
              var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
}

a{ color: inherit; text-decoration: none; }
a:hover{ opacity: .95; }

.container{
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.skip-link{
  position:absolute;
  left:-9999px;
  top:8px;
  padding:10px 12px;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.skip-link:focus{ left: 16px; z-index: 9999; }

/* Header */
.header{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, .55);
}
:root[data-theme="light"] .header{ background: rgba(246, 247, 251, .75); }

.navwrap{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 14px;
}

.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: .2px;
}
.brandMark{
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(124,58,237,.9), rgba(34,197,94,.6));
  box-shadow: 0 10px 30px rgba(124,58,237,.22);
}
.brandText{ font-size: 15px; }

.nav{
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav a{
  font-size: 14px;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 12px;
}
.nav a:hover{
  color: var(--text);
  background: var(--panel);
  border: 1px solid transparent;
}

.modeBtn{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}
.modeDot{
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.95), rgba(255,255,255,.10));
  border: 1px solid var(--line);
}
.modeText{ font-size: 13px; color: var(--muted); }

/* Mobile menu button */
.navToggle{
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  cursor: pointer;
}
.navToggle span{
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  margin: 4px auto;
  border-radius: 99px;
  opacity: .9;
}

/* Hero */
.hero{
  position: relative;
  padding: 58px 0 26px;
}
.heroGlow{
  position: absolute;
  inset: 0;
  background: radial-gradient(700px 350px at 50% 30%, rgba(124,58,237,.16), transparent 55%);
  pointer-events: none;
  filter: blur(2px);
}
.heroGrid{
  position: relative;
  display: grid;
  gap: 22px;
  grid-template-columns: 1.2fr .8fr;
  align-items: start;
}
.badge{
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
}
h1{
  margin: 14px 0 10px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.4px;
}
.lead{
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 16px;
}

.ctaRow{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}
.btn:hover{ transform: translateY(-1px); }
.btn.primary{
  border: 1px solid rgba(124,58,237,.45);
  background: linear-gradient(135deg, rgba(124,58,237,.95), rgba(34,197,94,.55));
  box-shadow: 0 16px 45px rgba(124,58,237,.18);
}
.btn.ghost{
  background: transparent;
}

.btn.small{
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
}

.metaRow{
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.metaLink{
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
}
.icon{
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--text);
  font-weight: 800;
}

.tiny{ font-size: 12px; color: var(--muted2); margin-top: 10px; }

/* Cards */
.card{
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.card h2, .card h3{ margin: 0 0 10px; }
.muted{ color: var(--muted); }
.subtle{ box-shadow: none; background: rgba(255,255,255,.04); }

.profileCard{ padding: 18px; }
.avatar{
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 26px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(124,58,237,.25), rgba(34,197,94,.20));
  overflow: hidden;
}
.avatar img{ width: 100%; height: 100%; object-fit: cover; }
.avatarFallback{
  font-weight: 900;
  letter-spacing: .5px;
  font-size: 22px;
}
.profileInfo{ margin-top: 12px; }
.profileInfo h2{ margin: 0; font-size: 18px; }
.profileInfo p{ margin: 6px 0 0; color: var(--muted); font-size: 13px; }

.chips{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.chip{
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--muted);
}

.stats{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.stat{
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  border-radius: 16px;
  padding: 10px 12px;
}
.statNum{ font-weight: 900; }
.statLabel{ font-size: 12px; color: var(--muted); }

.cardNote{
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

/* Sections */
.section{
  padding: 34px 0;
}
.sectionHead{
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.sectionHead h2{
  margin: 0;
  font-size: 22px;
}
.grid2{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.list{
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}
.list li{ margin: 8px 0; }

.miniRow{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.timeline{
  display: grid;
  gap: 12px;
}
.tTop{
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.pill{
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--muted);
  font-size: 12px;
}

.tagGrid{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.tag{
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
  font-size: 13px;
}

.cards3{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.project .projMeta{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.projLinks{
  margin-top: 12px;
}
.link{
  color: var(--text);
  border-bottom: 1px dashed var(--line);
  padding-bottom: 2px;
}
.link:hover{ opacity: .9; }

.contactBox{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* Footer */
.footer{
  border-top: 1px solid var(--line);
  padding: 18px 0 34px;
}
.foot{
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.foot p{ margin: 0; font-size: 13px; }

/* Responsive */
@media (max-width: 980px){
  .heroGrid{ grid-template-columns: 1fr; }
  .cards3{ grid-template-columns: 1fr; }
  .grid2{ grid-template-columns: 1fr; }
}

@media (max-width: 820px){
  .navToggle{ display: inline-block; }
  .nav{
    position: absolute;
    top: 62px;
    right: 20px;
    left: 20px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, .85);
    box-shadow: var(--shadow);
  }
  :root[data-theme="light"] .nav{ background: rgba(246, 247, 251, .92); }
  .nav a{ width: 100%; }
  .nav.open{ display: flex; }
  .modeBtn{ width: 100%; justify-content: center; }
}
