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

:root {
  --bg: #0f0f11;
  --surface: #18181b;
  --surface2: #1f1f23;
  --border: #27272a;
  --text: #fafafa;
  --muted: #71717a;
  --muted2: #a1a1aa;
  --accent: #6366f1;
  --accent-hover: #818cf8;
}

html, body { height: 100%; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  justify-content: center;
  min-height: 100dvh;
  padding: 3.5rem 1.5rem;
}

main {
  width: 100%;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  gap: 2.75rem;
}

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #fff;
  flex-shrink: 0;
}

.hero-text { display: flex; flex-direction: column; gap: 0.3rem; }

h1 {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.tagline {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent-hover);
}

.location {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.775rem;
  color: var(--muted2);
}

/* ── Links ────────────────────────────────────────────────────────── */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-size: 0.825rem;
  font-weight: 500;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.link-btn:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
  background: rgba(99, 102, 241, 0.08);
}

/* ── Section label ────────────────────────────────────────────────── */
.section { display: flex; flex-direction: column; gap: 0.85rem; }

.section-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Card (shared base) ───────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* flat variant — no internal timeline, just header row */
.card--flat {
  padding: 0.85rem 1.1rem;
}

.card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* ── Card header (experience) ─────────────────────────────────────── */
.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.card-header-text { flex: 1; }

.card-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--muted2);
  flex-shrink: 0;
}

.card-company {
  font-size: 0.9rem;
  font-weight: 600;
}

.card-meta {
  font-size: 0.775rem;
  color: var(--muted2);
  margin-top: 0.15rem;
}

/* ── External link chips ──────────────────────────────────────────── */
.card-ext-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex-shrink: 0;
}

.ext-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--muted2);
  text-decoration: none;
  font-size: 0.725rem;
  font-weight: 500;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.ext-link:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
}

/* ── Role timeline (inside experience card) ───────────────────────── */
.role-list {
  display: flex;
  flex-direction: column;
  border-left: 1.5px solid var(--border);
  margin-left: 0.25rem;
}

.role {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.45rem 0 0.45rem 1rem;
  position: relative;
}

.role-dot {
  position: absolute;
  left: -0.4rem;
  top: 0.82rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
  border: 1.5px solid var(--surface);
  flex-shrink: 0;
}

.role:first-child .role-dot { background: var(--accent); }

.role-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
}

.role-title {
  font-size: 0.85rem;
  font-weight: 500;
}

.role-date {
  font-size: 0.75rem;
  color: var(--muted2);
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .hero { flex-direction: column; align-items: flex-start; }
  .card-header { flex-wrap: wrap; }
  .card-row { flex-wrap: wrap; }
}
