:root {
  --bg: #F6F3EC;
  --ink: #1C2430;
  --ink-2: #4A5361;
  --ink-3: #7A8290;
  --line: rgba(28, 36, 48, 0.12);
  --tile: #FFFFFF;
  --navy: #1F3A5F;
  --navy-ink: #FFFFFF;
  --navy-ink-2: #C9D6E8;
  --sand: #F3DFC1;
  --sand-ink: #5C3A0E;
  --sage: #D4E7D9;
  --sage-ink: #1F4D2E;
  --lilac: #E7E0F6;
  --lilac-ink: #3E2A6E;
  --stone: #ECE8DF;
  --accent: #C2562B;
  --map-land: #E3DDD0;
  --map-visited: #E9A15B;
  --pin: #C2562B;
  --radius: 22px;
  --font-display: "Source Serif 4", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12161D;
    --ink: #ECEEF2;
    --ink-2: #B4BBC6;
    --ink-3: #8790A0;
    --line: rgba(236, 238, 242, 0.12);
    --tile: #1B212B;
    --navy: #2A4C78;
    --sand: #3A2E1E;
    --sand-ink: #F3D3A3;
    --sage: #1F3328;
    --sage-ink: #BFE2C9;
    --lilac: #2C2640;
    --lilac-ink: #D9CCF7;
    --stone: #222831;
    --accent: #F08A5D;
    --map-land: #2E3542;
    --map-visited: #C7783A;
    --pin: #F08A5D;
  }
}
:root[data-theme="dark"] {
  --bg: #12161D; --ink: #ECEEF2; --ink-2: #B4BBC6; --ink-3: #8790A0;
  --line: rgba(236, 238, 242, 0.12); --tile: #1B212B; --navy: #2A4C78;
  --sand: #3A2E1E; --sand-ink: #F3D3A3; --sage: #1F3328; --sage-ink: #BFE2C9;
  --lilac: #2C2640; --lilac-ink: #D9CCF7; --stone: #222831; --accent: #F08A5D;
  --map-land: #2E3542; --map-visited: #C7783A; --pin: #F08A5D;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1180px; margin: 0 auto; padding: 18px 24px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
}
.wordmark { font-family: var(--font-display); font-size: 22px; text-decoration: none; font-weight: 600; }
.topbar nav { display: flex; gap: 22px; }
.topbar nav a { text-decoration: none; font-size: 14px; color: var(--ink-2); }
.topbar nav a:hover { color: var(--ink); }

main { max-width: 1180px; margin: 0 auto; padding: 8px 24px 40px; }

/* ---------- bento ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(170px, auto);
  gap: 16px;
}
.tile {
  position: relative;
  background: var(--tile);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
a.tile:hover { transform: translateY(-3px); box-shadow: 0 10px 30px -12px rgba(0,0,0,.25); }
.tile-label {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  margin: 0 0 10px; opacity: .75;
}
.tile-big { font-family: var(--font-display); font-size: 24px; line-height: 1.2; margin: 0 0 8px; }
.tile-sub { margin: 0; font-size: 15px; opacity: .85; }
.tile-more { margin-top: auto; padding-top: 14px; font-size: 14px; font-weight: 500; }

.tile-hero {
  grid-column: span 2; grid-row: span 2;
  background: var(--navy); color: var(--navy-ink); border-color: transparent;
  padding: 32px;
}
.avatar {
  width: 120px; height: 120px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 3px rgba(255,255,255,.18);
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 26px; margin-bottom: 22px;
}
.tile-hero h1 { font-size: clamp(40px, 5vw, 60px); margin-bottom: 14px; }
.lede { font-size: 18px; color: var(--navy-ink-2); margin: 0 0 14px; max-width: 34em; }
.meta { font-family: var(--font-mono); font-size: 13px; color: var(--navy-ink-2); margin: 0 0 24px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  margin-top: auto;
  padding: 11px 18px; border-radius: 999px;
  background: var(--accent); color: #fff; text-decoration: none; font-weight: 500; font-size: 15px;
  transition: filter .15s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn .icon { width: 17px; height: 17px; flex-shrink: 0; }
.social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.social .btn { margin-top: 0; }
.btn-ghost { background: transparent; color: var(--navy-ink); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.55); }
.btn-ghost:hover { background: rgba(255,255,255,.1); filter: none; }


.tile-career { background: var(--tile); }
.tile-map { grid-column: span 2; grid-row: span 2; background: var(--sand); color: var(--sand-ink); border-color: transparent; padding-bottom: 12px; }
.mini-map { flex: 1; min-height: 240px; }
.mini-map svg, .big-map svg { width: 100%; height: 100%; display: block; }
.tile-volunteer, .tile-builds { grid-row: span 2; }
.tile-volunteer { background: var(--sage); color: var(--sage-ink); border-color: transparent; }
.tile-builds { background: var(--lilac); color: var(--lilac-ink); border-color: transparent; }
.tile-now { background: var(--tile); }
.tile-story { grid-column: span 2; background: var(--stone); }
.now-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 15px; color: var(--ink-2); }
.now-list li { position: relative; padding-left: 18px; line-height: 1.4; }
.now-list li::before { content: ""; position: absolute; left: 0; top: .5em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: auto 0 0; }
.tags li {
  border: 1px solid currentColor; border-radius: 999px; padding: 2px 10px;
  font-size: 13px; opacity: .85;
}

/* ---------- sections ---------- */
.section { padding: 72px 0 8px; scroll-margin-top: 70px; }
.section-title { font-size: clamp(30px, 4vw, 42px); margin-bottom: 18px; }
.section-intro { max-width: 46em; color: var(--ink-2); font-size: 18px; margin: 0 0 28px; }
.prose { max-width: 46em; font-size: 18px; color: var(--ink-2); }
.prose p { margin: 0 0 18px; }
.aside { color: var(--ink-3); font-size: 15px; max-width: 46em; margin-top: 24px; }

.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 32px 28px; max-width: 50em; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--accent);
}
.when { font-family: var(--font-mono); font-size: 13px; color: var(--accent); margin: 0 0 4px; }
.timeline h3 { font-size: 24px; }
.timeline h3 span { font-family: var(--font-body); font-weight: 400; font-size: 16px; color: var(--ink-3); }
.role { font-weight: 500; margin: 4px 0 8px; }
.timeline p:last-child { margin: 0; color: var(--ink-2); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--tile); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { font-size: 20px; margin-bottom: 6px; }
.card p:last-child { margin: 0; color: var(--ink-2); font-size: 15px; }

.big-map { background: var(--tile); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; aspect-ratio: 2 / 1; }
.place-list { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.place-list li { background: var(--tile); border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; font-size: 14px; }
.place-list li span { color: var(--ink-3); }
.map-country { fill: var(--map-land); stroke: var(--bg); stroke-width: .5; }
.map-country.visited { fill: var(--map-visited); }
.big-map .map-country.visited { fill: var(--map-visited); }
.map-pin { fill: var(--pin); stroke: var(--tile); stroke-width: 1.5; }
.map-pin-pulse { fill: var(--pin); opacity: .25; }

.feature { background: var(--lilac); color: var(--lilac-ink); border-radius: var(--radius); padding: 32px; max-width: 760px; }
.feature + .feature { margin-top: 20px; }
.feature h3 { font-size: 30px; margin-bottom: 10px; }
.feature p { margin: 0 0 14px; }
.stack { font-family: var(--font-mono); font-size: 13px; opacity: .8; }

.footer { max-width: 1180px; margin: 40px auto 0; padding: 40px 24px 60px; border-top: 1px solid var(--line); color: var(--ink-2); }
.footer a { color: var(--accent); }
.fine { font-size: 13px; color: var(--ink-3); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-hero, .tile-map, .tile-story { grid-column: span 2; }
  .tile-hero { grid-row: auto; }
}
@media (max-width: 600px) {
  .topbar { padding: 14px 16px; }
  .topbar nav { display: none; }
  main { padding: 4px 16px 32px; }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .tile-hero, .tile-map, .tile-story { grid-column: auto; }
  .tile-volunteer, .tile-builds { grid-row: auto; }
  .tile-map { grid-row: auto; }
  .tile-hero { padding: 26px; }
  .big-map { aspect-ratio: 1.6 / 1; padding: 4px; }
  .feature { padding: 24px; }
  .footer { padding: 32px 16px 48px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile { transition: none; }
}

/* ---------- employer logo ---------- */
/* White plate so the dark-green logo stays legible in dark mode too. */
.logo-plate {
  display: inline-flex; align-self: flex-start; align-items: center;
  background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px;
  padding: 8px 14px; margin: 2px 0 14px;
  transition: transform .15s ease;
}
.logo-plate:hover { transform: translateY(-2px); }
.logo-plate img { display: block; height: 34px; width: auto; }
.timeline .logo-plate { margin: 4px 0 2px; }
.timeline .logo-plate img { height: 40px; }
.tile-more { text-decoration: none; }
.tile-more:hover { text-decoration: underline; }
.logo-plate-square { padding: 6px; }
.logo-plate-square img { height: 68px; }
.tile-volunteer .tags { margin-top: 14px; }

.org-row { display: flex; align-items: flex-start; gap: 20px; margin: 0 0 24px; max-width: 46em; }
.org-row .logo-plate { margin: 0; flex-shrink: 0; }
.org-row .logo-plate-square img { height: 84px; }
.org-row h3 { font-size: 22px; margin-bottom: 4px; }
.org-row p { margin: 0 0 6px; color: var(--ink-2); }
.org-row a:not(.logo-plate) { color: var(--accent); font-weight: 500; text-decoration: none; }
.org-row a:not(.logo-plate):hover { text-decoration: underline; }
@media (max-width: 600px) { .org-row .logo-plate-square img { height: 64px; } }

/* Hero: avatar up top, name + links anchored to the bottom of the tile. */
.tile-hero h1 { margin-top: auto; }
.tile-hero .social { margin-top: 0; }
@media (max-width: 600px) { .tile-hero h1 { margin-top: 0; } }
@media (max-width: 600px) { .avatar { width: 96px; height: 96px; } }
