:root {
  --bg: #ffffff;
  --surface: #f5f7fa;
  --text: #1a2030;
  --muted: #5b6472;
  --border: #e2e8f0;
  --accent: #2563eb;
  --accent-soft: #dbe6ff;
  --max: 900px;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(20, 30, 60, .10);
}

:root[data-theme="dark"] {
  --bg: #0e1320;
  --surface: #172033;
  --text: #e6ebf5;
  --muted: #9aa6bd;
  --border: #26314a;
  --accent: #5b9dff;
  --accent-soft: #1c2a44;
  --shadow: 0 8px 26px rgba(0, 0, 0, .35);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
}

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand {
  font-weight: 800; font-size: 1.2rem; letter-spacing: .5px;
  color: var(--text); text-decoration: none;
  border: 2px solid var(--accent); border-radius: 8px; padding: .1rem .45rem;
}
.nav-links { display: flex; align-items: center; gap: 1.4rem; list-style: none; }
.nav-links a { position: relative; color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 500; transition: color .2s; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -5px; width: 0; height: 2px; background: var(--accent); border-radius: 2px; transition: width .25s ease; }
.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { width: 100%; }
.theme-toggle, .nav-toggle { background: none; border: none; cursor: pointer; font-size: 1.1rem; color: var(--text); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; }

.hero { display: flex; align-items: center; gap: 2.5rem; padding: 4.5rem 1.25rem 3.5rem; }
.hero-text { flex: 1; min-width: 0; }
.hero-photo { width: 260px; height: 260px; border-radius: 50%; object-fit: cover; border: 4px solid var(--surface); box-shadow: var(--shadow); flex-shrink: 0; }
.hero-eyebrow { color: var(--accent); font-weight: 600; font-size: .9rem; letter-spacing: .3px; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); font-weight: 800; margin: .6rem 0 .2rem; letter-spacing: -1px; }
.hero-role { font-size: clamp(1.1rem, 3vw, 1.5rem); color: var(--muted); font-weight: 600; }
.hero-tags { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.hero-tags li { background: var(--accent-soft); color: var(--accent); font-size: .82rem; font-weight: 600; padding: .32rem .75rem; border-radius: 20px; transition: transform .15s ease; }
.hero-tags li:hover { transform: translateY(-2px); }
.hero-tagline { max-width: 620px; margin: 1.3rem 0 2rem; color: var(--muted); font-size: 1.05rem; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; }

.btn { display: inline-block; padding: .7rem 1.3rem; border-radius: 10px; font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer; transition: transform .15s, background .2s, border-color .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.btn-primary:hover { box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.section { padding: 3.5rem 1.25rem; }
.section-title { font-size: 1.6rem; font-weight: 700; margin-bottom: 1.6rem; position: relative; padding-bottom: .5rem; }
.section-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 44px; height: 3px; background: var(--accent); border-radius: 3px; }
.about-text { color: var(--muted); font-size: 1.05rem; max-width: 720px; }

.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.skill-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; transition: transform .18s ease, border-color .2s, box-shadow .2s; }
.skill-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.skill-card h3 { font-size: .95rem; color: var(--accent); margin-bottom: .3rem; }
.skill-card p { color: var(--muted); font-size: .95rem; }

.timeline { display: flex; flex-direction: column; gap: 1.6rem; }
.timeline-item { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius); padding: 1.3rem 1.4rem; transition: transform .18s ease, box-shadow .2s; }
.timeline-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.timeline-head { margin-bottom: .6rem; }
.timeline-item h3 { font-size: 1.1rem; }
.timeline-meta { color: var(--muted); font-size: .88rem; }
.timeline-item ul { margin: .6rem 0 0 1.1rem; color: var(--muted); }
.timeline-item li { margin-bottom: .35rem; }

.cert-list { list-style: none; display: flex; flex-direction: column; gap: .7rem; }
.cert-list li { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .8rem 1.1rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; transition: transform .18s ease, box-shadow .2s; }
.cert-list li:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cert-info { display: flex; flex-direction: column; }
.cert-name { font-weight: 600; }
.cert-date { color: var(--muted); font-size: .82rem; margin-top: .1rem; }
.cert-verify { color: var(--accent); text-decoration: none; font-weight: 600; font-size: .88rem; white-space: nowrap; }
.cert-verify:hover { text-decoration: underline; }
.edu-item { margin-bottom: 1.1rem; }
.edu-item h3 { font-size: 1.05rem; }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.1rem; }
.project-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem 1.4rem; transition: transform .18s ease, box-shadow .2s; }
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.project-card h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.project-card p { color: var(--muted); font-size: .95rem; margin-bottom: .8rem; }
.project-card a { color: var(--accent); text-decoration: none; font-weight: 600; font-size: .92rem; }
.project-card--soon { opacity: .8; }
.project-card--soon:hover { transform: none; box-shadow: none; }
.badge { display: inline-block; background: var(--accent-soft); color: var(--accent); font-size: .78rem; font-weight: 600; padding: .25rem .6rem; border-radius: 20px; }

.contact-links { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.2rem; }

.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 2rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .6rem; padding: 1.4rem 1.25rem; color: var(--muted); font-size: .88rem; }
.visitors strong { color: var(--accent); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 680px) {
  .hero { flex-direction: column-reverse; align-items: flex-start; gap: 1.5rem; padding-top: 3rem; }
  .hero-photo { width: 150px; height: 150px; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: .5rem 1.25rem 1rem; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; padding: .5rem 0; }
}