:root {
  --bg: #e7efe1;
  --text: #1f2a1c;
  --muted: #4a5a48;
  --link: #3d5a31;
  --photo-border: rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page {
  max-width: 940px;
  margin: 0 auto;
  padding: 64px 24px 48px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 28px;
  align-items: start;
}

.hero-text {
  min-width: 0;
}

.photo {
  display: block;
  width: 200px;
  height: 200px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: inset 0 0 0 1px var(--photo-border);
}

.name {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.tagline {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.bio {
  margin: 16px 0 0;
}

.note {
  position: relative;
  display: inline-block;
}

.note-trigger {
  /* Reset button chrome so it reads as inline text */
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: help;
  text-decoration: underline dotted var(--muted);
  text-underline-offset: 3px;
}

.note-trigger:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
  border-radius: 2px;
}

.note-bubble {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(260px, 80vw);
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  line-height: 1.45;
  padding: 8px 12px;
  border-radius: 8px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 1;
}

.note-bubble::after {
  /* Small arrow pointing down at the trigger word */
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--text);
}

.note:hover .note-bubble,
.note-trigger:focus-visible + .note-bubble,
.note-trigger[aria-expanded="true"] + .note-bubble {
  visibility: visible;
  opacity: 1;
}

.tagline + .bio {
  margin-top: 24px;
}

.links {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.links a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.links a:hover {
  text-decoration-thickness: 2px;
}

.links a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
  border-radius: 2px;
}

.sep {
  color: var(--muted);
  user-select: none;
}

.footer {
  margin-top: 48px;
  color: var(--muted);
  font-size: 13px;
}

.footer p {
  margin: 0;
}

@media (max-width: 560px) {
  .page {
    padding: 40px 20px 32px;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .photo {
    order: -1;
    width: 160px;
    height: 160px;
  }
  /* Keep the tooltip bubble on-screen when the trigger is near the left edge */
  .note-bubble {
    left: 0;
    transform: none;
  }
  .note-bubble::after {
    left: 14px;
    transform: none;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #181d15;
    --text: #e7efe1;
    --muted: #a3b09f;
    --link: #a8c994;
    --photo-border: rgba(255, 255, 255, 0.08);
  }
}
