/* =========================
   Base + Theme Variables
   ========================= */

:root{
  --bg: #f6f8fc;
  --panel: #ffffff;
  --text: #101828;
  --muted: #667085;
  --border: rgba(16, 24, 40, 0.08);
  --shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
  --shadow-strong: 0 16px 45px rgba(16, 24, 40, 0.16);

  --accent: #2563eb;
  --accent-2: #22c55e;

  --radius: 16px;
  --radius-sm: 12px;

  --container: 1120px;
  --nav-h: 72px;
}

[data-theme="dark"]{
  --bg: #0b1220;
  --panel: rgba(255,255,255,0.06);
  --text: #eaf0ff;
  --muted: rgba(234,240,255,0.70);
  --border: rgba(234,240,255,0.10);
  --shadow: 0 12px 36px rgba(0,0,0,0.25);
  --shadow-strong: 0 18px 55px rgba(0,0,0,0.35);

  --accent: #60a5fa;
  --accent-2: #34d399;
}

/* =========================
   Global
   ========================= */

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
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(1000px 400px at 20% 0%, rgba(37,99,235,0.08), transparent 55%),
              radial-gradient(900px 420px at 100% 20%, rgba(34,197,94,0.08), transparent 55%),
              var(--bg);
  color: var(--text);
  line-height: 1.6;
}

img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
strong{ font-weight: 650; }

.container{
  width: min(var(--container), calc(100% - 40px));
  margin: 0 auto;
}

.section{
  padding: 64px 0;
}

.link{
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(37,99,235,0.35);
  text-underline-offset: 3px;
}

.scroll-progress{
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 9999;
}

/* =========================
   Header / Nav
   ========================= */

.header{
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .header{
  background: rgba(10, 16, 30, 0.55);
}

.nav{
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.brand-dot{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 6px rgba(37,99,235,0.12);
}

.nav-menu{
  list-style: none;
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 0;
}

.nav-link{
  font-weight: 560;
  color: var(--muted);
  position: relative;
  padding: 10px 8px;
  border-radius: 10px;
  transition: background 180ms ease, color 180ms ease;
}

.nav-link:hover{
  color: var(--text);
  background: rgba(37,99,235,0.08);
}

.nav-actions{
  margin-left: 6px;
}

.theme-toggle{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.theme-toggle:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow-strong);
}

.theme-text{
  font-weight: 600;
  font-size: 14px;
}

/* Mobile nav */
.nav-toggle{
  display: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 10px;
  border-radius: 12px;
}

.nav-toggle-bar{
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  border-radius: 2px;
  opacity: 0.85;
}

/* =========================
   Hero
   ========================= */

.hero{
  padding-top: 32px;
}

.hero-grid{
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: center;
}

.kicker{
  color: var(--muted);
  font-weight: 650;
  letter-spacing: 0.2px;
  margin: 0 0 10px;
}

.hero-title{
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.08;
  margin: 0 0 10px;
  letter-spacing: -0.6px;
}

.accent{
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle{
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 16px;
}

.hero-cta{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 14px;
}

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-weight: 650;
  letter-spacing: 0.1px;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
  user-select: none;
}

.btn:hover{
  transform: translateY(-2px);
  box-shadow: var(--shadow-strong);
}

.btn.primary{
  border: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #ffffff;
}

.btn.ghost{
  background: transparent;
  color: var(--text);
}

.btn.soft{
  background: rgba(37,99,235,0.10);
  color: var(--text);
}

.hero-links{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip{
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  font-weight: 650;
  font-size: 13px;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
}

.chip:hover{
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  color: var(--text);
  background: rgba(37,99,235,0.08);
}

.link-chip{
  text-decoration: none;
}

.hero-media{
  display: grid;
  gap: 16px;
  justify-items: center;
}

.avatar-wrap{
  position: relative;
  width: 280px;
  height: 280px;
  border-radius: 26px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transform: translateZ(0);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.avatar-wrap:hover{
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
}

.avatar{
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 250ms ease;
}

.avatar-wrap:hover .avatar{
  transform: scale(1.04);
}

.avatar-ring{
  position: absolute;
  inset: 12px;
  border-radius: 20px;
  box-shadow: inset 0 0 0 2px rgba(37,99,235,0.18);
  pointer-events: none;
}

.mini-cards{
  display: grid;
  gap: 10px;
  width: min(320px, 100%);
}

.mini-card{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.mini-card:hover{
  transform: translateY(-2px);
  box-shadow: var(--shadow-strong);
}

.mini-title{
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.2px;
}

.mini-value{
  font-weight: 700;
  margin-top: 2px;
}

.scroll-hint{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  color: var(--muted);
}

.scroll-dot{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(37,99,235,0.12);
}

.scroll-text{
  font-weight: 700;
  font-size: 13px;
}

/* =========================
   Sections / Cards
   ========================= */

.section-head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.section-title{
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.3px;
}

.section-subtitle{
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.card{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px;
  box-shadow: var(--shadow);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.card:hover{
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
  border-color: rgba(37,99,235,0.18);
}

.card-title{
  margin: 0 0 10px;
  font-size: 18px;
  letter-spacing: -0.2px;
}

.grid-2{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.chips{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Stats */
.stats{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.stat{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 14px;
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.stat:hover{
  transform: translateY(-3px);
  box-shadow: var(--shadow-strong);
}

.stat-num{
  font-weight: 800;
  font-size: 18px;
}

.stat-label{
  margin-top: 4px;
  color: var(--muted);
  font-weight: 650;
  font-size: 13px;
}

/* Projects */
.project-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.project-card{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.project-card:hover{
