/* ---------- Design tokens: change these to restyle the whole site ---------- */
:root {
  color-scheme: light;

  /* Pastels pulled from the logo's lavender → pink → peach gradient */
  --lavender: #d8d0fb;
  --lavender-soft: #ece8ff;
  --pink: #f6b8c8;
  --pink-soft: #fde3ea;
  --peach: #ffcf9e;
  --peach-soft: #ffe9d2;
  --gold: #f5c15f;

  /* Deep plum is the single "ink" color used for all text */
  --ink: #3b2341;
  --muted: #7d6a7f;
  --rose: #c4507a;           /* doodles + hover */
  --squiggle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M0 4 Q 3 0, 6 4 T 12 4' fill='none' stroke='%23c4507a' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");   /* one wave, tiled along underlines */
  --bg: #fff8f1;
  --line: color-mix(in srgb, var(--ink) 14%, transparent);

  --font-sans: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-display: "Fraunces", Georgia, serif;

  --max: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 28px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--pink); color: var(--ink); }

h1, h2, .statement, .next-project strong {
  font-variation-settings: "SOFT" 50, "WONK" 0;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
  background:
    radial-gradient(circle at 25% 25%, color-mix(in srgb, var(--lavender) 70%, transparent), transparent 55%),
    radial-gradient(circle at 80% 80%, color-mix(in srgb, var(--peach) 70%, transparent), transparent 55%),
    var(--pink-soft);
}

/* ---------- Hand-drawn doodles ---------- */
.doodle-underline {
  text-decoration: none;
  padding-bottom: 0.2em;
  background: var(--squiggle) left bottom / 0.6em 0.4em repeat-x;
  transition: color 0.2s;
}
.doodle-underline:hover { color: var(--rose); }

.doodle-circle {
  position: relative;
  white-space: nowrap;
}
.doodle-circle::after {
  content: "";
  position: absolute;
  inset: -0.18em -0.35em -0.12em -0.3em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 60' preserveAspectRatio='none'%3E%3Cpath d='M18 40 C 2 22, 40 4, 82 6 C 124 8, 142 26, 124 44 C 104 60, 40 60, 16 46 C 6 40, 10 26, 30 16' fill='none' stroke='%23c4507a' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E")
    center / 100% 100% no-repeat;
  pointer-events: none;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
}
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 76px;
}
/* Script logo: floats gently, and lifts + shines + sparkles on hover */
.logo {
  position: relative;
  display: block;
  animation: float 6s ease-in-out infinite;
}
.logo img {
  height: 54px;
  width: auto;
  aspect-ratio: 2000 / 405;          /* trims the empty space under the artwork */
  object-fit: cover;
  object-position: top;
  transform-origin: left center;
  filter: saturate(1.35) brightness(1.02);   /* richer than the raw artwork */
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}
.logo:hover img {
  transform: translateY(-2px);
  filter: saturate(1.6) brightness(1.04);
}
/* shine that sweeps across the lettering only (masked to the logo's shape) */
.logo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 40%, rgba(255, 255, 255, 0.85) 50%, transparent 60%)
    150% 0 / 250% 100% no-repeat;
  -webkit-mask: url("images/logo-script.webp") top / 100% auto no-repeat;
  mask: url("images/logo-script.webp") top / 100% auto no-repeat;
  transform-origin: left center;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.logo:hover::after {
  transform: translateY(-2px);
  animation: shine 0.9s ease-out;
}
@keyframes shine {
  from { background-position: 150% 0; }
  to   { background-position: -50% 0; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

/* The logo's two sparkles: hidden at rest, they pop in on hover.
   Positions are percentages of the logo box, matching where they sit in the original artwork. */
.sparkle-hover {
  position: absolute;
  fill: #ffc06a;
  opacity: 0;
  transform: scale(0);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.sp1 { left: 94%;    top: 2%;    width: 2.6%; height: 26%; }
.sp2 { left: 95.85%; top: 21.5%; width: 3.9%; height: 34%; }
.logo:hover .sparkle-hover {
  opacity: 1;
  transform: scale(1);
  animation: sparkle-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both,
             sparkle-twinkle 1.6s ease-in-out 0.6s infinite;
}
.logo:hover .sp2 { animation-delay: 0.12s, 0.9s; }
@keyframes sparkle-pop {
  from { opacity: 0; transform: translateY(-2px) scale(0); }
  to   { opacity: 1; transform: translateY(-2px) scale(1); }
}
@keyframes sparkle-twinkle {
  0%, 100% { transform: translateY(-2px) scale(1); }
  50%      { transform: translateY(-2px) scale(0.75); }
}

.nav { display: flex; gap: 28px; list-style: none; }
.nav a {
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  padding-bottom: 8px;
  position: relative;
  transition: color 0.2s;
}
/* squiggle that draws in from the left on hover */
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 7px;
  background: var(--squiggle) left center / 10px 7px repeat-x;
  transition: width 0.35s ease;
}
.nav a:hover { color: var(--rose); }
.nav a[aria-current="page"] { color: var(--rose); }
.nav a:hover::after, .nav a[aria-current="page"]::after { width: 100%; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Two-line menu button: only shown on small screens */
.menu-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  color: var(--ink);
  cursor: pointer;
}
.menu-toggle span:not(.sr-only) {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s ease, top 0.3s ease;
}
.menu-toggle span:nth-child(1) { top: 17px; }
.menu-toggle span:nth-child(2) { top: 26px; }
.nav-open .menu-toggle span:nth-child(1) { top: 21.5px; transform: rotate(45deg); }
.nav-open .menu-toggle span:nth-child(2) { top: 21.5px; transform: rotate(-45deg); }

/* Hero: gentle staggered fade-up on load */
.hero-name span, .roles li, .hero-art {
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero-name .ghost { animation-delay: 0.12s; }
.roles li:nth-child(1) { animation-delay: 0.3s; }
.roles li:nth-child(2) { animation-delay: 0.4s; }
.roles li:nth-child(3) { animation-delay: 0.5s; }
.hero-art { animation-delay: 0.2s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 32px;
  align-items: center;
  padding-block: clamp(32px, 6vw, 72px) clamp(64px, 10vw, 120px);
}
.hero-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(64px, 11vw, 150px);
  line-height: 0.82;
  letter-spacing: -0.045em;
  display: grid;
}
.hero-name span { position: relative; z-index: 1; }
.hero-name .ghost {
  color: var(--lavender);
  z-index: 0;
  margin-left: 0.22em;
}
.roles {
  list-style: none;
  margin-top: clamp(32px, 5vw, 56px);
  display: grid;
  gap: clamp(20px, 3.5vw, 40px);
}
.roles li { margin-left: var(--x); font-size: 17px; }

.hero-art {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  background: var(--peach-soft);
  padding: clamp(16px, 3vw, 32px);
}
.blob {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 46% 54% 42% 58% / 38% 44% 56% 62%;
  animation: morph 14s ease-in-out infinite alternate;
}
.blob img { width: 100%; height: 100%; object-fit: cover; }
@keyframes morph {
  to { border-radius: 58% 42% 55% 45% / 52% 60% 40% 48%; }
}
.sparkle {
  position: absolute;
  color: var(--gold);
  z-index: 2;
  line-height: 1;
}
.s1 { top: -18px; right: 12%; font-size: 44px; }
.s2 { top: 30px; right: 4%; font-size: 24px; }

/* ---------- Bands ---------- */
.band { padding-block: clamp(64px, 10vw, 112px); position: relative; }
.band-peach { background: var(--peach-soft); }

/* scalloped bottom edge */
.scalloped { margin-bottom: 96px; }
.scalloped::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 40px;
  background: radial-gradient(circle at 40px 0, var(--peach-soft) 39px, transparent 40px) 0 0 / 80px 40px repeat-x;
}

.split {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 32px;
}
.label {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  padding-top: 0.5em;
}

.statement {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.25;
  letter-spacing: -0.015em;
  max-width: 24ch;
}

/* ---------- Selected work ---------- */
.work { padding-block: clamp(80px, 12vw, 140px); }
.display-heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(52px, 9vw, 120px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.display-heading em { color: var(--rose); font-style: italic; }

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 72px clamp(24px, 5vw, 72px);
}
/* stagger the right-hand column */
.work-grid .card:nth-child(even) { margin-top: 120px; }

.card { text-decoration: none; display: block; }
.card-media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  transition: transform 0.4s ease;
}
.card-media img,
.card-media .placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.card:hover .card-media { transform: translateY(-6px) rotate(-0.6deg); }
.card:hover .card-media img,
.card:hover .card-media .placeholder { transform: scale(1.04); }

.shape-arch .card-media { border-radius: 999px 999px var(--radius) var(--radius); }
.shape-block .card-media { border-radius: var(--radius); }
.tint-peach .placeholder { background: var(--peach); }
.tint-pink .placeholder { background: var(--pink); }

.card h3 {
  margin-top: 20px;
  font-size: 22px;
  font-weight: 500;
}
.card h3 span { position: relative; padding-bottom: 0.25em; }
.card h3 span::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 0.4em;
  background: var(--squiggle) left center / 0.6em 0.4em repeat-x;
  transition: width 0.4s ease;
}
.card:hover h3 span::after { width: 100%; }
.card p { color: var(--muted); font-size: 15px; margin-top: 4px; }

/* ---------- Footer ---------- */
.site-footer {
  /* deep plum softening into a dusty rose-mauve */
  background: linear-gradient(110deg, var(--ink) 0%, #563660 55%, #7d4c72 100%);
  color: var(--bg);
  padding: 40px 0;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px 32px;
  flex-wrap: wrap;
}
.links { display: flex; gap: 28px; list-style: none; }
.links a {
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 0.01em;
  text-transform: lowercase;
}
.links a:hover { color: var(--pink); }
.site-footer small { opacity: 0.7; }

/* ---------- Case study page ---------- */
.case-hero { padding-block: clamp(48px, 8vw, 96px) 40px; }
.back { color: var(--muted); text-decoration: none; font-size: 15px; }
.back:hover { color: var(--rose); }
.case-hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 6.5vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 24px 0 20px;
  max-width: 16ch;
}
.case-hero .lede { color: var(--muted); font-size: 20px; max-width: 56ch; }
.meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 28px 32px;
  margin-top: 48px;
  background: var(--lavender-soft);
  border-radius: var(--radius);
}
.meta dt {
  font-size: 15px;
  text-transform: lowercase;
  letter-spacing: 0.01em;
  color: var(--muted);
  margin-bottom: 4px;
}
.case-image {
  margin: 48px 0;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
}
.case-image.arch { border-radius: 999px 999px var(--radius) var(--radius); aspect-ratio: 16 / 10; }
.case-body { max-width: 680px; margin: 0 auto; }
.case-body h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 36px;
  letter-spacing: -0.02em;
  margin: 56px 0 16px;
}
.case-body p + p { margin-top: 16px; }
.case-body ul { padding-left: 20px; margin-top: 12px; }
.next-project {
  display: block;
  text-decoration: none;
  text-align: center;
  padding: 80px 0;
  margin-top: 80px;
  border-top: 1px solid var(--line);
}
.next-project span {
  font-size: 15px;
  letter-spacing: 0.01em;
  text-transform: lowercase;
}
.next-project strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 72px);
  letter-spacing: -0.03em;
}
.next-project:hover strong { color: var(--rose); }

/* ---------- Inner pages ---------- */
.page-hero { padding-block: clamp(40px, 7vw, 88px) clamp(40px, 6vw, 72px); }
.page-title {
  position: relative;
  isolation: isolate;
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(56px, 9vw, 124px);
  line-height: 0.85;
  letter-spacing: -0.045em;
  padding-right: 0.08em;
}
/* playful shapes behind each page title; every page gets its own pair */
.page-title::before,
.page-title::after {
  content: "";
  position: absolute;
  z-index: -1;
}
/* front shape sits top-left, back shape bottom-right */
.page-title::before { left: -0.18em; top: -0.16em; }
.page-title::after  { right: -0.3em; bottom: -0.2em; }

/* hover: the shapes gently turn and grow (individual rotate/scale/translate
   properties so they combine with any transform a shape already has) */
.page-title::before,
.page-title::after {
  transition: rotate 0.7s cubic-bezier(0.34, 1.56, 0.64, 1),
              scale 0.7s cubic-bezier(0.34, 1.56, 0.64, 1),
              translate 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.page-title:hover::before { rotate: 18deg; scale: 1.08; }
.page-title:hover::after  { rotate: -10deg; scale: 1.06; translate: 0.03em -0.03em; }
/* the squiggle slides instead of spinning */
.page-title.shapes-resume:hover::before { rotate: 0deg; scale: 1.04; translate: 0.06em 0; }

/* projects: lavender starburst + peach arch */
.page-title.shapes-projects::before {
  width: 0.95em; height: 0.95em;
  background: var(--lavender);
  clip-path: polygon(50% 0%, 60.6% 10.4%, 75% 6.7%, 79% 21%, 93.3% 25%, 89.6% 39.4%, 100% 50%, 89.6% 60.6%, 93.3% 75%, 79% 79%, 75% 93.3%, 60.6% 89.6%, 50% 100%, 39.4% 89.6%, 25% 93.3%, 21% 79%, 6.7% 75%, 10.4% 60.6%, 0% 50%, 10.4% 39.4%, 6.7% 25%, 21% 21%, 25% 6.7%, 39.4% 10.4%);
}
.page-title.shapes-projects::after {
  width: 1.1em; height: 0.62em;
  border-radius: 999px 999px 0 0;
  background: var(--peach);
}

/* motion: pink flower + lavender sparkle */
.page-title.shapes-motion::before {
  width: 0.9em; height: 0.9em;
  background: var(--pink);
  clip-path: polygon(100.0% 50.0%, 98.8% 53.2%, 95.6% 56.0%, 91.2% 58.2%, 86.7% 59.8%, 83.2% 61.3%, 81.4% 63.0%, 81.5% 65.5%, 82.9% 69.0%, 84.9% 73.3%, 86.5% 78.0%, 86.8% 82.3%, 85.4% 85.4%, 82.3% 86.8%, 78.0% 86.5%, 73.3% 84.9%, 69.0% 82.9%, 65.5% 81.5%, 63.0% 81.4%, 61.3% 83.2%, 59.8% 86.7%, 58.2% 91.2%, 56.0% 95.6%, 53.2% 98.8%, 50.0% 100.0%, 46.8% 98.8%, 44.0% 95.6%, 41.8% 91.2%, 40.2% 86.7%, 38.7% 83.2%, 37.0% 81.4%, 34.5% 81.5%, 31.0% 82.9%, 26.7% 84.9%, 22.0% 86.5%, 17.7% 86.8%, 14.6% 85.4%, 13.2% 82.3%, 13.5% 78.0%, 15.1% 73.3%, 17.1% 69.0%, 18.5% 65.5%, 18.6% 63.0%, 16.8% 61.3%, 13.3% 59.8%, 8.8% 58.2%, 4.4% 56.0%, 1.2% 53.2%, 0.0% 50.0%, 1.2% 46.8%, 4.4% 44.0%, 8.8% 41.8%, 13.3% 40.2%, 16.8% 38.7%, 18.6% 37.0%, 18.5% 34.5%, 17.1% 31.0%, 15.1% 26.7%, 13.5% 22.0%, 13.2% 17.7%, 14.6% 14.6%, 17.7% 13.2%, 22.0% 13.5%, 26.7% 15.1%, 31.0% 17.1%, 34.5% 18.5%, 37.0% 18.6%, 38.7% 16.8%, 40.2% 13.3%, 41.8% 8.8%, 44.0% 4.4%, 46.8% 1.2%, 50.0% 0.0%, 53.2% 1.2%, 56.0% 4.4%, 58.2% 8.8%, 59.8% 13.3%, 61.3% 16.8%, 63.0% 18.6%, 65.5% 18.5%, 69.0% 17.1%, 73.3% 15.1%, 78.0% 13.5%, 82.3% 13.2%, 85.4% 14.6%, 86.8% 17.7%, 86.5% 22.0%, 84.9% 26.7%, 82.9% 31.0%, 81.5% 34.5%, 81.4% 37.0%, 83.2% 38.7%, 86.7% 40.2%, 91.2% 41.8%, 95.6% 44.0%, 98.8% 46.8%);
}
.page-title.shapes-motion::after {
  width: 0.7em; height: 0.95em;
  right: -0.4em; bottom: -0.15em;
  background: var(--lavender);
  clip-path: polygon(50% 0%, 59% 37%, 100% 50%, 59% 63%, 50% 100%, 41% 63%, 0% 50%, 41% 37%);
}

/* about: peach sparkle + pink blob */
.page-title.shapes-about::before {
  width: 0.7em; height: 0.95em;
  left: -0.24em; top: -0.3em;
  background: var(--peach);
  clip-path: polygon(50% 0%, 59% 37%, 100% 50%, 59% 63%, 50% 100%, 41% 63%, 0% 50%, 41% 37%);
}
.page-title.shapes-about::after {
  width: 1.05em; height: 0.8em;
  border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%;
  background: var(--pink);
}

/* résumé: lavender squiggle + peach flower */
.page-title.shapes-resume::before {
  width: 1.75em; height: 0.55em;
  left: -0.12em; top: 0.22em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 44'%3E%3Cpath d='M12 26 Q 26 8 40 22 T 68 22 T 96 22 T 128 18' fill='none' stroke='%23d8d0fb' stroke-width='18' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 100% 100% no-repeat;
  transform: rotate(-4deg);
}
.page-title.shapes-resume::after {
  width: 0.85em; height: 0.85em;
  right: -0.35em; bottom: -0.25em;
  background: var(--peach);
  clip-path: polygon(100.0% 50.0%, 99.0% 52.6%, 96.2% 54.9%, 92.5% 56.7%, 88.6% 58.2%, 85.7% 59.6%, 84.2% 61.1%, 84.5% 63.2%, 86.1% 66.1%, 88.3% 69.5%, 90.3% 73.2%, 91.1% 76.7%, 90.5% 79.4%, 88.1% 80.9%, 84.6% 81.1%, 80.4% 80.4%, 76.4% 79.4%, 73.2% 78.7%, 71.2% 79.1%, 70.1% 81.0%, 69.8% 84.2%, 69.5% 88.3%, 68.9% 92.5%, 67.6% 95.8%, 65.5% 97.6%, 62.7% 97.4%, 59.7% 95.5%, 56.7% 92.5%, 54.1% 89.3%, 51.9% 86.9%, 50.0% 86.0%, 48.1% 86.9%, 45.9% 89.3%, 43.3% 92.5%, 40.3% 95.5%, 37.3% 97.4%, 34.5% 97.6%, 32.4% 95.8%, 31.1% 92.5%, 30.5% 88.3%, 30.2% 84.2%, 29.9% 81.0%, 28.8% 79.1%, 26.8% 78.7%, 23.6% 79.4%, 19.6% 80.4%, 15.4% 81.1%, 11.9% 80.9%, 9.5% 79.4%, 8.9% 76.7%, 9.7% 73.2%, 11.7% 69.5%, 13.9% 66.1%, 15.5% 63.2%, 15.8% 61.1%, 14.3% 59.6%, 11.4% 58.2%, 7.5% 56.7%, 3.8% 54.9%, 1.0% 52.6%, 0.0% 50.0%, 1.0% 47.4%, 3.8% 45.1%, 7.5% 43.3%, 11.4% 41.8%, 14.3% 40.4%, 15.8% 38.9%, 15.5% 36.8%, 13.9% 33.9%, 11.7% 30.5%, 9.7% 26.8%, 8.9% 23.3%, 9.5% 20.6%, 11.9% 19.1%, 15.4% 18.9%, 19.6% 19.6%, 23.6% 20.6%, 26.8% 21.3%, 28.8% 20.9%, 29.9% 19.0%, 30.3% 15.8%, 30.5% 11.7%, 31.1% 7.5%, 32.4% 4.2%, 34.5% 2.4%, 37.3% 2.6%, 40.3% 4.5%, 43.3% 7.5%, 45.9% 10.7%, 48.1% 13.1%, 50.0% 14.0%, 51.9% 13.1%, 54.1% 10.7%, 56.7% 7.5%, 59.7% 4.5%, 62.7% 2.6%, 65.5% 2.4%, 67.6% 4.2%, 68.9% 7.5%, 69.5% 11.7%, 69.8% 15.8%, 70.1% 19.0%, 71.2% 20.9%, 73.2% 21.3%, 76.4% 20.6%, 80.4% 19.6%, 84.6% 18.9%, 88.1% 19.1%, 90.5% 20.6%, 91.1% 23.3%, 90.3% 26.8%, 88.3% 30.5%, 86.1% 33.9%, 84.5% 36.8%, 84.2% 38.9%, 85.7% 40.4%, 88.6% 41.8%, 92.5% 43.3%, 96.2% 45.1%, 99.0% 47.4%);
}

.page-intro {
  max-width: 54ch;
  margin-top: clamp(28px, 4vw, 44px);
  color: var(--muted);
  font-size: 19px;
}
.more-link {
  display: inline-block;
  justify-self: start;   /* don't stretch when it sits in a grid */
  margin-top: 56px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  font-family: var(--font-sans);
}
.work-page { padding-top: 0; }

.section { padding-block: clamp(64px, 10vw, 112px); }
.section-heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.035em;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.section-heading em, .cta-title em { color: var(--rose); font-style: italic; }

/* Under construction notice (projects page) */
/* the tape runs edge to edge; <main> clips the tilted overhang so the page never scrolls sideways */
.construction-page { overflow-x: clip; }
.construction { padding-block: 8px clamp(80px, 12vw, 140px); }
.tape {
  overflow: hidden;
  white-space: nowrap;
  padding: 12px 0;
  /* break out of the centered container to the full window width, plus a little extra so the tilt never shows a gap at the edges */
  width: calc(100vw + 80px);
  margin: 0 0 clamp(40px, 6vw, 64px) calc(50% - 50vw - 40px);
  transform: rotate(-2deg);
  background: repeating-linear-gradient(-45deg, var(--peach) 0 22px, var(--lavender) 22px 44px);
  border-block: 3px solid var(--bg);
}
.tape span {
  display: inline-block;
  padding: 4px 18px;
  border-radius: 999px;
  background: var(--bg);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  animation: tape-scroll 40s linear infinite;
}
@keyframes tape-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.construction-card {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding: clamp(16px, 3vw, 32px) 0;
}
.construction-card .section-heading { margin: 12px 0 20px; font-size: clamp(34px, 4.5vw, 52px); text-wrap: balance; }
.construction-card p:last-child { font-size: 18px; }

/* Motion */
.motion-section { padding-bottom: clamp(80px, 12vw, 140px); }
.motion-grid { columns: 2 320px; column-gap: clamp(24px, 4vw, 48px); }
.motion-card {
  display: block;
  break-inside: avoid;
  margin-bottom: 44px;
  text-decoration: none;
}
.motion-media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  transition: transform 0.4s ease;
}
.motion-media.square { aspect-ratio: 1; }
.motion-media.wide   { aspect-ratio: 16 / 9; }
.motion-media.tall   { aspect-ratio: 4 / 5; }
.motion-media video,
.motion-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.motion-card:hover .motion-media { transform: translateY(-6px); }
.play {
  position: absolute;
  left: 16px;
  bottom: 16px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding-left: 3px;
  border-radius: 50%;
  font-size: 13px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.motion-card:hover .play { transform: scale(1.12); }
.motion-card h3 { margin-top: 14px; font-size: 19px; font-weight: 500; }
.meta-line { color: var(--muted); font-size: 14px; }

/* Easter egg: Bao the dog (about page) */
/* the 🐾 at the end of the "outside of work" sentence is the trigger */
.paw {
  display: inline-block;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  line-height: 1;
  cursor: pointer;
}
.paw:hover, .paw:focus-visible { animation: wiggle 0.6s ease-in-out; }
@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-14deg) scale(1.15); }
  75% { transform: rotate(10deg) scale(1.15); }
}
.bao-modal {
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  text-align: center;
}
.bao-modal::backdrop {
  background: color-mix(in srgb, var(--ink) 60%, transparent);
  backdrop-filter: blur(4px);
}
.bao-modal .video-close { top: -10px; right: -10px; z-index: 2; }
.polaroid {
  width: min(340px, 78vw);
  padding: 14px 14px 0;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.45);
  rotate: -3deg;
}
.bao-modal[open] .polaroid { animation: polaroid-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
@keyframes polaroid-in {
  from { opacity: 0; scale: 0.7; rotate: -14deg; }
  to   { opacity: 1; scale: 1;   rotate: -3deg; }
}
.polaroid-photo {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--peach-soft);
}
.polaroid-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.polaroid-photo .placeholder { font-size: 15px; }
.polaroid figcaption {
  padding: 16px 0 20px;
  font-family: var(--font-display);
  font-size: 22px;
  font-style: italic;
}
.bao-next { margin-top: 24px; border: 0; cursor: pointer; font-family: inherit; }

/* Pop-up video player */
.video-modal {
  margin: auto;            /* the global margin reset would otherwise pin it to the top-left */
  width: min(1100px, 92vw);
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}
.video-modal::backdrop {
  background: color-mix(in srgb, var(--ink) 78%, transparent);
  backdrop-filter: blur(6px);
}
.video-modal[open] { animation: rise 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.video-frame {
  aspect-ratio: var(--ratio, 16 / 9);
  max-height: 82vh;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-close {
  position: absolute;
  top: -52px;
  right: 0;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.video-close:hover { transform: rotate(90deg); }

/* About */
.about-hero {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
  padding-block: clamp(40px, 7vw, 88px) clamp(48px, 8vw, 96px);
}
/* photo clipped to an organic SVG blob (see #about-blob in about.html) */
.portrait { position: relative; aspect-ratio: 4 / 5; }
.blob-defs { position: absolute; width: 0; height: 0; }
.blob-shape {
  width: 100%;
  height: 100%;
  -webkit-clip-path: url(#about-blob);
  clip-path: url(#about-blob);
}
.blob-shape img { width: 100%; height: 100%; object-fit: cover; }
.about-hero .statement { margin-top: clamp(28px, 4vw, 44px); }
/* About page: tighter rhythm between sections */
.about-page .about-hero { padding-bottom: clamp(24px, 4vw, 48px); }
.about-page .section { padding-block: clamp(32px, 5vw, 56px) clamp(48px, 7vw, 80px); }
.about-page .band { padding-block: clamp(48px, 7vw, 80px); }
.about-page .scalloped { margin-bottom: 40px; }
.about-page .cta { padding-block: clamp(24px, 3vw, 36px) clamp(64px, 9vw, 104px); }
.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.principle {
  display: flex;
  flex-direction: column;
  padding: 32px;
  border-radius: var(--radius);
  background: var(--lavender-soft);
  transition: transform 0.4s ease;
}
.principle:nth-child(2) { background: var(--pink-soft); }
.principle:nth-child(3) { background: var(--peach-soft); }
.principle:hover { transform: translateY(-6px); }
.principle .num {
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 1;
  color: var(--rose);
}
.principle h3 { margin: 18px 0 8px; font-size: 20px; font-weight: 500; }
.principle-link { margin-top: auto; padding-top: 20px; align-self: flex-start; }   /* pinned to the card's bottom */
.cta { text-align: center; padding-block: clamp(96px, 14vw, 160px); }
.cta-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(44px, 7vw, 96px);
  line-height: 1;
  letter-spacing: -0.04em;
  margin: 16px 0 28px;
}
.cta-link { font-size: clamp(18px, 2vw, 22px); }
.cta-email { display: inline-flex; align-items: center; gap: 10px; }
/* copy-to-clipboard button next to the email */
.copy-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.copy-btn:hover, .copy-btn:focus-visible { background: var(--pink-soft); color: var(--rose); }
.copy-btn:active { transform: scale(0.92); }
.copy-btn svg {
  grid-area: 1 / 1;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.copy-btn .icon-check { opacity: 0; transform: scale(0.5); }
.copy-btn.copied { color: var(--rose); }
.copy-btn.copied .icon-copy { opacity: 0; transform: scale(0.5); }
.copy-btn.copied .icon-check { opacity: 1; transform: scale(1); }
.copy-tip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  translate: -50% 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, translate 0.2s ease;
}
.copy-btn.copied .copy-tip { opacity: 1; translate: -50% 0; }

/* Resume */
.resume-hero {
  padding-bottom: clamp(16px, 3vw, 32px);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  flex-wrap: wrap;
}
.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: background 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.button:hover { background: var(--rose); transform: translateY(-2px); }
.resume { padding-bottom: clamp(80px, 12vw, 140px); }
.resume-block {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 32px;
  padding-block: 40px;
  border-top: 1px solid var(--line);
}
.resume-block .label { text-transform: none; }   /* Experience, Awards, Education in title case */
.role + .role { margin-top: 36px; }
.role-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.role h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 50, "WONK" 0;
}
.dates { color: var(--muted); font-size: 14px; }
.company { color: var(--rose); font-weight: 600; font-size: 16px; letter-spacing: 0.01em; margin: 4px 0 8px; }
.role ul:not(.steps) { color: var(--muted); font-size: 16px; line-height: 1.6; }
.role ul { list-style: none; padding-left: 0; }
.role li + li { margin-top: 10px; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; }
.pills li {
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 14px;
  background: var(--lavender-soft);
}
.pills li:nth-child(3n+2) { background: var(--pink-soft); }
.pills li:nth-child(3n)   { background: var(--peach-soft); }


/* Promotion within one company: titles stacked with a little dotted connector */
.steps { list-style: none; padding: 0 0 0 18px; position: relative; }
/* connector: runs from this dot's centre to the next dot's centre (dot centre = 0.6em + 5px; items are 4px apart) */
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: -14px;
  top: calc(0.6em + 5px);
  bottom: calc(-1 * (0.6em + 5px + 4px));
  border-left: 2px dotted var(--lavender);
}
.steps li {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.steps li + li { margin-top: 4px; }
.steps li::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: -18px;
  top: 0.6em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lavender);
}
.steps li:first-child::before { background: var(--rose); }
.role ul.steps { padding-left: 18px; }
.role ul.steps li + li { margin-top: 4px; }

.award + .award { margin-top: 36px; }
.award h3 { max-width: 30ch; }
.award h3 a { text-decoration: none; }
.medals { margin-top: 14px; }
.medals li.top    { background: var(--rose); color: var(--bg); }
.medals li.gold   { background: color-mix(in srgb, var(--gold) 45%, var(--bg)); }
.medals li.silver { background: var(--lavender-soft); }
.medals li.bronze { background: var(--peach-soft); }

@media print {
  .site-header, .site-footer, .button, .page-title::before, .page-title::after { display: none; }
  body { background: white; }
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .hero, .split, .work-grid { grid-template-columns: 1fr; }
  .work-grid .card:nth-child(even) { margin-top: 0; }
  .meta { grid-template-columns: repeat(2, 1fr); }
  .about-hero, .principles, .resume-block { grid-template-columns: 1fr; }
  .logo img { height: 40px; }

  /* nav collapses into a dropdown behind the menu button */
  .menu-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 8px var(--gutter) 32px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .nav-open .site-nav { display: block; animation: rise 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .nav { flex-direction: column; gap: 6px; }
  .nav a {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 400;
    letter-spacing: -0.02em;
    text-transform: lowercase;
  }
  .nav a::after { height: 10px; background-size: 14px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .page-title::before, .page-title::after { transition: none; }
  .tape span { animation: none; }
  .paw:hover, .paw:focus-visible { animation: none; }
  .bao-modal[open] .polaroid { animation: none; }
  .blob, .logo, .logo img, .logo::after, .sparkle-hover,
  .hero-name span, .roles li, .hero-art { animation: none !important; }
  .logo:hover .sparkle-hover { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
