:root {
  --side-bg: #2c3e4a;
  --side-text: #f2f5f7;
  --side-muted: #a9b7c1;
  --side-link: #ffffff;
  --bg: #eef1f3;
  --paper: #ffffff;
  --text: #1f2a31;
  --muted: #6b7a84;
  --accent: #2c3e4a;
  --rule: #d5dce1;
  --shadow: 0 10px 30px rgba(31, 42, 49, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --side-bg: #1b262e;
    --side-text: #e6ecef;
    --side-muted: #8fa0ab;
    --side-link: #ffffff;
    --bg: #11181d;
    --paper: #182229;
    --text: #e6ecef;
    --muted: #93a3ad;
    --accent: #9cc3dc;
    --rule: #2b3943;
    --shadow: none;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

.page {
  display: grid;
  grid-template-columns: 300px 1fr;
  max-width: 1000px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.sidebar {
  background: var(--side-bg);
  color: var(--side-text);
  padding: 56px 32px;
  font-size: 0.95rem;
}

.sidebar section + section {
  margin-top: 32px;
}

.sidebar h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.sidebar ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar li + li {
  margin-top: 6px;
}

.sidebar a {
  color: var(--side-link);
  text-decoration: none;
  overflow-wrap: anywhere;
  border-bottom: 1px solid transparent;
}

.sidebar a:hover,
.sidebar a:focus-visible {
  border-bottom-color: currentColor;
}

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

.sidebar .muted::before {
  content: "(";
}

.sidebar .muted::after {
  content: ")";
}

.content {
  padding: 56px;
}

.intro h1 {
  margin: 0;
  font-size: 2.6rem;
  font-weight: 400;
  line-height: 1.15;
}

.intro p {
  margin: 4px 0 0;
}

.headline {
  font-size: 1.1rem;
}

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

.content > section {
  margin-top: 40px;
}

.content > section + section {
  padding-top: 32px;
  position: relative;
}

.content > section + section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 56px;
  border-top: 1px solid var(--rule);
}

.content h2 {
  margin: 0 0 16px;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--accent);
}

.entry + .entry {
  margin-top: 24px;
}

.entry h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 500;
}

.entry p {
  margin: 2px 0 0;
}

.entry .role {
  font-size: 1.02rem;
}

.entry .date {
  color: var(--muted);
  font-size: 0.92rem;
}

.entry .date + p {
  margin-top: 10px;
  max-width: 62ch;
}

.back {
  margin-bottom: 32px;
  font-size: 0.9rem;
}

.back a,
.links a {
  color: var(--muted);
  text-decoration: none;
}

.back a:hover,
.back a:focus-visible {
  color: var(--text);
}

body.home {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px 16px;
}

.card {
  width: 100%;
  max-width: 620px;
  padding: 56px;
  background: var(--paper);
  border-top: 6px solid var(--side-bg);
  box-shadow: var(--shadow);
}

.card h1 {
  margin: 0;
  font-size: 2.6rem;
  font-weight: 400;
  line-height: 1.15;
}

.card p {
  margin: 4px 0 0;
}

.card .about {
  margin-top: 24px;
  max-width: 52ch;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.links a {
  padding: 8px 18px;
  border: 1px solid var(--rule);
  color: var(--text);
}

.links a:hover,
.links a:focus-visible {
  border-color: var(--accent);
}

.links a.primary {
  background: var(--side-bg);
  border-color: var(--side-bg);
  color: var(--side-link);
}

.links a.primary:hover,
.links a.primary:focus-visible {
  filter: brightness(1.15);
}

@media (max-width: 760px) {
  .card {
    padding: 40px 24px;
  }

  .card h1 {
    font-size: 2rem;
  }

  .page {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .content {
    order: -1;
    padding: 40px 16px 24px;
  }

  .sidebar {
    padding: 32px 16px 40px;
  }

  .intro h1 {
    font-size: 2rem;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .page {
    box-shadow: none;
    max-width: none;
    min-height: 0;
  }

  .sidebar {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
