:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1c2330;
  --muted: #5b6577;
  --border: #dfe3ea;
  --accent: #0b7a5b;
  --chip: #e8ecf2;
  --nav-h: 56px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --surface: #161b22;
    --text: #e6edf3;
    --muted: #9aa5b4;
    --border: #2a313c;
    --accent: #3ddc97;
    --chip: #232a35;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 16px; }

body {
  margin: 0;
  padding-bottom: var(--nav-h);
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}

h1, h2 { font-family: "Source Code Pro", ui-monospace, Menlo, Consolas, monospace; font-weight: 600; line-height: 1.2; }
h2 { font-size: 1.4rem; margin: 0 0 24px; }
h2::before { content: "# "; color: var(--accent); }

a { color: var(--accent); }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

main { max-width: 860px; margin: 0 auto; padding: 0 16px; }

section { padding: 48px 0; border-top: 1px solid var(--border); }
section:first-child { border-top: 0; }

/* Hero */
.hero { display: flex; align-items: center; gap: 32px; padding-top: 64px; }
.photo { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent); flex: none; }
.hero h1 { font-size: 2.2rem; margin: 0 0 4px; }
.hero .role { font-size: 1.1rem; color: var(--muted); margin: 0 0 20px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-block; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: var(--bg); font-weight: 600; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--accent); }

/* Skills */
.skill-group { margin-bottom: 20px; }
.skill-group h3 { margin: 0 0 8px; font-size: 0.95rem; color: var(--muted); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chip { padding: 4px 12px; border-radius: 999px; background: var(--chip); font-size: 0.9rem; }

/* Certifications */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.card { display: flex; align-items: center; gap: 16px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.card img { width: 72px; height: 72px; object-fit: contain; flex: none; }
.card p { margin: 0; }
.card .date { color: var(--muted); font-size: 0.9rem; }

/* Languages / contact */
.lang-list { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; list-style: none; }
.lang-list li { padding: 8px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.contact-list { list-style: none; margin: 0 0 20px; padding: 0; }
.contact-list li { margin-bottom: 6px; }
.contact-list span { color: var(--muted); display: inline-block; min-width: 90px; }

/* Language switch */
.lang-switch { position: fixed; top: 12px; right: 12px; z-index: 10; display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.lang-switch a { padding: 6px 12px; color: var(--text); text-decoration: none; font-size: 0.85rem; font-weight: 600; }
.lang-switch a:hover { background: var(--chip); }
.lang-switch a[aria-current] { background: var(--accent); color: var(--bg); }

.hero .tagline { color: var(--muted); margin: -12px 0 20px; font-size: 0.95rem; }

/* Experience */
.job { margin-bottom: 28px; padding-left: 16px; border-left: 2px solid var(--border); }
.job h3 { margin: 0; font-size: 1.05rem; }
.job h4 { margin: 16px 0 4px; font-size: 0.95rem; color: var(--accent); }
.job .co { margin: 2px 0 0; color: var(--muted); }
.job .dates { margin: 0 0 8px; font-size: 0.85rem; color: var(--muted); font-family: "Source Code Pro", ui-monospace, monospace; }
.job ul { margin: 8px 0 0; padding-left: 20px; }
.job li { margin-bottom: 4px; }
.job.edu { margin-bottom: 20px; }
.lang-list .level { color: var(--muted); }

/* Bottom nav */
.bottom-nav { position: fixed; inset: auto 0 0 0; height: var(--nav-h); background: var(--surface); border-top: 1px solid var(--border); }
.bottom-nav ul { display: flex; justify-content: center; height: 100%; margin: 0; padding: 0; list-style: none; overflow-x: auto; }
.bottom-nav a { display: flex; align-items: center; height: 100%; padding: 0 14px; color: var(--text); text-decoration: none; font-size: 0.9rem; white-space: nowrap; }
.bottom-nav a:hover { background: var(--chip); color: var(--accent); }

@media (max-width: 600px) {
  .hero { flex-direction: column; text-align: center; padding-top: 40px; }
  .actions { justify-content: center; }
  .hero h1 { font-size: 1.8rem; }
  .bottom-nav ul { justify-content: flex-start; }
}
