/* ====== Base & Theme ====== */
:root {
  --bg: #ffffff;
  --fg: #111827;
  --muted: #6b7280;
  --accent: #0f172a;
  --accent-2: #1f2937;
  --link: #1f6feb;
  --chip-bg: #f9fafb;
  --chip-bd: #e5e7eb;

  --radius: 10px;
  --container: 900px;
  --space: 32px;
  --space-sm: 12px;
  --fs-body: 16px;
  --fs-h1: 2rem;
  --fs-h2: 1.25rem;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  line-height: 1.6;
  margin: 0;
  color: var(--fg);
  background: var(--bg);
  font-size: var(--fs-body);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--space) 20px;
}

/* ====== Typography ====== */
h1 {
  margin: 0 0 0.25rem 0;
  font-size: var(--fs-h1);
}
h2 {
  margin: 2rem 0 0.5rem 0;
  font-size: var(--fs-h2);
}
a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
small.time {
  color: var(--muted);
  font-weight: 400;
}

/* ====== Header ====== */
.header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-sm);
  align-items: start;
}

.heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.title {
  margin: 0.25rem 0 0.75rem 0;
  font-weight: 600;
}

.links {
  display: flex;
  flex-direction: column;
  text-align: right;
  gap: 4px;
}
.links span {
  color: var(--muted);
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  font-weight: 600;
  width: fit-content;
  inline-size: fit-content;
  white-space: nowrap;
}
.btn:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
  text-decoration: none;
}

/* ====== Chips ====== */
.badges {
  margin-top: 0.5rem;
}
.badge {
  display: inline-block;
  border: 1px solid var(--chip-bd);
  background: var(--chip-bg);
  border-radius: 999px;
  padding: 4px 10px;
  margin: 6px 6px 0 0;
  font-size: 0.92rem;
  white-space: nowrap;
}

/* ====== Lists & Footer ====== */
ul {
  padding-left: 1.1rem;
  margin: 0;
}
li {
  margin: 0.25rem 0;
}
footer {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.role {
  margin-bottom: 1rem;
}

/* ====== Responsive Header ====== */
@media (max-width: 768px) {
  .header {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .links {
    text-align: left;
  }
  .links a {
    display: inline-block;
    margin-right: 12px;
  }
}

/* ====== Print (A4 look for CV export) ====== */
@media print {
  @page {
    size: A4;
    margin: 14mm 16mm;
  }
  body {
    color: #000;
  }
  a {
    color: inherit;
    text-decoration: none;
  }
  .container {
    max-width: none;
    padding: 0;
  }
  .btn {
    display: none;
  }
  .header {
    row-gap: 4mm;
  }
  h1 {
    font-size: 22pt;
  }
  h2 {
    font-size: 12pt;
    margin-top: 10mm;
  }
  body {
    font-size: 11pt;
    line-height: 1.5;
  }
}
