/* ==========================================================================
   Minah Tau — Portfolio stylesheet
   One file for the whole site. Sections:
   1. Design tokens (colours, type, spacing)   — change the brand here
   2. Base / reset
   3. Layout helpers
   4. Header + navigation
   5. Buttons, links, small components
   6. Homepage sections
   7. Work / portfolio grid + filters
   8. Case study pages
   9. Writing list
   10. Contact band + footer
   11. Utilities, motion, print
   ========================================================================== */

/* 1. DESIGN TOKENS ------------------------------------------------------- */
:root {
  /* Brand palette (from Minah's branding sheet) */
  --plum: #856996;        /* main brand colour */
  --berry: #AF5091;       /* accent: buttons, highlights */
  --lilac: #F0E5EE;       /* light section background */
  --aubergine: #382638;   /* dark backgrounds, headings */
  --blush: #E8C7B8;       /* warm accent */

  /* Derived shades — chosen to keep text accessible (WCAG AA) */
  --berry-deep: #8A3A72;  /* berry for small text/links on light backgrounds (6.1:1 on lilac) */
  --plum-deep: #5E4570;   /* plum for small text on light backgrounds */
  --aubergine-2: #4A3249; /* slightly lighter dark surface */
  --lilac-2: #E6D6E3;     /* hairlines / alternate light surface */
  --blush-soft: #F4E2D9;  /* softer blush surface */
  --ink: #2A1C2A;         /* body text on light backgrounds */
  --ink-soft: #57435A;    /* secondary text on light backgrounds */
  --on-dark: #F7EEF4;     /* body text on dark backgrounds */
  --on-dark-soft: #DCC9D8;/* secondary text on dark backgrounds */

  /* Typography */
  --font-serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-sans: "Work Sans", "Helvetica Neue", Arial, sans-serif;

  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.4vw, 1.4rem);
  --step-2: clamp(1.45rem, 1.28rem + 0.8vw, 1.9rem);
  --step-3: clamp(1.8rem, 1.5rem + 1.4vw, 2.6rem);
  --step-4: clamp(2.3rem, 1.8rem + 2.4vw, 3.7rem);
  --step-5: clamp(2.8rem, 2rem + 3.8vw, 5rem);

  /* Spacing + shape */
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(4rem, 9vw, 7.5rem);
  --max: 1200px;
  --measure: 66ch;
  --radius: 4px;
  --shadow: 0 18px 40px -24px rgba(56, 38, 56, 0.55);
  --focus: 3px solid var(--berry);
}

/* 2. BASE / RESET -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--lilac);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 450;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  color: var(--aubergine);
  font-variation-settings: "opsz" 96;
}
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p, ul, ol, dl { margin: 0 0 1.1em; }
a { color: var(--berry-deep); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: var(--focus); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--berry); color: #fff; }
em, i { font-style: italic; }

/* 3. LAYOUT HELPERS ------------------------------------------------------ */
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2 * var(--gutter), 780px); margin-inline: auto; }
.section { padding-block: var(--section); position: relative; }
.section--lilac { background: var(--lilac); }
.section--blush { background: var(--blush-soft); }
.section--plum { background: var(--plum); color: #fff; }
.section--dark { background: var(--aubergine); color: var(--on-dark); }
.section--dark h1, .section--dark h2, .section--dark h3,
.section--plum h1, .section--plum h2, .section--plum h3 { color: #fff; }
.section--dark a:not(.btn), .section--plum a:not(.btn) { color: var(--blush); }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--berry); color: #fff; padding: 0.7rem 1rem; border-radius: var(--radius);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 1rem; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Small uppercase label used above headings */
.kicker {
  display: inline-flex; align-items: center; gap: 0.75rem;
  font-family: var(--font-sans); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--berry-deep); margin: 0 0 1rem;
}
.kicker::after { content: ""; width: 3rem; height: 1px; background: currentColor; opacity: 0.6; }
.section--dark .kicker, .section--plum .kicker, .hero .kicker, .page-hero .kicker { color: var(--blush); }
.lede { font-size: var(--step-1); line-height: 1.55; color: var(--ink-soft); max-width: 40ch; }
.section--dark .lede, .section--plum .lede { color: var(--on-dark-soft); }

/* 4. HEADER + NAVIGATION ------------------------------------------------- */
.site-header {
  background: var(--aubergine);
  color: var(--on-dark);
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid rgba(232, 199, 184, 0.14);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 76px;
}
.brand { display: inline-flex; flex-direction: column; text-decoration: none; color: inherit; line-height: 1; }
.brand__name {
  font-family: var(--font-serif); font-size: 1.65rem; color: #F4D4E6; letter-spacing: -0.01em;
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.brand__name svg { width: 26px; height: 26px; color: var(--berry); }
.brand__tag {
  margin-top: 0.4rem; font-size: 0.62rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--on-dark-soft);
}
.nav__toggle {
  display: none; background: none; border: 1px solid rgba(232, 199, 184, 0.4); color: var(--on-dark);
  border-radius: var(--radius); padding: 0.55rem 0.8rem; font: inherit; font-size: 0.9rem; cursor: pointer;
  align-items: center; gap: 0.5rem;
}
.nav__toggle-bars { width: 18px; height: 12px; position: relative; }
.nav__toggle-bars::before, .nav__toggle-bars::after, .nav__toggle-bars span {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; border-radius: 1px;
}
.nav__toggle-bars::before { top: 0; } .nav__toggle-bars span { top: 5px; } .nav__toggle-bars::after { bottom: 0; }
.nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(1rem, 2.6vw, 2.2rem); }
.nav__list a {
  color: var(--on-dark); text-decoration: none; font-size: 0.95rem; padding: 0.4rem 0; position: relative;
}
.nav__list a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--berry);
  transform: scaleX(0); transform-origin: left; transition: transform 0.25s ease;
}
.nav__list a:hover::after, .nav__list a[aria-current="page"]::after { transform: scaleX(1); }
.nav__list a[aria-current="page"] { color: #fff; font-weight: 600; }

@media (max-width: 760px) {
  .js .nav__toggle { display: inline-flex; }
  .js .nav__list {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; background: var(--aubergine);
    padding: 0.5rem var(--gutter) 1.5rem; border-bottom: 1px solid rgba(232, 199, 184, 0.14);
  }
  .js .nav__list.is-open { display: flex; }
  .js .nav__list a { display: block; padding: 0.9rem 0; font-size: 1.1rem; border-bottom: 1px solid rgba(232,199,184,0.12); }
  .js .nav__list a::after { display: none; }
  /* Without JS, nav wraps under the brand */
  html:not(.js) .site-header__inner { flex-wrap: wrap; padding-block: 0.8rem; }
  html:not(.js) .nav__list { flex-wrap: wrap; gap: 0.4rem 1.2rem; }
  .brand__tag { display: none; }
}

/* 5. BUTTONS, LINKS, COMPONENTS ----------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.7rem;
  padding: 0.95rem 1.5rem; border-radius: var(--radius);
  font-family: var(--font-sans); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn svg { width: 16px; height: 16px; transition: transform 0.2s ease; }
.btn:hover svg { transform: translateX(3px); }
.btn--primary { background: var(--berry); color: #fff; }
.btn--primary:hover { background: #9A4480; }
.btn--blush { background: var(--blush); color: var(--aubergine); }
.btn--blush:hover { background: #F4D9CC; }
.btn--ghost { border-color: rgba(232, 199, 184, 0.6); color: var(--on-dark); background: transparent; }
.btn--ghost:hover { background: rgba(232, 199, 184, 0.12); border-color: var(--blush); }
.btn--outline { border-color: var(--plum-deep); color: var(--aubergine); background: transparent; }
.btn--outline:hover { background: var(--aubergine); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem 1.2rem; align-items: center; }

.arrow-link {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  text-decoration: none; color: var(--berry-deep);
}
.arrow-link svg { width: 15px; height: 15px; transition: transform 0.2s ease; }
.arrow-link:hover svg { transform: translateX(4px); }
.arrow-link:hover { text-decoration: underline; }

.tag-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.tag {
  display: inline-block; font-size: 0.74rem; letter-spacing: 0.06em; padding: 0.3rem 0.7rem;
  border-radius: 999px; background: rgba(133, 105, 150, 0.14); color: var(--plum-deep);
}
.status {
  display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; padding: 0.3rem 0.65rem; border-radius: 999px;
  background: var(--blush); color: var(--aubergine);
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--berry); }

.note {
  border-left: 3px solid var(--plum); background: rgba(133, 105, 150, 0.08);
  padding: 1rem 1.25rem; font-size: 0.93rem; color: var(--ink-soft); border-radius: 0 var(--radius) var(--radius) 0;
}
.note strong { color: var(--aubergine); }

.ornament { color: var(--berry); }
.botanical { position: absolute; pointer-events: none; color: rgba(232, 199, 184, 0.35); }

/* 6. HOMEPAGE ------------------------------------------------------------ */
.hero {
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(175, 80, 145, 0.35) 0%, transparent 55%),
    linear-gradient(135deg, var(--aubergine) 0%, #4C3150 55%, var(--plum) 130%);
  color: var(--on-dark); position: relative; overflow: hidden;
}
.hero__grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 6vw, 5rem);
  align-items: center; padding-block: clamp(3.5rem, 8vw, 6.5rem);
}
.hero h1 { color: #fff; font-size: var(--step-5); margin-bottom: 0.45em; }
.hero h1 em { color: #F4D4E6; font-style: italic; font-weight: 350; }
.hero__intro { font-size: var(--step-1); color: var(--on-dark-soft); max-width: 36em; line-height: 1.6; margin-bottom: 2rem; }
.hero__roles {
  font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--blush);
  margin-bottom: 1.4rem; display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem;
}
.hero__roles li { list-style: none; }
.hero__roles li + li::before { content: "/"; margin-right: 0.9rem; opacity: 0.6; }
.hero__roles { padding: 0; }
.hero__portrait { position: relative; justify-self: center; width: min(100%, 420px); }
.hero__portrait figure { margin: 0; }
.hero__frame {
  border-radius: 999px 999px var(--radius) var(--radius); overflow: hidden; aspect-ratio: 4 / 5.2;
  border: 1px solid rgba(232, 199, 184, 0.5); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.6);
  background: var(--plum);
}
.hero__frame picture { display: block; width: 100%; height: 100%; }
.hero__frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hero__arch-line {
  position: absolute; inset: -12px; border: 1px solid rgba(232, 199, 184, 0.35);
  border-radius: 999px 999px var(--radius) var(--radius); pointer-events: none;
}
.hero__butterfly { position: absolute; width: 78px; right: -18px; top: 16%; color: var(--blush); }
.hero__sign {
  position: absolute; left: -2.2rem; bottom: 2.2rem; background: var(--lilac); color: var(--aubergine);
  padding: 0.85rem 1.1rem; font-family: var(--font-serif); font-style: italic; font-size: 1.05rem; line-height: 1.25;
  box-shadow: var(--shadow); max-width: 15rem; transform: rotate(-3deg);
}
.hero .botanical--left { left: -40px; bottom: -30px; width: 220px; }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__portrait { order: -1; width: min(78%, 330px); }
  .hero__sign { left: -1rem; bottom: 1rem; font-size: 0.95rem; }
}

/* Section header: title left, lede right */
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 4rem; align-items: end; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--ink-soft); max-width: 46ch; }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; } }

/* Three strands: storytelling / strategy / coordination */
.strands { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(232,199,184,0.25); }
.strand { padding: 2rem 2rem 0 0; }
.strand + .strand { padding-left: 2rem; border-left: 1px solid rgba(232,199,184,0.25); }
.strand__num { font-family: var(--font-serif); font-style: italic; color: var(--blush); font-size: 1.1rem; }
.strand h3 { color: #fff; margin: 0.4rem 0 0.7rem; }
.strand p { color: var(--on-dark-soft); font-size: 0.97rem; margin: 0; }
@media (max-width: 860px) {
  .strands { grid-template-columns: 1fr; }
  .strand, .strand + .strand { padding: 1.6rem 0; border-left: 0; border-bottom: 1px solid rgba(232,199,184,0.25); }
}

/* About preview */
.about-preview { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.about-preview__media { position: relative; }
.about-preview__media::before {
  content: ""; position: absolute; inset: 12% 0 0 0; background: var(--plum); border-radius: 999px 999px 0 0;
}
.about-preview__media img { position: relative; width: 100%; }
.about-preview blockquote {
  margin: 0 0 1.5rem; font-family: var(--font-serif); font-size: var(--step-2); line-height: 1.3; color: var(--aubergine);
}
@media (max-width: 760px) { .about-preview { grid-template-columns: 1fr; } .about-preview__media { max-width: 340px; } }

/* 7. WORK GRID + FILTERS ------------------------------------------------- */
.work-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(1rem, 2vw, 1.5rem); }
.work-card {
  grid-column: span 2; position: relative; display: flex; flex-direction: column;
  padding: clamp(1.4rem, 2.6vw, 2rem); min-height: 300px; border-radius: var(--radius);
  background: #fff8fc; color: var(--ink); transition: transform 0.25s ease, box-shadow 0.25s ease;
  isolation: isolate;
}
.work-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.work-card--wide { grid-column: span 4; }
.work-card--half { grid-column: span 3; }
.work-card--lilac { background: #FBF5F9; }
.work-card--blush { background: var(--blush); }
.work-card--plum { background: var(--plum); color: #fff; }
.work-card--dark { background: var(--aubergine-2); color: var(--on-dark); }
.work-card__num { font-family: var(--font-serif); font-style: italic; font-size: 1rem; opacity: 0.75; }
.work-card__cat { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; color: var(--berry-deep); margin: 0.9rem 0 0.5rem; }
.work-card h2, .work-card h3 { font-size: var(--step-2); margin: 0 0 0.6rem; color: inherit; }
.work-card--wide h2, .work-card--wide h3 { font-size: var(--step-3); max-width: 18ch; }
.work-card--full { grid-column: 1 / -1; min-height: 0; }
.work-card p { font-size: 0.96rem; margin: 0 0 1.4rem; max-width: 46ch; }
.work-card__foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem; }
.work-card .arrow-link { color: inherit; }
.work-card .arrow-link::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* whole card is clickable */
.work-card--plum .work-card__cat, .work-card--dark .work-card__cat { color: var(--blush); }
.work-card--plum p, .work-card--dark p { color: var(--on-dark-soft); }
.work-card--plum p { color: #F6ECF3; }
.work-card__deco { position: absolute; right: 1.2rem; top: 1.2rem; width: 56px; opacity: 0.5; color: currentColor; z-index: -1; }
.work-card--wide .work-card__deco { width: 120px; opacity: 0.35; }
@media (max-width: 960px) {
  .work-card, .work-card--wide, .work-card--half { grid-column: span 3; }
  .work-card--full { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .work-grid { grid-template-columns: 1fr; }
  .work-card, .work-card--wide, .work-card--half, .work-card--full { grid-column: auto; min-height: 0; }
}
.work-card[hidden] { display: none; }

.filters { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0 0 2rem; padding: 0; list-style: none; }
.filter-btn {
  font: inherit; font-size: 0.88rem; padding: 0.6rem 1.1rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--plum); background: transparent; color: var(--aubergine);
}
.filter-btn:hover { background: rgba(133, 105, 150, 0.12); }
.filter-btn[aria-pressed="true"] { background: var(--aubergine); border-color: var(--aubergine); color: #fff; }
.filter-status { font-size: 0.9rem; color: var(--ink-soft); margin: -1rem 0 1.5rem; min-height: 1.5em; }

/* Category overview on work page */
.categories { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 3rem; }
.category { border-top: 2px solid var(--berry); padding-top: 1rem; }
.category h2 { font-size: var(--step-1); margin-bottom: 0.4rem; }
.category p { font-size: 0.94rem; color: var(--ink-soft); margin: 0; }
@media (max-width: 760px) { .categories { grid-template-columns: 1fr; } }

/* 8. CASE STUDY PAGES ---------------------------------------------------- */
.page-hero {
  background: linear-gradient(135deg, var(--aubergine) 0%, #4C3150 70%, #5E4570 100%);
  color: var(--on-dark); padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2.5rem, 6vw, 4.5rem);
  position: relative; overflow: hidden;
}
.page-hero h1 { color: #fff; font-size: var(--step-5); max-width: 18ch; }
.page-hero .lede { color: var(--on-dark-soft); max-width: 52ch; }
.page-hero .botanical { right: -30px; bottom: -40px; width: 260px; }
.breadcrumb { font-size: 0.85rem; margin-bottom: 1.6rem; color: var(--on-dark-soft); }
.breadcrumb a { color: var(--blush); }

.case { display: grid; grid-template-columns: 290px 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.case__aside { position: sticky; top: 100px; }
.facts { background: #FBF5F9; border-radius: var(--radius); padding: 1.6rem; margin: 0; }
.facts div + div { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--lilac-2); }
.facts dt { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--berry-deep); margin-bottom: 0.2rem; }
.facts dd { margin: 0; font-size: 0.95rem; }
.case__body { max-width: var(--measure); }
.case__body h2 { font-size: var(--step-3); margin-top: 2.8rem; }
.case__body h2:first-child { margin-top: 0; }
.case__body h3 { font-size: var(--step-1); margin-top: 1.8rem; margin-bottom: 0.5rem; font-family: var(--font-sans); font-weight: 600; letter-spacing: 0; color: var(--plum-deep); }
.case__body ul { padding-left: 1.2rem; }
.case__body li { margin-bottom: 0.45rem; }
.case__body li::marker { color: var(--berry); }
.toc { margin-top: 1.5rem; font-size: 0.9rem; }
.toc p { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.5rem; }
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc li { margin: 0.3rem 0; }
.toc a { text-decoration: none; color: var(--ink-soft); }
.toc a:hover { color: var(--berry-deep); text-decoration: underline; }
@media (max-width: 900px) {
  .case { grid-template-columns: 1fr; }
  .case__aside { position: static; }
  .toc { display: none; }
}

.pull {
  font-family: var(--font-serif); font-size: var(--step-2); line-height: 1.3; color: var(--aubergine);
  border-top: 1px solid var(--plum); border-bottom: 1px solid var(--plum); padding: 1.4rem 0; margin: 2.2rem 0;
}
.pull::before { content: "“"; color: var(--berry); }
.pull::after { content: "”"; color: var(--berry); }

/* Evidence: published items list */
.evidence { list-style: none; padding: 0 !important; margin: 1.2rem 0 0; display: grid; gap: 1rem; }
.evidence li { margin: 0 !important; }
.evidence a {
  display: grid; grid-template-columns: 1fr auto; gap: 0.3rem 1.2rem; align-items: center;
  padding: 1.2rem 1.4rem; background: #FBF5F9; border-radius: var(--radius); text-decoration: none; color: var(--ink);
  border: 1px solid transparent; transition: border-color 0.2s ease, background 0.2s ease;
}
.evidence a:hover { border-color: var(--plum); background: #fff; }
.evidence__title { font-family: var(--font-serif); font-size: 1.2rem; line-height: 1.3; color: var(--aubergine); }
.evidence__meta { grid-column: 1; font-size: 0.85rem; color: var(--ink-soft); }
.evidence__go { grid-column: 2; grid-row: 1 / span 2; color: var(--berry-deep); width: 20px; }

/* Instagram embeds */
.embeds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.embed-card { background: #FBF5F9; border-radius: var(--radius); padding: 1rem; display: flex; flex-direction: column; gap: 0.8rem; }
.embed-card .instagram-media { min-width: 0 !important; width: 100% !important; margin: 0 !important; }
.embed-card__caption { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }
.embed-card__caption strong { color: var(--aubergine); display: block; font-family: var(--font-serif); font-weight: 450; font-size: 1.1rem; }
@media (max-width: 700px) { .embeds { grid-template-columns: 1fr; } }

.skills-cloud { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skills-cloud li { margin: 0 !important; background: var(--aubergine); color: var(--on-dark); padding: 0.45rem 0.9rem; border-radius: 999px; font-size: 0.86rem; }

.case-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.case-nav a {
  display: block; padding: 1.5rem; border-radius: var(--radius); background: #FBF5F9; text-decoration: none; color: var(--aubergine);
}
.case-nav a:hover { background: #fff; box-shadow: var(--shadow); }
.case-nav span { display: block; font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--berry-deep); margin-bottom: 0.3rem; }
.case-nav strong { font-family: var(--font-serif); font-weight: 450; font-size: var(--step-1); }
.case-nav a:last-child { text-align: right; }
@media (max-width: 600px) { .case-nav { grid-template-columns: 1fr; } .case-nav a:last-child { text-align: left; } }

/* 9. WRITING LIST -------------------------------------------------------- */
.writing-group + .writing-group { margin-top: clamp(3rem, 7vw, 5rem); }
.writing-group__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 2rem; border-bottom: 2px solid var(--aubergine); padding-bottom: 0.8rem; margin-bottom: 0.5rem; }
.writing-group__head h2 { font-size: var(--step-3); margin: 0; }
.writing-group__head p { margin: 0; color: var(--ink-soft); font-size: 0.93rem; max-width: 52ch; }
.articles { list-style: none; margin: 0; padding: 0; }
.article { display: grid; grid-template-columns: 9rem 1fr; gap: 0.4rem 2rem; padding: 1.6rem 0; border-bottom: 1px solid var(--lilac-2); }
.article__date { font-size: 0.82rem; letter-spacing: 0.06em; color: var(--ink-soft); padding-top: 0.35rem; }
.article h3 { font-size: var(--step-2); margin: 0 0 0.4rem; }
.article h3 a { color: var(--aubergine); text-decoration: none; background-image: linear-gradient(var(--berry), var(--berry)); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size 0.3s ease; }
.article h3 a:hover { background-size: 100% 1px; }
.article p { margin: 0 0 0.5rem; color: var(--ink-soft); max-width: 62ch; }
.article__pub { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; color: var(--berry-deep); }
.ext-icon { display: inline-block; width: 0.8em; height: 0.8em; margin-left: 0.25em; vertical-align: -0.05em; }
@media (max-width: 640px) { .article { grid-template-columns: 1fr; } }

/* Home: compact writing list */
.writing-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--plum); }
.writing-mini li { list-style: none; padding: 1.5rem 1.5rem 1.5rem 0; }
.writing-mini li + li { padding-left: 1.5rem; border-left: 1px solid var(--lilac-2); }
.writing-mini a { text-decoration: none; color: var(--aubergine); font-family: var(--font-serif); font-size: 1.25rem; line-height: 1.3; display: block; margin: 0.4rem 0; }
.writing-mini a:hover { color: var(--berry-deep); text-decoration: underline; }
.writing-mini small { font-size: 0.8rem; color: var(--ink-soft); }
.writing-mini { padding: 0; }
@media (max-width: 760px) {
  .writing-mini { grid-template-columns: 1fr; }
  .writing-mini li, .writing-mini li + li { padding: 1.2rem 0; border-left: 0; border-bottom: 1px solid var(--lilac-2); }
}

/* Article pages (writing/*.html) */
.article-title { font-size: var(--step-4); max-width: 22ch; }
.article-meta { font-size: 0.85rem; letter-spacing: 0.06em; color: var(--on-dark-soft); margin: 1.4rem 0 0; }
.prose { font-size: 1.08rem; line-height: 1.8; }
.prose > * { max-width: 68ch; }
.prose h2 { font-size: var(--step-2); margin: 2.4rem 0 0.8rem; }
.prose figure { margin: 2rem 0; }
.prose figure img { border-radius: var(--radius); box-shadow: var(--shadow); }
.prose figcaption { font-size: 0.88rem; color: var(--ink-soft); margin-top: 0.7rem; font-style: italic; }
.prose > img { margin: 2rem 0; border-radius: var(--radius); }
.prose blockquote {
  margin: 2rem 0; padding: 0.2rem 0 0.2rem 1.4rem; border-left: 3px solid var(--berry);
  font-family: var(--font-serif); font-size: var(--step-1); line-height: 1.5; color: var(--aubergine);
}
.prose blockquote p { margin: 0; }
.prose .byline { font-size: 0.9rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--berry-deep); font-weight: 600; }
.figure-pair { display: grid; grid-template-columns: 1fr 1.6fr; gap: 1rem; align-items: center; }
.figure-pair img { width: 100%; height: 100%; object-fit: cover; }
.references { padding-left: 1.2rem; font-size: 0.92rem; line-height: 1.6; color: var(--ink-soft); }
.references li { margin-bottom: 0.7rem; overflow-wrap: anywhere; }
.article-origin { margin-top: 3rem; }
.prose .article-cover { margin: 0 0 2.5rem; max-width: none; }
.prose .article-cover img { width: 100%; box-shadow: var(--shadow); }
.article--thumb { grid-template-columns: 9rem 1fr 200px; align-items: start; }
.article__thumb img { width: 100%; border-radius: var(--radius); transition: transform 0.25s ease; }
.article__thumb:hover img { transform: translateY(-3px); }
@media (max-width: 760px) { .article--thumb { grid-template-columns: 1fr; } .article__thumb { order: -1; max-width: 320px; } }

/* About page photo */
.about-photo { justify-self: center; align-self: start; width: min(100%, 340px); }
.about-photo .hero__frame { aspect-ratio: 4 / 5; border-color: var(--plum); }
@media (max-width: 860px) { .about-photo { order: -1; width: min(70%, 280px); } }

/* About page timeline */
.timeline { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--plum); }
.timeline li { position: relative; padding: 0 0 2rem 1.8rem; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 0.45rem; width: 11px; height: 11px; border-radius: 50%; background: var(--berry); box-shadow: 0 0 0 4px var(--lilac); }
.timeline h3 { font-size: var(--step-1); margin: 0 0 0.2rem; }
.timeline .when { font-size: 0.82rem; letter-spacing: 0.08em; color: var(--ink-soft); display: block; margin-bottom: 0.4rem; }
.timeline p { margin: 0; font-size: 0.97rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.skill-groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem 2.5rem; }
.skill-groups h3 { font-size: var(--step-1); margin-bottom: 0.5rem; color: #fff; }
.skill-groups ul { padding-left: 1.1rem; margin: 0; color: var(--on-dark-soft); font-size: 0.96rem; }
.skill-groups li::marker { color: var(--blush); }
@media (max-width: 640px) { .skill-groups { grid-template-columns: 1fr; } }

/* 10. CONTACT BAND + FOOTER ---------------------------------------------- */
.connect {
  background: linear-gradient(120deg, var(--aubergine) 0%, #5A3558 60%, #7A3E6B 100%);
  color: var(--on-dark); position: relative; overflow: hidden;
}
.connect__grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.connect h2 { color: #fff; font-size: var(--step-4); }
.connect p { color: var(--on-dark-soft); max-width: 44ch; }
.connect .botanical { right: 38%; top: -20px; width: 200px; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.contact-list a, .contact-list .contact-item {
  display: flex; align-items: center; gap: 1rem; color: var(--on-dark); text-decoration: none; font-size: 1rem;
}
.contact-list a:hover span:last-child { text-decoration: underline; }
.contact-icon {
  flex: none; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(232, 199, 184, 0.55);
  display: grid; place-items: center; color: var(--blush);
}
.contact-icon svg { width: 20px; height: 20px; }
.contact-list small { display: block; color: var(--on-dark-soft); font-size: 0.82rem; }
.copy-btn {
  font: inherit; font-size: 0.78rem; background: none; border: 1px solid rgba(232,199,184,0.45); color: var(--blush);
  border-radius: 999px; padding: 0.25rem 0.7rem; cursor: pointer; margin-left: 0.3rem;
}
.copy-btn:hover { background: rgba(232,199,184,0.12); }
@media (max-width: 860px) { .connect__grid { grid-template-columns: 1fr; } .connect .botanical { display: none; } }

.site-footer { background: #2C1D2C; color: var(--on-dark-soft); padding-block: 2.5rem; font-size: 0.9rem; }
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem 2rem; }
.site-footer .brand__name { font-size: 1.4rem; }
.footer-nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.footer-nav a { color: var(--on-dark-soft); text-decoration: none; }
.footer-nav a:hover { color: #fff; text-decoration: underline; }
.footer-sign { font-family: var(--font-serif); font-style: italic; color: var(--blush); }
.footer-small { width: 100%; font-size: 0.8rem; opacity: 0.85; margin: 0; }

/* 11. UTILITIES, MOTION, PRINT ------------------------------------------ */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }

/* Hero depth + entrance (homepage). One orchestrated moment on load:
   headline flips up, portrait swings in, the butterfly flies in and lands.
   Final states are the elements' normal styles, so with reduced motion
   (animations off) everything simply appears in place. */
.hero__grid { perspective: 1400px; }
.hero h1 { transform-origin: 50% 100%; animation: flip-up 0.9s cubic-bezier(.2,.7,.2,1) 0.15s both; }
.hero h1 em { display: inline-block; transform-origin: 50% 100%; animation: flip-up 0.9s cubic-bezier(.2,.7,.2,1) 0.45s both; }
.hero__roles { animation: rise 0.7s ease 0.05s both; }
.hero__intro { animation: rise 0.8s ease 0.6s both; }
.hero .btn-row { animation: rise 0.8s ease 0.75s both; }
@keyframes flip-up { from { opacity: 0; transform: rotateX(-75deg) translateY(0.4em); } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

/* Portrait as a layered scene: layers sit at different depths and the
   whole group tilts toward the pointer (--tilt-x / --tilt-y set by main.js). */
.hero__portrait {
  transform-style: preserve-3d;
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 0.6s cubic-bezier(.2,.7,.2,1);
}
.hero__portrait figure { transform-style: preserve-3d; animation: swing-in 1.2s cubic-bezier(.2,.7,.2,1) 0.25s both; }
.hero__arch-line { transform: translateZ(-40px); animation: fade-in 1s ease 0.9s both; }
.hero__sign { transform: translateZ(70px) rotate(-3deg); animation: drop-in 0.8s cubic-bezier(.3,1.4,.5,1) 1.3s both; }
.hero__butterfly { transform-style: preserve-3d; transform: translateZ(110px); }
@keyframes swing-in { from { opacity: 0; transform: rotateY(-28deg) translateZ(-60px); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes drop-in { from { opacity: 0; transform: translateZ(70px) translateY(-24px) rotate(-9deg); } }

/* The butterfly: wings hinge on the body (rotateY) and the body is tipped
   back so the flap reads in depth. Fast flaps while flying in, then a slow
   resting open-and-close once it has landed on the arch. */
.fly {
  display: block; position: relative; width: 100%; aspect-ratio: 1;
  transform-style: preserve-3d; transform: rotateX(24deg) rotateZ(14deg);
  animation: fly-in 2.4s cubic-bezier(.35,.1,.25,1) 1s both, bob 4s ease-in-out 3.4s infinite;
}
.fly__wing, .fly__body { position: absolute; inset: 0; }
.fly__wing svg { width: 100%; height: 100%; fill: rgba(232, 199, 184, 0.28); }
.fly__wing--left { animation: flap-left 0.3s ease-in-out 0s 10 alternate, rest-left 2.2s ease-in-out 3.4s infinite; }
.fly__wing--right { animation: flap-right 0.3s ease-in-out 0s 10 alternate, rest-right 2.2s ease-in-out 3.4s infinite; }
.fly__body { transform: translateZ(1px); }
@keyframes flap-left { from { transform: rotateY(-8deg); } to { transform: rotateY(72deg); } }
@keyframes flap-right { from { transform: rotateY(8deg); } to { transform: rotateY(-72deg); } }
@keyframes rest-left { 0%, 60%, 100% { transform: rotateY(-4deg); } 80% { transform: rotateY(50deg); } }
@keyframes rest-right { 0%, 60%, 100% { transform: rotateY(4deg); } 80% { transform: rotateY(-50deg); } }
@keyframes fly-in {
  0%   { opacity: 0; transform: translate3d(-420px, 260px, 120px) rotateX(24deg) rotateZ(60deg) scale(0.6); }
  15%  { opacity: 1; }
  45%  { transform: translate3d(-230px, 40px, 160px) rotateX(16deg) rotateZ(30deg) scale(0.9); }
  75%  { transform: translate3d(-60px, -40px, 60px) rotateX(28deg) rotateZ(4deg) scale(1.05); }
  100% { transform: translate3d(0, 0, 0) rotateX(24deg) rotateZ(14deg) scale(1); }
}
@keyframes bob {
  0%, 100% { transform: translate3d(0, 0, 0) rotateX(24deg) rotateZ(14deg); }
  50%      { transform: translate3d(0, -6px, 8px) rotateX(30deg) rotateZ(10deg); }
}

/* Inner pages: the same entrance for every page header — headline flips up,
   the rest rises in — and the 3D butterfly (added by main.js) lands on the sprig. */
.page-hero .wrap, .page-hero .wrap--narrow { position: relative; z-index: 1; perspective: 1200px; }
.page-hero .breadcrumb, .page-hero .kicker { animation: rise 0.7s ease 0.05s both; }
.page-hero h1 { transform-origin: 50% 100%; animation: flip-up 0.9s cubic-bezier(.2,.7,.2,1) 0.15s both; }
.page-hero h1 em { display: inline-block; transform-origin: 50% 100%; animation: flip-up 0.9s cubic-bezier(.2,.7,.2,1) 0.4s both; }
.page-hero .lede { animation: rise 0.8s ease 0.5s both; }
.page-hero .article-meta { animation: rise 0.8s ease 0.65s both; }
.page-hero__butterfly {
  /* Pinned to the same corner as the sprig (.page-hero .botanical) so it lands on an upper leaf */
  position: absolute; z-index: 0; right: 58px; bottom: 262px;
  width: 64px; color: var(--blush); perspective: 700px; pointer-events: none;
}
@media (max-width: 700px) { .page-hero__butterfly { width: 44px; right: 1.2rem; bottom: 1rem; } }

/* "Hats over time" (about page; main.js section 9). A sticker cut-out of my
   head: hats pop out of the torn top one at a time, the title sits on a torn
   paper label under the chin, and the eyes follow the pointer. The eyes are
   three layers under the photo: the whites, then two irises that main.js
   slides around, showing through holes cut in the photo. */
.hats { position: relative; width: min(100%, 420px); margin: 2.2rem 0 2.4rem; --mono: "Space Mono", ui-monospace, Menlo, monospace; }
.hats__stage { position: relative; padding-top: 40%; }
.hats__head { position: relative; z-index: 2; aspect-ratio: 719 / 654; filter: drop-shadow(0 18px 22px rgba(56, 38, 56, 0.28)); }
.hats__head img { position: absolute; display: block; }
.hats__whites, .hats__face, .hats__smile { inset: 0; width: 100%; height: 100%; }
.hats__iris { width: 5.433%; height: auto; will-change: transform; transform: translate(var(--ex, 0%), var(--ey, 0%)); }
.hats__iris--left { left: 40.27%; top: 41.144%; }
.hats__iris--right { left: 67.001%; top: 46.832%; }
.hats__smile { opacity: 0; }
.hats__whites, .hats__iris, .hats__face, .hats__smile { transition: opacity 0.18s ease; }
.hats__stage.is-smiling .hats__smile { opacity: 1; }
.hats__stage.is-smiling .hats__whites, .hats__stage.is-smiling .hats__iris, .hats__stage.is-smiling .hats__face { opacity: 0; }
.hats__stage.is-smiling .hats__head { animation: head-bob 0.45s cubic-bezier(.3,1.6,.5,1); }
@keyframes head-bob { 40% { transform: scale(1.04) rotate(-2deg); } }

/* Hats sit behind the head, so they appear to come out of the torn top */
/* Sized so each hat's brim tucks just behind the torn top of the head */
.hats__pop { position: absolute; z-index: 1; top: -3%; left: 10%; width: 80%; aspect-ratio: 3 / 2; }
.hat { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; opacity: 0; transform-origin: 50% 90%; }
.hat:first-child { opacity: 1; } /* without JavaScript, the first hat just sits there */
.js .hat:first-child { opacity: 0; }
.js .hat.is-on { opacity: 1; animation: hat-pop 0.85s cubic-bezier(.25,1.35,.45,1) both; transform: rotate(var(--tilt, -6deg)); }
.js .hat.is-leaving { animation: hat-leave 0.6s cubic-bezier(.5,0,.75,0) both; }
.hat[data-hat="cap"] { --tilt: -8deg; }
.hat[data-hat="witch"] { --tilt: 7deg; }
.hat[data-hat="beanie"] { --tilt: -4deg; }
.hat[data-hat="sunhat"] { --tilt: -10deg; }
.hat[data-hat="beret"] { --tilt: 9deg; }
.hat[data-hat="pirate"] { --tilt: -5deg; }
@keyframes hat-pop {
  0%   { opacity: 0; transform: translateY(80%) scale(0.6) rotate(0deg); }
  25%  { opacity: 1; }
  60%  { transform: translateY(-16%) scale(1.06) rotate(calc(var(--tilt) * -1.4)); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(var(--tilt)); }
}
@keyframes hat-leave {
  from { opacity: 1; transform: rotate(var(--tilt)); }
  to   { opacity: 0; transform: translate(40%, -70%) rotate(35deg) scale(0.8); }
}

/* Silver stars around the head */
.hats__star { position: absolute; z-index: 3; width: 34px; height: 34px; overflow: visible; filter: drop-shadow(0 4px 4px rgba(56, 38, 56, 0.25)); animation: twinkle 5s ease-in-out infinite; }
.hats__star--a { left: 2%; top: 30%; width: 30px; }
.hats__star--b { right: 0; top: 52%; animation-delay: -1.7s; }
.hats__star--c { left: 10%; bottom: 6%; width: 24px; animation-delay: -3.2s; }
@keyframes twinkle { 0%, 100% { transform: rotate(-8deg) scale(1); } 50% { transform: rotate(10deg) scale(0.86); } }

/* Titles on a torn paper label under the chin */
.hats__list { list-style: none; margin: 0.6rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.hats__list li { font-size: 0.9rem; color: var(--ink-soft); line-height: 1.4; }
.hats__list strong { display: block; font-family: var(--mono); font-weight: 700; font-size: 1.02rem; letter-spacing: 0.02em; text-transform: uppercase; color: var(--aubergine); }
.js .hats__list { position: relative; z-index: 3; margin: -9% auto 0; width: 82%; display: grid; place-items: center; }
.js .hats__list li {
  grid-area: 1 / 1; text-align: center; padding: 0.9rem 1.4rem 1rem; background: #FFFCF8;
  clip-path: polygon(0% 8%, 6% 2%, 14% 6%, 23% 0%, 33% 5%, 44% 1%, 55% 6%, 66% 0%, 76% 5%, 86% 1%, 94% 6%, 100% 2%, 98% 30%, 100% 55%, 97% 80%, 100% 97%, 91% 93%, 80% 100%, 70% 95%, 58% 100%, 47% 94%, 36% 100%, 25% 95%, 14% 100%, 6% 94%, 0% 98%, 2% 70%, 0% 45%, 3% 22%);
  filter: drop-shadow(0 8px 10px rgba(56, 38, 56, 0.18));
  opacity: 0; visibility: hidden; transform: rotate(-2deg) scale(0.6);
  transition: opacity 0.25s ease, transform 0.45s cubic-bezier(.3,1.6,.5,1), visibility 0s 0.25s;
}
.js .hats__list li:nth-child(even) { transform: rotate(2deg) scale(0.6); }
.js .hats__list li.is-current { opacity: 1; visibility: visible; transform: rotate(-2deg) scale(1); transition-delay: 0.25s, 0.25s, 0s; }
.js .hats__list li.is-current:nth-child(even) { transform: rotate(2deg) scale(1); }
.hats__list span { display: block; font-size: 0.82rem; margin-top: 0.15rem; }

/* Round arrow buttons either side of the head */
.hats__btn {
  position: absolute; z-index: 4; top: 58%; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: var(--aubergine);
  background: rgba(255, 252, 248, 0.85); border: 1px solid var(--plum);
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.hats__btn:hover { background: #fff; transform: scale(1.06); }
.hats__btn svg { width: 18px; height: 18px; }
.hats__btn--prev { left: -12px; }
.hats__btn--next { right: -12px; }
@media (max-width: 860px) { .hats { margin-inline: auto; } }
@media (max-width: 420px) { .hats__btn { width: 42px; height: 42px; } .hats__btn--prev { left: -4px; } .hats__btn--next { right: -4px; } }

/* Ambient butterflies (main.js, section 8). A fixed layer under the header;
   main.js moves each .wanderer, CSS handles the wings: steady flapping in
   flight, a slow open-and-close while resting. */
.butterfly-layer { position: fixed; inset: 0; z-index: 40; pointer-events: none; overflow: hidden; perspective: 900px; }
.wanderer { position: absolute; left: 0; top: 0; transform-style: preserve-3d; will-change: transform; opacity: 0; transition: opacity 1.5s ease; }
.wanderer.is-on { opacity: 0.85; }
.fly.fly--free { animation: none; transform: rotateX(35deg); }
.fly--free .fly__wing svg { fill: currentColor; fill-opacity: 0.2; }
.fly--free .fly__wing--left { animation: flap-left 0.34s ease-in-out infinite alternate; }
.fly--free .fly__wing--right { animation: flap-right 0.34s ease-in-out infinite alternate; }
.fly--free.is-resting .fly__wing--left { animation: rest-left 2.8s ease-in-out infinite; }
.fly--free.is-resting .fly__wing--right { animation: rest-right 2.8s ease-in-out infinite; }
@media print { .butterfly-layer { display: none; } }

/* 3D tilt toward the pointer (main.js sets --rx/--ry, and --mx/--my for the
   light on work cards). Pointer devices only. */
.is-tilting,
.js .reveal.is-tilting { /* beats the .reveal transform/transition below */
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px);
  box-shadow: var(--shadow); transition: transform 0.12s ease-out, box-shadow 0.25s ease;
}
.about-photo.is-tilting, .about-preview__media.is-tilting, .article-cover.is-tilting { box-shadow: none; }
.about-photo, .about-preview__media, .article-cover, .article__thumb, .case-nav a, .evidence a { transition: transform 0.5s cubic-bezier(.2,.7,.2,1); }
.js .about-preview__media.reveal { transition: opacity 0.7s ease, transform 0.7s ease; }
.article__thumb { display: block; border-radius: var(--radius); }
.article__thumb:hover img { transform: none; }
.work-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.22), transparent 60%);
  opacity: 0; transition: opacity 0.3s ease;
}
.work-card.is-tilting::before { opacity: 1; }

.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .connect, .site-footer, .filters, .skip-link { display: none !important; }
  body { background: #fff; }
  .hero, .page-hero { background: none; color: #000; }
  .hero h1, .page-hero h1 { color: #000; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}
