/* ---------- Design tokens ---------- */
:root {
  --bg: #ffffff;
  --surface: #f6f7f9;
  --border: #e4e7ec;
  --text: #1a1d21;
  --text-muted: #5c636e;
  --accent: #4f46e5;
  --accent-soft: #eef2ff;
  --radius: 12px;
  --maxw: 860px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.1);
}

[data-theme="dark"] {
  --bg: #0f1115;
  --surface: #171a21;
  --border: #262b34;
  --text: #e8eaed;
  --text-muted: #9aa3b0;
  --accent: #818cf8;
  --accent-soft: #1e1b3a;
  --shadow: none;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease, color 0.2s ease;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: #fff; padding: 8px 16px; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; gap: 16px;
  height: 60px;
}
.nav__brand { font-weight: 700; font-size: 1.05rem; color: var(--text); }
.nav__links { display: flex; gap: 20px; margin-left: auto; }
.nav__links a { color: var(--text-muted); font-size: 0.9rem; }
.nav__links a:hover { color: var(--text); text-decoration: none; }
.theme-toggle {
  background: none; border: 1px solid var(--border); border-radius: 8px;
  width: 34px; height: 34px; cursor: pointer; color: var(--text); font-size: 1rem;
}
@media (max-width: 620px) { .nav__links { display: none; } }

/* ---------- Hero ---------- */
.hero { padding: 72px 24px 48px; }
.hero__label { color: var(--accent); font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; font-size: 0.8rem; }
.hero__name { font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 1.05; margin: 8px 0 16px; letter-spacing: -0.02em; }
.hero__summary { color: var(--text-muted); font-size: 1.1rem; max-width: 620px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 0.9rem; font-weight: 500;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }

.highlights { list-style: none; display: flex; flex-wrap: wrap; gap: 32px; margin-top: 40px; }
.highlights li { display: flex; flex-direction: column; }
.highlights .value { font-size: 1.8rem; font-weight: 700; color: var(--accent); }
.highlights .label { font-size: 0.85rem; color: var(--text-muted); }

/* ---------- Sections ---------- */
.section { padding: 40px 24px; }
.section__title {
  font-size: 1.5rem; margin-bottom: 24px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ---------- Timeline (experience / education) ---------- */
.timeline { display: flex; flex-direction: column; gap: 28px; }
.entry { display: grid; grid-template-columns: 140px 1fr; gap: 20px; }
.entry__period { color: var(--text-muted); font-size: 0.9rem; padding-top: 2px; }
.entry__title { font-size: 1.1rem; font-weight: 600; }
.entry__org { color: var(--accent); font-weight: 500; }
.entry__summary { color: var(--text-muted); margin: 4px 0 10px; }
.entry__list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.entry__list li { position: relative; padding-left: 18px; }
.entry__list li::before { content: "▸"; position: absolute; left: 0; color: var(--accent); }
@media (max-width: 620px) { .entry { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- Cards (projects / achievements) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; background: var(--surface); box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card--highlight { border-color: var(--accent); }
.card__title { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; }
.card__meta { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 8px; }
.card__desc { color: var(--text-muted); font-size: 0.92rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag {
  font-size: 0.75rem; padding: 2px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}

/* ---------- Skills ---------- */
.skills { display: flex; flex-direction: column; gap: 20px; }
.skill-group__cat { font-weight: 600; margin-bottom: 8px; }
.skill-group .tags .tag { background: var(--surface); color: var(--text); border: 1px solid var(--border); }

/* ---------- Footer ---------- */
.site-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 32px 24px; margin-top: 32px;
  border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.9rem;
}

/* ---------- Loading / error states ---------- */
.state { padding: 80px 24px; text-align: center; color: var(--text-muted); }
