:root {
  color-scheme: light;
  --background: #fdfdfc;
  --ink: #111111;
  --quiet: #666666;
  --rule: #f2f2f2;
  --brand: #0bb552;
  --brand-ink: #00220e;
  --link-hover: #0e4f26;
  --focus-ring: #039941;
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--background);
  color: var(--ink);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #141414;
  --ink: #f2f2f2;
  --quiet: #a3a3a3;
  --rule: #2b2b2b;
  --brand: #1dcc66;
  --link-color: var(--brand);
  --link-hover: #0bb552;
  --focus-ring: var(--brand);
}

* { box-sizing: border-box; }

body { margin: 0; }

.page {
  --page-top: clamp(52px, 9vh, 96px);
  --column-gap: clamp(40px, 6vw, 76px);
  position: relative;
  width: min(calc(100% - 64px), 1176px);
  margin-inline: auto;
  padding-block: var(--page-top) 76px;
  display: grid;
  grid-template-areas:
    "intro ."
    "experience experience";
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 43px var(--column-gap);
}

.page-controls {
  position: absolute;
  inset-block-start: calc(var(--page-top) - 10px);
  inset-inline-end: 0;
  display: flex;
}

.theme-toggle,
.language-toggle {
  inline-size: 44px;
  block-size: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--quiet);
  font: inherit;
  cursor: pointer;
  place-items: center;
}

.theme-toggle:not([hidden]),
.language-toggle:not([hidden]) { display: grid; }

.theme-toggle {
  justify-items: end;
  padding-inline-end: 5px;
}

.language-toggle {
  justify-items: start;
  padding-inline-start: 5px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
}

@media (hover: hover) {
  .theme-toggle:hover,
  .language-toggle:hover {
    color: var(--ink);
  }
}

.theme-toggle:active,
.language-toggle:active { color: var(--ink); }

.theme-toggle:focus-visible,
.language-toggle:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

.theme-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-icon--sun,
[data-theme="dark"] .theme-icon--moon { display: none; }

[data-theme="dark"] .theme-icon--sun { display: block; }

.intro { grid-area: intro; }

.experience {
  grid-area: experience;
  display: grid;
  grid-template-areas:
    "telemost projects"
    "work projects";
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  column-gap: var(--column-gap);
}

#telemost { grid-area: telemost; }
.work { grid-area: work; }
.projects { grid-area: projects; }

h1, h2, h3, h4, p, ol { margin: 0; }

h1 {
  font-size: 17px;
  font-weight: 640;
  letter-spacing: -.025em;
  line-height: 1.35;
}

.role {
  color: var(--quiet);
  margin-top: 3px;
  font-size: 14px;
}

.bio { margin-top: 22px; }

.bio p + p { margin-top: 13px; }

a {
  color: var(--link-color, inherit);
  text-decoration: underline;
  text-decoration-color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: .19em;
}

a:hover {
  color: var(--link-hover);
  text-decoration-color: currentColor;
}

a:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 4px;
  border-radius: 1px;
}

.job {
  padding-block: 12px;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 22px;
}

#telemost,
.projects > .job:first-child { border-top: 0; }

.job-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1px 16px;
}

.job-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 8px;
}

.project-links {
  display: inline-flex;
  gap: 4px;
  font-size: 13px;
}

.project-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-block-size: 24px;
  padding-inline: 7px;
  line-height: 24px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  color: var(--ink);
  text-decoration: none;
}

.project-links a:hover,
.project-links a:focus-visible {
  background: color-mix(in srgb, var(--ink) 13%, transparent);
  border-radius: 999px;
}

.project-links svg {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

h3, h4 {
  font-size: 15px;
  font-weight: 630;
}

.period, .stage-number {
  color: var(--quiet);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}

.period { white-space: nowrap; }

.job-role {
  margin-top: 2px;
  color: var(--quiet);
  font-size: 14px;
}

.stages {
  list-style: none;
  margin-top: 8px;
  padding: 0;
}

.stage {
  --number-width: 27px;
  --column-gap: 8px;

  position: relative;
  display: grid;
  grid-template-columns: var(--number-width) minmax(0, 1fr);
  gap: var(--column-gap);
  padding-block: 8px;
}

.stage + .stage::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: calc(var(--number-width) + var(--column-gap)) 0;
  border-block-start: 1px solid var(--rule);
}

.stage:last-child { padding-bottom: 1px; }

.stage-number { padding-top: 2px; }

.stage h4 { font-size: 14px; }

.stage p {
  margin-top: 2px;
  color: var(--quiet);
  font-size: 14px;
}

::selection {
  background: var(--brand);
  color: var(--brand-ink);
}

@media (max-width: 860px) {
  .intro h1 { padding-inline-end: 96px; }

  .page {
    width: min(calc(100% - 48px), 550px);
    grid-template-areas: "intro" "experience";
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .experience {
    grid-template-areas: "telemost" "projects" "work";
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  .page {
    --page-top: 45px;
    width: calc(100% - 40px);
    padding-block-end: 52px;
  }

  .page-controls { inset-block-start: 12px; }

  .stage {
    --number-width: 22px;
    --column-gap: 6px;
  }
}
