/*
  carlyewasiuk.com
  A forest garden on a sunny morning (light), twilight in the woods (dark).

  Secret layer, breath pacing: every ambient animation (fern sway, motes,
  cursor glow, the "available" dot) runs on --breath, a slow breathing
  cycle. Change it here and everything breathes together.
*/

:root {
  --breath: 5.5s;

  --bg: #fdf5f1;
  --ink: #3b2c34;
  --ink-soft: #6b5361;
  --link: #a1405f;
  --rose: #e9a2b6;
  --lilac: #c7b3e6;
  --leaf: #7fa56c;
  --leaf-line: #4c7a45;
  --moss: #86a873;
  --gold: #efc372;
  --glow: rgb(233 140 168 / 0.42);
  --warmth: rgb(240 160 150 / 0.13);
  --focus: #a1405f;
  --card: rgb(255 255 255 / 0.6);
  --card-line: rgb(161 64 95 / 0.15);
  --button-ink: #fdf5f1;

  /*
    Secret layer, colour undertone: a soft rainbow from crown (top of page)
    to roots (bottom), each mixed into the background at a whisper. It should
    only read as "nice gradients".
  */
  --crown: #b49ad6;
  --brow: #9db4dc;
  --throat: #9fcfd0;
  --heart: #a9cc96;
  --sun: #efd486;
  --sacral: #f0b98c;
  --root: #cf8f78;
  --tint: 9%;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1a21;
    --ink: #f2e7eb;
    --ink-soft: #c7b6c0;
    --link: #f2a9bf;
    --rose: #c9708c;
    --lilac: #8f7ab8;
    --leaf: #6c9a5e;
    --leaf-line: #b4d79f;
    --moss: #86ad72;
    --gold: #eac46c;
    --glow: rgb(242 169 191 / 0.32);
    --warmth: rgb(240 170 170 / 0.07);
    --focus: #f2a9bf;
    --card: rgb(255 255 255 / 0.04);
    --card-line: rgb(242 169 191 / 0.16);
    --button-ink: #1d1a21;

    --crown: #5b4a7a;
    --brow: #3d4f73;
    --throat: #2f5a5a;
    --heart: #3b5a33;
    --sun: #6b5a2a;
    --sacral: #6e4a30;
    --root: #6a3a2e;
    --tint: 22%;

    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 2rem;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image: linear-gradient(
    to bottom,
    color-mix(in oklab, var(--bg), var(--crown) var(--tint)) 0%,
    color-mix(in oklab, var(--bg), var(--brow) var(--tint)) 14%,
    color-mix(in oklab, var(--bg), var(--throat) calc(var(--tint) * 0.6)) 30%,
    var(--bg) 42%,
    color-mix(in oklab, var(--bg), var(--heart) var(--tint)) 58%,
    color-mix(in oklab, var(--bg), var(--sun) var(--tint)) 74%,
    color-mix(in oklab, var(--bg), var(--sacral) var(--tint)) 88%,
    color-mix(in oklab, var(--bg), var(--root) var(--tint)) 100%
  );
  color: var(--ink);
  font-family: "Nunito", ui-rounded, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}

main, footer {
  position: relative;
  z-index: 1;
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 40rem) {
  main, footer { padding: 0 2rem; }
}

h1, h2, h3 {
  font-family: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-weight: 500;
  line-height: 1.15;
  margin: 0;
}

h1 { position: relative; display: inline-block; font-size: clamp(2.6rem, 8vw, 4.25rem); letter-spacing: -0.01em; }
h2 {
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-style: italic;
}

/* A hand-drawn squiggle under each section title. */
h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.5rem;
  width: 4.5rem;
  height: 0.55rem;
  background: var(--rose);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 9'%3E%3Cpath d='M2 5c6-5 10 3 16 0s10-5 16 0 10 3 16 0 10-5 18-1' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 9'%3E%3Cpath d='M2 5c6-5 10 3 16 0s10-5 16 0 10 3 16 0 10-5 18-1' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

.say-hello h2::after { left: 50%; translate: -50% 0; }

/* A little star beside the name that twinkles at breathing pace. */
.twinkle {
  position: absolute;
  top: -0.1em;
  right: -0.6em;
  width: 0.32em;
  height: 0.32em;
  fill: var(--gold);
  animation: twinkle var(--breath) ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.35; transform: scale(0.75) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(20deg); }
}
h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 0.35rem; }

p { margin: 0 0 1rem; }

section {
  margin: 0 0 clamp(7rem, 14vw, 8.5rem);
}

/* ---------- Links and focus: links glow warm on hover ---------- */

a {
  color: var(--link);
  text-decoration-line: underline;
  text-decoration-color: color-mix(in oklab, var(--gold), transparent 30%);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  transition: text-shadow 0.6s ease, text-decoration-color 0.6s ease;
}

a:hover {
  text-decoration-color: var(--gold);
  text-shadow: 0 0 14px var(--glow);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
  border-radius: 6px;
}

/* ---------- 1 · Hello ---------- */

.hello {
  display: grid;
  gap: 1rem;
  align-items: center;
  min-height: min(88vh, 46rem);
  padding: 3rem 0 4rem;
}

.hello-text { order: 2; }
.fern-wrap { order: 1; }

@media (min-width: 48rem) {
  .hello {
    grid-template-columns: 1fr 17rem;
    gap: 3rem;
  }
  .hello-text { order: 1; }
  .fern-wrap { order: 2; }
}

.available {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.25rem;
  padding: 0.3rem 0.9rem;
  border: 1px solid var(--card-line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
}

.dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--moss);
  box-shadow: 0 0 0 0 var(--glow);
  animation: dot-breathe var(--breath) ease-in-out infinite;
}

@keyframes dot-breathe {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  50% { box-shadow: 0 0 0 5px color-mix(in oklab, var(--moss), transparent 70%); }
}

.lede {
  max-width: 32rem;
  margin: 1rem 0 0.75rem;
  font-size: clamp(1.15rem, 2.4vw, 1.3rem);
}

.where {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 1.75rem;
}

.hero-actions .button { padding: 0.75rem 1.75rem; font-size: 1rem; }
.quiet-link { font-weight: 600; }

/* ---------- The fern ---------- */

.fern-wrap {
  position: relative;
  display: grid;
  justify-items: center;
}

.fern {
  display: block;
  width: 9rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

@media (min-width: 48rem) {
  .fern { width: 100%; }
}

.fern svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  transition: filter 1.4s ease;
}

.fern:hover svg {
  filter: drop-shadow(0 0 10px color-mix(in oklab, var(--gold), transparent 75%));
}

/* Easter egg: three taps and the fern glows. */
.fern.glowing svg {
  filter: drop-shadow(0 0 22px var(--glow)) brightness(1.08);
}

.frond {
  transform-origin: 110px 432px;
  animation: sway var(--breath) ease-in-out 3s infinite;
}

@keyframes sway {
  0%, 100% { transform: rotate(-1deg); }
  50% { transform: rotate(1.3deg); }
}

.frond .stem {
  fill: none;
  stroke: var(--leaf-line);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 2.75s ease-out forwards;
}

.pinna {
  fill: var(--leaf);
  stroke: var(--leaf-line);
  stroke-width: 0.6;
  stroke-linejoin: round;
}

.rib {
  fill: none;
  stroke: var(--leaf-line);
  stroke-width: 0.35;
  stroke-linecap: round;
  opacity: 0.5;
}

/* Unfurl: leaflets open one by one, from the base up toward the tip. */
.pinna, .rib {
  transform-origin: 0 0;
  transform: scale(0);
  animation: unfurl 1.4s cubic-bezier(0.3, 1.3, 0.5, 1) calc(0.3s + var(--i) * 90ms) forwards;
  rotate: var(--bend, 0deg);
}

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes unfurl { to { transform: scale(1); } }

.whisper {
  min-height: 1.6em;
  margin: 0.5rem 0 0;
  color: var(--ink-soft);
  font-family: "Fraunces", ui-serif, Georgia, serif;
  font-style: italic;
  text-align: center;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.whisper.shown { opacity: 1; }

/* ---------- 2 · What I'm good at: blooms twirl on hover ---------- */

.skills {
  display: grid;
  gap: 1.75rem 2.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 40rem) {
  .skills { grid-template-columns: 1fr 1fr; }
}

.skills li {
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  gap: 0.9rem;
}

.skills p { margin: 0; color: var(--ink-soft); }

.bloom {
  width: 1.6rem;
  height: 1.6rem;
  margin-top: 0.1rem;
}

.bloom .petals { fill: var(--rose); transform-origin: 12px 12px; }
.skills li:nth-child(even) .bloom .petals { fill: var(--lilac); }
.bloom .heart { fill: var(--gold); }

.skills li:hover .bloom .petals {
  animation: twirl 1.4s cubic-bezier(0.3, 1.4, 0.5, 1);
}

@keyframes twirl {
  from { transform: rotate(0) scale(1); }
  40% { transform: rotate(50deg) scale(1.12); }
  to { transform: rotate(72deg) scale(1); }
}

/* ---------- 3 · Where I've worked: the vine timeline ---------- */

/* Tree rings: one per year, coloured by job, inside a mossy bark. */
.rings {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin: 0 0 2rem;
}

.rings-art { flex: none; width: 9.5rem; height: 9.5rem; overflow: visible; }
.rings-stage .rings-art { margin: 0 0.25rem; }
.rings .bark { fill: #9fc08c; stroke: #6f9a5c; stroke-width: 1.2; }
.rings-art { cursor: pointer; }
.rings .ring { stroke: rgb(107 83 97 / 0.35); stroke-width: 0.7; transition: filter 0.4s ease, stroke 0.4s ease; }
.rings .ring.b, .rings-key .b { fill: #f3c9a0; background: #f3c9a0; }
.rings .ring.em, .rings-key .em { fill: #cfbbe7; background: #cfbbe7; }
.rings .ring.sd, .rings-key .sd { fill: #ebb3c3; background: #ebb3c3; }
.rings .ring.m, .rings-key .m { fill: #b4d2ec; background: #b4d2ec; }
.rings .ring:hover, .rings .ring.active { filter: brightness(1.08) saturate(1.3); stroke: rgb(107 83 97 / 0.85); stroke-width: 1.1; }
.rings .pith { fill: #6b5361; }
.rings .crack { fill: none; stroke: #6b5361; stroke-width: 0.8; stroke-linecap: round; opacity: 0.6; }

.rings figcaption { display: grid; gap: 0.6rem; }

.rings-label {
  min-height: 3em;
  font-family: "Fraunces", ui-serif, Georgia, serif;
  font-style: italic;
  font-size: 1.05rem;
}

.rings-key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.rings-key i {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  margin-right: 0.35rem;
  border-radius: 50%;
  vertical-align: -0.1em;
}

/* The ‹ › buttons sit either side of the trunk. */
.rings-stage {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.4rem;
}

.ring-btn {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: color-mix(in oklab, var(--lilac), transparent 75%);
  color: var(--link);
  cursor: pointer;
  transition: background 0.4s ease, transform 0.4s cubic-bezier(0.3, 1.5, 0.5, 1);
}

.ring-btn svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ring-btn:hover { background: color-mix(in oklab, var(--rose), transparent 60%); transform: scale(1.08); }
.ring-btn[data-step="-1"]:hover { translate: -2px 0; }
.ring-btn[data-step="1"]:hover { translate: 2px 0; }

/* On phones the trunk gets bigger and sits above its caption. */
@media (max-width: 30rem) {
  .rings { flex-direction: column; align-items: center; text-align: center; }
  .rings-art { width: min(14rem, 62vw); height: auto; }
  .rings figcaption { justify-items: center; }
  .rings-key { justify-content: center; }
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.filters button {
  padding: 0.4rem 0.95rem;
  border: 1px solid var(--card-line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.4s ease, border-color 0.4s ease, transform 0.4s cubic-bezier(0.3, 1.4, 0.5, 1);
}

.filters button:hover { border-color: var(--rose); transform: translateY(-1px); }

.filters button[aria-pressed="true"] {
  border-color: var(--link);
  background: var(--link);
  color: var(--button-ink);
}

.filter-status {
  min-height: 1.6em;
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-family: "Fraunces", ui-serif, Georgia, serif;
  font-style: italic;
  font-size: 0.95rem;
}

.timeline {
  --stem-x: 0.85rem;
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The vine. It grows downward when the timeline scrolls into view. */
.timeline::before {
  content: "";
  position: absolute;
  top: 0.6rem;
  bottom: 0.6rem;
  left: calc(var(--stem-x) - 1px);
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(var(--leaf-line), var(--leaf));
  transform-origin: top;
  transition: transform 2.75s ease-out;
}

.js .timeline::before { transform: scaleY(0); }
.js .timeline.grown::before { transform: scaleY(1); }

.role, .event {
  position: relative;
  padding-left: calc(var(--stem-x) + 1.6rem);
}

.role + .role, .role + .event, .event + .role { margin-top: 1.25rem; }

/* Each job is a bud on the vine that blooms when it's open. */
.bud {
  position: absolute;
  top: 0.55rem;
  left: calc(var(--stem-x) - 0.8rem);
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--bg);
}

.bud .bloom { width: 100%; height: 100%; margin: 0; }
.bud .petals { transform-origin: 12px 12px; transform: scale(0.45); transition: transform 0.8s cubic-bezier(0.3, 1.5, 0.5, 1); }
.role.open .bud .petals { transform: scale(1); }
.role:nth-child(4n + 2) .bud .petals { fill: var(--lilac); }

.role-toggle {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 0.75rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: 1rem;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.4s ease;
}

.role-toggle:hover { background: var(--card); }

.role-toggle .when {
  grid-row: 1 / 3;
  padding-top: 0.25rem;
  color: var(--ink-soft);
  font-family: "Nunito", ui-rounded, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.role-toggle .org { font-size: 1.35rem; }

.role-toggle .title {
  grid-column: 2;
  color: var(--ink-soft);
  font-family: "Nunito", ui-rounded, sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
}

.role-toggle .count {
  grid-column: 2;
  color: var(--link);
  font-family: "Nunito", ui-rounded, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
}

.role-toggle .count:empty { display: none; }

/* Open and close by animating the row height from 0 to its natural size. */
.role-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.7s ease;
}

.role.open .role-body { grid-template-rows: 1fr; }
.role-body > div { overflow: hidden; min-height: 0; }

.milestones {
  max-width: 46rem;
  display: grid;
  gap: 0.35rem;
  margin: 0.5rem 0 0;
  padding: 0 0 0 0.75rem;
  list-style: none;
}

.milestones li {
  position: relative;
  padding: 0.3rem 0.75rem 0.3rem 1.1rem;
  border-radius: 0.75rem;
  transition: opacity 0.5s ease, background 0.5s ease;
}

.milestones li::before {
  content: "";
  position: absolute;
  top: 0.95em;
  left: 0.2rem;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--moss);
}

.milestones li.match { background: color-mix(in oklab, var(--rose), transparent 82%); }
.milestones li.match::before { background: var(--link); }
/* Faded items stay readable: only their colour softens, never below AA contrast. */
.milestones li.dim { color: var(--ink-soft); }
.milestones li.dim::before { opacity: 0.35; }

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0 0.5rem;
  padding: 0 0 0 0.75rem;
  list-style: none;
}

.stack li {
  padding: 0.1rem 0.65rem;
  border: 1px solid var(--card-line);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.role.no-match .role-toggle, .role.no-match .role-toggle .org { color: var(--ink-soft); }
.role.no-match .bud { opacity: 0.45; }

/* A small seed on the vine marks the acquisition. */
.event p {
  margin: 0;
  padding: 0.25rem 0.75rem;
  color: var(--ink-soft);
  font-family: "Fraunces", ui-serif, Georgia, serif;
  font-style: italic;
  font-size: 0.95rem;
}

.seed {
  position: absolute;
  top: 0.65rem;
  left: calc(var(--stem-x) - 0.35rem);
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50% 50% 50% 10%;
  background: var(--gold);
  transform: rotate(-45deg);
}

/* Roots below the vine: the work that came before tech. */
.root {
  --stem-x: 0.85rem;
  position: relative;
  margin-top: 0.1rem; /* just under where the vine ends */
  padding-left: calc(var(--stem-x) + 1.6rem);
}

.root-art {
  position: absolute;
  top: -0.2rem;
  left: calc(var(--stem-x) - 1.1rem);
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 40%;
  background: var(--bg);
  fill: none;
  stroke: color-mix(in oklab, var(--leaf-line), #8a6a4f 35%);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.root p {
  margin: 0;
  padding: 0.25rem 0.75rem;
  color: var(--ink-soft);
  font-family: "Fraunces", ui-serif, Georgia, serif;
  font-style: italic;
  font-size: 0.95rem;
}

.root strong { color: var(--ink); font-weight: 600; }

.root .root-note {
  max-width: 40rem;
  padding-top: 0;
  font-family: inherit;
  font-style: normal;
}

@media (max-width: 30rem) {
  .role-toggle { grid-template-columns: 1fr; }
  .role-toggle .when { grid-row: auto; padding-top: 0; }
  .role-toggle .title, .role-toggle .count { grid-column: 1; }
}

/* ---------- 4 · Toolkit: skills as bubbles ---------- */

.toolkit {
  --c-fe: #eaa3b8;
  --c-lang: #f0c77c;
  --c-be: #a9cb93;
  --c-ai: #c8b3e8;
  --c-test: #a5c8e8;
  --c-cloud: #f4b993;
}

.toolkit-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.toolkit-legend button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--card-line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  transition: border-color 0.4s ease, transform 0.4s cubic-bezier(0.3, 1.4, 0.5, 1);
}

.toolkit-legend button:hover { transform: translateY(-1px); border-color: var(--rose); }
.toolkit-legend button[aria-pressed="true"] { border-color: var(--ink); }
.toolkit-legend i { width: 0.75rem; height: 0.75rem; border-radius: 50%; background: var(--c); }
.toolkit [data-cat="fe"] { --c: var(--c-fe); }
.toolkit [data-cat="lang"] { --c: var(--c-lang); }
.toolkit [data-cat="be"] { --c: var(--c-be); }
.toolkit [data-cat="ai"] { --c: var(--c-ai); }
.toolkit [data-cat="test"] { --c: var(--c-test); }
.toolkit [data-cat="cloud"] { --c: var(--c-cloud); }

.bubbles svg { display: block; width: 100%; height: auto; overflow: visible; }

/* Each bubble bobs gently at breathing pace and swells on hover. */
.bubble {
  cursor: pointer;
  animation: bob calc(var(--breath) * var(--slow, 1)) ease-in-out var(--delay, 0s) infinite;
  transition: opacity 0.5s ease;
}

.bubble circle {
  fill: var(--c);
  stroke: color-mix(in oklab, var(--c), black 18%);
  stroke-width: 1;
  transform-box: fill-box;
  transform-origin: center;
  transition: scale 0.5s cubic-bezier(0.3, 1.5, 0.5, 1), filter 0.5s ease;
}

.bubble text {
  fill: #3b2c34;
  font-family: "Nunito", ui-rounded, sans-serif;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}

.bubble:hover circle, .bubble.active circle { scale: 1.08; filter: brightness(1.05) saturate(1.2); }
/* Fade the bubble, not its label, so the words stay readable. */
.bubbles.focused .bubble:not(.lit) circle { opacity: 0.22; }

@keyframes bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -4px; }
}

.bubble-label {
  min-height: 1.6em;
  margin: 0.75rem 0 0;
  color: var(--ink-soft);
  font-family: "Fraunces", ui-serif, Georgia, serif;
  font-style: italic;
  text-align: center;
}

/* Without JavaScript, the skills show as a plain list. With it, the list
   stays for screen readers and the bubbles take its place on screen. */
.toolkit-list { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.toolkit-list li { padding: 0.15rem 0.7rem; border-radius: 999px; background: var(--c); color: #3b2c34; font-size: 0.875rem; }
.js .toolkit-list {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- 5 · Side projects ---------- */

.cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.card {
  padding: 1.4rem;
  border: 1px solid var(--card-line);
  border-radius: 1.75rem 1.25rem 1.75rem 0.75rem;
  background: var(--card);
  transition: transform 0.6s ease, box-shadow 0.6s ease;
}

.card:hover {
  transform: translateY(-3px) rotate(-0.6deg);
  box-shadow: 0 10px 30px -12px var(--glow);
}

.card p { margin: 0; color: var(--ink-soft); }

/* A small italic line under a section title. */
.aside {
  margin: -1rem 0 1.75rem;
  color: var(--ink-soft);
  font-family: "Fraunces", ui-serif, Georgia, serif;
  font-style: italic;
}

/* ---------- 5 · Off the clock ---------- */

.hobbies {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.hobby {
  padding: 1.4rem;
  border: 1px solid var(--card-line);
  border-radius: 1.75rem 1.25rem 1.75rem 0.75rem;
  background: var(--card);
  transition: transform 0.6s ease, box-shadow 0.6s ease;
}


.hobby:hover {
  transform: translateY(-3px) rotate(0.5deg);
  box-shadow: 0 10px 30px -12px var(--glow);
}

.hobby h3 { margin-top: 0.6rem; }
.hobby p { margin: 0; color: var(--ink-soft); font-size: 0.975rem; }

/* Each illustration sits on its own soft blob of colour. */
.art {
  width: 5.75rem;
  height: 5.75rem;
  padding: 0.6rem;
  border-radius: 48% 52% 44% 56% / 55% 45% 55% 45%;
  background: color-mix(in oklab, var(--blob, var(--rose)), transparent 78%);
  overflow: visible;
}

.art.cat { --blob: var(--gold); }
.art.meadow { --blob: var(--moss); }
.art.forest { --blob: var(--leaf); }
.art.book { --blob: var(--lilac); }
.art.hands { --blob: var(--sacral); }

/* Yoga: the lotus opens a little wider. */
.lotus .p {
  fill: var(--rose);
  stroke: var(--link);
  stroke-width: 0.6;
  transform-origin: 24px 36px;
  transform: rotate(var(--r));
  transition: transform 1.2s cubic-bezier(0.3, 1.3, 0.5, 1);
}
.lotus .side { fill: color-mix(in oklab, var(--rose), var(--lilac) 40%); }
.lotus .outer { fill: var(--lilac); }
.lotus .water { fill: none; stroke: var(--moss); stroke-width: 1.6; stroke-linecap: round; }
.hobby:hover .lotus .p { transform: rotate(calc(var(--r) * 1.35)); }

/* Cats: two brothers. Their tails swish a beat apart, and they blink. */
.cat .grey .fur, .cat .grey .tail { --coat: #9b98a3; }
.cat .orange .fur, .cat .orange .tail { --coat: #e3a468; }
.cat .fur { fill: var(--coat); }
.cat .white { fill: #fbf7f2; }
.cat .tail { fill: none; stroke: var(--coat); stroke-width: 3.4; stroke-linecap: round; transform-origin: 32px 42px; }
.cat .eyes { fill: #3b2c34; transform-origin: 24px 16.3px; }
.cat .eyes .glint { fill: #fff; }
.cat .nose { fill: #e48a9c; }
.hobby:hover .cat .tail { animation: swish 1.6s ease-in-out; }
.hobby:hover .cat .orange .tail { animation-delay: 0.25s; }
.hobby:hover .cat .eyes { animation: blink 1.6s ease-in-out; }

@keyframes swish {
  0%, 100% { transform: rotate(0); }
  30% { transform: rotate(-18deg); }
  65% { transform: rotate(10deg); }
}

@keyframes blink {
  0%, 40%, 60%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.1); }
}

/* Garden: a wild little meadow. The grasses sway, a butterfly flutters by
   and the frog hops. */
.meadow .ground { fill: color-mix(in oklab, var(--moss), transparent 45%); }
.meadow .grass { fill: none; stroke: var(--leaf); stroke-width: 1.5; stroke-linecap: round; }
.meadow .stem { fill: none; stroke: var(--leaf-line); stroke-width: 1.1; stroke-linecap: round; }
.meadow .rose circle { fill: var(--rose); }
.meadow .daisy circle { fill: #fffaf3; stroke: var(--ink-soft); stroke-width: 0.3; }
.meadow .lilac circle { fill: var(--lilac); }
.meadow .gold circle { fill: var(--gold); }
.meadow .bloomlet .eye { fill: var(--gold); stroke: none; }
.meadow .daisy .eye { fill: var(--gold); }
.meadow .sway { transform-origin: 24px 44px; }
.hobby:hover .meadow .sway { animation: meadow-sway 1.8s ease-in-out; }

@keyframes meadow-sway {
  0%, 100% { transform: skewX(0); }
  30% { transform: skewX(-6deg); }
  65% { transform: skewX(3deg); }
}

.meadow .wing { fill: var(--lilac); transform-origin: 0 0; }
.meadow .wing.low { fill: var(--rose); }
.meadow .frog ellipse, .meadow .frog circle { fill: var(--moss); }
.meadow .frog .pupil { fill: #3b2c34; }
.hobby:hover .meadow .wing { animation: flutter 0.35s ease-in-out 4; }
.hobby:hover .meadow .frog { animation: hop 0.9s cubic-bezier(0.3, 1.4, 0.5, 1); }

@keyframes flutter {
  50% { transform: scaleX(0.35); }
}

@keyframes hop {
  0%, 100% { translate: 0 0; }
  40% { translate: 2px -6px; }
}

/* Forest: the trees sway, each a beat apart. */
.forest .tree path, .forest .tree rect { fill: var(--leaf); }
.forest .t2 path, .forest .t2 rect { fill: var(--leaf-line); }
.forest .tree path, .forest .tree rect { transform-origin: 0 26px; }
.hobby:hover .forest .tree path { animation: tree-sway 1.8s ease-in-out; }
.hobby:hover .forest .t2 path { animation-delay: 0.15s; }
.hobby:hover .forest .t3 path { animation-delay: 0.3s; }

@keyframes tree-sway {
  0%, 100% { transform: rotate(0); }
  30% { transform: rotate(-7deg); }
  65% { transform: rotate(4deg); }
}

/* Writing: a page turns in the notebook. */
.book .page { fill: #fffaf5; stroke: var(--ink-soft); stroke-width: 0.9; stroke-linejoin: round; }
.book .lines { fill: none; stroke: var(--rose); stroke-width: 0.9; stroke-linecap: round; }
.book .turn { transform-origin: 24px 26px; }
.book .sprig .stem { fill: none; stroke: var(--leaf-line); stroke-width: 1.2; stroke-linecap: round; }
.book .sprig .leaf { fill: var(--leaf); }
.hobby:hover .book .turn { animation: page-turn 1.4s ease-in-out; }

@keyframes page-turn {
  0% { transform: scaleX(1); }
  50% { transform: scaleX(-1); }
  100% { transform: scaleX(-1); opacity: 0; }
}

/* Energy healing: warm light held between two hands. On hover it glows brighter
   and the rays reach a little further, at a breathing pace. */
.hands .hand rect { fill: #f2c9ad; stroke: var(--ink-soft); stroke-width: 0.7; paint-order: stroke; }
.hands .orb { fill: var(--gold); }
.hands .halo { fill: color-mix(in oklab, var(--gold), transparent 65%); transform-origin: 24px 23px; transition: transform 2.75s ease-in-out; }
.hands .rays path { stroke: var(--gold); stroke-width: 1.4; stroke-linecap: round; }
.hands .rays { transform-origin: 24px 23px; opacity: 0.7; transition: transform 2.75s ease-in-out, opacity 2.75s ease-in-out; }
.hobby:hover .hands .halo { transform: scale(1.35); }
.hobby:hover .hands .rays { transform: scale(1.15); opacity: 1; }

/* ---------- 7 · Working together, as cards ---------- */

.fit-cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.fit-card {
  padding: 1.4rem;
  border: 1px solid var(--card-line);
  border-radius: 1.75rem 1.25rem 1.75rem 0.75rem;
  background: var(--card);
  transition: transform 0.6s ease, box-shadow 0.6s ease;
}

.fit-card:hover {
  transform: translateY(-3px) rotate(0.5deg);
  box-shadow: 0 10px 30px -12px var(--glow);
}

.fit-card h3 { margin-top: 0.7rem; }
.fit-card p { margin: 0; color: var(--ink-soft); font-size: 0.975rem; }

/* Small drawings on soft blobs, like the Off the clock cards. */
.fit-art {
  width: 3.75rem;
  height: 3.75rem;
  padding: 0.45rem;
  border-radius: 48% 52% 44% 56% / 55% 45% 55% 45%;
  background: color-mix(in oklab, var(--blob), transparent 78%);
  overflow: visible;
}
.fit-art.cal { --blob: var(--lilac); }
.fit-art.tz { --blob: var(--gold); }
.fit-art.heart { --blob: var(--rose); }
.fit-art.puzzle { --blob: var(--moss); }

.cal .pg { fill: #fffaf5; stroke: var(--ink-soft); stroke-width: 1; }
.cal .top { fill: var(--lilac); stroke: var(--ink-soft); stroke-width: 1; }
.cal .ring { fill: none; stroke: var(--ink-soft); stroke-width: 1.6; stroke-linecap: round; }
.cal .lf { fill: var(--leaf); }
.tz .sun { fill: var(--gold); }
.tz .sea { fill: #a5c8e8; }
.tz .wave { fill: none; stroke: #fffaf5; stroke-width: 1.2; stroke-linecap: round; }
.heart .h { fill: var(--rose); stroke: var(--link); stroke-width: 1; stroke-linejoin: round; transform-origin: 24px 26px; }
.heart .spark { fill: none; stroke: var(--gold); stroke-width: 1.4; stroke-linecap: round; }
.puzzle .pz { fill: var(--leaf); stroke: var(--leaf-line); stroke-width: 1; stroke-linejoin: round; transform-origin: 24px 26px; }

/* Each drawing does a little something on hover. */
.fit-card:hover .tz .sun { animation: sun-dip 1.6s ease-in-out; }
.fit-card:hover .heart .h { animation: beat 1s ease-in-out; }
.fit-card:hover .puzzle .pz { animation: tree-sway 1.4s ease-in-out; }
.fit-card:hover .cal .lf { animation: pop 1s ease-in-out; transform-box: fill-box; transform-origin: center; }

/* On phones, the drawing sits beside the words so the cards stay compact. */
@media (max-width: 30rem) {
  .fit-card { display: grid; grid-template-columns: auto 1fr; gap: 0.15rem 1rem; align-items: start; padding: 1.1rem 1.2rem; }
  .fit-art { grid-row: span 2; width: 3.25rem; height: 3.25rem; }
  .fit-card h3 { margin-top: 0.15rem; }
}

@keyframes sun-dip { 50% { translate: 0 3px; } }
@keyframes beat { 30% { scale: 1.15; } 60% { scale: 0.97; } }


.together .aside { max-width: 38rem; }

/* ---------- 5 · Say hello: the most open, spacious part of the page ---------- */

.say-hello {
  padding: 1rem 0 clamp(3rem, 10vw, 6rem);
  text-align: center;
}

.say-hello > p {
  max-width: 30rem;
  margin: 0 auto 2rem;
  font-size: 1.125rem;
}

.button {
  display: inline-block;
  padding: 0.95rem 2.25rem;
  border-radius: 999px;
  background: var(--link);
  color: var(--button-ink);
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  box-shadow: 0 0 0 0 transparent;
  transition: box-shadow 0.8s ease, transform 0.8s ease;
}

.button:hover {
  text-shadow: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 6px color-mix(in oklab, var(--gold), transparent 70%), 0 8px 28px -6px var(--glow);
}

.elsewhere {
  display: flex;
  justify-content: center;
  gap: 1.75rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

footer {
  padding-bottom: 2.5rem;
  color: var(--ink-soft);
  font-size: 0.875rem;
  text-align: center;
}

footer p { margin: 0; }

.land {
  max-width: 34rem;
  margin: 0.75rem auto 0 !important;
  font-family: "Fraunces", ui-serif, Georgia, serif;
  font-style: italic;
  line-height: 1.5;
}

/* The heart beats gently, at breathing pace. Screen readers say "love". */
.heart-love {
  display: inline-block;
  color: var(--link);
  animation: beat var(--breath) ease-in-out infinite;
}


/* ---------- Bringing it together ---------- */

/* 3 · A trailing pothos vine between sections, in the middle of the gap.
   It sways very slightly at breathing pace. */
main > section { position: relative; }

/* The hero has less space below it than the gap between sections; even it out. */
main > header + section { margin-top: clamp(3rem, 7vw, 4.5rem); }

main > section::before {
  content: "";
  position: absolute;
  top: calc(clamp(7rem, 14vw, 8.5rem) / -2 - 1.95rem); /* centred in the gap */
  left: 50%;
  width: min(14rem, 70%);
  height: 3.9rem;
  translate: -50% 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -6 200 56'%3E%3Cpath d='M4 22C40 8 70 34 100 22S160 34 196 22' fill='none' stroke='%235f8a52' stroke-width='1.6' stroke-linecap='round'/%3E%3Cg transform='translate(20 18.1) rotate(-18) scale(0.85)'%3E%3Cpath d='M0 0v3' stroke='%235f8a52' stroke-width='1.2'/%3E%3Cg transform='translate(0 3)'%3E%3Cpath d='M0 0C-6.5-2.5-10 4-8 9.5-6 14 0 17 0 21 0 17 6 14 8 9.5 10 4 6.5-2.5 0 0Z' fill='%2382ad6e' stroke='%235f8a52' stroke-width='.8'/%3E%3Cpath d='M0 3C-2.5 7-2 12 0 17M2.5 6c1.5 2 1.5 4 .5 6' fill='none' stroke='%23f4ecd0' stroke-width='1.4' stroke-linecap='round'/%3E%3C/g%3E%3C/g%3E%3Cg transform='translate(44 19.3) rotate(194) scale(0.95)'%3E%3Cpath d='M0 0v3' stroke='%235f8a52' stroke-width='1.2'/%3E%3Cg transform='translate(0 3)'%3E%3Cpath d='M0 0C-6.5-2.5-10 4-8 9.5-6 14 0 17 0 21 0 17 6 14 8 9.5 10 4 6.5-2.5 0 0Z' fill='%2382ad6e' stroke='%235f8a52' stroke-width='.8'/%3E%3Cpath d='M0 3C-2.5 7-2 12 0 17M2.5 6c1.5 2 1.5 4 .5 6' fill='none' stroke='%23f4ecd0' stroke-width='1.4' stroke-linecap='round'/%3E%3C/g%3E%3C/g%3E%3Cg transform='translate(68 23.9) rotate(10) scale(1.05)'%3E%3Cpath d='M0 0v3' stroke='%235f8a52' stroke-width='1.2'/%3E%3Cg transform='translate(0 3)'%3E%3Cpath d='M0 0C-6.5-2.5-10 4-8 9.5-6 14 0 17 0 21 0 17 6 14 8 9.5 10 4 6.5-2.5 0 0Z' fill='%2382ad6e' stroke='%235f8a52' stroke-width='.8'/%3E%3Cpath d='M0 3C-2.5 7-2 12 0 17M2.5 6c1.5 2 1.5 4 .5 6' fill='none' stroke='%23f4ecd0' stroke-width='1.4' stroke-linecap='round'/%3E%3C/g%3E%3C/g%3E%3Cg transform='translate(92 24.4) rotate(168) scale(0.9)'%3E%3Cpath d='M0 0v3' stroke='%235f8a52' stroke-width='1.2'/%3E%3Cg transform='translate(0 3)'%3E%3Cpath d='M0 0C-6.5-2.5-10 4-8 9.5-6 14 0 17 0 21 0 17 6 14 8 9.5 10 4 6.5-2.5 0 0Z' fill='%2382ad6e' stroke='%235f8a52' stroke-width='.8'/%3E%3Cpath d='M0 3C-2.5 7-2 12 0 17M2.5 6c1.5 2 1.5 4 .5 6' fill='none' stroke='%23f4ecd0' stroke-width='1.4' stroke-linecap='round'/%3E%3C/g%3E%3C/g%3E%3Cg transform='translate(116 18.6) rotate(-8) scale(1.0)'%3E%3Cpath d='M0 0v3' stroke='%235f8a52' stroke-width='1.2'/%3E%3Cg transform='translate(0 3)'%3E%3Cpath d='M0 0C-6.5-2.5-10 4-8 9.5-6 14 0 17 0 21 0 17 6 14 8 9.5 10 4 6.5-2.5 0 0Z' fill='%2382ad6e' stroke='%235f8a52' stroke-width='.8'/%3E%3Cpath d='M0 3C-2.5 7-2 12 0 17M2.5 6c1.5 2 1.5 4 .5 6' fill='none' stroke='%23f4ecd0' stroke-width='1.4' stroke-linecap='round'/%3E%3C/g%3E%3C/g%3E%3Cg transform='translate(140 20.9) rotate(196) scale(0.95)'%3E%3Cpath d='M0 0v3' stroke='%235f8a52' stroke-width='1.2'/%3E%3Cg transform='translate(0 3)'%3E%3Cpath d='M0 0C-6.5-2.5-10 4-8 9.5-6 14 0 17 0 21 0 17 6 14 8 9.5 10 4 6.5-2.5 0 0Z' fill='%2382ad6e' stroke='%235f8a52' stroke-width='.8'/%3E%3Cpath d='M0 3C-2.5 7-2 12 0 17M2.5 6c1.5 2 1.5 4 .5 6' fill='none' stroke='%23f4ecd0' stroke-width='1.4' stroke-linecap='round'/%3E%3C/g%3E%3C/g%3E%3Cg transform='translate(164 24.9) rotate(12) scale(1.05)'%3E%3Cpath d='M0 0v3' stroke='%235f8a52' stroke-width='1.2'/%3E%3Cg transform='translate(0 3)'%3E%3Cpath d='M0 0C-6.5-2.5-10 4-8 9.5-6 14 0 17 0 21 0 17 6 14 8 9.5 10 4 6.5-2.5 0 0Z' fill='%2382ad6e' stroke='%235f8a52' stroke-width='.8'/%3E%3Cpath d='M0 3C-2.5 7-2 12 0 17M2.5 6c1.5 2 1.5 4 .5 6' fill='none' stroke='%23f4ecd0' stroke-width='1.4' stroke-linecap='round'/%3E%3C/g%3E%3C/g%3E%3Cg transform='translate(186 24.5) rotate(166) scale(0.8)'%3E%3Cpath d='M0 0v3' stroke='%235f8a52' stroke-width='1.2'/%3E%3Cg transform='translate(0 3)'%3E%3Cpath d='M0 0C-6.5-2.5-10 4-8 9.5-6 14 0 17 0 21 0 17 6 14 8 9.5 10 4 6.5-2.5 0 0Z' fill='%2382ad6e' stroke='%235f8a52' stroke-width='.8'/%3E%3Cpath d='M0 3C-2.5 7-2 12 0 17M2.5 6c1.5 2 1.5 4 .5 6' fill='none' stroke='%23f4ecd0' stroke-width='1.4' stroke-linecap='round'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain;
  transform-origin: 50% 40%;
  animation: vine-sway calc(var(--breath) * 2) ease-in-out infinite;
}

@keyframes vine-sway {
  0%, 100% { rotate: -1deg; }
  50% { rotate: 1deg; }
}

/* 2 · Pictures on the project cards, in the same blobs as Off the clock. */
.card .art { margin-bottom: 0.8rem; }
.art.ticket { --blob: var(--rose); }
.art.mini-fern { --blob: var(--moss); }
.art.datebook { --blob: var(--lilac); }

.ticket .paper { fill: #fffaf5; stroke: var(--ink-soft); stroke-width: 0.9; stroke-linejoin: round; }
.ticket .ln { fill: none; stroke: var(--rose); stroke-width: 1.2; stroke-linecap: round; }
.ticket .arrow { fill: none; stroke: var(--ink-soft); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.ticket .ln2 { fill: none; stroke: var(--leaf-line); stroke-width: 1.6; stroke-linecap: round; }
.ticket .pr circle { fill: var(--lilac); stroke: var(--leaf-line); stroke-width: 1.2; }
.card:hover .ticket .tk { animation: nudge 1.2s ease-in-out; }
.card:hover .ticket .pr circle { animation: pop 1.2s ease-in-out 0.35s; transform-box: fill-box; transform-origin: center; }

@keyframes nudge { 40% { translate: 4px 0; } }
@keyframes pop { 50% { scale: 1.35; } }

.mini-fern path { fill: var(--leaf); stroke: var(--leaf-line); stroke-width: 0.6; stroke-linejoin: round; }
.mini-fern .s { fill: none; stroke-width: 1.3; stroke-linecap: round; }
.mini-fern .frond-sm { transform-origin: 15px 30px; }
.card:hover .mini-fern .frond-sm { animation: tree-sway 1.8s ease-in-out; }

.datebook .pg { fill: #fffaf5; stroke: var(--ink-soft); stroke-width: 1; }
.datebook .top { fill: var(--lilac); stroke: var(--ink-soft); stroke-width: 1; }
.datebook .ring { fill: none; stroke: var(--ink-soft); stroke-width: 1.6; stroke-linecap: round; }
.datebook .moon { fill: var(--gold); transform-origin: 26px 29px; }
.datebook .star { fill: var(--gold); }
.card:hover .datebook .moon { animation: tree-sway 1.6s ease-in-out; }

/* Two project cards side by side, with the websites card across the full row. */
@media (min-width: 44rem) {
  .cards { grid-template-columns: 1fr 1fr; }
}
.card.wide { grid-column: 1 / -1; }

.site-tiles {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.site-tiles li {
  min-width: 0;
  padding: 0.85rem 1rem;
  border-radius: 1rem 0.8rem 1rem 0.5rem;
  background: color-mix(in oklab, var(--moss), transparent 88%);
}

.site-tiles h4 {
  margin: 0 0 0.2rem;
  overflow-wrap: break-word; /* long names wrap instead of spilling out */
  font-family: "Fraunces", ui-serif, Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
}

.site-tiles p { font-size: 0.9rem; }

/* Tools used, under a project's description. */
.card .card-stack { margin: auto 0 0; padding: 0.9rem 0 0; }
.card { display: flex; flex-direction: column; } /* tags line up along the bottom */

/* 1 · The page ends the way it starts: with a fern. */
.footer-fern {
  display: block;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0 auto 0.6rem;
  transform-origin: 50% 95%;
  animation: sway var(--breath) ease-in-out infinite;
}
.footer-fern path { fill: var(--leaf); stroke: var(--leaf-line); stroke-width: 0.6; stroke-linejoin: round; }
.footer-fern .s { fill: none; stroke-width: 1.3; stroke-linecap: round; }

/* 4 · Clicking "Send a hello" sends up a little sprout. */
.hello-wrap { position: relative; display: inline-block; }

.hello-sprout {
  position: absolute;
  bottom: 100%;
  left: 50%;
  width: 3.5rem;
  height: 3.5rem;
  margin-left: -1.75rem;
  margin-bottom: -0.6rem;
  overflow: visible;
  pointer-events: none;
  opacity: 0;
}
.hello-sprout .st { fill: none; stroke: var(--leaf-line); stroke-width: 2; stroke-linecap: round; }
.hello-sprout .lf { fill: var(--leaf); }
.hello-sprout .bud circle { fill: var(--rose); }
.hello-sprout .bud .eye { fill: var(--gold); }
.hello-sprout .lf.l { transform-origin: 24px 32px; }
.hello-sprout .lf.r { transform-origin: 24px 28px; }
.hello-sprout .bud { transform-origin: 24px 21px; }

.hello-sprout.pop { animation: sprout-rise 2.4s ease-out forwards; transform-origin: 50% 100%; }
.hello-sprout.pop .lf, .hello-sprout.pop .bud { animation: unfold 0.9s cubic-bezier(0.3, 1.6, 0.5, 1) 0.3s both; }

@keyframes sprout-rise {
  0% { opacity: 1; transform: scaleY(0); }
  25% { opacity: 1; transform: scaleY(1); }
  80% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-6px); }
}

@keyframes unfold { from { transform: scale(0); } to { transform: scale(1); } }

/* ---------- Ambient layers ---------- */

/*
  Sunlight that follows the real sun over Cumberland, BC. main.js works out
  where the sun is right now and sets the colour, strength and position:
  rosy at dawn, golden in the morning, soft at midday, amber at sunset and
  a faint lilac moonlight at night.
*/
.sunlight {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse 70% 60% at var(--sun-x, 80%) var(--sun-y, 0%),
    var(--sun-color, transparent),
    transparent 70%
  );
  transition: background 3s ease;
}

/* Drifting light motes, like spores in a sunbeam. main.js adds them. */
.motes {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.mote {
  position: absolute;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold), transparent 70%);
  opacity: 0;
  animation:
    drift var(--d) linear var(--delay) infinite,
    mote-breathe var(--breath) ease-in-out var(--delay) infinite;
}

.mote:nth-child(3n) { background: radial-gradient(circle, var(--rose), transparent 70%); }

@keyframes drift {
  from { transform: translate(0, 0); }
  to { transform: translate(var(--dx), -40vh); }
}

@keyframes mote-breathe {
  0%, 100% { opacity: 0.1; }
  50% { opacity: 0.55; }
}

/*
  Secret layer, warm hands: a very soft warm glow that follows the cursor,
  like hands held near the body. main.js moves it, and only turns it on for
  a mouse or trackpad (never on touch) when motion is allowed. It breathes too.
*/
.warmth {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
  width: 26rem;
  height: 26rem;
  margin: -13rem 0 0 -13rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.5s ease;
}

.warmth.on { opacity: 1; }

.warmth::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, var(--warmth), transparent 65%);
  animation: warmth-breathe var(--breath) ease-in-out infinite;
}

@keyframes warmth-breathe {
  0%, 100% { transform: scale(0.92); }
  50% { transform: scale(1.06); }
}

/* ---------- Paint ---------- */

/* The painting covers the whole page and blends in like watercolour, so
   text always shows through. It only catches the pointer while painting. */
.canvas {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  pointer-events: none;
  mix-blend-mode: multiply;
}

@media (prefers-color-scheme: dark) {
  .canvas { mix-blend-mode: screen; }
}

body.painting .canvas {
  pointer-events: auto;
  touch-action: none;
  cursor: crosshair;
}

.paint {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 10;
  display: grid;
  justify-items: end;
  gap: 0.6rem;
}

.paint-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem 0.5rem 0.75rem;
  border: 1px solid var(--card-line);
  border-radius: 999px;
  background: color-mix(in oklab, var(--bg), transparent 10%);
  color: var(--ink);
  font-family: "Fraunces", ui-serif, Georgia, serif;
  font-style: italic;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 6px 20px -10px var(--glow);
  transition: box-shadow 0.6s ease, transform 0.6s ease;
}

.paint-toggle:hover { transform: translateY(-1px); box-shadow: 0 8px 26px -8px var(--glow); }
.paint-toggle svg { width: 1.3rem; height: 1.3rem; }
.paint-toggle .handle { fill: var(--ink-soft); }
.paint-toggle .tip { fill: var(--brush, var(--rose)); transition: fill 0.4s ease; }
.paint-toggle[aria-pressed="true"] { background: var(--card); border-color: var(--rose); }

.paint-tray {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px solid var(--card-line);
  border-radius: 1.4rem 1.4rem 0.6rem 1.4rem;
  background: color-mix(in oklab, var(--bg), transparent 6%);
  box-shadow: 0 10px 30px -14px var(--glow);
}

.paint-tray[hidden] { display: none; }

.swatches {
  display: grid;
  grid-template-columns: repeat(7, 1.9rem);
  gap: 0.45rem;
}

.swatch {
  position: relative;
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50% 50% 50% 15%;
  background: var(--c);
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.3, 1.4, 0.5, 1);
}

.swatch:hover { transform: rotate(-12deg) scale(1.08); }
.swatch[aria-pressed="true"] { border-color: var(--ink); transform: scale(1.1); }

/* "Any colour": a rainbow petal that opens the browser's colour picker. */
.swatch.any {
  background: conic-gradient(#e9a2b6, #efc372, #9cc08a, #9fc4e6, #c7b3e6, #e9a2b6);
}

.swatch.any.chosen { border-color: var(--ink); transform: scale(1.1); }
.swatch.any:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }

.swatch.any input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.brush-size {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink-soft);
  font-family: "Fraunces", ui-serif, Georgia, serif;
  font-style: italic;
  font-size: 0.875rem;
}

.brush-size input {
  flex: 1;
  min-width: 0;
  margin: 0;
  accent-color: var(--brush, var(--rose));
  cursor: pointer;
}

.paint-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.paint-actions button {
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--card-line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

.paint-actions button:hover { border-color: var(--rose); }

@media (max-width: 30rem) {
  .paint-toggle { padding: 0.65rem; }
  .paint-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

/* ---------- Reduced motion: everything holds still ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
  .pinna, .rib { transform: none; }
  .frond .stem { stroke-dashoffset: 0; }
  .motes, .warmth { display: none; }
  .js .timeline::before { transform: none; }
  .card:hover, .button:hover { transform: none; }
}
