:root{
  --bg: #070A12;
  --panel: rgba(255,255,255,.06);
  --panel2: rgba(255,255,255,.08);
  --line: rgba(255,255,255,.10);
  --text: #EAF0FF;
  --muted: rgba(234,240,255,.70);

  --brand1: #7C3AED;
  --brand2: #06B6D4;
  --brand3: #22C55E;

  --shadow: 0 16px 60px rgba(0,0,0,.40);
  --radius: 18px;
}

[data-theme="light"]{
  --bg:#F6F7FB;
  --panel: rgba(17,24,39,.05);
  --panel2: rgba(17,24,39,.07);
  --line: rgba(17,24,39,.10);
  --text:#0B1220;
  --muted: rgba(11,18,32,.70);
  --shadow: 0 16px 60px rgba(17,24,39,.15);
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  overflow-x:hidden;
}

a{ color:inherit; text-decoration:none; }

.container{
  width:min(1120px, 92vw);
  margin:0 auto;
}

.bg-glow{
  position:fixed;
  inset:-40%;
  background:
    radial-gradient(40% 40% at 30% 20%, rgba(124,58,237,.35), transparent 60%),
    radial-gradient(40% 40% at 70% 10%, rgba(6,182,212,.28), transparent 60%),
    radial-gradient(35% 35% at 60% 70%, rgba(34,197,94,.20), transparent 60%);
  filter: blur(40px);
  pointer-events:none;
  z-index:-1;
}

/* Header */
.header{
  position:sticky;
  top:0;
  z-index:50;
  background: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,0));
  backdrop-filter: blur(10px);
}
[data-theme="light"] .header{
  background: linear-gradient(to bottom, rgba(255,255,255,.75), rgba(255,255,255,0));
}

.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
  letter-spacing:.6px;
}
.brand-dot{
  width:12px;height:12px;border-radius:999px;
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  box-shadow: 0 0 0 6px rgba(124,58,237,.15);
}
.brand-text{ font-size:14px; }

.nav-links{
  display:flex;
  align-items:center;
  gap:18px;
  padding:10px 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius:999px;
}

.nav-link{
  font-size:13px;
  color: var(--muted);
  padding:8px 10px;
  border-radius:999px;
  transition: .2s ease;
}
.nav-link:hover{ color: var(--text); background: var(--panel2); }
.nav-link.active{ color: var(--text); background: var(--panel2); }

.nav-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

.burger{
  display:none;
  width:44px;height:44px;
  border-radius:12px;
  border:1px solid var(--line);
  background: var(--panel);
  cursor:pointer;
}
.burger span{
  display:block;
  height:2px;
  margin:6px 10px;
  background: var(--text);
  opacity:.9;
}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  height:44px;
  padding:0 16px;
  border-radius:14px;
  border:1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-weight:700;
  font-size:13px;
  cursor:pointer;
  transition: .2s ease;
}
.btn:hover{ transform: translateY(-1px); box-shadow: var(--shadow); }

.btn.primary{
  border:none;
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
}
.btn.ghost{ background: transparent; }
.btn.subtle{ background: var(--panel2); }

.section{
  padding: 70px 0;
}

.section-head{
  margin-bottom: 22px;
}
.section-head h2{
  margin:0 0 8px;
  font-size: 28px;
}
.muted{ color: var(--muted); }

/* Hero */
.hero{
  padding-top: 50px;
}
.hero-grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 18px;
  align-items: start;
}
.pill{
  display:inline-flex;
  gap:10px;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size:13px;
  margin:0 0 14px;
}
.headline{
  margin:0;
  font-size: 44px;
  letter-spacing: -0.8px;
}
.grad{
  background: linear-gradient(135deg, var(--brand1), var(--brand2), var(--brand3));
  -webkit-background-clip: text;
  background-clip:text;
  color: transparent;
}
.subhead{
  margin: 12px 0 18px;
  font-size: 16px;
  color: var(--muted);
  line-height: 1.5;
}

.hero-cards{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 14px 0 18px;
}
.mini-card{
  border:1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 14px;
}
.mini-title{
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.mini-value{
  font-weight: 800;
  font-size: 13px;
}

.cta{ display:flex; gap: 10px; margin: 10px 0 18px; flex-wrap:wrap; }

.hero-meta{
  display:flex;
  gap: 18px;
  flex-wrap:wrap;
  padding-top: 8px;
}
.meta-item{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.meta-k{ font-size:12px; color: var(--muted); }
.meta-v{ font-weight:800; font-size:13px; }

/* Profile Card */
.profile-card{
  border:1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  border-radius: calc(var(--radius) + 6px);
  overflow:hidden;
  box-shadow: var(--shadow);
}
.profile-top{
  padding:14px;
  display:flex;
  justify-content:flex-end;
}
.badge{
  font-size:12px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(34,197,94,.12);
}
.profile-photo{
  padding: 0 14px 14px;
}
.profile-photo img{
  width:100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: var(--radius);
  border:1px solid var(--line);
  background: var(--panel);
}
.profile-info{
  padding: 0 18px 18px;
}
.profile-info h2{
  margin: 10px 0 6px;
  font-size: 18px;
}
.hint{ margin:10px 0 0; font-size:12px; color: var(--muted); }

.stats{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:10px;
  margin: 14px 0 12px;
}
.stat{
  border:1px solid var(--line);
  background: var(--panel);
  border-radius: 14px;
  padding: 12px;
}
.stat-k{ font-size:12px; color: var(--muted); }
.stat-v{ font-weight:900; margin-top:4px; }

/* Layout helpers */
.grid-2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.card{
  border:1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 18px;
}
.card h3{ margin:0 0 10px; font-size:18px; }

.info-list{ display:flex; flex-direction:column; gap:10px; }
.info-row{
  display:flex; justify-content:space-between; gap:14px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:14px;
  background: var(--panel2);
}
.info-row span:first-child{ color: var(--muted); font-size: 13px; }
.info-row span:last-child{ font-weight: 800; font-size: 13px; }

.chips{ display:flex; flex-wrap:wrap; gap:10px; margin-top:14px; }
.chip{
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background: var(--panel2);
  font-size: 12px;
  font-weight: 700;
}

/* Skills */
.skill{ margin-bottom:14px; }
.skill-top{
  display:flex; justify-content:space-between;
  font-weight:800;
  margin-bottom:8px;
}
.bar{
  height: 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.05);
  overflow:hidden;
}
.fill{
  height:100%;
  width: var(--w);
  border-radius:999px;
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  transform-origin:left;
}

/* Timeline */
.timeline{ display:flex; flex-direction:column; gap:12px; }
.t-item{
  display:grid;
  grid-template-columns: 16px 1fr;
  gap:12px;
  align-items:start;
}
.t-dot{
  width:12px; height:12px;
  margin-top: 14px;
  border-radius:999px;
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  box-shadow: 0 0 0 6px rgba(124,58,237,.15);
}
.t-card{
  border:1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 16px;
}

/* Projects */
.projects-grid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.project{
  border:1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 18px;
  transition: .2s ease;
}
.project:hover{
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.project-top{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom: 10px;
}
.tag{
  font-size: 12px;
  font-weight: 800;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(124,58,237,.12);
  border: 1px solid var(--line);
}
.tag.ghost{ background: transparent; color: var(--muted); }
.project h3{ margin: 0 0 8px; }
.project-actions{ display:flex; gap:10px; margin-top: 14px; flex-wrap:wrap; }

/* Contact */
.contact-list{ display:flex; flex-direction:column; gap:10px; }
.contact-item{
  display:flex; justify-content:space-between; gap:14px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--line);
  background: var(--panel2);
  transition: .2s ease;
}
.contact-item:hover{ transform: translateY(-1px); box-shadow: var(--shadow); }
.contact-item.no-link:hover{ transform:none; box-shadow:none; }
.ci-k{ color: var(--muted); font-size:13px; }
.ci-v{ font-weight:900; font-size:13px; }

form .form-row{ display:flex; flex-direction:column; gap:8px; margin-bottom:12px; }
label{ font-size: 12px; color: var(--muted); font-weight: 800; }
input, textarea{
  width:100%;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
  padding: 12px 12px;
  outline:none;
}
[data-theme="light"] input,
[data-theme="light"] textarea{
  background: rgba(17,24,39,.03);
}
input:focus, textarea:focus{
  border-color: rgba(6,182,212,.55);
  box-shadow: 0 0 0 6px rgba(6,182,212,.12);
}

/* Footer */
.footer{
  margin-top: 30px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  padding-top: 18px;
  border-top:1px solid var(--line);
}
.to-top{
  font-weight: 900;
  color: var(--muted);
}
.to-top:hover{ color: var(--text); }

/* Reveal animation */
.reveal{
  opacity:0;
  transform: translateY(10px);
  transition: .6s ease;
}
.reveal.show{
  opacity:1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 980px){
  .hero-grid{ grid-template-columns: 1fr; }
  .hero-cards{ grid-template-columns: 1fr; }
  .projects-grid{ grid-template-columns: 1fr; }
  .grid-2{ grid-template-columns: 1fr; }
  .nav-links{
    position: fixed;
    top: 70px;
    right: 4vw;
    left: 4vw;
    display:none;
    flex-direction:column;
    gap:8px;
    padding: 14px;
    border-radius: 18px;
  }
  .nav-links.open{ display:flex; }
  .burger{ display:inline-flex; flex-direction:column; justify-content:center; }
}
