*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:              #f8fafc;
  --surface:         #ffffff;
  --surface-2:       #f1f5f9;
  --border:          #e2e8f0;
  --border-strong:   #cbd5e1;
  --text-primary:    #0f172a;
  --text-secondary:  #475569;
  --text-muted:      #94a3b8;
  --accent:          #3b82f6;
  --accent-bg:       #eff6ff;
  --accent-border:   #bfdbfe;
  --accent-text:     #1d4ed8;
  --green:           #22c55e;
  --green-bg:        #f0fdf4;
  --green-border:    #bbf7d0;
  --green-text:      #15803d;
  --warning-bg:      #fffbeb;
  --warning-border:  #fde68a;
  --warning-text:    #b45309;
  --radius:          8px;
  --shadow:          0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:             #0f172a;
    --surface:        #1e293b;
    --surface-2:      #1a2744;
    --border:         #334155;
    --border-strong:  #475569;
    --text-primary:   #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted:     #64748b;
    --accent:         #60a5fa;
    --accent-bg:      #1e3a5f;
    --accent-border:  #1d4ed8;
    --accent-text:    #93c5fd;
    --green:          #4ade80;
    --green-bg:       #14532d;
    --green-border:   #166534;
    --green-text:     #86efac;
    --warning-bg:     #451a03;
    --warning-border: #78350f;
    --warning-text:   #fcd34d;
  }
}

:root[data-theme="dark"] {
  --bg:             #0f172a;
  --surface:        #1e293b;
  --surface-2:      #1a2744;
  --border:         #334155;
  --border-strong:  #475569;
  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;
  --accent:         #60a5fa;
  --accent-bg:      #1e3a5f;
  --accent-border:  #1d4ed8;
  --accent-text:    #93c5fd;
  --green:          #4ade80;
  --green-bg:       #14532d;
  --green-border:   #166534;
  --green-text:     #86efac;
  --warning-bg:     #451a03;
  --warning-border: #78350f;
  --warning-text:   #fcd34d;
}

/* ── BASE ── */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  padding: 2rem 1rem;
  line-height: 1.6;
}

.port {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ── ICONS ── */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
  flex-shrink: 0;
}
.icon-sm  { width: 12px; height: 12px; }
.icon-md  { width: 14px; height: 14px; }
.icon-lg  { width: 18px; height: 18px; }
.icon-xl  { width: 22px; height: 22px; }

/* ── HERO ── */
.hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero::after {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(59,130,246,0.07) 0%, transparent 70%);
  pointer-events: none;
}

.hero-top {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.avatar {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--accent-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  color: var(--accent-text);
  border: 2px solid var(--accent-border);
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

.hero-name {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.hero-title {
  font-size: 13px;
  color: var(--accent-text);
  font-weight: 500;
  margin-top: 4px;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

.hero-bio {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

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

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  text-decoration: none;
  background: var(--surface-2);
  transition: border-color .15s, color .15s, background .15s;
}
.link-btn:hover {
  border-color: var(--accent-border);
  color: var(--accent-text);
  background: var(--accent-bg);
}

/* ── STATS ── */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
@media (max-width: 520px) { .stats { grid-template-columns: repeat(2, 1fr); } }

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .875rem .75rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-num { font-size: 20px; font-weight: 600; color: var(--text-primary); }
.stat-lbl { font-size: 11px; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }

/* ── SECTION ── */
.sec {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}

.sec-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-bottom: .625rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: .875rem;
}
.sec-head .icon { color: var(--accent); }

/* ── SKILLS ── */
.skill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: var(--surface-2);
}
.skill-tag.hot {
  border-color: var(--accent-border);
  color: var(--accent-text);
  background: var(--accent-bg);
}
.skill-tag.sec-skill {
  border-color: var(--green-border);
  color: var(--green-text);
  background: var(--green-bg);
}

/* ── EXPERIENCE ── */
.xp-item {
  display: flex;
  gap: 1rem;
  padding: .875rem 0;
  border-bottom: 1px solid var(--border);
}
.xp-item:first-of-type { padding-top: 0; }
.xp-item:last-child { border-bottom: none; padding-bottom: 0; }

.xp-logo {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--accent-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent-text);
  border: 1px solid var(--accent-border);
}

.xp-role    { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.xp-company { font-size: 12px; color: var(--accent-text); font-weight: 500; margin-top: 1px; }
.xp-date    { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

.xp-bullets {
  margin-top: 8px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.xp-bullets li {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  gap: 7px;
  line-height: 1.55;
}
.xp-bullets li::before {
  content: '→';
  color: var(--accent);
  flex-shrink: 0;
  font-size: 11px;
  margin-top: 2px;
}

/* ── PROJECTS ── */
.proj-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 520px) { .proj-grid { grid-template-columns: 1fr; } }

.proj-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s, box-shadow .15s;
  text-decoration: none;
  display: block;
  color: inherit;
}
.proj-card:hover {
  border-color: var(--accent-border);
  background: var(--accent-bg);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59,130,246,0.1);
}
.proj-card.featured {
  grid-column: 1 / -1;
  border-color: var(--accent-border);
  background: var(--accent-bg);
}

.proj-icon  { font-size: 22px; margin-bottom: .5rem; line-height: 1; }
.proj-name  { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 5px; }
.proj-desc  { font-size: 12px; color: var(--text-secondary); line-height: 1.6; margin-bottom: .75rem; }
.proj-tags  { display: flex; flex-wrap: wrap; gap: 4px; }
.proj-tag {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--surface);
}
.proj-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--green-bg);
  color: var(--green-text);
  border: 1px solid var(--green-border);
  margin-bottom: 7px;
  font-weight: 500;
}

.proj-links { display: flex; gap: 6px; margin-top: 10px; }
.proj-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--accent-text);
  text-decoration: none;
  font-weight: 500;
}
.proj-link:hover { text-decoration: underline; }

/* ── EDUCATION & CERTS ── */
.cert-row {
  display: flex;
  align-items: flex-start;
  gap: .875rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
}
.cert-row:first-of-type { padding-top: 0; }
.cert-row:last-child { border-bottom: none; padding-bottom: 0; }

.cert-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--warning-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--warning-text);
  border: 1px solid var(--warning-border);
}

.cert-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.cert-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; line-height: 1.5; }

/* ── CTA ── */
.cta {
  background: var(--surface);
  border: 1px solid var(--accent-border);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.cta-text  { font-size: 14px; color: var(--text-secondary); margin-bottom: .75rem; }
.cta-email {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-text);
  text-decoration: none;
  display: block;
}
.cta-email:hover { text-decoration: underline; }
.cta-phone { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
