:root {
  --bg: #f4efe8;
  --surface: #ffffff;
  --border: rgba(28, 25, 22, 0.09);
  --ink: #1c1916;
  --muted: #6e655c;
  --accent: #2f5079; /* denim */
  --on-ink: #ffffff;
  --chart: #3567a8; /* denim, brightened for chart marks */
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141210;
    --surface: #1f1c19;
    --border: rgba(255, 255, 255, 0.08);
    --ink: #f2ece4;
    --muted: #a39a90;
    --accent: #8fb0d8;
    --on-ink: #141210;
    --chart: #5a8fd0;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: max(56px, env(safe-area-inset-top)) 20px max(40px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--border), 0 12px 32px rgba(28, 25, 22, 0.14);
}

.wordmark {
  margin: 22px 0 0;
  font-family: "Bodoni Moda", Didot, "Bodoni 72", Georgia, serif;
  font-weight: 500;
  font-size: 2.125rem;
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.wordmark em {
  font-style: italic;
  font-weight: 400;
  text-transform: lowercase;
  letter-spacing: 0.02em;
  color: var(--accent);
}

.bio {
  margin: 10px 0 0;
  max-width: 34ch;
  color: var(--muted);
  font-size: 0.975rem;
}

.socials {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}
.socials a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  transition: background-color 0.2s, color 0.2s;
}
.socials a:hover {
  background: var(--ink);
  color: var(--on-ink);
}
.socials svg { width: 20px; height: 20px; fill: currentColor; }
.socials svg.outline { fill: none; stroke: currentColor; stroke-width: 2; }
.socials svg.outline .dot { fill: currentColor; stroke: none; }

.links {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  width: 100%;
  display: grid;
  gap: 12px;
}
.links a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 14px 52px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s, transform 0.2s;
}
.links a::after {
  content: "";
  position: absolute;
  right: 22px;
  width: 9px;
  height: 9px;
  border-top: 1.75px solid currentColor;
  border-right: 1.75px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.35;
  transition: opacity 0.2s, transform 0.2s;
}
.links a:hover {
  background: var(--ink);
  color: var(--on-ink);
}
.links a:hover::after {
  opacity: 1;
  transform: translateX(3px) rotate(45deg);
}
.links a:active { transform: scale(0.985); }

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* "Let's connect" email line under the main links */
.connect {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 40px;
}
.connect .page-title { margin: 0; }
.connect a {
  margin-top: 10px;
  padding: 4px 2px;
  color: var(--ink);
  font-size: 0.9375rem;
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: text-decoration-color 0.2s;
}
.connect a:hover { text-decoration-color: currentColor; }

footer {
  margin-top: 44px;
  max-width: 40ch;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.6;
}
footer p { margin: 0 0 6px; }

/* Inspiration page */
main.wide { max-width: 1040px; }

.home {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: inherit;
  text-decoration: none;
  border-radius: 12px;
}
.home .avatar {
  width: 64px;
  height: 64px;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--border), 0 8px 20px rgba(28, 25, 22, 0.12);
}
.home .wordmark {
  margin-top: 14px;
  font-size: 1.5rem;
}

.page-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.page-title::before,
.page-title::after {
  content: "";
  width: 40px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

.pins {
  --cols: 2;
  --gap: 12px;
  width: 100%;
  margin-top: 28px;
  columns: var(--cols);
  column-gap: var(--gap);
}
/* inspiration.html deals pins into columns left to right so her board order reads across rows. */
.pins.lanes {
  display: flex;
  align-items: flex-start;
  gap: var(--gap);
  columns: auto;
}
.pin-col {
  flex: 1;
  min-width: 0;
}
.pins a {
  display: block;
  margin-bottom: var(--gap);
  break-inside: avoid;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
}
.pins img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto 2 / 3; /* typical pin shape until the image loads */
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.pins a:hover img { transform: scale(1.03); }
@media (min-width: 640px) {
  .pins { --cols: 3; --gap: 16px; }
}
@media (min-width: 960px) {
  .pins { --cols: 4; }
}

.pins-empty {
  margin: 28px 0 0;
  color: var(--muted);
}

.links.more {
  max-width: 520px;
  margin-top: 20px;
}

@media (prefers-reduced-motion: no-preference) {
  main > * {
    animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  main > :nth-child(2) { animation-delay: 0.05s; }
  main > :nth-child(3) { animation-delay: 0.1s; }
  main > :nth-child(4) { animation-delay: 0.15s; }
  main > :nth-child(5) { animation-delay: 0.2s; }
  main > :nth-child(6) { animation-delay: 0.3s; }
  main > :nth-child(7) { animation-delay: 0.35s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(8px); }
  }
}

/* Stats page */
main.stats { max-width: 640px; }

.range {
  display: inline-flex;
  gap: 4px;
  margin-top: 24px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.range button {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}
.range button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--on-ink);
}

.card {
  width: 100%;
  margin-top: 16px;
  padding: 20px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: left;
}
.card h2 {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
}
.card .note {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.8125rem;
}
.hero {
  margin: 0;
  font-size: 3.5rem;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.empty {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.bar-rows {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.bar-row {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  align-items: center;
  gap: 12px;
  border-radius: 6px;
  outline-offset: 2px;
}
.bar-row .label {
  overflow: hidden;
  font-size: 0.875rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bar-track {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.bar {
  height: 20px;
  min-width: 2px;
  border-radius: 0 4px 4px 0;
  background: var(--chart);
  transition: filter 0.15s;
}
.bar-row:hover .bar,
.bar-row:focus-visible .bar { filter: brightness(1.15); }
.bar-value {
  color: var(--muted);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.hours {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 160px;
  margin-top: 28px;
  border-bottom: 1px solid var(--border);
}
.hour {
  position: relative;
  display: flex;
  flex: 1;
  align-items: flex-end;
  height: 100%;
  border-radius: 4px 4px 0 0;
  outline-offset: 2px;
}
.hour .col {
  position: relative;
  width: 100%;
  max-width: 24px;
  margin: 0 auto;
  border-radius: 4px 4px 0 0;
  background: var(--chart);
  transition: filter 0.15s;
}
.hour:hover .col,
.hour:focus-visible .col { filter: brightness(1.15); }
.hour .peak {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding-bottom: 4px;
  color: var(--muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hour-axis {
  display: flex;
  gap: 2px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.75rem;
}
.hour-axis span {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
}

.card details {
  margin-top: 16px;
  font-size: 0.875rem;
}
.card summary {
  color: var(--muted);
  cursor: pointer;
}
.card table {
  width: 100%;
  margin-top: 8px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.card th,
.card td {
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.card td:last-child,
.card th:last-child { text-align: right; }

.tooltip {
  position: fixed;
  z-index: 10;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 0.8125rem;
  line-height: 1.35;
  pointer-events: none;
  white-space: nowrap;
}
.tooltip strong { display: block; font-size: 0.9375rem; }
.tooltip[hidden] { display: none; }
