/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { margin: 0.25rem 0 0; padding-left: 1.25rem; }

/* ---------- Theme tokens (LinkedIn-classic blue) ---------- */
:root {
  --bg: #f3f2ef;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --fg: #1d1d1f;
  --muted: #616161;
  --border: #e0e0e0;
  --accent: #0a66c2;
  --accent-hover: #004182;
  --accent-soft: #e7f0f9;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 14px rgba(0,0,0,.08);
  --radius: 10px;
  --radius-lg: 16px;
}
[data-theme="dark"] {
  --bg: #0b1220;
  --surface: #111b2e;
  --surface-2: #0f1626;
  --fg: #e6edf7;
  --muted: #9aa7bd;
  --border: #1f2b44;
  --accent: #4ea4ef;
  --accent-hover: #70b6f3;
  --accent-soft: rgba(78,164,239,.12);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 6px 22px rgba(0,0,0,.45);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(160%) blur(12px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0.75rem 1.25rem;
  display: flex; align-items: center; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff; display: grid; place-items: center; font-size: 0.82rem; letter-spacing: .5px;
}
.brand-text { font-size: 0.95rem; }
.nav-links { margin-left: auto; display: flex; gap: 1.1rem; }
.nav-links a {
  font-size: 0.9rem; color: var(--muted); transition: color .15s;
}
.nav-links a:hover { color: var(--accent); }
.theme-toggle {
  background: none; border: 1px solid var(--border); border-radius: 50%;
  width: 36px; height: 36px; cursor: pointer; color: var(--fg);
  display: grid; place-items: center; transition: background .15s, border-color .15s;
}
.theme-toggle:hover { background: var(--surface); border-color: var(--accent); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (max-width: 720px) {
  .brand-text { display: none; }
  .nav-links { gap: 0.7rem; overflow-x: auto; }
  .nav-links a { font-size: 0.82rem; white-space: nowrap; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 4rem 1.25rem 3.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(1200px 400px at 20% -10%, var(--accent-soft), transparent 60%),
    radial-gradient(900px 350px at 85% 10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 65%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 780px; margin: 0 auto; }
.avatar {
  width: 128px; height: 128px; margin: 0 auto 1.5rem;
  border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff; font-weight: 800; font-size: 2.5rem; letter-spacing: 2px;
  display: grid; place-items: center;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 45%, transparent);
  border: 4px solid var(--surface);
}
.name {
  font-size: clamp(2rem, 4.5vw, 3rem); margin: 0 0 0.4rem; font-weight: 800; letter-spacing: -0.02em;
}
.title { font-size: 1.1rem; color: var(--muted); margin: 0 0 0.6rem; }
.title .sep { color: var(--accent); margin: 0 0.3rem; }
.location {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--muted); font-size: 0.95rem; margin: 0 0 1.5rem;
}
.location svg { width: 16px; height: 16px; }

.chips {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-bottom: 2rem;
}
.chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 0.5rem 0.9rem; border-radius: 999px; font-size: 0.85rem;
  transition: border-color .15s, color .15s, transform .15s;
}
.chip svg { width: 14px; height: 14px; }
.chip:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

.cta { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.4rem; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  transition: transform .15s, background .15s, color .15s, border-color .15s;
  border: 1px solid transparent; cursor: pointer;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-ghost { border-color: var(--border); color: var(--fg); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

/* ---------- Section scaffolding ---------- */
.section { padding: 4.5rem 1.25rem; }
.section-muted { background: var(--surface); border-block: 1px solid var(--border); }
.container { max-width: 1100px; margin: 0 auto; }
.section-head { margin-bottom: 2rem; }
.eyebrow {
  display: inline-block; font-size: 0.8rem; font-weight: 600;
  color: var(--accent); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 0.4rem;
}
.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.15rem); margin: 0; letter-spacing: -0.02em; font-weight: 700;
}

.lead { font-size: 1.05rem; color: var(--fg); max-width: 820px; }
.lead strong { color: var(--accent); }

/* ---------- Stats ---------- */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem; margin-top: 2rem;
}
.stat {
  background: var(--surface); border: 1px solid var(--border);
  padding: 1.2rem; border-radius: var(--radius); text-align: center;
  transition: transform .15s, border-color .15s;
}
.stat:hover { transform: translateY(-2px); border-color: var(--accent); }
.stat-num { display: block; font-size: 2rem; font-weight: 800; color: var(--accent); letter-spacing: -0.03em; }
.stat-num small { font-size: 0.9rem; font-weight: 600; margin-left: 2px; }
.stat-label { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 0.3rem; }

/* ---------- Cards ---------- */
.grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.25rem;
}
.card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; transition: transform .15s, border-color .15s, box-shadow .15s;
}
.section-muted .card { background: var(--surface-2); }
.card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow-md); }
.card-icon {
  width: 40px; height: 40px; border-radius: 10px; margin-bottom: 0.9rem;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
}
.card-icon svg { width: 20px; height: 20px; }
.card h3 { margin: 0 0 0.4rem; font-size: 1.05rem; font-weight: 700; }
.card p { margin: 0; color: var(--muted); font-size: 0.92rem; }

/* ---------- Timeline ---------- */
.timeline {
  list-style: none; padding: 0; margin: 0; position: relative;
}
.timeline::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 14px; width: 2px;
  background: linear-gradient(180deg, var(--accent), transparent);
}
.t-item { position: relative; padding: 0 0 1.75rem 48px; }
.t-item:last-child { padding-bottom: 0; }
.t-dot {
  position: absolute; left: 7px; top: 18px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}
.section-muted .t-dot { border-color: var(--surface); }
.t-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.4rem 1.5rem; transition: border-color .15s, box-shadow .15s;
}
.t-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.t-head {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: baseline; justify-content: space-between;
  margin-bottom: 0.25rem;
}
.t-head h3 { margin: 0; font-size: 1.1rem; font-weight: 700; }
.t-dates {
  color: var(--accent); font-weight: 600; font-size: 0.85rem;
  background: var(--accent-soft); padding: 0.2rem 0.7rem; border-radius: 999px;
  white-space: nowrap;
}
.t-company { margin: 0 0 0.8rem; color: var(--muted); font-size: 0.9rem; }
.t-card ul li { color: var(--fg); margin: 0.35rem 0; font-size: 0.94rem; }

/* ---------- Skills ---------- */
.skill-groups {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}
.skill-group {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
}
.section-muted .skill-group { background: var(--surface-2); }
.skill-group h4 {
  margin: 0 0 0.8rem; font-size: 0.95rem; font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.chips-grid { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
  display: inline-block; background: var(--accent-soft); color: var(--accent);
  padding: 0.3rem 0.7rem; border-radius: 999px; font-size: 0.82rem; font-weight: 500;
  border: 1px solid transparent; transition: border-color .15s;
}
.tag:hover { border-color: var(--accent); }

/* ---------- Certifications ---------- */
.cert-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.cert {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.2rem;
  transition: border-color .15s, transform .15s;
  border-left: 4px solid var(--accent);
}
.cert:hover { transform: translateY(-2px); border-color: var(--accent); }
.cert h4 { margin: 0 0 0.3rem; font-size: 1rem; font-weight: 700; color: var(--accent); }
.cert p { margin: 0; color: var(--muted); font-size: 0.88rem; }
.in-view {
  margin-top: 1.25rem; padding: 1rem 1.25rem;
  background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius);
  color: var(--muted); font-size: 0.9rem;
}
.in-view strong { color: var(--accent); }
.edu {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.2rem 1.4rem;
  border-left: 4px solid var(--accent);
}
.edu h4 { margin: 0 0 0.3rem; }
.edu p { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* ---------- Contact ---------- */
.section-contact { background: var(--surface); border-top: 1px solid var(--border); }
.contact-lead { color: var(--muted); max-width: 720px; margin-bottom: 2rem; }
.contact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}
.contact-card {
  display: flex; align-items: center; gap: 1rem;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.2rem 1.3rem;
  transition: border-color .15s, transform .15s;
}
.contact-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.contact-card svg {
  width: 28px; height: 28px; color: var(--accent); flex-shrink: 0;
}
.contact-card h4 { margin: 0 0 0.15rem; font-size: 0.95rem; }
.contact-card p { margin: 0; color: var(--muted); font-size: 0.88rem; word-break: break-word; }

/* ---------- Footer ---------- */
.footer {
  background: var(--bg); border-top: 1px solid var(--border); padding: 2rem 1.25rem;
}
.footer-inner {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  color: var(--muted); font-size: 0.85rem;
}
.footer-sub { margin: 0; }
.footer p { margin: 0; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Print ---------- */
@media print {
  .nav, .theme-toggle, .cta, .contact-grid, .footer { display: none; }
  .section { padding: 1rem 0; }
  body { background: #fff; color: #000; }
}
