:root {
  --bg: #0a0a1a;
  --bg-sidebar: #0d0d24;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(168, 85, 247, 0.25);
  --text: #f0eef6;
  --text-muted: #9490b0;
  --accent: #c084fc;
  --accent-bright: #a855f7;
  --accent-soft: rgba(168, 85, 247, 0.12);
  --gradient-start: #a855f7;
  --gradient-mid: #ec4899;
  --gradient-end: #f97316;
  --green: #34d399;
  --green-soft: rgba(52, 211, 153, 0.1);
  --orange: #fb923c;
  --orange-soft: rgba(251, 146, 60, 0.1);
  --purple: #c084fc;
  --purple-soft: rgba(192, 132, 252, 0.1);
  --pink: #f472b6;
  --pink-soft: rgba(244, 114, 182, 0.1);
  --radius: 12px;
  --sidebar-w: 260px;
  --font: 'DM Sans', sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: -200px; left: 30%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(168,85,247,0.12) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -300px; right: 10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(236,72,153,0.08) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}

/* Sidebar */
.sidebar {
  position: fixed; top: 0; left: 0;
  width: var(--sidebar-w); height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 28px 0; z-index: 100; overflow-y: auto;
}

.sidebar::before {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 1px; height: 100%;
  background: linear-gradient(180deg, var(--gradient-start), transparent 40%, transparent 60%, var(--gradient-mid));
  opacity: 0.3;
}

.sidebar-identity { padding: 0 24px 24px; border-bottom: 1px solid var(--border); }

.sidebar-identity h1 {
  font-size: 20px; font-weight: 700; letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.sidebar-identity .tagline {
  font-size: 12px; color: var(--text-muted); margin-top: 4px; font-family: var(--mono);
}

.sidebar-identity .status {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  font-size: 12px; color: var(--green); background: var(--green-soft);
  padding: 4px 12px; border-radius: 20px; border: 1px solid rgba(52,211,153,0.15);
}

.status-dot {
  width: 6px; height: 6px; background: var(--green); border-radius: 50%;
  animation: pulse 2s infinite; box-shadow: 0 0 8px rgba(52,211,153,0.6);
}

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* Navigation */
nav { flex: 1; padding: 16px 12px; }

.nav-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-muted); padding: 14px 12px 6px; font-weight: 600; opacity: 0.6;
}

nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  color: var(--text-muted); text-decoration: none; font-size: 14px;
  font-weight: 500; border-radius: 8px; transition: all 0.2s; position: relative;
}

nav a:hover { color: var(--text); background: var(--bg-card); }
nav a.active { color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(168,85,247,0.15); }
nav a svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.6; }
nav a:hover svg, nav a.active svg { opacity: 1; }

/* Sidebar footer */
.sidebar-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 14px; }
.sidebar-footer a { color: var(--text-muted); transition: all 0.2s; }
.sidebar-footer a:hover { color: var(--accent); filter: drop-shadow(0 0 6px rgba(168,85,247,0.4)); }

/* Main content */
.main {
  margin-left: var(--sidebar-w); flex: 1; padding: 32px 44px 80px;
  max-width: 980px; position: relative; z-index: 1;
}

/* Sections */
.section { margin-bottom: 52px; }

.section-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 20px;
  padding-bottom: 14px; border-bottom: 1px solid var(--border);
}

.section-header h2 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }

.section-header .count {
  font-family: var(--mono); font-size: 11px; color: var(--accent);
  background: var(--accent-soft); padding: 3px 10px; border-radius: 20px;
  border: 1px solid rgba(168,85,247,0.15);
}

/* Glance grid */
.glance-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px; margin-bottom: 52px;
}

.glance-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; position: relative;
  overflow: hidden; transition: all 0.3s;
}

.glance-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-mid), var(--gradient-end));
  opacity: 0; transition: opacity 0.3s;
}

.glance-card:hover {
  border-color: var(--border-glow); background: var(--bg-card-hover);
  box-shadow: 0 4px 24px rgba(168,85,247,0.06);
}

.glance-card:hover::before { opacity: 1; }

.glance-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px; font-size: 18px;
}

.icon-purple { background: var(--purple-soft); border: 1px solid rgba(192,132,252,0.15); }
.icon-pink { background: var(--pink-soft); border: 1px solid rgba(244,114,182,0.15); }
.icon-green { background: var(--green-soft); border: 1px solid rgba(52,211,153,0.15); }
.icon-orange { background: var(--orange-soft); border: 1px solid rgba(251,146,60,0.15); }

.glance-card .label {
  font-size: 11px; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.06em; font-weight: 600; margin-bottom: 6px;
}

.glance-card .value { font-size: 15px; font-weight: 700; }
.glance-card .sub { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

/* Skills */
.skill-group { margin-bottom: 18px; }
.skill-group-title { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 10px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }

.tag {
  font-family: var(--mono); font-size: 12px; padding: 5px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg-card); color: var(--text-muted);
  transition: all 0.2s;
}

.tag:hover { color: var(--text); border-color: var(--border-glow); box-shadow: 0 0 12px rgba(168,85,247,0.08); }
.tag.highlight { color: var(--accent); border-color: rgba(168,85,247,0.3); background: var(--accent-soft); box-shadow: 0 0 12px rgba(168,85,247,0.06); }

/* Projects */
.project-list { display: flex; flex-direction: column; gap: 14px; }

.project-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; transition: all 0.3s; cursor: default; position: relative; overflow: hidden;
}

.project-card::after {
  content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%;
  background: linear-gradient(180deg, var(--gradient-start), var(--gradient-mid));
  opacity: 0; transition: opacity 0.3s;
}

.project-card:hover {
  background: var(--bg-card-hover); border-color: var(--border-glow);
  box-shadow: 0 8px 32px rgba(168,85,247,0.06); transform: translateX(3px);
}

.project-card:hover::after { opacity: 1; }

.project-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.project-name { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.project-name a { color: var(--text); text-decoration: none; transition: color 0.2s; }
.project-name a:hover { color: var(--accent); }

.project-badge {
  font-family: var(--mono); font-size: 10px; padding: 3px 10px; border-radius: 20px;
  font-weight: 600; letter-spacing: 0.03em;
}

.badge-prod { color: var(--green); background: var(--green-soft); border: 1px solid rgba(52,211,153,0.15); }
.badge-oss { color: var(--purple); background: var(--purple-soft); border: 1px solid rgba(192,132,252,0.15); }
.badge-wip { color: var(--orange); background: var(--orange-soft); border: 1px solid rgba(251,146,60,0.15); }

.project-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; line-height: 1.6; }

.project-stack { display: flex; flex-wrap: wrap; gap: 6px; }

.project-stack span {
  font-family: var(--mono); font-size: 11px; color: var(--text-muted);
  background: rgba(255,255,255,0.04); border: 1px solid var(--border); padding: 3px 10px; border-radius: 6px;
}

/* Experience */
.exp-item {
  position: relative; padding: 22px; padding-left: 30px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 14px; transition: all 0.3s;
}

.exp-item:hover { border-color: var(--border-glow); box-shadow: 0 4px 24px rgba(168,85,247,0.05); }

.exp-item::before {
  content: ''; position: absolute; left: 14px; top: 30px; width: 8px; height: 8px;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid));
  border-radius: 50%; box-shadow: 0 0 10px rgba(168,85,247,0.4);
}

.exp-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; flex-wrap: wrap; gap: 8px; }
.exp-role { font-size: 15px; font-weight: 700; }
.exp-date { font-family: var(--mono); font-size: 11px; color: var(--accent); background: var(--accent-soft); padding: 2px 10px; border-radius: 20px; }
.exp-company { font-size: 13px; color: var(--accent); margin-bottom: 10px; }
.exp-details { font-size: 13px; color: var(--text-muted); line-height: 1.65; }

/* Early Years / Summary text */
.summary-text,
.early-years-text {
  font-size: 14px; color: var(--text-muted); line-height: 1.7;
}

/* Contact */
.contact-row { display: flex; flex-wrap: wrap; gap: 12px; }

.contact-link {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); text-decoration: none; font-size: 13px; font-weight: 500; transition: all 0.25s;
}

.contact-link:hover {
  border-color: var(--border-glow); background: var(--accent-soft); color: var(--accent);
  box-shadow: 0 4px 20px rgba(168,85,247,0.1); transform: translateY(-2px);
}

.contact-link svg { width: 16px; height: 16px; }

.cta-link { background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid)); border: none; color: white; font-weight: 600; }
.cta-link:hover { color: white; background: linear-gradient(135deg, var(--gradient-mid), var(--gradient-start)); box-shadow: 0 4px 24px rgba(168,85,247,0.3); }

/* Mobile */
.mobile-header {
  display: none; position: fixed; top: 0; left: 0; right: 0; height: 56px;
  background: var(--bg-sidebar); border-bottom: 1px solid var(--border); z-index: 200;
  align-items: center; justify-content: space-between; padding: 0 16px;
}

.mobile-header h1 {
  font-size: 17px; font-weight: 700;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.hamburger { background: none; border: none; color: var(--text); cursor: pointer; padding: 8px; }

.overlay { display: none; position: fixed; inset: 0; background: rgba(10,10,26,0.75); backdrop-filter: blur(4px); z-index: 99; }

@media (max-width: 768px) {
  .mobile-header { display: flex; }
  .sidebar { transform: translateX(-100%); transition: transform 0.3s cubic-bezier(0.4,0,0.2,1); }
  .sidebar.open { transform: translateX(0); }
  .overlay.open { display: block; }
  .main { margin-left: 0; padding: 72px 16px 60px; }
  .glance-grid { grid-template-columns: 1fr 1fr; }
}

/* Animations */
.section { opacity: 0; transform: translateY(16px); animation: fadeUp 0.5s ease forwards; }
.section:nth-child(1) { animation-delay: 0s; }
.section:nth-child(2) { animation-delay: 0.07s; }
.section:nth-child(3) { animation-delay: 0.14s; }
.section:nth-child(4) { animation-delay: 0.21s; }
.section:nth-child(5) { animation-delay: 0.28s; }
.section:nth-child(6) { animation-delay: 0.35s; }

@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(168,85,247,0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(168,85,247,0.4); }

/* Project Images */
.project-images { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }

.project-images img {
  width: 100%; border-radius: var(--radius);
  border: 1px solid var(--border); transition: all 0.3s;
}

.project-images img:hover {
  border-color: var(--border-glow);
  box-shadow: 0 4px 24px rgba(168,85,247,0.08);
}

.side-by-side {
  display: flex; gap: 16px;
}

.side-by-side img {
  flex: 1; min-width: 0;
}
