:root {
  color-scheme: light;
  --bg: #f7f7f2;
  --text: #171717;
  --muted: #6d6a62;
  --line: #d8d5ca;
  --accent: #bf4e30;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.page {
  width: min(100% - 40px, 680px);
  padding: clamp(28px, 7vw, 64px) 0;
}

.tiny {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 0.84rem;
  letter-spacing: 0;
  text-transform: lowercase;
}

.tiny a {
  color: inherit;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.5rem, 15vw, 8rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.9;
}

.role {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 3vw, 1.35rem);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

a {
  color: var(--text);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

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

code {
  font-family: inherit;
}

.aside {
  max-width: 38rem;
  margin: 58px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.now-page h1,
.resume-page h1,
.map-page h1 {
  font-size: clamp(3.8rem, 16vw, 7.5rem);
}

.resume-page,
.map-page {
  width: min(100% - 40px, 960px);
}

.resume-section {
  display: grid;
  grid-template-columns: minmax(9rem, 0.28fr) minmax(0, 1fr);
  gap: 24px;
  margin-top: 52px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.resume-section h2 {
  margin: 0;
  color: var(--accent);
  font-size: 0.94rem;
  font-weight: 400;
  text-transform: lowercase;
}

.resume-section > p {
  margin: 0;
  line-height: 1.65;
}

.skills-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.skills-list div {
  display: grid;
  grid-template-columns: minmax(10rem, 0.4fr) minmax(0, 1fr);
  gap: 18px;
}

.skills-list dt {
  color: var(--muted);
}

.skills-list dd {
  margin: 0;
  line-height: 1.5;
}

.jobs {
  border-top: 1px solid var(--line);
}

.job {
  border-bottom: 1px solid var(--line);
}

.job summary {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
  padding: 18px 36px 18px 0;
  cursor: pointer;
  list-style: none;
}

.job summary::-webkit-details-marker {
  display: none;
}

.job summary::after {
  content: "+";
  position: absolute;
  top: 17px;
  right: 0;
  color: var(--accent);
  font-size: 1.2rem;
}

.job[open] summary::after {
  content: "-";
}

.job summary:hover .job-role,
.job summary:focus-visible .job-role {
  color: var(--accent);
}

.job summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.job-heading {
  display: grid;
  gap: 5px;
}

.job-role {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
  line-height: 1.2;
}

.job-company,
.job-date,
.job-team {
  color: var(--muted);
  font-size: 0.9rem;
}

.job-date {
  padding-top: 3px;
  white-space: nowrap;
}

.job-description {
  padding: 0 36px 22px 0;
}

.job-team {
  margin: 0 0 14px;
}

.job-description ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  line-height: 1.55;
}

.job-description li::marker {
  color: var(--accent);
}

.education {
  padding-bottom: 20px;
}

.education > p {
  line-height: 1.5;
}

.education > p + p {
  grid-column: 2;
  margin-top: -18px;
  color: var(--muted);
}

.list {
  display: grid;
  grid-template-columns: minmax(9rem, 0.38fr) minmax(0, 1fr);
  gap: 20px;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.list h2 {
  margin: 0;
  color: var(--accent);
  font-size: 0.94rem;
  font-weight: 400;
  text-transform: lowercase;
}

.list p {
  margin: 0;
  color: var(--text);
}

.map-note {
  max-width: 44rem;
  margin: 22px 0 0;
  color: var(--muted);
}

.map-controls {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.map-actions button {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.map-actions button:hover,
.map-actions button:focus-visible,
.map-actions button[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

.map-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.map-shell {
  position: relative;
  margin-top: 18px;
  border: 1px solid var(--line);
  background: #fff;
}

#route-map {
  position: relative;
  z-index: 0;
  user-select: none;
  width: 100%;
  height: min(68vh, 720px);
  min-height: 520px;
  touch-action: none;
}

.map-empty[hidden] {
  display: none;
  pointer-events: none;
}

.map-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(247, 247, 242, 0.92);
  color: var(--muted);
  text-align: center;
}

.route-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 18px;
  color: var(--muted);
}

.route-summary p {
  margin: 0;
}

.leaflet-container {
  font-family: inherit;
  cursor: grab;
}

.leaflet-dragging .leaflet-container,
.leaflet-dragging .leaflet-interactive,
#route-map.is-panning {
  cursor: grabbing;
}

@media (max-width: 520px) {
  body {
    place-items: start center;
  }

  .page {
    padding-top: 56px;
  }

  nav,
  .list,
  .resume-section,
  .skills-list div {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .resume-section {
    gap: 16px;
  }

  .job summary {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .job-date {
    padding-top: 0;
  }

  .education > p + p {
    grid-column: 1;
    margin-top: -10px;
  }

  #route-map {
    min-height: 480px;
  }
}
