/* Carlos Flores — quiet frame, the photographs first. */

@font-face {
  font-family: 'LT Cushion';
  src: url('/assets/fonts/LTCushion-VF.ttf') format('truetype');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f3f3f3;   /* light text on the dark and coloured overlays */
  --page: #e6dfd4;    /* the work and projects: page, panel, viewer (Grant, 2026-11-23; was #f3f3f3) */
  --ink: #272624;
  --stone: #655b45;   /* accents: current item, links */
  --khaki: #9f937e;   /* About */
  --olive: #717f68;   /* Contact */
  --neptune: #272640; /* the Neptunian page's panel */
  --neptune-deep: #222139; /* the Neptunian page beside its panel */
  --muted: color-mix(in srgb, var(--ink) 70%, var(--page)); /* 4.9:1 on the page */

  --panel: clamp(220px, 17vw, 270px);
  --gutter: 16px;
  --space: clamp(24px, 3vw, 40px);
  --font: 'LT Cushion', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);   /* overlays arriving: quick, then a long settle */
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);    /* overlays leaving: gathers speed as it goes */

  /* Photos still loading (site-kit placeholders) when they have no dominant colour of their own. */
  --kit-placeholder: color-mix(in srgb, var(--ink) 6%, var(--page));

  --photo-stroke: 6px; /* the hover stroke on a photo you can open (work covers, project photos) */

  /* The photo viewer (site-kit gallery): the page colour, with ink controls. */
  --gallery-bg: var(--page);
  --gallery-icon-color: var(--ink);
  --gallery-icon-color-secondary: var(--page);
  --gallery-icon-stroke-color: var(--page);

  color-scheme: light;
}

@media (min-width: 900px) {
  :root { --gutter: var(--space); }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; } /* no grey box on tap; keyboard focus keeps its outline */

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 17px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html.has-overlay { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }
picture { display: block; }
figure { margin: 0; }

a { color: inherit; text-decoration: none; }
/* Hover and the current page are underlined (it never shifts layout). Keyboard focus shows its
   outline. Cards and the pager underline just their title, not the whole link. */
a:hover,
.nav a[aria-current],
.card:hover .card-title,
.pager a:hover .pager-title,
.splash:hover .splash-enter,
.contact-form button:hover,
.gate-form button:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}
/* Icon buttons are links underneath; they shouldn't drag out as links (Safari needs the CSS too). */
.back, .overlay-close { -webkit-user-drag: none; user-select: none; }
/* Header icons: the back arrow and the X are one size everywhere. */
.back svg, .overlay-close svg { width: var(--head-icon, 24px); height: var(--head-icon, 24px); }
.card:hover, .pager a:hover, .back:hover, .gate-button:hover, .overlay-close:hover, .social-icon:hover { text-decoration: none; }
:focus-visible { outline: 1px solid currentColor; outline-offset: 3px; }

h1, h2, h3, p, ul, dl, dd { margin: 0; }
h1, h2 { font-size: inherit; font-weight: 400; }
ul { padding: 0; list-style: none; }

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

/* ── Text ──────────────────────────────────────────────────────────────── */

.prose { max-width: 36em; }
.prose p + p { margin-top: 1em; }
.prose h2 { margin-bottom: 0.5em; color: var(--muted); }
.prose a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }

/* ── Frame: the panel and the main column ───────────────────────────────── */

.panel {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--page);
}

.panel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 var(--gutter);
}

.brand { font-size: 22px; letter-spacing: 0.01em; }
.brand-logo img { width: auto; max-height: 28px; }

.menu-toggle { display: inline-flex; padding: 10px 0 10px 16px; margin-right: -2px; -webkit-user-drag: none; }
.menu-toggle svg { width: 24px; height: 24px; display: block; }
.menu-toggle:hover { text-decoration: none; }
/* While the menu is open (data-open; :target without the script) the hamburger turns into the X, in
   two steps: the top and bottom lines come together on the middle one, which goes, then they turn
   45° each way. Closing runs it backwards: they turn back, then part, and the middle line returns. */
.icon-menu .menu-line { transform-box: fill-box; transform-origin: center; transition: rotate 0.18s var(--ease), translate 0.18s var(--ease) 0.15s, opacity 0.08s linear 0.15s; }
:is(.panel[data-open], .panel:target) .menu-line { transition: translate 0.18s var(--ease), rotate 0.2s var(--ease) 0.15s, opacity 0.08s linear 0.12s; }
:is(.panel[data-open], .panel:target) .menu-line--top { translate: 0 5.5px; rotate: 45deg; }
:is(.panel[data-open], .panel:target) .menu-line--middle { opacity: 0; }
:is(.panel[data-open], .panel:target) .menu-line--bottom { translate: 0 -5.5px; rotate: -45deg; }

.nav { display: none; }
/* data-closing: a link in the menu opened an overlay, which fades in over the menu; the menu stays
   (inert) until the overlay covers it, so the page underneath never shows in between. */
.panel[data-closing] .nav { pointer-events: none; }
.panel[data-open] .nav,
.panel[data-closing] .nav,
.panel[data-shutting] .nav,
.panel:target .nav {
  display: flex;
  flex-direction: column;
  height: calc(100svh - 56px);
  overflow-y: auto;
  padding: 8px var(--gutter) 24px;
  font-size: 28px;
  line-height: 1.35;
  text-align: right; /* phones: options line up under the hamburger */
}

/* Each link is a full row: its target runs the width of the panel, and the rows meet with no gap
   between them (the spacing is the links' own padding). */
.nav-list { margin: -0.175em 0; }
.nav-list a { display: block; padding: 0.175em 0; }
.nav a[aria-current] { color: var(--stone); }

/* The layout switches. The project's (off for now) sits at the foot of the panel (phones: the foot of
   the menu, at the right like the links): two square cells in a thin frame; a solid square slides
   under the chosen one. The work's is labelled, below. */
.layout-switch { position: relative; display: inline-flex; align-self: flex-end; margin-top: auto; border: 1px solid var(--ink); }
.layout-switch[hidden] { display: none; }
.layout-switch::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 40px; background: var(--stone); transition: translate 0.3s var(--ease); } /* the chosen layout, in the current-page colour; one button wide */
.layout-switch:has(> button:last-child[aria-pressed='true'])::before { translate: 100% 0; }
.layout-switch button { position: relative; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; transition: color 0.3s var(--ease); }
.layout-switch button[aria-pressed='true'] { color: var(--page); }
.layout-switch svg { display: block; width: 20px; height: 20px; }
/* The work's: Projects or Shuffle at the top of the work, left-aligned, set apart from the top bar on
   phones. Two equal rectangles, each its icon and its name; the fill is one rectangle wide. */
.layout-switch--labelled { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: max-content; margin: 0 var(--gutter) 24px; }
/* Its width is the labels', in fractions of a pixel. A translated fill is rounded to the pixel before
   it's moved, so it could stop a sliver short of the frame (or past it); moved by left, it's rounded
   with the frame and meets it. */
.layout-switch--labelled::before { width: 50%; transition-property: left; }
.layout-switch--labelled:has(> button:last-child[aria-pressed='true'])::before { translate: none; left: 50%; }
.layout-switch--labelled button { display: flex; align-items: center; justify-content: center; gap: 8px; width: auto; height: 36px; padding: 0 16px; font: inherit; font-size: 17px; line-height: 1; }
.layout-switch--labelled svg { flex: none; width: 18px; height: 18px; }
.layout-switch--labelled span { translate: 0 1px; } /* LT Cushion's letters ride high; down to the icon's middle */

.gate-button { display: inline-block; width: 56px; }
.gate-button img { aspect-ratio: 1; object-fit: contain; } /* round on its own */

.main { padding: 24px 0 64px; outline: none; } /* phones: clear of the top bar */

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: var(--panel) minmax(0, 1fr); }

  .panel {
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: var(--space) 0 var(--space) var(--space);
  }
  .panel-bar { display: block; min-height: 0; padding: 0; }
  .brand { display: block; } /* the name's target runs the width of the panel too */
  .menu-toggle { display: none; }

  .nav,
  .panel[data-open] .nav,
  .panel:target .nav {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    height: auto;
    margin-top: 48px;
    padding: 0;
    overflow-y: auto;
    font-size: 20px;
    text-align: left;
  }

  /* A link too long for the panel (a long section name on the Neptunian page) wraps, keeping the same
     space on the right as on the left; its target still runs to the panel's edge. Its lines sit
     close (1.15); the padding makes up the rest, so every row is as tall as before (1.85em) and a
     one-line link's text doesn't move. */
  .nav-list a { padding: 0.35em var(--space) 0.35em 0; line-height: 1.15; }

  :root { --head-icon: 32px; } /* desktop header icons; phones keep 24px to match the hamburger */
  .main { padding: var(--space) var(--space) 96px; }
}

/* ── Work ──────────────────────────────────────────────────────────────── */

.work-intro { padding: 8px var(--gutter) 32px; }

/* The projects as square covers, two to a row at every size, like a project's grid: edge to edge
   with an 8px gap on phones, var(--space) between them on desktop. Each cover is cut around its
   focal point (the centre unless one is set). */
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 8px; }

.card { display: block; }
.card-media { position: relative; display: block; aspect-ratio: 1; background: color-mix(in srgb, var(--ink) 6%, var(--page)); overflow: hidden; }
.card-media picture, .card-media img { width: 100%; height: 100%; }
.card-media img { object-fit: cover; }

/* A photo you can open, here or on a project, draws a stroke in the current-page colour in from its
   edges on hover (and on keyboard focus, in place of the outline). One set of rules for both, so a
   cover and a project's photo always behave the same. */
:is(.frame-link, .card-media)::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 0 var(--stone); transition: box-shadow 0.35s var(--ease); pointer-events: none; }
@media (hover: hover) {
  .frame-link:hover::after, .card:hover .card-media::after { box-shadow: inset 0 0 0 var(--photo-stroke) var(--stone); }
}
:is(.frame-link, .card):focus-visible { outline: none; }
.frame-link:focus-visible::after, .card:focus-visible .card-media::after { box-shadow: inset 0 0 0 var(--photo-stroke) var(--stone); }
.card-title { display: block; margin-top: 10px; padding: 0 var(--gutter); }
.card-meta { display: block; padding: 0 var(--gutter); color: var(--muted); font-size: 15px; }

@media (min-width: 900px) {
  .work-intro { padding: 0 0 var(--space); }
  .layout-switch--labelled { margin: 0 0 var(--space); }
  .work-grid { gap: 56px var(--space); }
  .card-title, .card-meta { padding: 0; }
}

/* The work's two views, from the switch in the panel: Projects (the default) and Shuffle. Without the
   script, the list of projects. */
.work-gallery, .work-shuffle { display: none; }
/* Until site.js has placed the photos they're out of sight (head.js sets is-placing before the first
   paint, so nothing shows in the wrong place), then they fade in. */
/* The work's switch fades in with them, in a place kept for it from the first paint (site.js shows
   it), so the work under it doesn't jump down when it arrives. */
:is(.main--project .chapter > .frame, .work-gallery, .work-shuffle, .secret-section > .frame, .layout-switch--labelled) { transition: opacity 0.4s var(--ease); }
/* Placed straight away (a page the browser already had: Back, or a prefetched one): no fade, they're just there. */
:root.is-quick :is(.main--project .chapter > .frame, .work-gallery, .work-shuffle, .secret-section > .frame, .layout-switch--labelled) { transition: none; }
:root.is-placing :is(.main--project .chapter > .frame, .work-gallery, .work-shuffle, .secret-section > .frame, .layout-switch--labelled) { opacity: 0; }
:root.is-placing .layout-switch--labelled[hidden] { display: grid; }
/* On desktop, text beside a photo (About) is sized by site.js to fill the photo's height (fitText),
   in its own font: until then it's out of sight too, so it's never seen at another size or wrapping. */
@media (min-width: 900px) {
  .prose-section.has-media .prose { transition: opacity 0.4s var(--ease); }
  :root.is-quick .prose-section.has-media .prose { transition: none; }
  :root.is-placing .prose-section.has-media .prose { opacity: 0; }
}
/* site.js sets a switch's choice as it shows it: no slide of the fill to get there. */
.layout-switch.is-setting::before, .layout-switch.is-setting button { transition: none; }
:root[data-work='projects'] .work-gallery, :root[data-work='shuffle'] .work-shuffle { display: block; }
:root[data-work] .work-grid { display: none; }
/* Projects: a project's first photos (at most five) in one row at one height, filling the row on
   desktop (each one's share of it from its shape, which site.js sets). */
.work-row { display: flex; align-items: flex-start; gap: 8px; }
.work-row > .frame { flex: var(--ratio, 1) 1 0; min-width: 0; margin: 0; } /* --ratio: width over height (site.js) */
.work-row > .frame + .frame { margin-top: 0; } /* not the stacked photos' gap, which comes later */
.work-row figcaption { display: none; }
/* See More: phones only, at the end of the row's scroll, the row's height, its words in the middle. */
.work-more { display: none; }
/* Phones: the row runs on past the screen's edge and scrolls sideways, every photo one height. */
@media (max-width: 899px) {
  .work-row { overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); padding-inline: var(--gutter); scrollbar-width: none; }
  .work-row::-webkit-scrollbar { display: none; }
  .work-row > .frame { flex: none; width: calc(min(52vw, 240px) * var(--ratio, 1.5)); scroll-snap-align: start; }
  .work-more { flex: none; align-self: stretch; display: inline-flex; align-items: center; gap: 0.45em; padding: 0 28px 0 36px; font-size: 26px; line-height: 1.1; scroll-snap-align: end; }
  .work-more span { width: min-content; } /* "See" over "More", the chevron right beside them */
  /* As tall as the two lines' letters, "See"'s cap top to "More"'s baseline (1.82em): the stroke
     runs 13/14.5 of the box, so the box is 2.03em; raised to the letters' middle, which sits above
     the lines' (their space below the baseline). The same slope as before; a little heavier than
     the one-line chevrons' 1.25, for its length. */
  .work-more .chevron.chevron--tall { width: 0.745em; height: 2.03em; translate: 0 -0.13em; stroke-width: 1.6; }
}
/* The title leads to the project, with a right chevron that nudges on hover (Back's, mirrored). */
.work-project { display: inline-flex; align-items: center; gap: 0.35em; }
:is(.work-project, .work-more) .chevron { flex: none; width: 0.32em; height: 0.96em; translate: 0 -0.06em; transition: transform 0.3s var(--ease); }
:is(.work-project, .work-more):is(:hover, :focus-visible) .chevron { transform: translateX(3px); }
/* Each project's title a step up from the text (a project page's title size on desktop), close
   over its photos, and a shorter gap from one project's photos to the next title than between a project's chapters. */
.work-gallery .chapter-text { padding-bottom: 12px; } /* the title sits close over its own photos */
.work-gallery .chapter-text h2 { font-size: 22px; line-height: 1.25; }
.work-gallery .chapter + .chapter { margin-top: 40px; }
@media (min-width: 900px) {
  .work-gallery .chapter-text { padding-bottom: 16px; }
  .work-row { gap: var(--space); }
  .work-gallery .chapter-text h2 { font-size: 25px; }
  .work-gallery .chapter + .chapter { margin-top: 64px; }
}

/* ── Project ───────────────────────────────────────────────────────────── */

.project-head {
  display: grid;
  grid-template-columns: minmax(0, 36em);
  align-items: start;
  row-gap: 12px;
  padding: 0 var(--gutter) 32px;
}
.project-title { font-size: 25px; line-height: 1.25; }
/* Back: the arrow and the word. Phones: in the title's place (below). */
.back { display: inline-flex; align-items: center; gap: 0.3em; justify-self: start; color: var(--ink); transition: color 0.2s var(--ease); }
.back svg.chevron { flex: none; width: calc(var(--head-icon, 24px) / 3); translate: 0 -0.09em; transition: transform 0.3s var(--ease); } /* a third as wide as tall; raised to the capitals' middle */
.back:hover, .back:focus-visible { color: var(--stone); }
.back:hover .chevron, .back:focus-visible .chevron { transform: translateX(-3px); }
/* Phones: Back takes the title's place, set exactly like the project names on the work that lead
   here (their size, their chevron, mirrored); the heading stays for screen readers. Desktop keeps
   "Back" at the right and the title. */
@media (max-width: 899px) {
  .project-head .back { gap: 0.35em; font-size: 22px; line-height: 1.25; }
  .project-head .back svg.chevron { width: 0.32em; height: 0.96em; translate: 0 -0.06em; }
  .project-head .project-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .project-head { row-gap: 0; } /* the heading takes no line; a bio or details keep their gap */
  .project-intro:has(> :not(.project-title)) { margin-top: 12px; }
}
.project-meta { color: var(--muted); }
.project-bio { margin-top: 1.25em; }

.chapter + .chapter { margin-top: 56px; }
.chapter-text { padding: 0 var(--gutter) 12px; }
/* A section's subtitle (a merged project's parts, Grant 2026-11-23): set like the project names on the
   work, close over its own photos, in grey under the project's title. */
.chapter-text h2 { margin-bottom: 0; font-size: 20px; line-height: 1.25; }

/* Phones: every photograph runs edge to edge. */
.frame + .frame { margin-top: 8px; }
.frame img { width: 100%; }
/* Each photo opens the viewer; its hover stroke is shared with the work's covers (see Work). */
.frame-link { position: relative; display: block; }
figcaption { padding: 8px var(--gutter) 0; color: var(--muted); font-size: 15px; }

.credits { display: grid; gap: 4px; margin-top: 56px; padding: 0 var(--gutter); font-size: 15px; }
.credits div { display: flex; gap: 0.5em; }
.credits dt { color: var(--muted); }
.credits dt::after { content: ':'; }

.pager {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 64px;
  padding: 0 var(--gutter);
}
.pager a { max-width: 45%; }
.pager a[rel='next'] { text-align: right; }
.pager-label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 15px; }
.pager a[rel='next'] .pager-label { justify-content: flex-end; }
.pager .arrow { width: 18px; height: 18px; transition: transform 0.3s var(--ease); }
.pager a:hover .arrow--left, .pager a:focus-visible .arrow--left { transform: translateX(-3px); }
.pager a:hover .arrow--right, .pager a:focus-visible .arrow--right { transform: translateX(3px); }

/* Tiles (a project's, the work's and the Neptunian page's): equal columns, two on phones and four on desktop, each
   photo its own shape, uncropped, with the same gap across and down. CSS sets the columns' width;
   site.js places each photo under the shortest column so far, like a masonry wall. */
:is(:root[data-layout="tiles"] .main--project .chapter, :root[data-work="shuffle"] .work-shuffle .chapter, :root[data-personal="tiles"] .secret-section) { --tile-columns: 2; --tile-gap: 8px; position: relative; }
:is(:root[data-layout="tiles"] .main--project, :root[data-work="shuffle"] .work-shuffle, :root[data-personal="tiles"] .secret-main .secret-section) .frame { position: absolute; width: calc((100% - (var(--tile-columns) - 1) * var(--tile-gap)) / var(--tile-columns)); margin-top: 0; }
:is(:root[data-layout="tiles"] .main--project, :root[data-work="shuffle"] .work-shuffle, :root[data-personal="tiles"] .secret-main .secret-section) figcaption { display: none; }

@media (min-width: 900px) {
  /* Desktop: the title starts at the photos' left edge; Back sits at the right edge of the page, set
     like the title so the two share a line, and stays there as the project scrolls (under the panel
     and overlays). */
  .project-head { padding: 0 0 var(--space); }
  /* One title line tall, so the word sits on the title's line. The padding is taken back out of top
     and right, so the word stays where it was and only the box around it reaches further. */
  /* 4px at the bottom, not 8px: the line keeps room under the baseline for descenders, and "Back" has
     none, so even padding left the word sitting high with more space below it than above. */
  .project-head .back { position: fixed; top: calc(var(--space) - 8px); right: calc(var(--space) - 12px); z-index: 10; box-sizing: content-box; height: 1.25em; margin-left: 0; padding: 8px 12px 4px; font-size: 25px; line-height: 1.25; background-color: var(--page); transition: color 0.2s var(--ease); }
  /* Photos pass under Back as the project scrolls, so it sits on a square of the page colour. */
  .project-intro > * { max-width: 36em; }
  .chapter-text { padding: 0 0 16px; }
  .chapter-text h2 { font-size: 22px; }
  .main--project .chapter:first-of-type > .chapter-text { margin-top: -16px; } /* 24px under the title, not 40 */
  .chapter + .chapter { margin-top: 96px; }

  /* Desktop: every photograph the full column width, whatever its shape; vertical ones run taller
     than the window and scroll through. */
  .frame + .frame { margin-top: var(--space); }
  .frame img { width: 100%; }
  figcaption { padding: 10px 0 0; }

  .credits, .pager { padding: 0; }
  .pager { margin-top: 96px; }

  .layout-switch { align-self: flex-start; }
  :is(:root[data-layout="tiles"] .main--project .chapter, :root[data-work="shuffle"] .work-shuffle .chapter) { --tile-columns: 4; --tile-gap: var(--space); }
  /* The Neptunian page's photos are fewer and more personal: two columns, so each is seen larger,
     a little further apart. (.secret-main is there to outweigh the phones' :is() rule above.) */
  :root[data-personal="tiles"] .secret-main .secret-section { --tile-columns: 2; --tile-gap: calc(1.5 * var(--space)); }
}

/* The viewer's controls (PhotoSwipe, themed through --gallery-* above), in ink at the size of an
   overlay's title and X: the count at the top left and the X at the top right, in a bar placed like
   the page's header (phones: the 56px bar; desktop: the title's line, var(--space) in from the
   edges), and on desktop the previous and next chevrons at the bottom left, placed as the count's
   mirror. */
.pswp--kit .pswp__top-bar { height: auto; min-height: 56px; align-items: center; padding: 0 var(--gutter); }
/* Each sits on a square of the page colour, like the pinned Back, so it reads over any photo. The
   room around the count and the X is taken back out of their margins, so they stay put. .pswp twice
   outranks PhotoSwipe's own .pswp__button:hover, which would otherwise clear the fill on hover. */
.pswp.pswp--kit :is(.pswp__counter, .pswp__button--close, .pswp__button--arrow) { background-color: var(--page); }
/* Like Back: 4px below, not 8px, as the line keeps room for descenders the count doesn't have. */
.pswp--kit .pswp__counter { height: auto; padding: 8px 12px 4px; margin: -8px -12px -4px; color: var(--ink); text-shadow: none; opacity: 1; font-size: 22px; line-height: 1.25; }
/* The buttons' sizes come from width and height, never padding: PhotoSwipe zeroes a button's padding
   on hover and focus, which would shrink it out from under the pointer and make the cursor flicker.
   The X's box is as tall as the count's (1.25em + 12px). */
.pswp--kit :is(.pswp__button--close, .pswp__button--arrow) { display: grid; height: calc(1.25em + 12px); font-size: 22px; color: var(--ink); opacity: 1; }
.pswp--kit :is(.pswp__button--close, .pswp__button--arrow) svg { width: var(--head-icon, 24px); height: var(--head-icon, 24px); }
.pswp--kit :is(.pswp__button--close, .pswp__button--arrow):hover { color: var(--stone); }
.pswp--kit .pswp__button--close { place-items: center; width: calc(var(--head-icon, 24px) + 24px); margin: -4px -14px 0 auto; }
/* Project (the work's viewers, Shuffle and Projects): bottom right, styled like Back, the chevron nudging the way it goes.
   On phones it sits as far in from the bottom right as the count from the top left. */
.pswp--kit .pswp__link { position: absolute; right: calc(var(--gutter) - 12px); bottom: calc(8px + env(safe-area-inset-bottom, 0px)); display: inline-flex; align-items: center; gap: 0.35em; padding: 8px 12px 4px; font-size: 22px; line-height: 1.25; color: var(--ink); background-color: var(--page); text-decoration: none; -webkit-user-drag: none; user-select: none; transition: color 0.2s var(--ease); }
.pswp--kit .pswp__link .chevron { flex: none; width: 0.32em; height: 0.96em; translate: 0 -0.06em; transition: transform 0.3s var(--ease); }
.pswp--kit .pswp__link:is(:hover, :focus-visible) { color: var(--stone); text-decoration: none; }
.pswp--kit .pswp__link:is(:hover, :focus-visible) .chevron { transform: translateX(3px); }
/* Phones swipe; the chevrons are for desktop only. */
.pswp--kit .pswp__button--arrow { display: none; }
/* Phones: the count's ink and the X's ink each sit 20px from the top and from their side (measured:
   the count's figures ride high in their line box, and the X's strokes stop short of its box). */
@media (max-width: 899px) {
  .pswp--kit .pswp__counter { translate: 3px 1px; }
  .pswp--kit .pswp__button--close { translate: -0.7px -1.3px; }
}
@media (min-width: 900px) {
  .pswp--kit .pswp__top-bar { min-height: 0; align-items: flex-start; padding: var(--space) var(--space) 0; }
  .pswp--kit .pswp__counter { font-size: 25px; }
  .pswp--kit :is(.pswp__button--close, .pswp__button--arrow) { font-size: 25px; }
  .pswp--kit .pswp__button--close { margin: -8px calc(var(--head-icon) * -5.5 / 24 - 12px) 0 auto; }
  /* The two chevrons share one box, 88px wide (44px each, none between) and taller than the count's,
     with 40px chevrons. Its bottom sits as far from the bottom as the count's box top from the top.
     PhotoSwipe hides arrows on touch screens until a mouse is used; a wide touch screen shows them. */
  .pswp.pswp--kit .pswp__button--arrow { visibility: visible; }
  .pswp--kit .pswp__button--arrow { display: grid; top: auto; bottom: calc(var(--space) - 8px); width: 44px; height: calc(1.25em + 24px); margin: 0; }
  .pswp--kit .pswp__button--arrow svg { width: 40px; height: 40px; }
  .pswp--kit .pswp__button--arrow--prev { left: calc(var(--space) - 12px); place-items: center end; }
  .pswp--kit .pswp__button--arrow--next { left: calc(var(--space) + 32px); right: auto; place-items: center start; }
  /* The chevrons' mirror: the same box height and distance from the bottom, at the right. */
  .pswp--kit .pswp__link { right: calc(var(--space) - 12px); bottom: calc(var(--space) - 8px); box-sizing: border-box; height: calc(1.25em + 24px); padding: 0 12px; font-size: 25px; }
}

/* ── Overlays: About, Contact, other pages ─────────────────────────────── */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px var(--gutter); /* same top and bottom: an overlay that fits doesn't scroll */
  /* Its colour carries on a screen's height below it. Typing in a field (the login's password,
     Contact) brings up the iPhone keyboard, and Safari slides the whole view up past the overlay's
     bottom to keep the field in sight; this is what shows there instead of the page underneath. A
     transparent border shows the overlay's own background, and sits outside the part that scrolls. */
  bottom: -100lvh;
  border-bottom: 100lvh solid transparent;
}
.overlay[hidden] { display: none; }
/* A thin scrollbar in the overlay's own text colour, faint, on no track. It's part of the overlay,
   so it slides in and out with it. Light text (Contact, the login, the Neptunian page) gets a light
   thumb. Browsers without scrollbar-color (older Safari) get the same look from ::-webkit-scrollbar. */
.overlay { --thumb: color-mix(in srgb, var(--ink) 32%, transparent); scrollbar-width: thin; scrollbar-color: var(--thumb) transparent; }
:is(.overlay--contact, .overlay--gate, .overlay--secret) { --thumb: color-mix(in srgb, var(--paper) 40%, transparent); }
@supports not (scrollbar-color: auto) {
  .overlay::-webkit-scrollbar { width: 10px; }
  .overlay::-webkit-scrollbar-track { background: transparent; }
  .overlay::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 10px; background: var(--thumb) padding-box; }
}
.overlay:focus { outline: none; } /* focused on open so screen readers land in it; not a control */

/* An overlay fades in on top of whatever is showing; site.js hides what's underneath once the
   fade ends. Above everything while entering, the login included. */
/* An overlay slides in from the left (on desktop, out from behind the panel), and its contents rise
   in after it, one after another; closing slides it back out. Opening another while one is showing
   slides the new one over it. site.js waits for every overlay-* animation to finish. */
.overlay.is-entering { z-index: 50; animation: overlay-slide-in 0.65s var(--ease-out) both; }
.overlay.is-leaving { z-index: 45; pointer-events: none; animation: overlay-slide-out 0.42s var(--ease-in) both; }
/* About's row of links doesn't rise itself, its links do: a moving box (translate) would become the
   box the planet is positioned from (it floats off the row, positioned from the section), so for the
   length of the rise it would sit 400px further down and stretch the overlay, which then shrinks
   back when the rise ends and snaps a visitor who had scrolled back up. The planet fades in on its
   own (planet-appear). */
.overlay.is-entering :is(.overlay-head, .prose-media, .prose-column > :not(.about-links), .about-links > :not(.about-gate), .contact > *) {
  animation: overlay-rise 0.6s var(--ease-out) both;
  animation-delay: calc(0.2s + var(--rise, 0) * 0.06s);
}
.overlay .prose-media { --rise: 1; }
.overlay .prose-column > :nth-child(1), .overlay .contact > :nth-child(1) { --rise: 2; }
.overlay .prose-column > :nth-child(2), .overlay .contact > :nth-child(2) { --rise: 3; }
.overlay .prose-column > :nth-child(3), .overlay .contact > :nth-child(3) { --rise: 4; }
.overlay .prose-column > :nth-child(n+4), .overlay .contact > :nth-child(n+4) { --rise: 5; }
@keyframes overlay-slide-in { from { translate: -100% 0; } }
@keyframes overlay-slide-out { to { translate: -100% 0; } }
@keyframes overlay-rise { from { opacity: 0; translate: 0 14px; } }

.overlay--about { background: var(--khaki); color: var(--ink); }
.overlay--page { background: var(--paper); color: var(--ink); }
/* The Neptunian page, behind the login: dark, so every bit of text on it is light (paper: 14:1). */
.overlay--secret { --stone: var(--paper); background: var(--neptune-deep); color: var(--paper); } /* light strokes on its photos */
/* No one-word last lines on the Neptunian page (Grant, 2026-12-02): the browser rebalances a
   paragraph's last few lines so at least two words end it. Browsers without it wrap as usual. */
.overlay--secret p { text-wrap: pretty; }
/* Safari (iOS) fills the strip under its floating toolbar from the fixed element at the bottom of
   the screen, and when that has no colour of its own (the smoke covering the page) from the page's
   background: the work's light one, showing through under the deep blue. So while the page is open
   (not as it leaves) the page's background is its deep blue too, and so is theme-color: site.js sets
   both (is-neptunian), since Safari didn't notice a :has() match. Only the root's background: the
   body keeps the work's colour, so nothing else changes. */
:root.is-neptunian { background: var(--neptune-deep); }
/* The photo viewer opened from it (attached to the page's end, so set from the root): the page's
   deep blue with light controls, a dimmer light on hover. */
:root:has(.overlay--secret:not([hidden])) .pswp--kit {
  --paper: var(--neptune-deep);
  --page: var(--neptune-deep);
  --ink: #f3f3f3;
  --stone: color-mix(in srgb, #f3f3f3 60%, var(--neptune-deep));
  --gallery-bg: var(--neptune-deep);
  --gallery-icon-color: #f3f3f3;
  --gallery-icon-color-secondary: var(--neptune-deep);
  --gallery-icon-stroke-color: var(--neptune-deep);
}
.overlay--secret a, .overlay--secret h2, .overlay--secret .overlay-title { color: var(--paper); }
/* Paper on olive is 3.8:1, so contact text stays large. */
.overlay--contact { background: var(--olive); color: var(--paper); font-size: 21px; }

/* The X and the title in their own columns (the X on the right on desktop and phones). */
.overlay-head {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 10px;
  align-items: center;
  margin-bottom: 32px;
}
/* LT Cushion's letters sit high in their line, so the X comes up 2px to centre on the capitals. */
.overlay-close { display: inline-flex; margin-left: -4px; padding: 2px 4px; translate: 0 -2px; color: inherit; opacity: 0.75; transition: opacity 0.2s var(--ease); }
.overlay-close:hover, .overlay-close:focus-visible { opacity: 1; }
/* Overlay headings match project titles, so every page header reads the same. */
.overlay-title { font-size: 25px; line-height: 1.25; }

.prose-section + .prose-section { margin-top: 48px; }
.prose-media { display: grid; gap: 16px; margin: 0 calc(-1 * var(--gutter)) 24px; }
.prose-media figcaption { padding: 8px var(--gutter) 0; color: inherit; opacity: 0.8; }
.overlay .prose h2 { color: inherit; font-size: 15px; letter-spacing: 0.04em; }
.overlay--about .prose { font-size: 17px; line-height: 1.55; }
/* The portrait's top is a full semicircle, like an arched window. The huge radius is scaled down to
   half the width, so the arch stays round at any size. The 1% inset trims the dark band along the
   photo's top edge and starts the arch a few pixels down. */
.overlay--about .prose-media img { clip-path: inset(1% 0 0 0 round 9999px 9999px 0 0); }

.about-links { --about-icon: 44px; display: flex; align-items: center; gap: 20px; margin-top: 40px; }
.prose-column { display: flex; flex-direction: column; }
.social-icon { display: inline-flex; padding: 8px; margin-left: -8px; }
.social-icon svg { width: var(--about-icon); height: var(--about-icon); } /* same height as the Neptune image */
.about-gate { width: var(--about-icon); }
/* On phones the planet stays in the row of links at the foot of About, beside Instagram, away from
   the portrait. On desktop it leaves the row and floats on its own to the right of it (below). */
.overlay--about .prose-section.has-media { position: relative; }
/* Instagram and Neptune share one hover: a slight grow. */
.about-links a svg, .about-links a img { transition: transform 0.3s var(--ease); }
.about-links a:hover svg, .about-links a:hover img,
.about-links a:focus-visible svg, .about-links a:focus-visible img { transform: scale(1.06); }
/* The planet comes last: it starts to fade in as everything else on About finishes rising (the last
   rise ends at 1.1s), on opening About and on landing on it. Not an overlay-* animation, so site.js
   doesn't wait for it before settling the overlay. */
.overlay--about .about-gate { animation: planet-appear 1.8s ease-in-out 0.8s both; } /* slowly, like something coming into view */
@keyframes planet-appear { from { opacity: 0; } }

/* One column, as wide as a comfortable form: any intro text, the form in a white-outlined box,
   then "or email" and the address at the size of the rest of the text. */
.contact { display: grid; gap: 28px; max-width: min(100%, 24em); }
.contact-area { margin: 0; }
.contact-image { margin-top: 24px; max-width: 320px; }
.contact-box { border: 1px solid var(--paper); padding: clamp(20px, 2vw, 32px); }
.contact-or { margin: 0 0 4px; font-size: 0.8em; letter-spacing: 0.02em; }
.contact-details li + li { margin-top: 0.2em; }
.contact-details a { overflow-wrap: anywhere; }

.contact-form { display: grid; gap: 16px; }
.contact-form label { display: block; margin-bottom: 4px; }
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}
.contact-form textarea { resize: vertical; height: clamp(4em, 15svh, 6.5em); } /* shorter on short windows, so the address under the box stays in view on a laptop */
/* Browser autofill paints its own light background, which hid the light text until edited. Cover it
   with the page colour and keep the text light. */
.contact-form :is(input, textarea, select):autofill,
.contact-form :is(input, textarea, select):-webkit-autofill {
  -webkit-text-fill-color: var(--paper);
  caret-color: var(--paper);
  box-shadow: inset 0 0 0 1000px var(--olive);
  transition: background-color 600000s 0s; /* Chrome keeps its own background otherwise */
}
.contact-form select option { color: var(--ink); }
/* After Send (site-kit's form script): the thank-you takes the form's place, and anything to fix
   sits above the button, marked by a rule so it reads as a message rather than more form. */
.contact-sent { margin: 0; outline: none; }
.contact-error { margin: 0; padding-left: 12px; border-left: 2px solid currentColor; }
/* With no script, /__contact answers with its own small page in these styles. */
.contact-result { max-width: 32em; padding: var(--space) var(--gutter); }
.contact-result p + p { margin-top: 1em; }
.contact-result a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
.contact-form :focus-visible { outline: none; border-bottom-width: 2px; }
.contact-form button,
.gate-form button {
  justify-self: start;
  padding: 10px 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

@media (min-width: 900px) {
  /* The panel stays in view: overlays cover only the work. */
  .overlay { left: var(--panel); padding: var(--space); }
  .panel { z-index: 60; } /* the overlays slide out from behind it */
  /* Desktop: the title on the left, the X in its own column at the right. */
  .overlay-head { grid-template-columns: minmax(0, 1fr) max-content; column-gap: var(--space); margin-bottom: var(--space); }
  /* The X's visible end (x=18.5 of its 24-unit box) lands on the content's right edge. */
  .overlay-close { order: 2; padding-right: 0; margin-right: calc(var(--head-icon) * -5.5 / 24); }

  .prose-section.has-media { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space); align-items: stretch; }
  .prose-section.has-media .prose-media { align-self: start; }
  /* The photo never runs past the window, so About doesn't scroll: the window less the overlay's
     padding (top and bottom), the 36px title row, and the space under it. */
  .prose-section.has-media .prose-media img { width: auto; max-height: calc(100svh - 3 * var(--space) - 36px); }
  /* Beside a photo, the links sit at the bottom of the text column, level with the photo's foot. */
  .prose-section.has-media .about-links { margin-top: auto; padding-top: 40px; }
  .prose-media { margin: 0; }
  /* About is one column: the arched portrait over the text, at a readable measure. The planet
     floats midway across the empty space to the right of the portrait, level with its lower half,
     clear of the photo and the text under it. */
  .overlay--about .prose-section.has-media { display: block; }
  .overlay--about .prose-section.has-media .prose-column { max-width: 36em; }
  .overlay--about .prose-section.has-media .prose-media { margin-bottom: var(--space); }
  .overlay--about .prose-section.has-media .prose-media img { width: min(100%, 360px); max-height: none; }
  .overlay--about .prose-section.has-media .about-links { margin-top: 40px; padding-top: 0; }
  .overlay--about .prose-section.has-media .about-gate { position: absolute; top: 400px; left: calc((min(100%, 360px) + 100%) / 2 - var(--about-icon) / 2); }

  /* Contact's type grows with the window, so it doesn't sit small in a wide, empty overlay. */
  .overlay--contact { font-size: clamp(22px, 1.1vw + 10px, 30px); }

  /* The login's lift: the title row (36px) and the space under it. The text at the bottom stays put. */
  .overlay--gate .gate { margin-bottom: calc(36px + var(--space)); }
}

/* Wide windows: About's text moves into its own column to the right of the portrait, so it fills
   the overlay instead of leaving its right side empty. The links sit at the foot of the text column,
   level with the portrait's foot (or under the text, if the text runs longer). Narrower desktops keep
   the single column above. The planet floats midway between the end of the text and the overlay's
   right edge, well down beside the portrait. It's placed from the text column (100%) and the section's
   width (100cqw, the section being a container); a third, empty column keeps room for it at the right
   (the text gives way a little on the narrower of these windows). */
@media (min-width: 1200px) {
  .overlay--about .prose-section.has-media {
    display: grid;
    grid-template-columns: clamp(300px, 26vw, 440px) minmax(0, 36em) minmax(calc(44px + var(--space)), 1fr);
    gap: var(--space);
    align-items: stretch;
    container-type: inline-size;
  }
  .overlay--about .prose-section.has-media .prose-media { margin-bottom: 0; }
  .overlay--about .prose-section.has-media .prose-media img { width: 100%; }
  .overlay--about .prose-section.has-media .about-links { margin-top: auto; padding-top: 40px; }
  /* The text stands a little further off the portrait, and starts a little below its top. */
  .overlay--about .prose-section.has-media .prose-column { position: relative; padding: var(--space) 0 0 var(--space); }
  .overlay--about .prose-section.has-media .about-gate {
    top: calc(clamp(300px, 26vw, 440px) * 0.74 + 350px); /* from the portrait's size, not the text's length */
    left: calc((100% + 100cqw - clamp(300px, 26vw, 440px) - var(--space)) / 2 - var(--about-icon) / 2);
  }
}


/* Phones: the top bar stays, as on any page, and an overlay fills the screen under it. The hamburger
   moves between pages (Work closes the overlay), so there's no X, and the open menu drops over the
   overlay. The title heads the page like a project's, at the same size. The overlay runs to the
   bottom of the screen, under Safari's floating toolbar, so its end has room to scroll clear of it
   (Send, About's icons). */
@media (max-width: 899px) {
  .panel { z-index: 40; }
  .overlay { top: 56px; padding-top: 0; padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
  .overlay-close { display: none; }
  /* The menu drops over the overlay; a switch in it has nothing to switch there. Only the menu's:
     the work's stays, so the work slides back in whole when the overlay closes. */
  :root:has([data-overlay-path]:not([hidden])) .nav .layout-switch { display: none; }
  .overlay-head { display: block; margin-bottom: 0; padding: 24px 0; } /* as far under the bar as a page's top */
  /* An overlay's contents ride in with it, all at once, as the Neptunian page's do, rather than
     rising up into place after it. */
  .overlay.is-entering :is(.overlay-head, .prose-media, .prose-column > :not(.about-links), .about-links > :not(.about-gate), .contact > *) { animation: none; }
  /* About's planet sits off the row of links, down and to the right of Instagram. */
  .overlay--about .about-gate { translate: 180px 50px; }
  /* LT Cushion's letters ride ~2px high, so the name comes down to meet the hamburger's centre. */
  .brand { translate: 0 2px; }

  /* The menu unrolls down from the bar while its links slide in from the right (where they line
     up), one after another. Closing (data-shutting, site.js) fades them and rolls it back up into
     the bar. Opening an overlay from it skips that: the overlay slides over it instead. */
  /* The open menu lies over the page under the bar rather than in its flow, so opening it doesn't
     push the work down (the browser would move the scroll to follow, and closing it left the
     visitor further down the work than they were). */
  .nav { position: absolute; top: 100%; left: 0; right: 0; background: inherit; }
  :is(.panel[data-open], .panel:target) .nav { animation: menu-drop 0.5s var(--ease-out) backwards; }
  .panel[data-shutting] .nav { animation: menu-lift 0.34s var(--ease-in) both; }
  :is(.panel[data-open], .panel:target) :is(.nav-list > li, .nav > .layout-switch) {
    animation: menu-item 0.5s var(--ease-out) backwards;
    animation-delay: calc(0.06s + var(--item, 0) * 0.05s);
  }
  .panel[data-shutting] :is(.nav-list > li, .nav > .layout-switch) { animation: menu-item-out 0.18s linear both; }
  .nav-list > li:nth-child(2) { --item: 1; }
  .nav-list > li:nth-child(3) { --item: 2; }
  .nav-list > li:nth-child(4) { --item: 3; }
  .nav-list > li:nth-child(n+5), .nav > .layout-switch { --item: 4; }

  /* Back to the work (Work in the menu, or Back): the work slides in from the left like an overlay,
     over the one that was showing and the menu (if open). The overlay and the menu are cut away
     along the work's leading edge as it comes, so all three move as one. */
  .overlay.is-leaving { z-index: 30; animation: overlay-uncover 0.65s var(--ease-out) both; }
  :root.is-returning .main { animation: overlay-slide-in 0.65s var(--ease-out) both; }
  :root.is-returning .panel[data-closing] .nav { animation: overlay-uncover 0.65s var(--ease-out) both; }
}
@keyframes overlay-uncover { from { clip-path: inset(0); } to { clip-path: inset(0 0 0 100%); } }
@keyframes menu-drop { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
@keyframes menu-lift { from { clip-path: inset(0); } to { clip-path: inset(0 0 100% 0); } }
@keyframes menu-item { from { opacity: 0; translate: 24px 0; } }
@keyframes menu-item-out { to { opacity: 0; } }

/* ── The Neptunian page: a takeover, with its own panel ────────────────── */

/* It covers everything, the site's panel included, and lays itself out the same way: its panel's
   name and links land exactly where the site's were. */
.overlay--takeover { padding: 0; }
/* Above the site's panel (raised on desktop so the other overlays slide out from behind it), while
   it slides in and out too; on phones it keeps covering the site's bar as the work comes back over it. */
@media (max-width: 899px) { .overlay--takeover, .overlay--takeover.is-leaving { top: 0; z-index: 45; } }
@media (min-width: 900px) { .overlay--takeover, .overlay--takeover:is(.is-entering, .is-leaving) { z-index: 70; } }
.panel--secret { background: var(--neptune); color: var(--paper); }
.panel--secret .nav a[aria-current] { color: var(--paper); }
/* Log Out leads with a left chevron, sized and set like Back's; on hover it nudges left. */
.nav-list .nav-logout { display: flex; align-items: center; gap: 0.6em; } /* a full row like the other links, laid out as a row */
/* A little space between Log Out and the sections (a margin, so it isn't part of Log Out's target). */
.panel--secret .nav-list > li:has(> .nav-logout) { margin-bottom: 0.75em; }
.nav-logout .chevron { flex: none; width: 0.4267em; height: 1.28em; translate: 0 -0.09em; transition: transform 0.3s var(--ease); }
.nav-logout:hover .chevron, .nav-logout:focus-visible .chevron { transform: translateX(-3px); }
@media (max-width: 899px) { .nav-list .nav-logout { justify-content: flex-end; } } /* phones: the menu is right-aligned */
/* The link list scrolls if it's long, which also clips sideways: give it room on the left (into the
   panel's padding, so nothing moves) for the chevron's hover nudge. */
@media (min-width: 900px) { .panel--secret .nav { margin-left: -12px; padding-left: 12px; } }
/* Smoke in the page's background: two layers of soft noise in amber (#d49c38), drifting opposite
   ways at different speeds, thicker toward the bottom. Fixed, so it stays put as the photos scroll
   over it; the panel (positioned, later in the page) covers it. Each layer is one tile wider than
   the screen and slides exactly one tile, and the tiles stitch, so the loop has no seam. Reduced
   motion (below) leaves it still. */
.secret-smoke, .smoke-mirror {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgb(0 0 0 / 0.75) 45%, rgb(0 0 0 / 0.3) 100%);
  mask-image: linear-gradient(to top, #000 0%, rgb(0 0 0 / 0.75) 45%, rgb(0 0 0 / 0.3) 100%);
}
.secret-smoke::before, .secret-smoke::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background-repeat: repeat;
  will-change: translate;
}
.secret-smoke::before {
  --tile: 1400px;
  width: calc(100% + var(--tile));
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1400' height='900'%3E%3Cfilter id='s' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.0021 0.0044' numOctaves='5' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.831 0 0 0 0 0.612 0 0 0 0 0.22 3.2 0 0 0 -1.45'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23s)'/%3E%3C/svg%3E");
  background-size: var(--tile) 900px;
  opacity: 0.32;
  animation: smoke-drift-left 140s linear infinite;
}
.secret-smoke::after {
  --tile: 1100px;
  left: calc(-1 * var(--tile));
  width: calc(100% + var(--tile));
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1100' height='760'%3E%3Cfilter id='s' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.0032 0.006' numOctaves='4' seed='23' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.831 0 0 0 0 0.612 0 0 0 0 0.22 3.6 0 0 0 -1.7'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23s)'/%3E%3C/svg%3E");
  background-size: var(--tile) 760px;
  opacity: 0.24;
  animation: smoke-drift-right 95s linear infinite, smoke-breathe 23s ease-in-out infinite alternate;
}
@keyframes smoke-drift-left { to { translate: calc(-1 * var(--tile)) 0; } }
@keyframes smoke-drift-right { to { translate: var(--tile) 0; } }
@keyframes smoke-breathe { from { opacity: 0.12; } to { opacity: 0.3; } }
.secret-main { position: relative; } /* over the smoke */
/* With WebGL, site.js draws the smoke on a canvas instead: it curls and rises rather than sliding. */
.secret-smoke.is-live::before, .secret-smoke.is-live::after { display: none; }
.secret-smoke canvas { display: block; width: 100%; height: 100%; }
/* The photo viewer's copy, in its background: the same size and fade as the page's, lined up with it. */
.smoke-mirror { position: absolute; display: block; width: 100%; height: 100%; }

.secret-view { padding: 24px 0 0; }
.secret-view[hidden] { display: none; }
.secret-view .overlay-title { margin-bottom: 24px; padding: 0 var(--gutter); translate: none; }
/* A section's own heading (ext.heading, the About's "Welcome to my little planet"): larger than a
   title, a greeting rather than a label. */
.secret-view .overlay-title--lead { font-size: clamp(30px, 2.4vw + 12px, 46px); line-height: 1.15; text-wrap: balance; }
.secret-section .prose { padding: 0 var(--gutter) 24px; }
.secret-embed { padding: 0 var(--gutter) 24px; }
/* The player fills the screen under the title (the bar, the title and the padding around them),
   never shorter than Spotify's own 352px; its track list scrolls inside it. */
.secret-embed iframe { display: block; width: 100%; height: max(352px, calc(100svh - 160px)); border: 0; border-radius: 12px; }
/* While Spotify's player loads, a soft panel in its place, breathing gently; the player fades in
   over it once it has drawn (site.js marks the embed is-loaded). Both share one grid cell, so the
   panel is exactly the player's size. Dark, as Spotify's player is, so one turns into the other
   gently. Without the script, the player just shows as it loads. */
.secret-embed { display: grid; }
.secret-embed::before { content: ""; grid-area: 1 / 1; border-radius: 12px; background: rgb(18 18 18 / 0.45); animation: embed-wait 1.4s ease-in-out infinite alternate; }
.secret-embed iframe { grid-area: 1 / 1; }
.secret-embed.is-loaded::before { animation: none; }
@keyframes embed-wait { from { opacity: 0.45; } }
@media (scripting: enabled) {
  .secret-embed iframe { opacity: 0; transition: opacity 0.7s var(--ease); }
  .secret-embed.is-loaded iframe { opacity: 1; }
}
.secret-section + .secret-section { margin-top: 48px; }
/* The Neptunian About: rows of text, each with a photo beside it. On phones the photo follows its
   text, the width of the screen; on desktop they share the row half and half, the text and photo
   swapping sides from one row to the next (below). */
.secret-row { display: grid; gap: 24px; }
.secret-row .prose { padding: 0 var(--gutter); font-size: 18px; line-height: 1.55; }
.secret-row + .secret-row { margin-top: 32px; } /* phones: from a photo to the next text */
/* A section marked as a row (ext.row): a project's row on the work (.work-row), under the rows. */
.secret-strip { margin-top: 32px; padding-bottom: 56px; } /* room under it at the end of the page */
/* Phones: unlike the work's rows, it doesn't scroll: the photos share the width at one height, edge
   to edge like the page's other photos. */
@media (max-width: 899px) {
  .secret-strip .work-row { overflow: visible; scroll-snap-type: none; padding-inline: 0; }
  .secret-strip .work-row > .frame { flex: var(--ratio, 1) 1 0; width: auto; }
}
/* Each photo in a square, cropped from its centre (or the focus point set on it). */
.secret-row .frame img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }

@media (min-width: 900px) {
  .overlay--takeover { left: 0; padding: 0; }
  .overlay--takeover:not([hidden]) { display: grid; grid-template-columns: var(--panel) minmax(0, 1fr); align-items: start; }
  .secret-main { padding: var(--space) var(--space) 96px; }
  .secret-view { padding: 0; }
  .secret-view .overlay-title { margin-bottom: var(--space); padding: 0; }
  .secret-section .prose { max-width: 36em; padding: 0 0 var(--space); }
  .secret-embed { padding: 0 0 var(--space); }
  .secret-embed iframe { height: max(452px, calc(100svh - 3 * var(--space) - 32px)); } /* padding, title, gap below */
  .secret-section + .secret-section { margin-top: 96px; }
  /* Two columns, each centred on its text or photo, close together: the text a short measure at a
     larger size, the photo no taller than most of the window, so a row reads as one piece. */
  /* The rows' view (the heading with them) keeps to a moderate width, centred: on a wide window the
     margins grow, not the gap between text and photo. */
  .secret-view:has(.secret-row) { max-width: 1180px; margin-inline: auto; }
  .secret-row { grid-template-columns: 1fr 1fr; column-gap: var(--space); align-items: center; justify-items: center; }
  .secret-row .prose { width: 100%; max-width: 25em; padding: 0; font-size: clamp(20px, 0.5vw + 13px, 23px); }
  .secret-row:nth-child(even of .secret-row) .prose { order: 2; }
  .secret-row .frame { width: min(100%, 62svh, 560px); }
  .secret-row + .secret-row { margin-top: calc(1.5 * var(--space)); }
  .secret-strip { margin-top: calc(2 * var(--space)); padding-bottom: calc(2 * var(--space)); }
}

/* ── The Neptune gate ──────────────────────────────────────────────────── */

/* A normal overlay (beside the panel, same fade), in near-black night sky, with the login centred in
   it: across, and down the window. The part under the close X fills the rest of the overlay and
   centres the login in it; on desktop it's lifted by the title row's height, so the login sits at the
   window's middle rather than the middle of what's under the title. The page's text (if any) sits
   small and centred at the bottom. Taller than the window, it just scrolls. */
.overlay--gate { --gate-sky: #07070b; background: var(--gate-sky); color: var(--paper); }
.overlay--gate:not([hidden]) { display: flex; flex-direction: column; }
.overlay--gate .overlay-inner { flex: 1 0 auto; display: grid; grid-template-rows: 1fr auto; }
/* No title shown (Grant, 2026-12-02): it stays for screen readers, which name the overlay by it,
   and keeps its row so the X stays where it is. */
.overlay--gate .overlay-title { visibility: hidden; }
.gate { align-self: center; width: min(320px, 100%); margin: 0 auto; text-align: center; }
.gate-image { width: 120px; margin: 0 auto 32px; }
.gate-image img { aspect-ratio: 1; object-fit: contain; }
.gate-foot { padding-top: 32px; font-size: 13px; line-height: 1.6; text-align: center; color: color-mix(in srgb, var(--paper) 70%, var(--gate-sky)); }

/* The stars: behind everything in the overlay (one screen of them, scrolling with it), each a dot
   that brightens and fades on its own timing (handlers/layout.tsx scatters them). A few are brighter
   and glow. Reduced motion leaves them still, at their resting brightness. */
.gate-sky { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; --shooting-opacity: 1; } /* how strongly the rockets and shooting stars show */
.gate-sky i { position: absolute; aspect-ratio: 1; border-radius: 50%; background: var(--paper); opacity: 0.35; animation: twinkle ease-in-out infinite; }
.gate-sky .bright { box-shadow: 0 0 4px 1px color-mix(in srgb, var(--paper) 45%, transparent); }
@keyframes twinkle {
  0%, 100% { opacity: 0.15; scale: 0.8; }
  50% { opacity: 1; scale: 1; }
}
/* Rockets and shuttles, each carrying a hint (handlers/layout.tsx). site.js flies one right across
   the sky, edge to edge, either way and tilted a little up or down, along a lane clear of the
   planet and the fields, above the text at the bottom. The hint is cut out of the side of its
   squared-off body in the sky's own colour, and the body is as long as the hint. A rocket has a
   red nose cone and swept fins; a shuttle (rocket--shuttle) a blunt nose with cockpit windows, a
   tail fin and a wing. The engine flame flickers. Flying left, the frame turns round and the hint
   turns back, so it still reads. Hidden until then. */
.rocket {
  --hull: #e9ecf2;
  --trim: #df5a3e;
  position: absolute;
  top: 0;
  left: 0;
  height: 48px;
  display: flex;
  align-items: center;
  transform-origin: 0 50%;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--paper) 28%, transparent));
}
.rocket-frame { display: flex; align-items: center; height: 100%; }
.rocket.is-leftward .rocket-frame, .rocket.is-leftward .rocket-text { scale: -1 1; }
.rocket-flame {
  width: 30px;
  height: 12px;
  margin-right: -2px;
  border-radius: 50% 0 0 50%;
  background: linear-gradient(to left, #fff6d8, #ffc15a 30%, #ff7a3d 62%, transparent);
  transform-origin: 100% 50%;
  animation: rocket-flame 0.24s linear infinite;
}
@keyframes rocket-flame {
  0%, 100% { scale: 1 1; }
  33% { scale: 0.8 0.9; }
  66% { scale: 1.12 1.04; }
}
.rocket-body {
  position: relative;
  display: flex;
  align-items: center;
  height: 22px;
  padding: 0 14px 0 18px;
  border-radius: 3px 1px 1px 3px;
  background: var(--hull);
}
.rocket-text {
  font-family: system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-box: trim-both cap alphabetic; /* centres the capitals themselves on the body */
  white-space: nowrap;
  color: var(--gate-sky);
}
/* A rocket's fins, swept back, above and below its tail. */
.rocket-body::before, .rocket-body::after {
  content: '';
  position: absolute;
  left: -2px;
  width: 20px;
  height: 12px;
  background: var(--trim);
}
.rocket-body::before { bottom: 100%; clip-path: polygon(0 0, 30% 0, 100% 100%, 0 100%); }
.rocket-body::after { top: 100%; clip-path: polygon(0 0, 100% 0, 30% 100%, 0 100%); }
.rocket-nose {
  width: 28px;
  height: 22px;
  margin-left: -1px;
  background: var(--trim);
  clip-path: polygon(0 0, 35% 5%, 68% 22%, 100% 50%, 68% 78%, 35% 95%, 0 100%); /* an ogive, near enough */
}
/* A shuttle: white, with its dark underside, a tall tail fin, a wing along its lower back, and a
   blunt nose with a dark cap and cockpit windows. */
.rocket--shuttle { --hull: #f1f2f5; --belly: #464a56; }
.rocket--shuttle .rocket-body { background: linear-gradient(var(--hull) 80%, var(--belly) 80%); }
.rocket--shuttle .rocket-body::before { left: 0; width: 26px; height: 17px; background: var(--hull); clip-path: polygon(0 0, 38% 0, 100% 100%, 0 100%); }
.rocket--shuttle .rocket-body::after { left: 6px; width: 55%; height: 6px; background: #c9ccd5; clip-path: polygon(0 0, 100% 0, 12% 100%, 0 100%); }
.rocket--shuttle .rocket-nose {
  position: relative;
  width: 22px;
  background: linear-gradient(to right, var(--hull) 62%, var(--belly) 62%);
  clip-path: none;
  border-radius: 0 14px 9px 0 / 0 13px 9px 0;
}
.rocket--shuttle .rocket-nose::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 1px;
  width: 11px;
  height: 4px;
  background: linear-gradient(to right, var(--gate-sky) 44%, transparent 44% 56%, var(--gate-sky) 56%); /* two panes */
  clip-path: polygon(0 0, 100% 0, 82% 100%, 0 100%); /* raked back */
}

/* Plain shooting stars between the rockets (site.js): like the stars in the sky (.gate-sky .bright)
   come loose, a tiny white point with their soft glow and a short, thin trail fading out behind. */
.shooting-star { position: absolute; top: 0; left: 0; display: flex; align-items: center; height: 2px; transform-origin: 0 50%; opacity: 0; pointer-events: none; }
.shooting-trail {
  flex: none;
  height: 100%;
  background: linear-gradient(to left, var(--paper), color-mix(in srgb, var(--paper) 40%, transparent) 40%, transparent);
  clip-path: polygon(0 50%, 100% 0, 100% 100%); /* to a point behind */
  opacity: 0.6;
}
.shooting-head {
  flex: none;
  width: 2.5px;
  height: 2.5px;
  margin-left: -1.25px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 0 4px 1px color-mix(in srgb, var(--paper) 45%, transparent);
}
.shooting-star.is-leftward { flex-direction: row-reverse; }
.is-leftward .shooting-trail {
  background: linear-gradient(to right, var(--paper), color-mix(in srgb, var(--paper) 40%, transparent) 40%, transparent);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.is-leftward .shooting-head { margin-left: 0; margin-right: -1.25px; }
/* Sparks from a rocket's engine (site.js): tiny warm points drifting off behind it and fading. */
.shooting-ember {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50%;
  background: #ffd9b0;
  box-shadow: 0 0 4px 1px color-mix(in srgb, #ff7a45 70%, transparent);
  pointer-events: none;
}

.gate-form { display: grid; gap: 16px; text-align: left; }
.gate-form span { display: block; margin-bottom: 4px; font-size: 15px; color: color-mix(in srgb, var(--paper) 70%, var(--gate-sky)); }
.gate-form input {
  width: 100%;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--paper) 40%, var(--gate-sky));
  border-radius: 0;
  background: transparent;
  color: var(--paper);
  font: inherit;
  font-size: 18px;
}
.gate-form input:focus-visible { outline: none; border-bottom-color: var(--paper); }
.gate-form input:autofill,
.gate-form input:-webkit-autofill {
  -webkit-text-fill-color: var(--paper);
  caret-color: var(--paper);
  box-shadow: inset 0 0 0 1000px var(--gate-sky);
  transition: background-color 600000s 0s;
}
.gate-form input[readonly] { color: color-mix(in srgb, var(--paper) 70%, var(--gate-sky)); cursor: default; }
.gate-form button { justify-self: center; margin-top: 8px; transition: opacity 0.3s var(--ease), visibility 0.3s; }
/* Enter appears once something is typed in the password. */
.gate-form:has(.gate-key:placeholder-shown) button { opacity: 0; visibility: hidden; }
/* The password is a plain text field (so browsers don't offer to save it; handlers/layout.tsx),
   shown as dots like a real one. */
.gate-key { -webkit-text-security: disc; }
/* The hint sits under Enter and shows even before Enter does (Enter keeps its space while hidden). */
.gate-hint { justify-self: center; margin-top: -8px; font-size: 13px; color: var(--paper); }


/* ── Landing page ──────────────────────────────────────────────────────── */

.splash { position: relative; height: 100svh; overflow: hidden; background: var(--ink); color: var(--paper); }

.splash-media, .splash-media picture { position: absolute; inset: 0; }
.splash-media { isolation: isolate; }
.splash-media img { width: 100%; height: 100%; object-fit: cover; }
/* The cross-fade (Grant, 2026-11-23): the next photo fades in on top of the last, which stays fully
   there until it's covered, so the change never dips to the dark behind. An even ease in and out;
   site.js sets the length (--splash-fade) and the time between. */
.splash-media picture { opacity: 0; transition: opacity var(--splash-fade, 2.5s) cubic-bezier(0.45, 0, 0.55, 1); }
.splash-media picture.is-active { z-index: 1; opacity: 1; }
.splash-media picture.is-leaving { opacity: 1; transition: none; }
.splash-media::after {
  content: '';
  position: absolute;
  z-index: 2;
  inset: 0;
  background: rgb(39 38 36 / 0.28);
}

/* Centered over the image. The Enter link stretches over the whole page, so a tap anywhere enters. */
.splash-content {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: var(--gutter);
  text-align: center;
}
.splash-name { font-size: 30px; letter-spacing: 0.01em; }
.splash-name img { width: auto; max-height: 48px; margin: 0 auto; }
.splash-text { max-width: 32em; opacity: 0.85; }
.splash-text a { position: relative; z-index: 1; text-decoration: underline; text-underline-offset: 0.2em; }
.splash-enter { font-size: 17px; letter-spacing: 0.06em; opacity: 0.85; transition: opacity 0.3s var(--ease); }
.splash-enter::after { content: ''; position: absolute; inset: 0; }
.splash:hover .splash-enter { opacity: 1; }
.splash-enter:focus-visible { outline: none; opacity: 1; text-decoration: underline; text-underline-offset: 0.3em; }

@media (min-width: 900px) {
  .splash-name { font-size: 38px; }
  .splash-enter { font-size: 18px; }
}

/* Enter (a cross-document view transition; head.js skips it for every other navigation): the
   landing page lifts away like a curtain, showing the work already in place underneath (the two
   never blend), while his name glides from the middle up into the panel. Browsers without it go
   straight to the work. */
@view-transition { navigation: auto; }
.splash-name, .brand-name { view-transition-name: carlos-name; }
/* Enter and the landing text fade where they are, quickly, rather than ride up past the name. */
.splash-enter { view-transition-name: splash-enter; }
.splash-text { view-transition-name: splash-text; }
::view-transition-old(splash-enter), ::view-transition-old(splash-text) { animation-duration: 0.2s; }
::view-transition-old(root) { z-index: 1; mix-blend-mode: normal; animation: splash-lift 0.9s var(--ease-lift) both; }
::view-transition-new(root) { mix-blend-mode: normal; animation: work-settle 0.9s var(--ease-out) both; }
::view-transition-group(carlos-name) { animation-duration: 0.9s; animation-timing-function: var(--ease-lift); }
::view-transition-old(carlos-name), ::view-transition-new(carlos-name) { animation-duration: 0.9s; }
:root { --ease-lift: cubic-bezier(0.6, 0, 0.3, 1); }
@keyframes splash-lift { to { translate: 0 -100%; } }
@keyframes work-settle { from { translate: 0 4vh; } }

/* ── Not found ─────────────────────────────────────────────────────────── */

.missing { padding: 8px var(--gutter); }
.missing p { margin-top: 0.5em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  @view-transition { navigation: none; }
}
