/* Home from Figma "mirandaissocool.com (2.0)" → Home — Dark Mode (node 472:304), on its 1440px frame.
   The site is dark only.
   index.html zooms the page out by --s so the whole unicorn fits in the window (never zooms
   in). The page fills any width: content keeps 120px side margins and the unicorn and its
   small icons stay pinned to the right edge (--off is half the extra width). */

:root {
  --bg: #141419;
  --ink: #f4f1eb;
  --ink-50: rgba(244, 241, 235, 0.5);
  --ink-soft: rgba(244, 241, 235, 0.72);   /* footer links, dates */
  --white: #ffffff;                        /* nav links, Play, media tabs */
  --card: #292930;
  --line: rgba(244, 241, 235, 0.22);       /* footer rule, list rules */
  color-scheme: dark;
  --pink-lt: #ffcce8;
  --pink: #fc81c5;
  --orange: #fe7814;           /* unicorn orange: hover colour for header links and icons */
  --s: 1;
  --off: 0px;                 /* (window − 1440) / 2, from −55px up; set by index.html */
  --pad: calc(120px + min(0px, var(--off)));   /* 120px sides (Home and About), giving back up to 55px on narrow windows */
  --font-display: "Brawler", Georgia, serif;
  --font-body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --font-welcome: "Mulish", "Instrument Sans", Arial, sans-serif;   /* Home's welcome text */

  /* Type scale, from Figma variables (phones get their own, in the max-width: 800px block) */
  --fs-display: 42px;   /* headline (Figma "header") */
  --fs-heading: 24px;   /* About section titles (Figma "smaller header") */
  --fs-title: 18px;     /* Work / Play, media tabs (Figma "larger text") */
  --fs-text: 15px;      /* body text: intro, lists, captions (Figma "text") */
  --fs-welcome: 18px;   /* Home's welcome text ("Hi I'm Miranda…") */
  --fs-footer: 15px;    /* nav and footer text (Figma "text") */
  }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
/* Always reserve the scrollbar so the page width index.html measures doesn't change after load. */
html { overflow-y: scroll; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); overflow-x: hidden; }

/* Thin, greyscale text smoothing like Figma's; the browser default on macOS draws text heavier. */
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
img { display: block; max-width: none; }
a { color: inherit; text-decoration: none; }
p, h1, h2 { margin: 0; font-weight: 400; }
.dim { color: var(--ink-50); }

.page {
  position: relative;
  width: var(--page-w, 1440px);
  zoom: var(--s);
  padding: 44px 0 44px;   /* 44px above the nav (Figma has 64; brought up), 44px under the footer */
  display: flex;
  flex-direction: column;
  gap: 50px;
}

/* ---- Home spacing (Figma "Home — Dark Mode" 472:304) -------------------
   hero → Work and Play → footer are 100px apart (the page's 50px gap + 50). */
.home .projects, .home .footer { margin-top: 50px; }
.nav { gap: 24px; } /* Work · About · Contact sit 24px apart (Figma "smaller header" spacing) */

/* ---- header ---------------------------------------------------------- */
/* the unicorn (Figma "Nav Bar" 567:525), drawn in the ink colour */
.logo { display: block; width: 40px; height: 29.024px; color: var(--ink); transition: color 0.2s ease; }
.logo-mark {
  display: block; width: 100%; height: 100%; background: currentColor;
  -webkit-mask: url("assets/about/logo-unicorn.svg") center / contain no-repeat;
  mask: url("assets/about/logo-unicorn.svg") center / contain no-repeat;
}
/* hover: the unicorn hops up a little. Only the drawing moves, so the link stays under the
   pointer and the hover never flickers. */
.logo-mark { transition: transform 0.2s ease; }
.logo:hover .logo-mark { transform: translateY(-4px); }

.home .logo { display: none; } /* Home has its headline there instead; the logo shows on phones */
.top { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; padding: 0 var(--pad); }
.hello { width: 514px; } /* 428px at the old 35px headline, scaled with it so the lines break the same */
.hello h1 { font: 400 var(--fs-display)/normal var(--font-display); }

.nav { display: flex; align-items: center; font-size: var(--fs-footer); line-height: normal; }
/* The link itself never moves (so hover can't flicker off); its text lifts instead. The 8px
   padding (cancelled by the margin) gives a taller, easier hover area. */
.nav a { color: var(--white); transition: color 0.2s ease; display: inline-flex; flex-direction: column; align-items: center; padding: 8px 0; margin: -8px 0; }
.nav a > span { transition: transform 0.2s ease; }
/* Instrument Sans Medium on hover, while pressed, and for the current page (Work).
   The hidden medium-weight copy reserves the wider width so the nav doesn't jiggle. */
.nav a::after { content: attr(data-label); font-weight: 500; height: 0; overflow: hidden; visibility: hidden; pointer-events: none; }
.nav a:hover, .nav a:active, .nav a:focus-visible, .nav a[aria-current="page"] { font-weight: 500; }
.nav a[aria-current="page"]:hover > span { transform: none; }
.nav a:hover > span { transform: translateY(-2px); } /* lifts with the tap sound in sfx.js */
/* hover (or tab to) one nav item and the others blur, so only that one stays sharp */
.nav > a, .nav > .contact { transition: color 0.2s ease, filter 0.3s ease; }
.nav:has(> :hover, > :focus-visible, :focus-visible) > :not(:hover, :focus-visible, :has(:focus-visible)) { filter: blur(2.5px); }
/* on About, hovering the unicorn blurs the whole nav the same way */
.top:has(.logo:hover, .logo:focus-visible) .nav > * { filter: blur(2.5px); }

/* Home's About link (Figma "Header Update" 681:1952, component 681:1974): a round 40px user icon on
   a soft white-to-pink glass, which opens into an "About" pill on hover */
.nav a.about-pill {
  flex-direction: row; gap: 0; height: 40px; padding: 8.333px; margin: 0; border-radius: 45px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), rgba(252, 129, 197, 0.2));
  font: 400 var(--fs-title)/1 var(--font-welcome); color: var(--white); white-space: nowrap; overflow: hidden;
  transition: gap 0.3s cubic-bezier(0.22, 1, 0.36, 1), padding 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav a.about-pill::after { content: none; }
.about-pill img { display: block; flex: none; width: 23.333px; height: 23.333px; }
.about-label { max-width: 0; opacity: 0; transition: max-width 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease; }
.nav a.about-pill:is(:hover, :focus-visible) { gap: 5px; padding-right: 16.667px; padding-left: 13px; font-weight: 400; }
.about-pill:is(:hover, :focus-visible) .about-label { max-width: 70px; opacity: 1; }
.nav a.about-pill:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }

/* ---- Button (Figma component "Button", node 349:8) ----------------------------
   A gradient pill with a 2px 50%-white stroke, a soft inner highlight on top of the
   label, and a coloured glow. Figma strokes sit inside the shape, so the gradient runs
   under the stroke and the stroke reads as a pale tint of the gradient. */
.btn {
  --btn-from: #d1d1d1;   /* bottom of the gradient */
  --btn-to: #ffffff;     /* top */
  --btn-glow: #d9d9d9;
  --btn-ink: #505050;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 27px;
  background: linear-gradient(to top, var(--btn-from), var(--btn-to)) border-box;
  box-shadow: 0 1px 12.75px var(--btn-glow);   /* the glow; box-shadow follows the rounded corners in every browser */
  color: var(--btn-ink);
  font: 400 20px/normal var(--font-body);
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.6s ease;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 27px;
  pointer-events: none;
}
.btn::after { box-shadow: inset 9px 4px 7px rgba(255, 255, 255, 0.25); }
.btn:hover { transform: translateY(-1px); }
.contact:hover .contact-toggle { transform: translateY(-2px); } /* hover on the still wrapper, lift the button */
/* Contact's pink glow is hidden at rest and fades in slowly on hover */
.contact-toggle { box-shadow: 0 1px 12.75px transparent; }
.contact:hover .contact-toggle, .contact-toggle:focus-visible { box-shadow: 0 1px 12.75px var(--btn-glow); }
.btn--pink   { --btn-from: #fc81c5; --btn-to: #ffcce8; --btn-glow: #ffcce8; --btn-ink: #fff; }
.btn--green  { --btn-from: #b6ff00; --btn-to: #ffffff; --btn-glow: #b6ff00; --btn-ink: #35613b; }
.btn--orange { --btn-from: #fea662; --btn-to: #ffd683; --btn-glow: #ffd683; --btn-ink: #fff; }
.btn--purple { --btn-from: #9977fe; --btn-to: #e0d6fe; --btn-glow: #e0d6fe; --btn-ink: #fff; }
/* Figma nav bar (567:525): Contact hugs its 14px label with 5px top / 6px bottom / 11px side padding + 2px border */
.contact-toggle { padding: 5px 11px 6px; font-size: inherit; line-height: inherit; }
.btn { cursor: pointer; }
.btn, .btn:hover { color: var(--btn-ink); }

/* ---- Contact → "Email Copied" (Figma 467:382) -------------------------------
   Clicking Contact copies the email and the button itself turns into the green Email Copied
   pill (white → #b6ff00 gradient, white stroke, lime glow, mail icon). contact.js eases the
   width between the two labels and turns it back after a few seconds, on a click elsewhere,
   or on Escape. */
.contact { position: relative; display: flex; }
.contact-toggle { flex: none; overflow: hidden; white-space: nowrap; transition: transform 0.2s ease, box-shadow 0.6s ease, width 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.contact-toggle .copied-label { display: none; align-items: center; gap: 10px; }
.contact-toggle.is-copied { --btn-from: #b6ff00; --btn-to: #ffffff; --btn-glow: #b6ff00; --btn-ink: #35613b; border-color: #fff; }
.contact-toggle.is-copied, .contact:hover .contact-toggle.is-copied { box-shadow: 0 1px 12.75px var(--btn-glow); }
.contact-toggle.is-copied .contact-label { display: none; }
.contact-toggle.is-copied .copied-label { display: inline-flex; }
.contact-toggle .mail {
  flex: none;
  width: 18px;
  height: 19px;
  background: currentColor;
  -webkit-mask: url("assets/contact/mail-green.svg") 0 0 / 18px 19px no-repeat;
  mask: url("assets/contact/mail-green.svg") 0 0 / 18px 19px no-repeat;
}

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- hero: welcome text, gradient, unicorn ------------------------------ */
/* The unicorn pokes 95px up into the header row. */
.hero { position: relative; height: 435px; margin-top: 7px; } /* 57px below the header row */
.welcome { position: absolute; left: var(--pad); bottom: 0; z-index: 1; width: 448px; display: flex; flex-direction: column; gap: 25px; } /* 348px at 14px text, scaled with it to 18px */
.welcome-text { font-family: var(--font-welcome); font-size: var(--fs-welcome); line-height: normal; display: flex; flex-direction: column; gap: 1lh; } /* one blank line, as in Figma */

/* ---- small things (Figma "small thingz", Header Update 681:1627): the speaker (component
   640:5568) and the shooting star (681:1990), 30px, at 50%, in a row above the welcome text.
   Each icon's other variant is its hover state. ---- */
.small-things { display: flex; align-items: center; gap: 40.5px; height: 30px; }
.shooting-star, .sound {
  position: relative; display: block; width: 30px; height: 30px; padding: 0; border: 0; background: none;
  cursor: pointer; opacity: 0.5; transition: opacity 0.2s ease;
}
.shooting-star img, .sound img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; transition: transform 0.2s ease; }
.shooting-star .icon-alt, .sound .icon-alt { visibility: hidden; }
/* hover (or tab to) an icon: it shows its other variant at full opacity, lifting a little with the
   tap sound (sfx.js) */
.shooting-star:is(:hover, :focus-visible), .sound:is(:hover, :focus-visible) { opacity: 1; }
.shooting-star:is(:hover, :focus-visible) img, .sound:is(:hover, :focus-visible) img { transform: translateY(-2px); }
.shooting-star:is(:hover, :focus-visible) .icon-default, .sound:is(:hover, :focus-visible) .icon-default { visibility: hidden; }
.shooting-star:is(:hover, :focus-visible) .icon-alt, .sound:is(:hover, :focus-visible) .icon-alt { visibility: visible; }
.shooting-star:focus-visible, .sound:focus-visible { outline: 2px solid var(--pink); outline-offset: 4px; border-radius: 4px; }
/* switched on: the star is filled (glimmer cursor on, glimmer-cursor.js) and the speaker is
   crossed out (muted, sfx.js); hovering then previews the other look */
.shooting-star[aria-pressed="true"], .sound[aria-pressed="true"] { opacity: 1; }
.shooting-star[aria-pressed="true"] .icon-default, .sound[aria-pressed="true"] .icon-default { visibility: hidden; }
.shooting-star[aria-pressed="true"] .icon-alt, .sound[aria-pressed="true"] .icon-alt { visibility: visible; }
.sound[aria-pressed="true"]:is(:hover, :focus-visible) .icon-default { visibility: visible; }
.sound[aria-pressed="true"]:is(:hover, :focus-visible) .icon-alt { visibility: hidden; }
/* The gradient (Figma component "gradient" 567:582, placed as 567:583 in Home 472:304): a
   1821.7 × 756 box at -382, -161 from the hero's top-left. The exported SVG overhangs that box
   (Figma's inset -7.39% top, -3.2% right, -9.6% bottom) to leave room for the blur. Its tails run
   on past the unicorn's feet and fade out behind the Work cards. */
.gradient { position: absolute; left: calc(-382px + min(0px, var(--off))); top: -161px; width: 1821.725px; height: 756px; pointer-events: none; }
.gradient img { position: absolute; left: 0; top: -55.87px; width: 1880.06px; height: 884.484px; max-width: none; }

/* On load the gradient sweeps in from its top-left tip, fading up as it goes. */
@keyframes ribbon-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ribbon-sweep { from { -webkit-mask-position: 100% 0; mask-position: 100% 0; } to { -webkit-mask-position: 0 0; mask-position: 0 0; } }
.gradient img {
  -webkit-mask: linear-gradient(90deg, #000 45%, transparent 55%) 0 0 / 250% 100% no-repeat;
  mask: linear-gradient(90deg, #000 45%, transparent 55%) 0 0 / 250% 100% no-repeat;
  animation: ribbon-fade 2s ease both, ribbon-sweep 3s cubic-bezier(0.45, 0, 0.25, 1) both;
}

/* header glimmers (header-glimmer.js): tiny white twinkles that appear in small groups at random
   spots over the header, each with a soft glow. The layer reaches up past the nav row. */
.glimmers { position: absolute; left: 0; right: 0; top: -150px; bottom: 0; z-index: 4; pointer-events: none; } /* above the unicorn (3) */
.glimmer { position: absolute; display: block; color: #fff; opacity: 0;
  filter: drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 4px rgba(255, 230, 250, 0.85)); }
.glimmer::before { content: ""; position: absolute; inset: -30%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 245, 252, 0.55), rgba(255, 204, 232, 0.14) 45%, transparent); }
.glimmer svg { position: relative; display: block; width: 100%; height: 100%; overflow: visible; fill: currentColor; }
/* the glimmer cursor (glimmer-cursor.js): the pointer becomes a twinkle and leaves a trail of glimmers */
html.glimmer-cursor, html.glimmer-cursor * { cursor: url("assets/header/glimmer-cursor.svg") 14 14, auto !important; }
.cursor-glimmers { position: fixed; inset: 0; z-index: 1000; pointer-events: none; overflow: hidden; }
/* the spray of glimmers from the unicorn's horn (horn-sparkle.js), above the unicorn */
.horn-glimmers { position: absolute; z-index: 2; inset: 0; pointer-events: none; }

/* Figma size (695 × 500) scaled up 6% at the request of the designer, bottom-right anchored.
   It sits above the header row so its horn can be hovered and clicked; only the horn takes the pointer. */
.unicorn { position: absolute; z-index: 3; right: 0; top: -95.107px; width: 736.703px; height: 530.107px; pointer-events: none; }
/* Pixel Bloom shader (main.js), masked to the Figma unicorn shape (node 439:1437) */
.unicorn-bloom {
  position: relative; z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  -webkit-mask: url("assets/unicorn-mask.svg") 0 0 / 100% 100% no-repeat;
  mask: url("assets/unicorn-mask.svg") 0 0 / 100% 100% no-repeat;
}
/* a saved frame of the shader sits underneath: it shows at once while the page loads, and stays
   if WebGL is missing or the shader fails (main.js). The shader draws at 1 pixel per CSS px, so
   keep its pixel blocks crisp when the browser scales it up on retina screens. */
.unicorn-bloom { background: url("assets/unicorn-still.jpg") 0 0 / 100% 100% no-repeat; image-rendering: pixelated; }
/* the horn's glow (horn-sparkle.js), on a see-through canvas behind the unicorn that reaches 380px
   up and left; being behind, it lights the sky around the horn and never tints the unicorn */
.unicorn-fx { position: absolute; z-index: 0; left: -380px; top: -380px; width: calc(100% + 380px); height: calc(100% + 380px); display: block; }
/* the horn: hovering or clicking it makes it glow and shoot sparkles. Cut to the horn's triangle
   (8.3,0 → 136.3,94.1 → 97.5,123.4 in the unicorn's 695 × 500.1). */
.unicorn-horn {
  position: absolute; z-index: 2; left: 1.1915%; top: 0; width: 18.42%; height: 24.669%;
  padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto;
  clip-path: polygon(0 0, 100% 76.29%, 69.67% 100%);
}
.unicorn-horn:focus-visible { outline: none; } /* focus shows as the horn's own glow (horn-sparkle.js) */

/* ---- projects ------------------------------------------------------------ */
.projects { padding: 0 var(--pad); display: flex; flex-direction: column; gap: 100px; } /* Work → Play: 100px */
.projects { position: relative; z-index: 1; } /* above the gradient's tail */
.work { display: flex; flex-direction: column; }
.section-title { font-family: var(--font-display); font-size: var(--fs-title); line-height: normal; } /* Work / Play in Brawler */
/* Work / Play toggle (Figma "Work" 567:784, "Play" 567:992): a small filled triangle 20px before
   the title. Open: the triangle points down and title and triangle are at 50%. Closed: it points
   right and both are full white. toggle.js flips aria-expanded. */
.section-toggle {
  display: flex; align-items: center; gap: 20px; padding: 0; border: 0; background: none;
  font: inherit; color: var(--white); cursor: pointer;
}
.section-toggle { transition: color 0.3s ease; }
.section-toggle[aria-expanded="true"] { color: var(--ink-50); }
.section-toggle:hover { color: var(--white); }
.section-toggle:focus-visible { outline: 2px solid var(--pink); outline-offset: 4px; border-radius: 2px; }
.caret { width: 12px; height: 12px; display: flex; align-items: center; justify-content: center; }
.caret > span {
  flex: none; width: 10px; height: 12px; background: var(--white);
  -webkit-mask: url("assets/triangle.svg") 0 0 / 100% 100% no-repeat; mask: url("assets/triangle.svg") 0 0 / 100% 100% no-repeat;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.3s ease;
}
[aria-expanded="true"] > .caret > span { transform: rotate(90deg); background: rgba(255, 255, 255, 0.5); }
.section-toggle:hover .caret > span { background: var(--white); }

/* A fold opens and shuts its contents smoothly: the grid row eases between 0 and the content's full
   height. Used by Work / Play here and the award photos on About. */
.fold { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease; }
.fold-inner { min-height: 0; overflow: hidden; }
[aria-expanded="false"] + .fold, :has(> [aria-expanded="false"]) + .fold { grid-template-rows: 0fr; opacity: 0; }
.work .fold-inner > .gallery { margin-top: 25px; }
/* once Work / Play has finished opening, stop clipping, so the hover text under the bottom row of
   cards can show below the fold */
@keyframes unclip { to { overflow: visible; } }
.work [aria-expanded="true"] + .fold > .fold-inner, .work :has(> [aria-expanded="true"]) + .fold > .fold-inner { animation: unclip 0s 0.45s forwards; } /* heading → cards: 25px, and nothing under a closed title */

.gallery { display: grid; grid-template-columns: 1fr 1fr; column-gap: 50px; row-gap: 50px; } /* 575px cards at 1440 */
.card { aspect-ratio: 552 / 331.2; min-height: 0; border-radius: 5.816px; }
.art { background: var(--card); } /* Figma "project card" */

/* ---- project cards (Figma "Work" grid 577:3173) -------------------------------------------
   Each card is drawn from its Figma layers on a 575 × 345 frame. Every size below is written in
   --u, 1/575 of the card's width, so the art scales with the card at any window size.
   Fonts Figma uses that the web doesn't have are stood in for: SF Pro → the system font,
   GT Standard → Instrument Sans, PP Editorial New → Newsreader. Common Ground's Modesto
   lettering is the Figma text exported as outlines (cg-wordmark.svg).
   Figma's Glass effect (the guide pill, Zinnia's "Today, you feel" card) has no CSS equivalent;
   it's drawn as a backdrop blur plus a light rim, lit from the top left (light angle -45°). */
.card { position: relative; display: block; container-type: inline-size; }
.art { position: absolute; inset: 0; --u: calc(100cqw / 575); overflow: hidden; border-radius: inherit; }
.art img { position: absolute; display: block; max-width: none; }
.art .fit { object-fit: cover; }

/* guide! (640:6458) */
.card--guide > .art { background: #292930; }
.guide-pill {
  position: absolute; left: 19.82%; right: -42.63%; top: calc(50% + calc(0.5 * var(--u))); transform: translateY(-50%);
  display: flex; align-items: center; gap: calc(27.764 * var(--u)); padding: calc(20 * var(--u)) calc(49 * var(--u)); border-radius: calc(79 * var(--u)); background: rgba(0, 0, 0, 0.2);
  -webkit-backdrop-filter: blur(calc(4 * var(--u))); backdrop-filter: blur(calc(4 * var(--u)));
}
/* glass rim: a 1px gradient border, brightest along the top-left */
.guide-pill::before, .z-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  padding: max(1px, calc(1.2 * var(--u)));
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.06) 45%, rgba(255, 255, 255, 0.04) 60%, rgba(255, 255, 255, 0.22));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.guide-pill img { position: static; width: calc(46 * var(--u)); height: calc(46 * var(--u)); flex: none; }
.guide-pill span { width: calc(212 * var(--u)); flex: none; font: 400 calc(38.87 * var(--u))/normal -apple-system, BlinkMacSystemFont, "SF Pro", "Helvetica Neue", Arial, sans-serif; color: #fff; white-space: nowrap; }

/* rideshare (640:6477) */
.card--rideshare > .art { background: linear-gradient(180deg, #02437b 0%, #628cb6 34.615%, #ffc39f 87.019%, #fe8201 100%); }
.card--rideshare .phone-a { left: 13.33%; top: 28.07%; width: 32.88%; height: 112.98%; }
.card--rideshare .phone-b { left: 55.79%; top: -38.89%; width: 32.88%; height: 112.98%; }

/* commonground (640:6488) */
.card--commonground > .art { background: #f54f58; }
.cg-a { left: 40.3%; top: 25.73%; width: 10.24%; height: 21.66%; }
.cg-b { left: 49.97%; top: 22.75%; width: 9.6%; height: 21.65%; transform: scaleX(-1); }
.cg-word { left: calc(166.557 * var(--u)); top: calc(173.787 * var(--u)); width: calc(232 * var(--u)); height: calc(85 * var(--u)); }

/* tiktok effect house (653:1484) */
.card--tiktok > .art { background: #ededed; }
.tt-image { left: calc(-42 * var(--u)); top: calc(103 * var(--u)); width: calc(161 * var(--u)); height: calc(161 * var(--u)); border-radius: calc(11.365 * var(--u)); mix-blend-mode: hard-light; }
.tt-logo { left: calc(calc(212.43 * var(--u)) + calc(16.374 * var(--u))); top: calc(calc(195.43 * var(--u)) + calc(16.374 * var(--u))); width: calc(147.389 * var(--u)); height: calc(147.389 * var(--u)); border-radius: calc(16.906 * var(--u)); transform: rotate(14.79deg); mix-blend-mode: hard-light; }
.tt-glow { position: absolute; opacity: 0.6; filter: blur(calc(52.258 * var(--u))); }
.tt-glow:nth-of-type(1) { inset: 62.91% 37.41% -20.15% -2.18%; background: rgba(255, 46, 158, 0.5); transform: scaleX(-1) rotate(4.75deg); }
.tt-glow:nth-of-type(2) { inset: 47.95% 84.2% 26.74% -3.86%; background: rgba(255, 169, 94, 0.5); }
.tt-glow:nth-of-type(3) { inset: 52.97% 69.68% 25.77% 17.56%; background: rgba(255, 72, 72, 0.5); }
.tt-glow:nth-of-type(4) { inset: 76.59% -1.6% -30.56% 40.3%; background: rgba(217, 78, 255, 0.5); transform: scaleX(-1) rotate(10.65deg); }
.tt-phone { left: 13.16%; top: 13.74%; width: 32.18%; height: 110.59%; }
.tt-line {
  position: absolute; left: calc(403 * var(--u)); top: calc(50% - calc(24.5 * var(--u))); transform: translateX(-50%); margin: 0;
  font: 500 calc(20 * var(--u))/calc(25 * var(--u)) "TikTok Sans", var(--font-body); color: #000; opacity: 0.8; text-align: center; white-space: nowrap;
}

/* zinnia (640:6561): the Dashboard screen on a little phone, on a pink → yellow wash */
.card--zinnia > .art { background: linear-gradient(180deg, #f394af, #f9ab15); }
.z-bloom { left: -21.93%; top: -48.54%; width: 87.45%; height: 145.76%; mix-blend-mode: overlay; } /* overlay, as in Figma: it disappears over the black phone */
.z-phone {
  position: absolute; inset: 21.35% 34.53% -33.04% 34.56%; overflow: hidden;
  display: flex; flex-direction: column; gap: calc(14.347 * var(--u)); padding: calc(32.282 * var(--u)) calc(10.761 * var(--u)) calc(14.347 * var(--u)); border-radius: calc(17 * var(--u));
  background: #0f0e0e; color: #fff; font-family: var(--font-body); line-height: 1;
}
.z-title { margin: 0; font: 200 calc(17.934 * var(--u))/1 Newsreader, Georgia, serif; letter-spacing: calc(-0.3587 * var(--u)); }
.z-days { display: flex; justify-content: space-between; }
.z-day {
  display: flex; flex-direction: column; align-items: center; gap: calc(3.587 * var(--u)); padding: calc(3.587 * var(--u)) calc(2.69 * var(--u));
  border: calc(0.448 * var(--u)) solid rgba(217, 217, 217, 0.25); border-radius: calc(7.174 * var(--u));
}
.z-day b { font-size: calc(8.967 * var(--u)); font-weight: 700; color: #fbfbfb; }
.z-day i { font-style: normal; font-size: calc(5.38 * var(--u)); color: rgba(251, 251, 251, 0.5); }
.z-day:nth-child(6) b { color: #fcdc51; }
.z-day:nth-child(7) i { color: #858484; }
.z-day img { position: static; width: calc(9.247 * var(--u)); height: calc(9.864 * var(--u)); }
.z-day img.flower { width: calc(9.218 * var(--u)); height: calc(9.863 * var(--u)); }
.z-day img.flower-2 { width: calc(9.349 * var(--u)); height: calc(10.312 * var(--u)); }
.z-log { display: flex; flex-direction: column; gap: calc(8.967 * var(--u)); }
.z-time { font-size: calc(5.38 * var(--u)); color: #bababa; letter-spacing: calc(0.1076 * var(--u)); }
.z-card {
  position: relative; overflow: hidden; width: calc(154.683 * var(--u)); border-radius: calc(7.174 * var(--u)); box-shadow: 0 calc(0.897 * var(--u)) calc(3.587 * var(--u)) rgba(254, 224, 164, 0.1);
  background: linear-gradient(-17.75deg, #fff 11.456%, #f74b07 63.502%, #fcb511 118.64%);
  -webkit-backdrop-filter: blur(calc(1.793 * var(--u))); backdrop-filter: blur(calc(1.793 * var(--u)));
}
.z-card > img { left: calc(16.59 * var(--u)); top: calc(-50.22 * var(--u)); width: calc(136.981 * var(--u)); height: calc(136.981 * var(--u)); mix-blend-mode: overlay; }
.z-feel { position: relative; margin: 0; padding: calc(10.761 * var(--u)); width: calc(calc(111.641 * var(--u)) + calc(21.522 * var(--u))); font-size: calc(10.761 * var(--u)); font-weight: 700; line-height: 1.2; }
.z-feel em { font: italic 800 1em/1.2 Newsreader, Georgia, serif; letter-spacing: calc(-0.32 * var(--u)); }
.z-sliders { position: relative; display: flex; flex-direction: column; gap: calc(14.347 * var(--u)); padding: calc(10.761 * var(--u)); background: #201f1f; }
.z-slider { display: flex; flex-direction: column; gap: calc(5.38 * var(--u)); }
.z-slider p { display: flex; justify-content: space-between; margin: 0; font-size: calc(5.38 * var(--u)); line-height: 1.2; }
.z-track { position: relative; height: calc(5.38 * var(--u)); border: calc(0.448 * var(--u)) solid rgba(255, 255, 255, 0.2); border-radius: calc(14.796 * var(--u)); background: rgba(255, 255, 255, 0.1); }
.z-track span { position: absolute; left: calc(-0.448 * var(--u)); top: calc(-0.448 * var(--u)); height: calc(5.38 * var(--u)); border-radius: calc(14.796 * var(--u)) 0 0 calc(14.796 * var(--u)); }
.z-track i { position: absolute; top: calc(-1.79 * var(--u)); width: calc(19.279 * var(--u)); height: calc(8.967 * var(--u)); border-radius: calc(8.07 * var(--u)); background: #fff; }
.z-track--a span { width: calc(61.425 * var(--u)); background: url("assets/work/zinnia-rect.png") center / cover, rgba(255, 255, 255, 0.1); }
.z-track--a i { left: calc(52.46 * var(--u)); }
.z-track--b span { width: calc(73.082 * var(--u)); background: linear-gradient(90deg, #804ac7 0%, #eeaaec 41.577%, #f8e282 76.313%, #fcdc51 109.47%); }
.z-track--b i { left: calc(61.87 * var(--u)); }
.z-chips { display: flex; flex-direction: column; gap: calc(3.587 * var(--u)); font-size: calc(7.174 * var(--u)); line-height: 1.1; }
.z-chips p { display: flex; align-items: center; gap: calc(1.793 * var(--u)); margin: 0; white-space: nowrap; }
.z-chips p:first-child b { padding-top: calc(1.793 * var(--u)); }
.z-chips b { padding: calc(2.242 * var(--u)) calc(3.587 * var(--u)); border-radius: calc(14.347 * var(--u)); background: rgba(42, 42, 42, 0.2); font-size: calc(5.38 * var(--u)); font-weight: 600; line-height: 1; color: #fbfbfb; }

/* Hover: the card's frame shrinks a little (the art scales down inside the card's own box, so
   nothing around it moves) and a line of text fades in under it at 50%, Mulish 14px.
   Placeholder copy until each project has its own. */
.art { transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
.card:hover .art, .card:focus-visible .art { transform: scale(0.96); }
.card-caption {
  position: absolute; left: 2%; top: calc(100% + 6px); z-index: 1;
  font: 400 var(--fs-text)/normal var(--font-welcome); color: var(--ink); white-space: nowrap;
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.card:hover .card-caption, .card:focus-visible .card-caption { opacity: 0.5; transform: none; }
.card:focus-visible { outline: none; }
.card:focus-visible .art { outline: 2px solid var(--pink); outline-offset: 3px; }

/* /photos (640:7000): a blank card for now, linking to the photos page */
.card--photos > .art { background: #ededed; }

/* ---- footer -------------------------------------------------------------- */
.footer { padding: 0 var(--pad); display: flex; flex-direction: column; gap: 20px; }
.footer-line { width: 100%; height: 1px; background: var(--line); }
.footer-row { display: flex; justify-content: space-between; align-items: stretch; font-size: var(--fs-footer); line-height: normal; }
/* Footer (Figma "footer" 567:1083), made shorter: a 74px row under the rule (Figma 88px). "Thanks for
   visiting!", the email and the socials spread over its height, as do Home / About / Resume; the
   unicorn is 74px tall. */
.footer-row { min-height: 74px; }
.find { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 4px; }
/* the email copies on click (footer.js). Hovering swaps the address for "Copy email"; once it's
   copied it reads "Copied!" for a couple of seconds, then goes back to the address. */
.footer-email {
  display: inline-flex; padding: 0; border: 0; background: none;
  font: inherit; color: var(--ink); cursor: pointer;
}
.footer-email .email-hover, .footer-email .email-copied { display: none; }
.footer-email:is(:hover, :focus-visible):not(.is-copied) .email-text { display: none; }
.footer-email:is(:hover, :focus-visible):not(.is-copied) .email-hover { display: inline; }
.footer-email.is-copied .email-text { display: none; }
.footer-email.is-copied .email-copied { display: inline; }
.footer-email:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; border-radius: 2px; }
.find-me { opacity: 0.5; }
/* drawn as masks in currentColor */
.socials { display: flex; align-items: center; gap: 15px; padding-top: 4px; color: var(--ink); }
/* each icon is at 50% and, on hover, fills with one of the site's gradients (LinkedIn purple, X pink,
   Instagram gold → orange), glows in that colour and lifts a little */
.socials a { display: flex; opacity: 0.5; transition: opacity 0.25s ease, transform 0.2s ease, filter 0.3s ease; }
.socials a:hover, .socials a:focus-visible { opacity: 1; transform: translateY(-2px); filter: drop-shadow(0 0 5px var(--glow)); }
.socials a:nth-child(1) { --grad: linear-gradient(160deg, #e0d6fe, #9977fe); --glow: rgba(153, 119, 254, 0.6); }
.socials a:nth-child(2) { --grad: linear-gradient(160deg, #ffcce8, #fc81c5); --glow: rgba(252, 129, 197, 0.6); }
.socials a:nth-child(3) { --grad: linear-gradient(160deg, #ffd683, #fe7814); --glow: rgba(254, 120, 20, 0.6); }
.socials span { position: relative; }
.socials span::after { content: ""; position: absolute; inset: 0; background: var(--grad); opacity: 0; transition: opacity 0.25s ease; }
.socials a:hover span::after, .socials a:focus-visible span::after { opacity: 1; }
.socials span { display: block; background: currentColor; -webkit-mask: var(--icon) 0 0 / 100% 100% no-repeat; mask: var(--icon) 0 0 / 100% 100% no-repeat; }
.socials .linkedin { --icon: url("assets/linkedin.svg"); width: 19.5px; height: 19.5px; }   /* ~20% larger than Figma */
.socials .x { --icon: url("assets/x.svg"); width: 16.5px; height: 18px; }
.socials .instagram { --icon: url("assets/instagram.svg"); width: 19.5px; height: 19.5px; }
.footer-links { width: 77px; display: flex; flex-direction: column; justify-content: space-between; color: var(--ink-50); }
/* like the nav: hover (or tab to) a link and it goes full cream while the other two blur */
.footer-links a { transition: color 0.2s ease, filter 0.3s ease; }
.footer-links a:hover, .footer-links a:focus-visible { color: var(--ink); }
.footer-links:has(a:hover, a:focus-visible) a:not(:hover, :focus-visible) { filter: blur(2.5px); }
.footer-mark { position: relative; display: flex; align-items: center; }
.footer-mark img, .footer-mark svg { width: 102.85px; height: 74px; }
/* footer-unicorn.js swaps the image for a live drawing; the diamonds burst out past its box */
.footer-mark svg { display: block; overflow: visible; }
/* the horn: clicking it makes the unicorn sparkle (a 44px target over the head) */
.footer-horn {
  position: absolute; left: -8px; top: 50%; translate: 0 -41px; width: 44px; height: 44px;
  padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer;
}
.footer-horn:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }

/* ---- phones and narrow windows (Figma "Home — Dark Mode" mobile 556:585, 402px frame) ----------
   index.html stops zooming at 800px and below; the page is laid out at the device width instead.
   24px top, 20px sides, sections 100px apart. The nav is the unicorn, About and Contact; the
   header (nav + headline + welcome) is 400px tall, with the gradient behind it at 62.5% and no
   big unicorn. Work is one column of cards, and the footer stacks with the big unicorn at the
   bottom, as wide as the content. */
@media (max-width: 800px) {
  :root { --pad: 20px; --fs-display: 30px; --fs-text: 12px; --fs-footer: 12px; }
  .page { width: auto; zoom: 1; padding: 24px 0 0; gap: 100px; }
  .wide-only { display: none; }

  .top { display: grid; grid-template-columns: auto 1fr; align-items: center; align-content: start; row-gap: 25px; }
  .logo, .home .logo { display: block; width: 33.647px; height: 24.418px; }
  .logo, .nav { grid-row: 1; }
  .nav { grid-column: 2; justify-self: end; gap: 25px; font-size: 11px; }
  .hello { grid-row: 2; grid-column: 1 / -1; width: auto; }

  /* Contact: 11px type, 4px / 8px padding, and its pink glow always on (there's no hover on touch) */
  .contact-toggle {
    padding: 4px 8px; border-width: 1.5px; border-radius: 26.067px;
    font-size: 11px; line-height: normal;
  }
  .contact-toggle, .contact:hover .contact-toggle { box-shadow: 0 0.965px 12.31px var(--btn-glow); }
  .contact-toggle::after { border-radius: 26.067px; box-shadow: inset 8.689px 3.862px 6.758px rgba(255, 255, 255, 0.25); }
  .contact-toggle .copied-label { gap: 6px; }
  .contact-toggle .mail { width: 10.5px; height: 11.08px; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; }

  /* the header is 400px tall (Figma 556:588): nav and headline at the top, the welcome text
     pinned to its bottom. The hero has no height of its own and pulls up over the header's
     bottom edge, so the welcome sits there however many lines the headline wraps to. */
  .home .top { min-height: calc(400px); pointer-events: none; }
  .home .top > * { pointer-events: auto; }
  .hero { height: 0; margin-top: -100px; }
  .welcome { left: var(--pad); right: var(--pad); width: auto; gap: 19.972px; }
  .welcome-text { font-size: 14px; } /* 18px scaled down with the rest of the phone text */
  .small-things { height: 24px; }
  .shooting-star { display: none; }   /* no pointer on phones, so no glimmer cursor */
  .sound { width: 24px; height: 24px; }
  .nav a.about-pill { height: 32px; padding: 6.5px; font-size: 14px; }
  .about-pill img { width: 19px; height: 19px; }
  .unicorn { display: none; }
  /* the same three ribbons as desktop, scaled to Figma's 781 × 324 and placed 76px below the
     top of the nav (400 − 76 = 324px above the header's bottom), 216px off the left of the content */
  .gradient { left: calc(var(--pad) - 246px); top: -374.6px; transform: scale(0.6252); transform-origin: 0 0; }

  .home .projects, .home .footer { margin-top: 0; }
  .gallery { grid-template-columns: 1fr; gap: 50px; }

  /* footer (Figma "Footer!" 577:2780): everything stacks 30px apart, the big unicorn last, as wide
     as the content */
  .footer-row { flex-direction: column; gap: 30px; }
  .find { height: auto; gap: 9px; }
  .socials { gap: 12px; }
  .socials .linkedin, .socials .instagram { width: 17.277px; height: 17.277px; }
  .socials .x { width: 14.624px; height: 15.958px; }
  .footer-links { width: auto; height: 55px; }
  .footer-mark img, .footer-mark svg { width: 100%; height: auto; aspect-ratio: 107.009 / 77; }
  .footer-horn { top: 0; translate: none; width: max(44px, 30%); height: auto; aspect-ratio: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .nav a, .nav a > span, .btn, .shooting-star, .sound, .shooting-star img, .sound img, .about-label { transition: none; }
  .fold, .caret > span, .section-toggle, .art, .card-caption { transition: none; }
  /* with Reduce Motion on, the gradient simply fades in, without the sweep */
  .gradient img { animation: ribbon-fade 1.2s ease both; -webkit-mask: none; mask: none; }
}
