@font-face {
  font-family: "Day Roman";
  src: url("/fonts/day-roman.regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: #fbfbfc;
  --ink: #25272c;
  --muted: #575a62;
  --rule: #d9dade;
  --accent: #ad342b;
  font-family: "Day Roman", Georgia, serif;
  font-synthesis: none;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

body { margin: 0; }

.home {
  width: min(100% - 48px, 620px);
  margin-inline: auto;
  padding-block: clamp(88px, 24vh, 240px) 64px;
}

h1 {
  margin: 0 0 28px;
  font-size: clamp(2.25rem, 5vw, 2.625rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.intro {
  max-width: 58ch;
  margin: 0;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1.65;
}

.intro + .intro { margin-top: 20px; }

a {
  color: var(--ink);
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

a:hover { color: var(--accent); text-decoration-color: currentColor; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 1px; }

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
  margin-top: 32px;
  padding-top: 16px;
  font-size: 1.0625rem;
}

.links a { display: inline-flex; align-items: center; min-height: 44px; }

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17181c;
    --ink: #e5e6e8;
    --muted: #afb1b9;
    --rule: #3e4048;
    --accent: #ef897e;
  }
}

@media (max-width: 400px) {
  .links { column-gap: 24px; }
}

/* Contribution tiles: limestone to patinated bronze, on the page itself. */
github-frog-grid, strava-activity-grid {
  display: block;
  margin-top: 52px;
  --frog-font: "Day Roman", Georgia, serif;
  --frog-bg: var(--paper);
  --frog-ink: var(--ink);
  --frog-muted: var(--muted);
  --frog-line: var(--rule);
  --frog-accent: var(--accent);
  --frog-level-0: #deded8;
  --frog-level-1: #a4b396;
  --frog-level-2: #789265;
  --frog-level-3: #506f40;
  --frog-level-4: #304e26;
}

.activity-fallback { color: var(--muted); font-size: 1rem; line-height: 1.6; }

@media (prefers-color-scheme: dark) {
  github-frog-grid, strava-activity-grid {
    --frog-level-0: #111310;
    --frog-level-1: #293822;
    --frog-level-2: #4c683a;
    --frog-level-3: #87a366;
    --frog-level-4: #cfe2b4;
  }
}

/* Inline context cards preserve normal link behavior. */
.inline-note { position: relative; display: inline-block; }
.inline-note-trigger {
  border: 0; padding: 0; margin: 0; background: none;
  font: inherit; color: var(--ink); cursor: pointer;
  text-decoration: underline dotted var(--rule); text-underline-offset: 5px;
}
.inline-note-trigger:hover { color: var(--accent); }
.inline-note-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.inline-note-card {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 10;
  width: min(320px, calc(100vw - 48px)); padding: 0;
  max-height: calc(100dvh - 48px); overflow-y: auto;
  color: var(--ink); background: var(--paper); border: 1px solid var(--rule);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--ink) 8%, transparent);
  font-size: 1rem; line-height: 1.6;
}
.inline-note-card[hidden] { display: none; }
.inline-note-image { display: block; width: 100%; height: 176px; object-fit: cover; border-bottom: 1px solid var(--rule); }
.inline-note-copy { display: block; padding: 16px 18px; }

.inline-note-title { display: block; margin-bottom: 6px; font-size: 1.125rem; }

/* Strava has its own orange scale; zero keeps the shared quiet background. */
strava-activity-grid {
  --frog-level-1: #ecd2b8;
  --frog-level-2: #dca16c;
  --frog-level-3: #c77231;
  --frog-level-4: #ac490c;
}
@media (prefers-color-scheme: dark) {
  strava-activity-grid {
    --frog-level-1: #462b19;
    --frog-level-2: #8b4c23;
    --frog-level-3: #d87b35;
    --frog-level-4: #ffb267;
  }
}

/* Native scroll snapping keeps swipe and trackpad navigation available without JS. */
activity-carousel { display: block; margin-top: 52px; border-top: 1px solid var(--rule); padding-top: 8px; }
activity-carousel[data-enhanced] .activity-heading,
activity-carousel[data-enhanced] strava-activity-grid::part(heading) { display: none; }
activity-carousel github-frog-grid::part(stage),
activity-carousel strava-activity-grid::part(stage) { border-top: 0; padding-top: 8px; }
.activity-viewport {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--rule) transparent;
  overscroll-behavior-x: contain;
}
.activity-slide { flex: 0 0 100%; min-width: 0; padding: 6px 4px 10px; scroll-snap-align: start; scroll-snap-stop: always; }
.activity-slide github-frog-grid, .activity-slide strava-activity-grid { margin-top: 0; }
.activity-heading { margin: 0 0 14px; font-size: 16px; font-weight: 400; line-height: normal; }
.activity-controls { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 4px; }
.activity-controls[hidden] { display: none; }
.activity-picker { display: flex; gap: 20px; }
.activity-controls button {
  min-height: 44px; border: 0; padding: 4px 0; background: none;
  font: inherit; font-size: 14px; color: var(--muted); cursor: pointer;
  text-underline-offset: 5px;
}
.activity-controls button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; }
.activity-controls button:hover { color: var(--ink); }
.activity-controls button:focus-visible, .activity-viewport:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.activity-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.activity-picker button { font-size: 16px; }
