/* ===== Theme tokens ===== */
:root {
  --bg: #ffffff;
  --bg-alt: #f6f8fb;
  --surface: #ffffff;
  --border: #e4e8ef;
  --text: #1a2233;
  --muted: #5c6b82;
  --primary: #2b6cff;
  --primary-dark: #1f54cc;
  --accent: #00c2a8;
  --shadow: 0 8px 30px rgba(20, 35, 70, 0.08);
  --radius: 14px;
  --maxw: 1080px;
}
[data-theme="dark"] {
  --bg: #0e1320;
  --bg-alt: #131a2b;
  --surface: #182034;
  --border: #263149;
  --text: #e8edf6;
  --muted: #9aa8c0;
  --primary: #5b8cff;
  --primary-dark: #3f74f0;
  --accent: #2fe0c6;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .25s, color .25s;
}
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer; transition: .18s; white-space: nowrap;
}
.btn--sm { padding: 7px 14px; font-size: .85rem; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-icon {
  background: transparent; border: 1px solid var(--border); color: var(--text);
  width: 38px; height: 38px; border-radius: 10px; cursor: pointer; font-size: 1rem;
}
.btn-icon:hover { border-color: var(--primary); }

/* ===== Nav ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav__inner { display: flex; align-items: center; gap: 18px; height: 64px; }
.nav__brand { font-weight: 800; font-size: 1.15rem; color: var(--text); letter-spacing: -.02em; }
.nav__links { display: flex; gap: 22px; margin-left: auto; }
.nav__links a { color: var(--muted); font-weight: 500; font-size: .92rem; }
.nav__links a:hover { color: var(--text); }
.nav__actions { display: flex; align-items: center; gap: 10px; }

/* ===== Hero ===== */
.hero { padding: 72px 0 56px; }
.hero__inner { display: grid; grid-template-columns: 1.4fr .8fr; gap: 40px; align-items: center; }
.hero__eyebrow { color: var(--accent); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: .82rem; }
.hero__name { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.05; letter-spacing: -.03em; margin: 8px 0; }
.hero__title { font-size: clamp(1.1rem, 2.5vw, 1.5rem); color: var(--primary); font-weight: 600; }
.hero__tagline { color: var(--muted); font-size: 1.1rem; margin: 16px 0 24px; max-width: 540px; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__social { display: flex; gap: 14px; margin-top: 22px; }
.hero__social a {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border);
  display: grid; place-items: center; color: var(--text); transition: .18s;
}
.hero__social a:hover { background: var(--primary); color: #fff; border-color: var(--primary); transform: translateY(-2px); }
.hero__social svg { width: 20px; height: 20px; }
.hero__photo { display: grid; place-items: center; }
.avatar {
  width: 230px; height: 230px; border-radius: 24px; overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: grid; place-items: center; color: #fff; font-size: 4rem; font-weight: 800;
  box-shadow: var(--shadow);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ===== Sections ===== */
.section { padding: 64px 0; }
.section--alt { background: var(--bg-alt); }
.section__title { font-size: 1.7rem; letter-spacing: -.02em; margin-bottom: 28px; position: relative; padding-bottom: 12px; }
.section__title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 52px; height: 3px; background: var(--primary); border-radius: 3px; }
.about__text { font-size: 1.12rem; color: var(--muted); max-width: 760px; }

/* ===== Timeline (experience) ===== */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding: 0 0 30px 8px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -26px; top: 6px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px var(--bg);
}
.tl-item__head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.tl-item__logo { width: 26px; height: 26px; border-radius: 6px; object-fit: contain; background: #fff; padding: 2px; border: 1px solid var(--border); flex: none; }
.tl-item__role { font-size: 1.15rem; font-weight: 700; }
.tl-item__company { color: var(--primary); font-weight: 600; }
.tl-item__date { margin-left: auto; color: var(--muted); font-size: .9rem; font-weight: 500; }
.tl-item__meta { color: var(--muted); font-size: .9rem; margin: 2px 0 8px; }
.tl-item__desc { color: var(--muted); }

/* ===== Skills ===== */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.skill-group__title { font-size: 1rem; font-weight: 700; margin-bottom: 14px; color: var(--text); }
.skill { margin-bottom: 14px; }
.skill__head { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: 5px; }
.skill__name { font-weight: 600; }
.skill__pct { color: var(--muted); }
.skill__bar { height: 7px; background: var(--border); border-radius: 6px; overflow: hidden; }
.skill__fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 6px; transition: width .8s ease; }

/* ===== Cards (certifications) ===== */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); transition: .18s;
}
.card:hover { transform: translateY(-3px); border-color: var(--primary); }
.card__badge { width: 44px; height: 44px; border-radius: 10px; background: var(--bg-alt); display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 14px; }
.card__title { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.card__issuer { color: var(--primary); font-weight: 600; font-size: .92rem; }
.card__meta { color: var(--muted); font-size: .85rem; margin-top: 6px; }
.card__link { font-size: .88rem; font-weight: 600; margin-top: 12px; display: inline-block; }

/* ===== Projects ===== */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.project {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: .18s; display: flex; flex-direction: column;
}
.project:hover { transform: translateY(-4px); border-color: var(--primary); }
.project__img { aspect-ratio: 16/9; background: linear-gradient(135deg, var(--primary), var(--accent)); display: grid; place-items: center; color: #fff; font-size: 2.2rem; font-weight: 800; }
.project__img img { width: 100%; height: 100%; object-fit: cover; }
.project__body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.project__title { font-size: 1.15rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.project__star { color: #f5b50a; }
.project__desc { color: var(--muted); margin: 8px 0 14px; flex: 1; }
.project__tech { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.chip { font-size: .78rem; padding: 4px 10px; border-radius: 20px; background: var(--bg-alt); color: var(--muted); border: 1px solid var(--border); font-weight: 500; }
.project__links { display: flex; gap: 14px; }
.project__links a { font-size: .88rem; font-weight: 600; }

/* ===== Contact ===== */
.contact { text-align: center; }
.contact__lead { color: var(--muted); font-size: 1.1rem; max-width: 560px; margin: 0 auto 26px; }
.contact__links { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--border); padding: 26px 0; }
.footer__inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; align-items: center; }
.footer__muted { color: var(--muted); font-size: .88rem; }

/* ===== Responsive ===== */
@media (max-width: 820px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__photo { grid-row: 1; justify-self: start; }
  .avatar { width: 130px; height: 130px; border-radius: 20px; font-size: 2.4rem; }
  .nav__links { display: none; }
}
.empty { color: var(--muted); font-style: italic; }
