:root {
  --bg: #0b0f14;
  --panel: #0f1620;
  --text: #e8eef7;
  --muted: #a8b3c7;
  --line: rgba(255, 255, 255, 0.10);
  --accent: #7dd3fc;
  /* light cyan */
  --accent2: #a78bfa;
  /* violet */
  --chip: rgba(255, 255, 255, 0.06);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --radius: 16px;
  --max: 980px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
}

[data-theme="light"] {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --text: #1a202c;
  --muted: #4a5568;
  --line: rgba(0, 0, 0, 0.10);
  --accent: #0891b2;
  --accent2: #7c3aed;
  --chip: rgba(0, 0, 0, 0.04);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(125, 211, 252, 0.18), transparent 55%),
    radial-gradient(900px 500px at 85% 5%, rgba(167, 139, 250, 0.14), transparent 60%),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
  transition: background 0.3s ease, color 0.3s ease;
}

[data-theme="light"] body {
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(8, 145, 178, 0.08), transparent 55%),
    radial-gradient(900px 500px at 85% 5%, rgba(124, 58, 237, 0.06), transparent 60%),
    var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 42px 18px 64px;
}

header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow);
}

.kicker {
  font-family: var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.1;
}

.headline {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 1.6vw, 18px);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.meta a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}

.meta a:hover {
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 0 4px rgba(125, 211, 252, 0.10);
}

.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.icon svg {
  width: 100%;
  height: 100%;
  fill: var(--accent);
}

main {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 18px;
}

@media (max-width: 860px) {
  main {
    grid-template-columns: 1fr;
  }
}

section,
aside {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: var(--shadow);
}

section {
  padding: 22px;
}

aside {
  padding: 22px;
  position: sticky;
  top: 16px;
  height: fit-content;
}

@media (max-width: 860px) {
  aside {
    position: relative;
    top: 0;
  }
}

h2 {
  margin: 0 0 12px;
  font-size: 18px;
  letter-spacing: 0.01em;
}

p {
  margin: 0 0 12px;
  color: var(--text);
}

.muted {
  color: var(--muted);
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 18px 0;
}

.role {
  padding: 14px 0;
}

.role:first-child {
  padding-top: 0;
}

.role:last-child {
  padding-bottom: 0;
}

.role h3 {
  margin: 0;
  font-size: 16px;
}

.role .where {
  margin-top: 3px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.badge {
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

ul {
  margin: 10px 0 0 18px;
  padding: 0;
  color: var(--text);
}

li {
  margin: 6px 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--chip);
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
}

.chip .mini {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  opacity: 0.9;
}

footer {
  margin-top: 18px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.cta:hover {
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}

[data-theme="light"] .cta:hover,
[data-theme="light"] .meta a:hover {
  background: rgba(0, 0, 0, 0.05);
}

.toolbar {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
  z-index: 1000;
}

.toolbar-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--chip);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

[data-theme="light"] .toolbar-btn:hover {
  background: rgba(0, 0, 0, 0.08);
}

.theme-toggle {
  position: relative;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  position: absolute;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(-90deg);
}

.theme-toggle .icon-moon {
  opacity: 1;
  transform: rotate(0deg);
}

[data-theme="light"] .theme-toggle .icon-sun {
  opacity: 1;
  transform: rotate(0deg);
}

[data-theme="light"] .theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(90deg);
}

.pdf-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Print styles for PDF export */
@media print {
  :root {
    --bg: #ffffff;
    --panel: #ffffff;
    --text: #1a202c;
    --muted: #4a5568;
    --line: rgba(0, 0, 0, 0.15);
    --chip: rgba(0, 0, 0, 0.05);
    --shadow: none;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body {
    background: white !important;
    font-size: 11pt;
  }

  .toolbar {
    display: none !important;
  }

  .wrap {
    max-width: 100%;
    padding: 0;
  }

  header,
  section,
  aside,
  footer {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }

  main {
    display: block;
  }

  aside {
    position: relative;
    top: 0;
    margin-top: 18px;
  }

  .role {
    break-inside: avoid;
  }

  a {
    color: inherit;
  }

  .dot,
  .mini {
    background: #666 !important;
  }

  .icon svg {
    fill: #444 !important;
  }
}
