/* Palette: blue-green (teal) */
:root,
[data-md-color-scheme="default"] {
  --md-primary-fg-color: #0f6b6b;
  --md-primary-fg-color--light: #3a9a96;
  --md-primary-fg-color--dark: #0a4a4b;
  --md-accent-fg-color: #12948c;
  --md-default-bg-color: #f5faf9;
  --la-card-bg: #ffffff;
  --la-muted: #55696a;
  --la-line: #d5e6e4;
  --la-edu: #4fb3ae;
  --la-exp: #0f6b6b;
  --la-home: #08393a;
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #137b78;
  --md-primary-fg-color--light: #5cc0b8;
  --md-primary-fg-color--dark: #0f6b6b;
  --md-accent-fg-color: #6fd6cb;
  --md-typeset-a-color: #7fd3c9;
  --md-default-bg-color: #101a1a;
  --la-card-bg: #172424;
  --la-muted: #a2b8b6;
  --la-line: #283a3a;
  --la-edu: #8fd8cf;
  --la-exp: #5cc0b8;
  --la-home: #c2e8e3;
}

/* ---------- Home hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 2rem;
  align-items: center;
  margin: 1rem 0 2.5rem;
}
.hero h1 {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 .4rem;
  color: var(--md-default-fg-color);
}
.hero .tagline {
  font-size: 1.15rem;
  color: var(--md-primary-fg-color);
  font-weight: 600;
  margin: 0 0 1rem;
}
.hero figure { margin: 0; }
.hero img {
  width: 100%;
  border-radius: 12px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .15);
}
.hero figcaption {
  font-size: .7rem;
  color: var(--la-muted);
  text-align: left;
  max-width: none;
}
.hero .md-button { margin: .3rem .4rem .3rem 0; }

@media screen and (max-width: 44.9375em) {
  .hero { grid-template-columns: 1fr; gap: 1rem; }
  .hero h1 { font-size: 1.9rem; }
  .hero figure { order: -1; }
}

/* ---------- Image gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1rem 0 2rem;
}
.gallery figure {
  margin: 0;
  background: var(--la-card-bg);
  border: 1px solid var(--la-line);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.gallery figure a { display: block; }
.gallery img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  transition: transform .25s ease;
}
.gallery figure:hover img { transform: scale(1.03); }
.gallery figcaption {
  font-size: .72rem;
  padding: .6rem .7rem .8rem;
  margin: 0;
  max-width: none;
  text-align: left;
  color: var(--md-default-fg-color--light);
}
.gallery figcaption strong { color: var(--md-default-fg-color); display: block; }

/* ---------- Cards (Material grid cards, softened) ---------- */
.md-typeset .grid.cards > ul > li {
  background: var(--la-card-bg);
  border-color: var(--la-line);
  border-radius: 10px;
}
.md-typeset .grid.cards > ul > li:hover { border-color: var(--md-primary-fg-color--light); }

/* ---------- CV timeline ---------- */
.timeline { border-left: 3px solid var(--la-line); margin: 1rem 0 2rem .4rem; padding-left: 1.2rem; }
.timeline .entry { position: relative; margin-bottom: 1.3rem; }
.timeline .entry::before {
  content: "";
  position: absolute;
  left: -1.67rem;
  top: .35rem;
  width: .75rem;
  height: .75rem;
  border-radius: 50%;
  background: var(--la-exp);
  border: 2px solid var(--md-default-bg-color);
}
.timeline.edu .entry::before { background: var(--la-edu); }
.timeline .when { font-size: .72rem; font-weight: 600; color: var(--la-muted); letter-spacing: .02em; text-transform: uppercase; }
.timeline .role { font-weight: 700; margin: .1rem 0 0; }
.timeline .org { color: var(--md-primary-fg-color); }
.timeline p { margin: .2rem 0 0; }
.timeline .maplink { font-size: .72rem; cursor: pointer; }

/* ---------- Career map ---------- */
.map-controls { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0 .8rem; }
.map-controls button {
  font: inherit;
  font-size: .75rem;
  padding: .3rem .8rem;
  border-radius: 999px;
  border: 1px solid var(--la-line);
  background: var(--la-card-bg);
  color: var(--md-default-fg-color);
  cursor: pointer;
}
.map-controls button[aria-pressed="true"] {
  background: var(--md-primary-fg-color);
  border-color: var(--md-primary-fg-color);
  color: #fff;
}
.map-controls .dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .35rem; vertical-align: middle; }

#career-map {
  height: 480px;
  border-radius: 12px;
  border: 1px solid var(--la-line);
  z-index: 0;
}
@media screen and (max-width: 44.9375em) { #career-map { height: 380px; } }

.leaflet-popup-content { font-family: var(--md-text-font-family, sans-serif); font-size: .8rem; line-height: 1.4; }
.leaflet-popup-content .pop-when { color: #55696a; font-size: .72rem; text-transform: uppercase; font-weight: 600; }
.leaflet-popup-content .pop-title { font-weight: 700; margin: .15rem 0; }
.leaflet-popup-content .pop-org { color: #0f6b6b; }
.leaflet-popup-content p { margin: .3rem 0 0; }

.career-pin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .45);
}
.career-pin.education { background: #4fb3ae; }
.career-pin.experience { background: #0f6b6b; }
.career-pin.home { background: #08393a; }
.career-pin.volunteer { background: #2f6fb0; }
.timeline.vol .entry::before { background: #2f6fb0; }
.readtime { font-size: .75rem; color: var(--la-muted); display: block; margin: .2rem 0 .6rem; }

/* Photo strip */
.photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 1rem 0 1.5rem; }
.photos figure { margin: 0; }
.photos img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; display: block; }
.photos figcaption { font-size: .68rem; color: var(--la-muted); text-align: left; max-width: none; margin-top: .3rem; }

/* ---------- Blog ---------- */
.md-typeset .md-post--excerpt img { border-radius: 8px; }
.md-typeset figure img { border-radius: 8px; }

.hero img.hero-savanna { aspect-ratio: 16 / 9; object-position: 55% 60%; }
.photos.single { grid-template-columns: minmax(0, 360px); }
.photos.single img { aspect-ratio: 3 / 4; }

/* ---------- Destination mosaic ---------- */
.intro { max-width: 44rem; margin: 1rem 0 1.5rem; }
.intro h1 { font-size: 2.6rem; font-weight: 700; line-height: 1.1; margin: 0 0 .4rem; color: var(--md-default-fg-color); }
.intro .tagline { font-size: 1.15rem; color: var(--md-primary-fg-color); font-weight: 600; margin: 0 0 1rem; }
.intro .md-button { margin: .3rem .4rem .3rem 0; }

.destinations {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .8rem;
  margin: 1.5rem 0 .4rem;
}
.md-typeset .destinations a.dest {
  position: relative;
  display: block;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
}
.destinations img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.destinations a.dest:hover img, .destinations a.dest:focus-visible img { transform: scale(1.06); }
.destinations a.dest::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.15) 45%, rgba(0,0,0,0) 70%);
}
.dest-label {
  position: absolute; left: 1rem; right: 1rem; bottom: .9rem; z-index: 1;
  font-size: 1.35rem; font-weight: 700; line-height: 1.15;
  text-shadow: 0 1px 6px rgba(0,0,0,.5);
}
.dest-label small {
  display: block; font-size: .62rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; opacity: .9; margin-bottom: .2rem;
}
.md-typeset p.credits { font-size: .62rem; color: var(--la-muted); margin: .2rem 0 2rem; }
@media screen and (max-width: 59.9375em) {
  .destinations { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 44.9375em) {
  .intro h1 { font-size: 2rem; }
  .dest-label { font-size: 1.1rem; left: .7rem; bottom: .7rem; }
}

.gallery img.contain { object-fit: contain; background: #FFFBEA; }
.gallery figure.wide { grid-column: span 2; }
.gallery figure.wide img { aspect-ratio: 8 / 5; }
.md-typeset figure.featured { margin: 1rem 0 1.2rem; max-width: none; }
.md-typeset figure.featured img { width: 100%; border-radius: 12px; border: 1px solid var(--la-line); background: #FFFBEA; }
.md-typeset figure.featured figcaption { font-size: .7rem; color: var(--la-muted); max-width: none; text-align: left; }
