:root {
  color-scheme: light;
  --bg: #fff;
  --fg: #111;
  --muted: #666;
  --line: #e5e5e5;
  --surface: #f5f5f5;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --small: 14px;
  --body: 16px;
  --heading: 32px;
}
:root[data-theme=dark] {
  color-scheme: dark;
  --bg: #111;
  --fg: #f5f5f5;
  --muted: #a3a3a3;
  --line: #303030;
  --surface: #1c1c1c;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 var(--body)/1.6 var(--font); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { padding: 0; border: 0; background: none; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button, a { transition: color 160ms ease, opacity 160ms ease, background-color 160ms ease; }
body { transition: background-color 200ms ease, color 200ms ease; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
img { display: block; max-width: 100%; }
img.is-unavailable { opacity: 0; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: var(--heading); font-weight: 500; line-height: 1.3; letter-spacing: -.025em; }
h2, h3 { font-size: var(--body); font-weight: 500; line-height: 1.5; }
main { padding-bottom: 64px; }
main:focus { outline: none; }
.site-shell { max-width: 1120px; padding: 0 44px; margin: auto; }
.site-header { display: flex; align-items: center; gap: 28px; padding: 32px 0; }
.wordmark { display: flex; align-items: center; gap: 10px; font-size: var(--body); font-weight: 500; white-space: nowrap; }
.header-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.site-header nav { display: flex; gap: 24px; margin-left: auto; color: var(--muted); font-size: var(--small); }
.site-header nav a { padding: 6px 0; }
.site-header nav a[aria-current=page] { color: var(--fg); text-decoration: underline; text-underline-offset: 6px; }
.text-button { padding: 6px 0; color: var(--muted); font-size: var(--small); }
.text-button:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 4px; }
.theme-toggle { display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; }
.theme-toggle:hover { background: var(--surface); }
.home-hero h1 { font-size: clamp(40px, 4.5vw, 56px); line-height: 1.15; }
.home-hero { max-width: 720px; padding: 64px 0; }
.intro { margin-top: 24px; font-size: var(--body); color: var(--muted); }
.intro a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.intro a:hover { text-decoration-color: var(--fg); }
.intro-note { margin-top: 16px; }
.social-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; font-size: var(--small); }
.social-location { margin-left: 12px; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.social-links .social-icon { display: grid; place-items: center; width: 28px; height: 32px; color: var(--muted); }
.social-links .social-icon:hover { color: var(--fg); }
.social-links .social-icon svg { width: 20px; height: 20px; }
.social-links svg { height: 14px; width: 14px; }
.section-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.section-top a { font-size: var(--small); color: var(--muted); }
.home-photos { padding: 0 0 48px; width: 100vw; margin-left: calc(50% - 50vw); }
.photo-strip { display: flex; gap: 16px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.photo-strip::-webkit-scrollbar { display: none; }
.photo-strip button { flex: 0 0 auto; width: auto; }
.photo-strip button:focus-visible { outline-offset: -4px; }
#site-footer { padding: 0 0 40px; }
#site-footer .social-links { margin-top: 0; gap: 6px; }
#site-footer .social-icon { width: 24px; height: 24px; color: color-mix(in srgb, var(--muted) 65%, #000); }
#site-footer .social-icon:hover { color: var(--fg); }
#site-footer .social-icon svg { width: 16px; height: 16px; }
.photo-strip button, .photo-card button { display: block; overflow: hidden; border-radius: 4px; }
.photo-card button { width: 100%; }
.photo-strip img { width: auto; max-width: none; height: 230px; object-fit: contain; }
.photo-strip button:hover, .photo-card button:hover { opacity: .85; }
.home-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.small-note { padding-top: 0; }
.eyebrow { display: block; color: var(--muted); font-size: var(--small); font-weight: 400; margin-bottom: 8px; }
.small-note p { margin-top: 4px; color: var(--muted); font-size: var(--small); }
.small-note>a { display: inline-block; margin-top: 16px; font-size: var(--small); }
.page-heading { padding: 56px 0 40px; }
.page-heading p { margin-top: 12px; max-width: 620px; color: var(--muted); }
.resume { max-width: 860px; }
.resume-section { padding-top: 24px; }
.resume-section>h2 { margin-bottom: 32px; color: var(--muted); font-size: var(--small); font-weight: 400; }
.resume-row { display: grid; grid-template-columns: 160px minmax(0,1fr); gap: 32px; margin-bottom: 48px; }
.resume-date, .resume-location { color: var(--muted); font-size: var(--small); }
.resume-date { padding-top: 2px; }
.resume-progression { display: block; margin-top: 6px; }
.resume-company { margin-top: 4px; }
.resume-location { margin-top: 6px; }
.resume-description { margin-top: 16px; color: var(--muted); }
.resume-description p+p { margin-top: 12px; }
.resume-description ul { padding-left: 20px; margin: 12px 0 0; }
.resume-description li+li { margin-top: 6px; }
.resume-links { display: grid; gap: 8px; margin-top: 16px; font-size: var(--small); }
.resume-study { margin-top: 6px; color: var(--muted); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; margin-bottom: 20px; font-size: var(--small); }
.count, .toolbar>a { color: var(--muted); }
.photo-grid { columns: 3; column-gap: 18px; }
.photo-card { break-inside: avoid; margin: 0 0 24px; }
.photo-card img { width: 100%; height: auto; }
.segmented, .filters { display: flex; align-items: center; gap: 24px; }
.segmented button, .filters button { padding: 6px 0; color: var(--muted); font-size: var(--small); text-underline-offset: 6px; }
.segmented button[aria-pressed=true], .filters button[aria-pressed=true] { color: var(--fg); text-decoration: underline; }
.segmented button:hover, .filters button:hover { color: var(--fg); text-decoration: underline; }
.timeline { margin-top: 8px; }
.month-group { display: grid; grid-template-columns: 132px minmax(0,1fr); gap: 28px; margin-bottom: 32px; }
.month-label { font-size: var(--small); font-weight: 400; color: var(--muted); padding-top: 20px; }
.visit-list { min-width: 0; padding-left: 28px; }
.visit-row { position: relative; display: grid; grid-template-columns: 54px minmax(0,1fr) 56px 18px; align-items: start; gap: 20px; min-height: 96px; padding: 20px 0;  }
.visit-row:before { content: ''; position: absolute; width: 7px; height: 7px; left: -32px; top: 28px; border: 1px solid var(--muted); border-radius: 50%; background: var(--bg); }
.visit-date { font-size: var(--small); color: var(--muted); }
.visit-description { min-width: 0; }
.visit-description p { margin-top: 2px; font-size: var(--small); color: var(--muted); text-transform: capitalize; }
.visit-thumbnail { display: block; width: 56px; height: 56px; }
.visit-image { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.visit-row>a:last-child { display: grid; place-items: center; color: var(--muted); }
.visit-row svg { width: 16px; height: 16px; }
.filters { flex-wrap: wrap; }
.gear-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 32px 20px; }
.gear-card button { width: 100%; background: none; padding: 0; text-align: left; }
.gear-image { position: relative; display: grid; place-items: center; height: 210px; background: var(--surface); border-radius: 4px; margin-bottom: 12px; overflow: hidden; }
.gear-image img { width: 82%; height: 160px; object-fit: contain; }
.gear-card button:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
.gear-card h3 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gear-card p { margin-top: 4px; font-size: var(--small); color: var(--muted); }
.gear-placeholder svg { width: 56px; height: 56px; stroke-width: 1; color: var(--muted); }
.sample-badge { position: absolute; top: 10px; right: 12px; font-size: var(--small); color: var(--muted); }
.map-layout { display: grid; grid-template-columns: minmax(0,1fr) 260px; gap: 24px; }
.map { position: relative; height: 540px; border-radius: 4px; background: var(--surface); overflow: hidden; }
.map-status { position: absolute; top: 12px; left: 12px; right: 52px; z-index: 2; padding: 10px 14px; border-radius: 4px; background: var(--bg); color: var(--muted); font-size: var(--small); }
.map-list { max-height: 540px; min-width: 0; overflow-y: auto; }
.map-place { display: block; width: 100%; padding: 12px 0; text-align: left; font-size: var(--body); }
.map-place-name { display: block; text-underline-offset: 4px; }
.map-place:hover .map-place-name, .map-place[aria-pressed=true] .map-place-name { text-decoration: underline; }
.map-place.is-hovered .map-place-name { text-decoration: underline; }
.map-place[aria-pressed=true] .map-place-name { font-weight: 500; }
.map-place-meta { display: block; margin-top: 4px; color: var(--muted); font-size: var(--small); }
.map-marker { width: 12px; height: 12px; padding: 0; background: var(--fg); border: 2px solid var(--bg); border-radius: 50%; }
.map-marker[aria-pressed=true] { outline: 2px solid var(--fg); outline-offset: 2px; }
.map-marker.is-hovered { outline: 2px solid var(--fg); outline-offset: 3px; z-index: 2; }
.map-marker[aria-pressed=true] { z-index: 3; }
.mapboxgl-ctrl-attrib { background: var(--bg); color: var(--muted); font-size: 10px; }
.map-list { overscroll-behavior: contain; }
.mapboxgl-map, .mapboxgl-popup { font-family: var(--font); }
.mapboxgl-canvas { filter: grayscale(1); }
.mapboxgl-popup-content { padding: 16px 20px 16px 16px; border-radius: 4px; background: var(--bg); color: var(--fg); font-size: var(--small); line-height: 1.6; }
.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip { border-top-color: var(--bg); }
.mapboxgl-popup-anchor-top .mapboxgl-popup-tip { border-bottom-color: var(--bg); }
.mapboxgl-popup-anchor-left .mapboxgl-popup-tip { border-right-color: var(--bg); }
.mapboxgl-popup-anchor-right .mapboxgl-popup-tip { border-left-color: var(--bg); }
.mapboxgl-ctrl-group, .mapboxgl-ctrl-group:not(:empty) { background: none; border: 0; box-shadow: none; }
.mapboxgl-ctrl-group button, .mapboxgl-ctrl-group button+button { border: 0; }
.mapboxgl-ctrl-group button:not(:disabled):hover, .mapboxgl-ctrl-group button:not(:disabled):active, .mapboxgl-popup-close-button:hover { background: none; }
:root[data-theme=dark] .mapboxgl-ctrl-icon { filter: invert(1); }
.mapboxgl-popup-close-button { padding: 0 5px; }
.map-popup-title { font-weight: 500; }
.map-popup-date { color: var(--muted); }
.mapboxgl-popup a { display: inline-block; margin-top: 8px; text-decoration: underline; text-underline-offset: 3px; }
.map-note { padding-top: 12px; font-size: var(--small); color: var(--muted); }
.load-more { display: block; margin: 28px auto 0; }
.empty, .loading { color: var(--muted); padding: 64px 0; }
.loading { min-height: 60vh; }
.loading h1 { color: var(--fg); margin-bottom: 20px; }
.loading button { margin-top: 20px; }
.preview-note { position: fixed; right: 16px; bottom: 10px; color: var(--muted); background: var(--bg); padding: 0 4px; font-size: var(--small); pointer-events: none; }
.skip { position: absolute; left: 20px; top: -100px; background: var(--bg); padding: 8px; z-index: 1000; }
.skip:focus { top: 10px; }
dialog { width: min(760px,calc(100vw - 32px)); max-height: 90vh; padding: 32px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); }
dialog::backdrop { background: #0009; }
.dialog-close { display: block; margin: -16px 0 12px auto; }
dialog h2 { margin: 16px 0 8px; }
dialog p { margin-top: 8px; color: var(--muted); font-size: var(--small); }
dialog a { display: inline-block; margin-top: 8px; font-size: var(--small); text-decoration: underline; text-underline-offset: 4px; }
.lightbox-image { width: 100%; max-height: 65vh; object-fit: contain; }
.dialog-image { width: 100%; height: 250px; object-fit: contain; }
.error-banner { padding: 12px 16px; margin: 16px 0; background: var(--surface); color: var(--muted); font-size: var(--small); }
@media(max-width:800px) {
  .site-shell { padding: 0 28px; }
  .site-header { gap: 20px; }
  .site-header nav { gap: 20px; }
  .photo-strip img { height: 180px; }
  .photo-grid { columns: 2; }
  .gear-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .month-group { grid-template-columns: 110px minmax(0,1fr); gap: 16px; }
  .visit-list { padding-left: 20px; }
  .visit-row { gap: 12px; }
  .visit-row:before { left: -24px; }
  .map-layout { grid-template-columns: 1fr; }
  .map { height: 440px; }
  .map-list { max-height: 240px; }
}
@media(max-width:520px) {
  .site-shell { padding: 0 22px; }
  .site-header { flex-wrap: wrap; gap: 16px; padding: 24px 0; }
  .site-header .theme-toggle { margin-left: auto; }
  .site-header nav { order: 3; flex-basis: 100%; margin: 0; gap: 24px; }
  .home-hero, .page-heading { padding: 32px 0; }
  .resume-row { grid-template-columns: 1fr; gap: 10px; margin-bottom: 36px; }
  .resume-section>h2 { margin-bottom: 24px; }
  .photo-strip { gap: 12px; }
  .photo-strip img { height: 190px; }
  .home-notes { grid-template-columns: 1fr; gap: 28px; }
  .photo-grid { column-gap: 12px; }
  .photo-card { margin-bottom: 20px; }
  .toolbar { gap: 12px; flex-wrap: wrap; }
  .month-group { display: block; }
  .month-label { padding: 0 0 12px; }
  .visit-list { margin-left: 3px; padding-left: 16px; }
  .visit-row { grid-template-columns: 46px minmax(0,1fr) 40px 16px; gap: 10px; min-height: 80px; padding: 16px 0; }
  .visit-row:before { left: -20px; }
  .visit-thumbnail { width: 40px; height: 40px; }
  .gear-grid { gap: 28px 16px; }
  .gear-image { height: 160px; }
  .gear-image img { height: 120px; }
  .filters { gap: 4px 20px; }
  .gear-toolbar { align-items: flex-start; flex-direction: column; }
  .map { height: 380px; }
  dialog { padding: 28px 20px; }
}
@media(prefers-reduced-motion:reduce) {
  * { scroll-behavior: auto!important; transition: none!important; animation: none!important; }
}

.place-title { text-align: left; font-weight: 500; }
.place-title:hover { text-decoration: underline; text-underline-offset: 4px; }
dialog.place-pane { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(460px,100vw); height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; padding: 28px; }
.place-pane .dialog-close { margin: 0 0 28px auto; }
.place-cover { width: 100%; max-height: 300px; object-fit: cover; border-radius: 4px; margin-bottom: 28px; }
.place-pane h2 { font-size: 28px; margin: 8px 0; }
.place-location { display: flex; gap: 8px; align-items: center; }
.place-actions { margin-top: 24px; }
body:has(dialog[open]) { overflow: hidden; }


.visit-date, .month-label { line-height: 24px; }
.place-facts { margin: 28px 0 0; font-size: var(--small); }
.place-facts:empty { display: none; }
.place-facts>div { margin-bottom: 20px; }
.place-facts dt { color: var(--muted); margin-bottom: 4px; }
.place-facts dd { margin: 0; }
.place-reviews { margin-top: 28px; }
.place-reviews p a { margin-top: 0; }
.place-actions { display: flex; flex-wrap: wrap; gap: 20px; }
@media(max-width:520px) { .visit-row:before { top: 24px; } }

.places-toolbar { justify-content: flex-end; }
.places-stage { display: grid; grid-template-columns: 0fr 1fr; transition: grid-template-columns 420ms cubic-bezier(.22,.68,0,1); align-items: start; }
.places-stage.with-map { grid-template-columns: 1fr 1fr; }
.map-reveal { min-width: 0; overflow: hidden; opacity: 0; transition: opacity 300ms ease; position: sticky; top: 20px; }
.with-map .map-reveal { opacity: 1; }
.map-reveal .map { width: 100%; min-width: 280px; height: 540px; }
.shared-places { min-width: 0; transition: padding-left 420ms ease; }
.with-map .shared-places { padding-left: 24px; max-height: 540px; overflow-y: auto; overscroll-behavior: contain; }
.with-map .month-group { grid-template-columns: 90px minmax(0,1fr); gap: 16px; }
.with-map .month-label { padding: 20px 0 0; }
.with-map .visit-list { padding-left: 0; }
.with-map .visit-row { grid-template-columns: 48px minmax(0,1fr); gap: 12px; }
.with-map .visit-thumbnail, .with-map .visit-row>a, .with-map .visit-row:before { display: none; }
.shared-places .place-title.is-hovered, .shared-places .place-title[aria-pressed=true] { text-decoration: underline; text-underline-offset: 4px; }
@media(max-width:600px) {
  .places-stage.with-map { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .with-map .shared-places { padding-left: 12px; }
  .with-map .visit-row { grid-template-columns: 1fr; gap: 2px; }
  .map-reveal .map { min-width: 0; }
}

.places-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.places-heading .places-toolbar { flex-shrink: 0; margin: 0; padding: 0; }
.map-reveal { border-radius: 12px; height: 540px; }
.map-reveal .map { height: 580px; border-radius: 12px; }
@media(max-width:600px) {
  .places-heading { flex-wrap: wrap; gap: 0; margin-bottom: 24px; }
  .places-heading .page-heading { padding-bottom: 20px; }
  .with-map .month-group { grid-template-columns: 1fr; gap: 0; }
}

/* Preserve the month gutter across the two views. */
.places-stage .month-group { grid-template-columns: 90px minmax(0,1fr); gap: 16px; }
@media(max-width:520px) { .places-stage .month-group { display: block; } .with-map .month-label { padding: 0 0 12px; } }

.photo-strip button { border-radius: 12px; }
#site-footer .social-links { justify-content: center; }

/* A month stays visible only within its own group, in either scroll view. */
.places-stage .month-label {
  position: sticky;
  top: 0;
  align-self: start;
  z-index: 1;
  background: var(--bg);
}

.places-heading { align-items: flex-end; }
.places-heading .places-toolbar { margin-bottom: 40px; }
.places-heading .segmented button { padding-bottom: 0; }
.places-stage .timeline { margin-top: 0; }
.places-stage .month-label { padding-top: 0; }
.places-stage .visit-row { padding-top: 0; padding-bottom: 40px; }
.places-stage .visit-row:before { top: 8px; }
.places-stage.with-map .month-group { grid-template-columns: minmax(0,1fr) 90px; }
.with-map .month-label { grid-column: 2; grid-row: 1; text-align: right; }
.with-map .visit-list { grid-column: 1; grid-row: 1; }
@media(max-width:600px) { .places-heading .places-toolbar { margin-bottom: 0; } }
@media(max-width:520px) {
  .places-stage.with-map .month-group { display: grid; grid-template-columns: minmax(0,1fr) 64px; gap: 8px; }
  .with-map .month-label { font-size: 12px; }
}

.place-reviews .review-link { display: inline-flex; align-items: center; gap: 10px; }
.review-link svg { flex-shrink: 0; width: 16px; height: 16px; color: var(--muted); }
.places-stage .visit-thumbnail, .places-stage .visit-row>a:last-child { margin-top: 4px; }
.with-map .visit-row { grid-template-columns: 48px minmax(0,1fr) 44px; }
.with-map .visit-thumbnail { display: block; width: 44px; height: 44px; }
@media(max-width:600px) {
  .with-map .visit-row { grid-template-columns: minmax(0,1fr) 36px; }
  .with-map .visit-date { grid-column: 1; }
  .with-map .visit-description { grid-column: 1; }
  .with-map .visit-thumbnail { grid-column: 2; grid-row: 1 / span 2; width: 36px; height: 36px; }
}

/* Photo-only viewer: no dialog surface or dark overlay. */
dialog.photo-lightbox {
  width: min(1100px,calc(100vw - 48px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: auto;
}
dialog.photo-lightbox::backdrop { background: rgba(0,0,0,.82); backdrop-filter: blur(8px); }
.photo-lightbox .dialog-close { margin: 0 0 12px auto; }
.photo-lightbox .lightbox-image { width: auto; max-width: 100%; height: auto; max-height: calc(100dvh - 150px); margin: 0 auto; object-fit: contain; }
.photo-lightbox h2 { text-align: center; font-size: var(--small); font-weight: 400; margin: 16px auto 0; max-width: 640px; }

.resume-description a { text-decoration: underline; text-underline-offset: 4px; color: var(--fg); }

/* Consistent continuous corners, with rounded fallback where unsupported. */
.photo-strip button, .photo-card button, .visit-image, .gear-image,
.map-reveal, .map, .place-cover, .lightbox-image, .dialog-image {
  border-radius: 16px;
  corner-shape: squircle;
}
.visit-image { border-radius: 10px; }
dialog:not(.photo-lightbox):not(.place-pane), .mapboxgl-popup-content, .error-banner {
  border-radius: 16px;
  corner-shape: squircle;
}
.photo-lightbox { color: #f5f5f5; }
.photo-lightbox .dialog-close { color: #d4d4d4; }
.header-avatar, .theme-toggle, .map-marker { corner-shape: round; }

/* Shared geometry: view changes move content, never scale it. */
.places-stage, .shared-places { transition: none; }
.places-stage .visit-row { grid-template-columns: 54px minmax(0,1fr) 56px 18px; gap: 12px; min-height: 100px; }
.places-stage .visit-thumbnail { display: block; width: 56px; height: 56px; grid-column: 3; grid-row: 1; }
.places-stage .visit-date { grid-column: 1; grid-row: 1; }
.places-stage .visit-description { grid-column: 2; grid-row: 1; }
.places-stage .visit-row>a { display: grid; grid-column: 4; grid-row: 1; }
.places-stage .visit-description h3, .places-stage .visit-description p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.places-stage .place-title { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media(max-width:800px) {
  .places-stage.with-map { grid-template-columns: 2fr 3fr; }
  .places-stage .visit-row { grid-template-columns: 46px minmax(0,1fr) 40px 16px; gap: 8px; }
  .places-stage .visit-thumbnail { width: 40px; height: 40px; }
}

.photo-lightbox .lightbox-image { transform-origin: top left; }
dialog.photo-lightbox { overflow: visible; }

.company-jumps { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: var(--small); margin: -20px 0 40px; }
.play-section { margin-bottom: 48px; max-width: 860px; }
.play-section>p { color: var(--muted); margin: 12px 0 24px; }
.contribution-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7,10px); grid-auto-columns: 10px; gap: 4px; overflow-x: auto; }
.contribution-grid span { background: var(--surface); border-radius: 3px; corner-shape: squircle; }
.contribution-grid [data-level="1"] { background: #bbb; }
.contribution-grid [data-level="2"] { background: #888; }
.contribution-grid [data-level="3"] { background: #555; }
.contribution-grid [data-level="4"] { background: var(--fg); }
:root[data-theme=dark] .contribution-grid [data-level="1"] { background: #444; }
:root[data-theme=dark] .contribution-grid [data-level="3"] { background: #bbb; }
.play-section .github-note { font-size: 12px; margin-top: 12px; }
.resume-row { scroll-margin-top: 28px; }
html { scroll-behavior: smooth; }

.play-section>h2, .resume-section>h2 {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--fg);
  margin-bottom: 24px;
}
.company-jumps { column-gap: 0; }
.company-jumps a+a::before { content: '·'; display: inline-block; margin: 0 12px; color: var(--muted); }

.github-calendar { overflow-x: auto; }
.github-months { display: grid; grid-template-columns: repeat(53,10px); gap: 4px; margin-bottom: 6px; color: var(--muted); font-size: 12px; }
.github-months span { overflow: visible; white-space: nowrap; }
.github-calendar .contribution-grid { overflow: visible; width: max-content; }
.contribution-grid [data-level="1"] { background: #9be9a8; }
.contribution-grid [data-level="2"] { background: #40c463; }
.contribution-grid [data-level="3"] { background: #30a14e; }
.contribution-grid [data-level="4"] { background: #216e39; }
:root[data-theme=dark] .contribution-grid [data-level="1"] { background: #0e4429; }
:root[data-theme=dark] .contribution-grid [data-level="2"] { background: #006d32; }
:root[data-theme=dark] .contribution-grid [data-level="3"] { background: #26a641; }
:root[data-theme=dark] .contribution-grid [data-level="4"] { background: #39d353; }

.place-filter { font: inherit; color: inherit; padding: 0; border: 0; background: none; cursor: pointer; text-underline-offset: 4px; }
.place-filter:hover, .place-filter[aria-pressed="true"] { text-decoration: underline; }
/* Keep filters quiet; the close glyph explains the selected toggle. */
.place-filter:hover,.place-filter[aria-pressed=true] { text-decoration:none; }
.place-filter[aria-pressed=true] { color:var(--fg); }
.filter-clear { display:none; }
.place-filter[aria-pressed=true] .filter-clear { display:inline; }
.visit-row[hidden],.month-group[hidden],.map-marker[hidden] { display:none !important; }
.places-stage .month-label { top:24px; }
.header-avatar { transform-origin:top left; }
.home-hero { display:flex; align-items:center; gap:32px; max-width:none; }
.hero-copy { min-width:0; max-width:720px; }
.hero-avatar-slot { flex:0 0 148px; }
.hero-avatar-slot .header-avatar { width:148px; height:148px; }
@media(min-width:801px) and (min-height:650px) {
  .home-page .site-shell { min-height:100svh; display:flex; flex-direction:column; }
  .site-header { padding:clamp(18px,3vh,32px) 0; }
  .home-page main { flex:1; display:flex; flex-direction:column; justify-content:center; gap:28px; padding-bottom:48px; }
  .home-page .home-hero { padding:clamp(16px,3vh,40px) 0 0; }
  .home-page .home-hero h1 { font-size:clamp(36px,4vw,52px); }
  .home-page .intro { margin-top:16px; }
  .home-page .intro-note { margin-top:10px; }
  .home-page .home-photos { padding-bottom:0; }
  .home-page .photo-strip img { height:clamp(140px,24vh,260px); }
  .home-page #site-footer { padding:12px 0 20px; }
}
@media(max-width:800px) {
  .home-hero { gap:20px; align-items:flex-start; }
  .hero-avatar-slot { flex-basis:80px; }
  .hero-avatar-slot .header-avatar { width:80px; height:80px; }
}
@media(max-width:520px) {
  .home-hero { display:block; }
  .hero-avatar-slot { margin-bottom:20px; }
}
.home-hero { display:block; }
.hero-copy { max-width:900px; }
.hero-title { display:flex; align-items:center; gap:20px; }
.hero-avatar-slot { flex:0 0 64px; margin:0; }
.hero-avatar-slot .header-avatar { width:64px; height:64px; }
.wordmark span { display:inline-block; }
.photos-page .page-heading p { display:flex; flex-wrap:wrap; gap:8px 20px; font-size:var(--small); max-width:none; }
.play-interests a,.inline-link { text-decoration:underline; text-decoration-color:var(--line); text-underline-offset:4px; }
.inline-link { font:inherit; }
.play-section .play-interests { margin-top:16px; }
@media(max-width:520px) {
  .hero-title { gap:14px; }
  .hero-avatar-slot { flex-basis:48px; }
  .hero-avatar-slot .header-avatar { width:48px; height:48px; }
  .home-hero h1 { font-size:32px; }
}
/* The map list starts flush with its viewport; only Timeline has a sticky inset. */
.places-stage.with-map .month-label { top:0; }

/* Balance the full bio against the portrait at the opposite edge. */
.home-hero { display:flex; justify-content:space-between; align-items:center; gap:40px; }
.hero-copy { flex:0 1 720px; max-width:720px; }
.hero-avatar-slot { flex:0 0 148px; margin:0; }
.hero-avatar-slot .header-avatar { width:148px; height:148px; }
@media(max-width:800px) {
  .home-hero { gap:24px; }
  .hero-avatar-slot { flex-basis:100px; }
  .hero-avatar-slot .header-avatar { width:100px; height:100px; }
}
@media(max-width:520px) {
  .home-hero { flex-wrap:wrap; gap:20px; }
  .hero-copy { flex-basis:100%; }
  .hero-avatar-slot { order:-1; margin:0; flex-basis:80px; }
  .hero-avatar-slot .header-avatar { width:80px; height:80px; }
}

/* The portrait remains in the header on every route. */
.avatar-button { display:grid; place-items:center; flex-shrink:0; cursor:zoom-in; }
.home-hero { display:block; }
.hero-copy { max-width:720px; }

.footer-time { text-align:center; color:var(--muted); font-size:var(--small); margin-bottom:6px; }
.footer-time-in { color:color-mix(in srgb, var(--muted) 65%, #000); }
@media(max-width:800px) {
  .photo-strip button, .photo-card button, .lightbox-image { border-radius:6px; }
}
@supports not (corner-shape:squircle) {
  .photo-strip button, .photo-card button, .lightbox-image { border-radius:6px; }
}

/* Connect the existing timeline dots without changing the row geometry. */
.places-stage:not(.with-map) .visit-list { position:relative; }
.places-stage:not(.with-map) .timeline { position:relative; }
.places-stage:not(.with-map) .timeline::before { content:''; position:absolute; top:var(--axis-top,12px); left:var(--axis-left,106px); height:var(--axis-height,0px); width:1px; background:var(--line); }
#more-visits { display:block; margin:24px auto 0; }
#more-visits[hidden] { display:none; }

/* Dissolve the scrolling list into the page, with room to reveal its final row. */
.with-map .shared-places {
  padding-bottom: 64px;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 64px), transparent 100%);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 64px), transparent 100%);
}
