:root {
  --coral: #ff4742;
  --coral-dark: #e43c38;
  --night: #0b0b10;
  --text: #111111;
  --secondary: #999999;
  --border: #eeeeee;
  --surface: #ffffff;
  --photo-fallback: #e7e7e7;
  --content-width: 1100px;
  --pill-radius: 9999px;
  --card-radius: 8px;
  --font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10000;
  transform: translateY(-160%);
  border-radius: var(--pill-radius);
  background: var(--surface);
  color: var(--text);
  padding: 10px 18px;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero {
  position: relative;
  min-height: 710px;
  overflow: hidden;
  background: var(--night);
}

.hero__stars {
  position: absolute;
  inset: 0;
  opacity: 0.6;
  background-image:
    radial-gradient(circle at 12% 18%, rgb(255 255 255 / 80%) 0 1px, transparent 1.4px),
    radial-gradient(circle at 32% 72%, rgb(255 255 255 / 45%) 0 1px, transparent 1.3px),
    radial-gradient(circle at 74% 24%, rgb(255 255 255 / 60%) 0 1px, transparent 1.5px),
    radial-gradient(circle at 88% 66%, rgb(255 255 255 / 42%) 0 1px, transparent 1.3px);
  background-size: 113px 127px, 167px 151px, 193px 179px, 139px 211px;
  background-position: 5px 11px, 19px 31px, 47px 2px, 3px 53px;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 640px;
  place-items: center;
  padding: 44px 24px 86px;
}

.map-frame {
  width: min(520px, calc(100vw - 40px));
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 50%;
  background: #15151b;
  box-shadow: 0 30px 90px rgb(0 0 0 / 50%);
}

#travel-map {
  width: 100%;
  height: 100%;
  background: #17171c;
}

#travel-map.map-error {
  display: grid;
  place-items: center;
  padding: 40px;
  color: rgb(255 255 255 / 65%);
  font-size: 0.85rem;
  text-align: center;
}

.leaflet-container {
  font-family: var(--font-sans);
}

.leaflet-control-zoom a {
  color: var(--text);
}

.trip-marker {
  display: block;
  width: 10px;
  height: 10px;
  border: 2px solid rgb(255 255 255 / 90%);
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 1px 5px rgb(0 0 0 / 38%);
}

.leaflet-tooltip.trip-tooltip {
  border: 0;
  border-radius: 6px;
  box-shadow: 0 4px 18px rgb(0 0 0 / 18%);
  font-size: 12px;
  font-weight: 700;
}

.hero__wave {
  position: absolute;
  z-index: 2;
  right: -1px;
  bottom: -1px;
  left: -1px;
  display: block;
  width: calc(100% + 2px);
  height: 150px;
  fill: var(--surface);
}

.profile {
  position: relative;
  z-index: 3;
  width: min(100% - 32px, var(--content-width));
  margin: -78px auto 0;
  text-align: center;
}

.profile__photo-wrap {
  position: relative;
  width: 138px;
  height: 138px;
  margin: 0 auto 12px;
  border: 4px solid var(--surface);
  border-radius: 50%;
  background: var(--photo-fallback);
  box-shadow: 0 8px 28px rgb(0 0 0 / 14%);
}

.profile__photo {
  display: block;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
}

.profile__online {
  position: absolute;
  right: 8px;
  bottom: 10px;
  width: 20px;
  height: 20px;
  border: 4px solid var(--surface);
  border-radius: 50%;
  background: #25c76f;
}

.profile__handle {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.045em;
}

.profile__bio {
  max-width: 60ch;
  margin: 12px auto 20px;
  color: #555555;
  font-size: 1.03rem;
}

.profile__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
}

.profile-link,
.trip-toggle {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--coral);
  border-radius: var(--pill-radius);
  background: var(--surface);
  color: var(--coral);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.profile-link {
  padding: 9px 18px;
}

.profile-link--primary {
  background: var(--coral);
  color: var(--surface);
}

.profile-link:hover,
.trip-toggle:hover {
  background: #fff4f3;
}

.profile-link--primary:hover {
  background: var(--coral-dark);
}

.stats-section {
  width: min(100% - 32px, var(--content-width));
  margin: 58px auto 0;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 18px 8px;
}

.stat {
  min-width: 0;
  text-align: center;
}

.stat__value {
  display: block;
  overflow-wrap: anywhere;
  font-size: clamp(1.45rem, 2.8vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.stat__label {
  display: block;
  margin-top: 5px;
  color: var(--secondary);
  font-size: 0.74rem;
  line-height: 1.25;
}

.content-section {
  width: min(100% - 32px, var(--content-width));
  margin: 72px auto 0;
}

.section-heading {
  margin-bottom: 28px;
  text-align: center;
}

.section-heading__eyebrow {
  margin: 0 0 4px;
  color: var(--coral);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.35rem);
  letter-spacing: -0.045em;
  line-height: 1.15;
}

.trip-log {
  border-top: 1px solid var(--border);
}

.year-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--secondary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.year-divider::before,
.year-divider::after {
  height: 1px;
  flex: 1;
  background: var(--border);
  content: "";
}

.year-divider span {
  padding: 16px 0;
}

.trip-row {
  display: grid;
  grid-template-columns: 88px 84px 88px 60px minmax(180px, 1fr) minmax(100px, auto);
  min-height: 68px;
  align-items: center;
  gap: 16px;
  padding: 11px 16px;
  border-top: 1px solid var(--border);
  transition: background-color 150ms ease;
}

.year-divider + .trip-row {
  border-top: 0;
}

.trip-row:hover {
  background: #fafafa;
}

.trip-row--current {
  border: 0;
  border-radius: var(--card-radius);
  background: var(--coral);
  color: var(--surface);
}

.trip-row--current:hover {
  background: var(--coral-dark);
}

.trip-date,
.trip-duration,
.trip-country {
  font-size: 0.78rem;
}

.trip-duration {
  color: var(--secondary);
  text-align: center;
}

.trip-row--current .trip-duration {
  color: rgb(255 255 255 / 78%);
}

.trip-photo-wrap {
  width: 60px;
  height: 44px;
  overflow: hidden;
  border-radius: var(--card-radius);
  background: var(--photo-fallback);
}

.trip-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trip-place {
  min-width: 0;
  overflow: hidden;
  font-size: 0.95rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trip-country {
  justify-self: end;
  color: #555555;
  text-align: right;
}

.trip-row--current .trip-country {
  color: var(--surface);
}

.trip-toggle {
  width: 100%;
  margin-top: 20px;
  padding: 12px 20px;
}

.graph-section {
  margin-bottom: 80px;
}

.travel-chart {
  min-height: 340px;
  overflow-x: auto;
  padding: 18px 8px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.travel-chart svg {
  display: block;
  width: 100%;
  min-width: 720px;
  height: auto;
}

.chart-grid {
  stroke: var(--border);
  stroke-width: 1;
}

.chart-area {
  fill: url("#travel-area-gradient");
}

.chart-line,
.chart-line-current {
  fill: none;
  stroke: var(--coral);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.chart-line-current {
  stroke-dasharray: 7 7;
}

.chart-dot {
  fill: var(--surface);
  stroke: var(--coral);
  stroke-width: 3;
}

.chart-label,
.chart-value,
.chart-axis-label {
  font-family: var(--font-sans);
  font-size: 11px;
}

.chart-label,
.chart-axis-label {
  fill: var(--secondary);
}

.chart-value {
  fill: #555555;
  font-weight: 700;
}

.footer {
  padding: 26px 16px;
  border-top: 1px solid var(--border);
  color: var(--secondary);
  font-size: 0.78rem;
  text-align: center;
}

.footer p {
  margin: 0;
}

.footer a {
  color: #555555;
  font-weight: 700;
}

.footer code {
  color: #555555;
  font-size: 0.95em;
}

.noscript,
.data-error {
  width: min(100% - 32px, var(--content-width));
  margin: 24px auto;
  padding: 16px;
  border: 1px solid #ffc5c3;
  border-radius: var(--card-radius);
  background: #fff4f3;
  color: #76201e;
  text-align: center;
}

@media (max-width: 767px) {
  .hero {
    min-height: 560px;
  }

  .hero__inner {
    min-height: 510px;
    padding: 28px 20px 88px;
  }

  .hero__wave {
    height: 112px;
  }

  .profile {
    margin-top: -70px;
  }

  .profile__bio {
    font-size: 0.95rem;
  }

  .stats-section {
    margin-top: 42px;
  }

  .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 25px;
  }

  .content-section {
    margin-top: 58px;
  }

  .trip-row {
    grid-template-columns: 60px minmax(0, 1fr) auto;
    grid-template-areas:
      "photo place country"
      "photo dates dates";
    gap: 3px 12px;
    padding: 12px 8px;
  }

  .trip-photo-wrap {
    grid-area: photo;
  }

  .trip-place {
    grid-area: place;
  }

  .trip-country {
    grid-area: country;
    max-width: 92px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .trip-date--start {
    grid-area: dates;
  }

  .trip-duration,
  .trip-date--end {
    grid-area: dates;
    justify-self: start;
    margin-left: 74px;
  }

  .trip-date--end {
    margin-left: 155px;
  }

  .trip-duration {
    color: transparent;
    font-size: 0;
  }

  .trip-duration::before {
    color: var(--secondary);
    content: attr(data-mobile-label);
    font-size: 0.75rem;
  }

  .trip-row--current .trip-duration::before {
    color: rgb(255 255 255 / 78%);
  }

  .travel-chart {
    margin-right: -16px;
    margin-left: -16px;
    padding-right: 16px;
    padding-left: 16px;
  }
}

@media (max-width: 430px) {
  .hero {
    min-height: 500px;
  }

  .hero__inner {
    min-height: 455px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .map-frame {
    width: min(410px, calc(100vw - 24px));
  }

  .profile__links {
    gap: 7px;
  }

  .profile-link {
    padding-right: 14px;
    padding-left: 14px;
  }

  .trip-date--end {
    display: none;
  }
}

@media (min-width: 1200px) {
  .hero__inner {
    padding-top: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
