/* These variables control the page's colors. */
:root {
  --background: #fcfcfb;
  --heading: #30322f;
  --text: #646660;
  --muted: #797b74;
  --link: #444a40;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  padding: 64px 28px;
  display: grid;
  place-items: center;
  background: var(--background);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* A narrow column makes the introduction feel personal and easy to read. */
.intro { width: 100%; max-width: 460px; }
.intro-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 38px;
}
h1 { margin: 0; color: var(--heading); font-size: 16px; font-weight: 500; line-height: 1.5; }
.subtitle { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
nav { display: flex; gap: 8px; }
nav a {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #efefeb;
  color: #62665d;
  font-size: 12px;
  text-decoration: none;
}
.bio p { margin: 0 0 24px; }
.bio p:last-child { margin-bottom: 0; }
.emphasis { color: var(--heading); }
a { color: var(--link); text-decoration-color: #b7bcb0; text-underline-offset: 4px; }
a:hover { color: var(--heading); text-decoration-color: currentColor; }
nav a:hover { background: #e2e5dc; }
a:focus-visible { outline: 2px solid #536544; outline-offset: 5px; }
.closing { color: var(--muted); }
@media (max-width: 480px) {
  body { padding: 48px 28px; }
  .intro-header { gap: 16px; margin-bottom: 32px; }
}

/* Vector icons stay sharp and consistent on every operating system. */
nav svg { width: 17px; height: 17px; fill: currentColor; stroke: none; }


/* The same tooltip appears for a mouse or a keyboard user. */
nav a { position: relative; }
.tooltip {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 9px;
  border-radius: 5px;
  background: #30322f;
  color: #fff;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
  pointer-events: auto;
  visibility: hidden;
  opacity: 0;
  z-index: 2;
}
nav a:hover .tooltip,
nav a:focus-visible .tooltip {
  visibility: visible;
  opacity: 1;
}

/* This invisible bridge keeps the tooltip open while moving onto it. */
.tooltip::before { content: ""; position: absolute; bottom: 100%; left: 0; right: 0; height: 10px; }

nav a.tooltip-dismissed .tooltip { visibility: hidden; opacity: 0; }

[hidden] { display: none !important; }
.analytics-choice { margin-top: 32px; border-top: 1px solid #dedfd9; padding-top: 16px; font-size: 12px; }
.analytics-choice p { margin: 0 0 10px; }
.analytics-actions { display: flex; gap: 8px 14px; flex-wrap: wrap; }
.analytics-actions button, .privacy-settings { font: inherit; color: var(--link); cursor: pointer; }
.analytics-actions button { padding: 7px 10px; border: 1px solid #d1d4cb; border-radius: 5px; background: var(--background); }
.privacy-settings { display: block; margin-top: 24px; padding: 4px 0; border: 0; background: none; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
button:focus-visible { outline: 2px solid #536544; outline-offset: 4px; }
#privacy-dialog { width: calc(100% - 40px); max-width: 520px; max-height: 85svh; overflow: auto; padding: 24px; border: 1px solid #d1d4cb; border-radius: 8px; color: var(--text); background: var(--background); font-size: 14px; line-height: 1.6; }
#privacy-dialog::backdrop { background: #0005; }
#privacy-dialog h2 { font-size: 18px; color: var(--heading); margin-top: 0; }

/* A quiet consent card, using the same palette and typography as the bio. */
.analytics-choice {
  margin-top: 36px;
  padding: 20px;
  border: 1px solid #e3e4dd;
  border-radius: 14px;
  background: #f4f5f0;
  font-size: 13px;
  line-height: 1.65;
}
.cookie-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; color: var(--heading); }
.cookie-heading svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.cookie-heading h2 { margin: 0; font-size: 13px; font-weight: 500; letter-spacing: -.01em; }
.analytics-choice p { margin: 0 0 17px; }
.analytics-choice .analytics-actions { gap: 8px; align-items: center; }
.analytics-choice .analytics-actions button { min-height: 38px; padding: 8px 13px; border-radius: 7px; font-size: 12px; line-height: 1.5; border-color: #d8dcd0; background: #e8ebe2; color: #394232; }
.analytics-choice .analytics-actions button:hover { background: #dce2d4; border-color: #bfc8b4; }
.analytics-choice .analytics-actions .cookie-details { margin-left: auto; padding: 8px 0 8px 7px; background: transparent; border-color: transparent; border-radius: 0; color: var(--muted); }
.analytics-choice .cookie-details:hover { text-decoration: underline; text-underline-offset: 4px; }
.privacy-settings { color: var(--muted); font-size: 12px; text-decoration-color: #b7bcb0; }
#privacy-dialog { border-radius: 14px; border-color: #e3e4dd; }
#privacy-dialog .analytics-actions button:hover { background: #efefeb; }
@media (max-width: 380px) {
  .analytics-choice { padding: 16px; }
  .analytics-choice .analytics-actions > [data-consent] { flex: 1; }
  .analytics-choice .analytics-actions .cookie-details { margin-left: 0; padding-left: 0; }
}

/* A separate bottom section keeps consent clear of content at every size. */
body { display: flex; flex-direction: column; }
.intro { margin: auto; flex-shrink: 0; }
.analytics-choice { width: min(460px, 100%); flex-shrink: 0; margin: 40px auto 0; }

.privacy-footer { width: min(460px, 100%); margin: 16px auto 0; flex-shrink: 0; }
.privacy-footer .privacy-settings { margin-top: 0; }

.privacy-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); }
.privacy-footer .privacy-settings { flex-shrink: 0; font-size: inherit; white-space: nowrap; }
.footer-credit { white-space: nowrap; }
.pronunciation { color: var(--muted); }
@media (max-width: 380px) {
  .privacy-footer { font-size: 10px; gap: 7px; }
}

/* Draw arrows as vectors so mobile systems cannot substitute emoji. */
.external-arrow {
  display: inline-block;
  width: .85em;
  height: .85em;
  margin-left: .22em;
  vertical-align: -.04em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
