:root {
  color-scheme: dark;
  --bg: #111214;
  --text: #e7e8ea;
  --muted: #9a9fa6;
  --rule: #2a2c30;
  --accent: #8cb0ff;
  --glow: rgba(90, 130, 255, 0.20);
}

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

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 75% 480px at 50% -100px, var(--glow), transparent 70%)
    no-repeat,
    var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  max-width: 48rem;
  margin: 0 auto;
  padding: 2.75rem 1.5rem 2rem;
}

/* Intro */

h1 {
  margin: 0;
  font-size: 2.25rem;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.headline {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.about {
  max-width: 40rem;
  margin: 1.25rem 0 0;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin-top: 1.25rem;
}

#email {
  color: var(--muted);
}

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

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Sections */

section {
  margin-top: 2.25rem;
}

h2 {
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.entries {
  display: grid;
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.date {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.role,
.detail {
  max-width: calc(100% - 9rem);
  margin: 0.1rem 0 0;
}

.detail {
  color: var(--muted);
  font-size: 0.95rem;
}

footer {
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Small screens */

@media (max-width: 520px) {
  main {
    padding: 3.5rem 1.25rem 3rem;
  }

  h1 {
    font-size: 2rem;
  }

  section {
    margin-top: 3rem;
  }

  .entry-head {
    flex-direction: column;
    gap: 0;
  }

  .date {
    order: 2;
  }

  .role,
  .detail {
    max-width: none;
  }
}

.nowrap {
  white-space: nowrap;
}
