:root{
  --bg: #ffffff;
  --bg2: #f8fafc;
  --card: rgba(0,0,0,0.03);
  --card2: rgba(0,0,0,0.01);
  --text: #1a202c;
  --muted: rgba(26,32,44,0.7);
  --border: rgba(0,0,0,0.08);
  --accent: #3b82f6;
  --accent2: #8b5cf6;
  --shadow: 0 4px 6px rgba(0,0,0,0.05);
}

[data-theme="dark"] {
  --bg: #0b1220;
  --bg2: #060a12;
  --card: rgba(255,255,255,0.06);
  --card2: rgba(255,255,255,0.04);
  --text: #e8eefc;
  --muted: rgba(232,238,252,0.72);
  --border: rgba(255,255,255,0.12);
  --accent: #7aa7ff;
  --accent2:#ff7ab7;
  --shadow: 0 10px 35px rgba(0,0,0,0.35);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: underline; }

.container{ width: min(1100px, 92%); margin: 0 auto; }
.section{ padding: 64px 0; }

.skip{ position:absolute; left:-999px; }
.skip:focus{
  left: 12px; top: 12px;
  padding: 10px 12px;
  background: rgba(0,0,0,0.6);
  border: 1px solid var(--border);
  border-radius: 10px;
}

/* Header */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 12px;
}
.theme-toggle{
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.theme-toggle:hover{
  background: var(--card2);
}
.theme-toggle.small{
  width: 28px;
  height: 28px;
  border-radius: 6px;
  margin-right: 8px;
}
.theme-icon{
  font-size: 18px;
  line-height: 1;
}
.brand{
  display:flex;
  align-items:center;
  gap: 10px;
  font-weight: 800;
}
.brand-dot{
  width: 10px; height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 0 4px rgba(122,167,255,0.12);
}
.nav{ display:flex; align-items:center; gap: 18px; }
.nav a{
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 10px;
  border-radius: 10px;
}
.nav a:hover{
  color: var(--text);
  background: rgba(0,0,0,0.05);
  text-decoration:none;
}
.nav-cta{
  border: 1px solid var(--border);
  color: var(--text) !important;
  background: rgba(0,0,0,0.02);
}

.menu-btn{
  display:none;
  width: 44px; height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor:pointer;
}
.menu-btn span{
  display:block;
  height:2px;
  width: 18px;
  margin: 4px auto;
  background: var(--text);
}

/* Background */
.hero-bg{
  display: none;
}

/* Hero */
.hero{ padding: 120px 0 80px; text-align: center; }
.hero-content{ max-width: 600px; margin: 0 auto; }
.hero-title{
  font-size: clamp(48px, 8vw, 72px);
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--text);
}
.hero-subtitle{
  font-size: 24px;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 24px;
}
.hero-description{
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 24px;
}
.hero-email{
  font-size: 16px;
  color: var(--accent);
  margin: 0 0 24px;
  font-weight: 500;
}
.hero-links{
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-links a{
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.hero-links a:hover{
  border-bottom-color: var(--accent);
}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  transition: all 160ms ease;
}
.btn:hover{ transform: translateY(-1px); box-shadow: var(--shadow); text-decoration:none; }
.btn.primary{
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.btn.small{ padding: 8px 10px; border-radius: 10px; }

.meta{ display:flex; flex-wrap: wrap; gap: 10px; }
.pill{
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--border);
  background: var(--card);
  padding: 6px 12px;
  border-radius: 999px;
}

/* Cards & grids */
.card{
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 12px;
  padding: 20px;
}
.grid{ display:grid; gap: 20px; margin-top: 20px; }
.grid.two{ grid-template-columns: 1fr 1fr; }
.grid.three{ grid-template-columns: 1fr 1fr 1fr; }

.section-head h2{
  margin: 0 0 16px;
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
}
.section-head p{
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 16px;
}

/* About */
.about-content{
  max-width: 800px;
  margin: 0 auto;
}
.about-content p{
  color: var(--muted);
  line-height: 1.7;
  font-size: 18px;
  margin: 0 0 20px;
}
.about-content p:last-child{
  margin-bottom: 0;
}

/* Profile */
.profile{ display:flex; gap: 16px; align-items:flex-start; }
.avatar{
  width: 60px; height: 60px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: 1px solid var(--border);
  display:flex; align-items:center; justify-content:center;
  font-weight: 900;
  color: white;
}
.profile-name{ margin: 0; font-size: 18px; }
.profile-role{ margin: 4px 0 10px; color: var(--muted); }
.profile-links{ display:flex; gap: 12px; flex-wrap: wrap; }
.profile-links a{
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
}
.profile-links a:hover{ box-shadow: var(--shadow); text-decoration:none; }

.stats{ display:grid; gap: 16px; margin-top: 16px; }
.stat{ display:flex; justify-content: space-between; gap: 12px; }
.stat-num{ font-weight: 900; }
.stat-label{ color: var(--muted); text-align:right; font-size: 13px; line-height: 1.4; }

/* Experience */
.experience-item{
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}
.experience-header{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.experience-item h3{
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.experience-date{
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.experience-description{
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 16px;
  font-size: 16px;
}
.experience-tech{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.experience-tech span{
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  background: rgba(59, 130, 246, 0.1);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Projects */
.project h3{ margin: 0 0 8px; font-size: 20px; font-weight: 700; }
.project p{ margin: 0 0 16px; color: var(--muted); line-height: 1.6; }
.project-tech{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.project-tech span{
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  background: rgba(59, 130, 246, 0.1);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Skills chips */
.chips{
  list-style:none;
  padding:0;
  margin: 10px 0 0;
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chips li{
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  font-weight: 900;
  font-size: 12px;
}

/* Contact */
.muted{ color: var(--muted); }
code{
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  padding: 8px 10px;
  border-radius: 12px;
}

/* Footer */
.footer{
  border-top: 1px solid var(--border);
  padding: 24px 0;
  background: var(--bg);
}
.footer-inner{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 14px;
  color: var(--muted);
}

/* Reveal */
[data-reveal]{ opacity: 0; transform: translateY(10px); transition: 420ms; }
.revealed{ opacity: 1 !important; transform: translateY(0) !important; }

@media (max-width: 920px){
  .hero-inner{ grid-template-columns: 1fr; }
  .grid.three{ grid-template-columns: 1fr; }
}
@media (max-width: 760px){
  .grid.two{ grid-template-columns: 1fr; }
  .theme-toggle{
    width: 36px;
    height: 36px;
  }
  .theme-toggle.small{
    width: 24px;
    height: 24px;
    margin-right: 6px;
  }
  .nav{
    position: absolute;
    top: 60px;
    right: 4%;
    left: 4%;
    display:none;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--card);
    box-shadow: var(--shadow);
  }
  .nav.open{ display:flex; }
  .menu-btn{ display:inline-block; }
}
