/*
Theme Name: Simón De Zubiría
Theme URI: https://simondezubiria.com
Author: Simón De Zubiría
Description: Portfolio theme for simondezubiria.com. Pixelify Sans labels, Geist text and a pixel dragon, light or dark with the system setting, with a grid of recent web work. Projects come from the simondezubiria-plugin.
Version: 1.14.3
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: simondezubiria
*/

/* self-hosted, Latin subset (covers English and Spanish); preloaded in functions.php */
@font-face {
  font-family: "Pixelify Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/pixelify-sans-600-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400 500; /* one variable font */
  font-display: swap;
  src: url("assets/fonts/geist-latin.woff2") format("woff2");
}

:root {
  /* light and dark follow the visitor's system setting */
  color-scheme: light dark;
  --ink: #111111;
  --ink-soft: #55534e;
  --paper: #ffffff;
  --surface: #f4f4f2;   /* behind screenshots while they load */
  --line: rgba(17, 17, 17, .12);

  /* two families: pixel for short labels, Geist for anything you read */
  --font-pixel: "Pixelify Sans", ui-monospace, monospace;
  --font-text: "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* five sizes */
  --fs-display: clamp(30px, 3.2vw, 55px);  /* name, About / Projects */
  --fs-lead: clamp(24px, 2.2vw, 36px);     /* tagline */
  --fs-title: clamp(22px, 1.7vw, 28px);    /* section titles */
  --fs-large: clamp(18px, 1.3vw, 21px);    /* role line, about, contact */
  --fs-small: 15px;                        /* card details, footer */

  --gutter: clamp(16px, 9vw, 158px);
  --step: steps(3, end);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ededea;
    --ink-soft: #a29f98;
    --paper: #0f0f0e;
    --surface: #1b1b1a;
    --line: rgba(237, 237, 234, .14);
  }
}

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

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

:focus-visible {
  outline: 2px dashed var(--ink);
  outline-offset: 4px;
}

/* ---------- header ---------- */

.site-header {
  position: relative;
  display: flex;
  justify-content: center;
  padding: clamp(32px, 5vw, 85px) var(--gutter) 0;
}

.site-title {
  margin: 0;
  font: inherit;
}

.site-name {
  font-family: var(--font-pixel);
  font-weight: 600;
  font-size: var(--fs-display);
  line-height: 1.18;
  text-decoration: none;
}

.content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* EN / ES in the top right corner */
.lang-switch {
  position: absolute;
  top: clamp(20px, 2.6vw, 40px);
  right: var(--gutter);
  display: flex;
  gap: 4px;
  font-size: var(--fs-small);
}

.lang-switch a {
  padding: 4px 6px;
  color: var(--ink-soft);
  text-decoration: none;
}

.lang-switch a:hover { color: var(--ink); }

.lang-switch a[aria-current] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .25em;
}

/* narrower screens: the switcher gets its own line above the name */
@media (max-width: 900px) {
  .site-header { flex-direction: column; align-items: center; }
  .lang-switch { position: static; order: -1; align-self: flex-end; margin: -8px 0 8px; }
}

/* ---------- hero: ABOUT · dragon · PROJECTS ---------- */

.hero {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(16px, 6vw, 110px);
  width: 100%;
  max-width: calc(1186px + 2 * var(--gutter));
  padding: clamp(48px, 10vw, 180px) var(--gutter) 0;
}

.hero-link {
  font-family: var(--font-pixel);
  font-weight: 600;
  font-size: var(--fs-display);
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  position: relative;
  padding: .1em .2em;
}

.hero-link--about { justify-self: start; }
.hero-link--projects { justify-self: end; }

/* pixel underline that draws in hard steps */
.hero-link::after {
  content: "";
  position: absolute;
  left: .2em;
  right: .2em;
  bottom: 0;
  height: 4px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .24s var(--step);
}

.hero-link:hover::after,
.hero-link:focus-visible::after { transform: scaleX(1); }

.hero-link:hover { animation: blink-caret 1s steps(1) infinite; }

@keyframes blink-caret {
  50% { color: var(--ink-soft); }
}

.hero {
  position: relative;
  /* a multiple of the 80px-wide artwork, so every art pixel is a whole number of screen pixels */
  --dragon-w: clamp(240px, 26.5vw, 480px);
}

@supports (width: round(1px, 1px)) {
  .hero { --dragon-w: round(clamp(240px, 26.5vw, 480px), 80px); }
}

/* the dragon's tail hangs below the doorway, so line the links up with the doorway, not the whole artwork */
.hero { align-items: start; }
.hero-link { margin-top: calc(var(--dragon-w) * .5625 - .5em); }

.dragon {
  --ap: 5px; /* one art pixel on screen; js/dragon.js sets the real value */
  display: grid;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  width: var(--dragon-w);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* backdrop, door, back rocks, the dragon and the front ledge all share one cell */
.dragon > *,
.dragon-clip > *,
.dragon-body > * { grid-area: 1 / 1; }

/* everything of the dragon below the bottom ledge stays hidden, so the tail only
   shows as it rises out from behind the ledge. The clip doesn't move: the dragon
   slides behind it. The polygon follows the stones' bottom edge column by column
   and is written by ../dragon/build.py. */
.dragon-clip {
  position: relative;
  display: grid;
  clip-path: polygon(-100% -400%, 200% -400%, 200% 65%, 86.25% 65%, 86.25% 63.33%, 85% 63.33%, 85% 64.17%, 80% 64.17%, 80% 63.33%, 78.75% 63.33%, 78.75% 64.17%, 73.75% 64.17%, 73.75% 63.33%, 71.25% 63.33%, 71.25% 64.17%, 70% 64.17%, 70% 65%, 65% 65%, 65% 64.17%, 63.75% 64.17%, 63.75% 65%, 56.25% 65%, 56.25% 63.33%, 53.75% 63.33%, 53.75% 64.17%, 46.25% 64.17%, 46.25% 63.33%, 43.75% 63.33%, 43.75% 65%, 36.25% 65%, 36.25% 64.17%, 35% 64.17%, 35% 65%, 30% 65%, 30% 64.17%, 28.75% 64.17%, 28.75% 63.33%, 26.25% 63.33%, 26.25% 64.17%, 21.25% 64.17%, 21.25% 63.33%, 20% 63.33%, 20% 64.17%, 15% 64.17%, 15% 63.33%, 13.75% 63.33%, 13.75% 65%, -100% 65%);
}

.dragon-layer {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  pointer-events: none;
}

/* the bottom ledge stays in front of the dragon */
.dragon-ledge { position: relative; z-index: 3; }

/* the dragon breathes up and down one art pixel inside its doorway */
.dragon-body {
  position: relative;
  display: grid;
  transition: transform .3s var(--step);
  animation: bob 2.4s steps(1) infinite;
}

/* and shifts a pixel or two toward the cursor (--mx / --my in art pixels, from js/dragon.js) */
.dragon-body .dragon-layer {
  translate: calc(var(--mx, 0) * var(--ap)) calc(var(--my, 0) * var(--ap));
}

/* its face while it breathes fire */
.dragon-face--fire,
.dragon.is-fire .dragon-face { visibility: hidden; }
.dragon.is-fire .dragon-face--fire { visibility: visible; }

/* it leans toward whichever link you're about to click (tilt only: a stepped
   scaleX flip could freeze mid-way and leave it squashed) */
.hero:has(.hero-link--about:hover) .dragon-body { transform: translateX(-4%) rotate(-4deg); animation-play-state: paused; }
.hero:has(.hero-link--projects:hover) .dragon-body { transform: translateX(4%) rotate(4deg); animation-play-state: paused; }

/* fire breath: a quick pixel recoil while js/dragon.js draws the flames */
.dragon.is-breathing .dragon-body .dragon-layer { animation: recoil .7s steps(4, jump-none); }

/* the third click in a row: it flies off the top (over the name), then climbs
   back up from behind the bottom ledge */
.dragon.is-flying,
.dragon.is-returning { cursor: default; }
.dragon.is-flying .dragon-clip,
.dragon.is-returning .dragon-clip { z-index: 2; }
.dragon.is-flying .dragon-body,
.dragon.is-returning .dragon-body { animation: none; }
.dragon.is-flying .dragon-body .dragon-layer { animation: fly-out 1.5s steps(18, jump-none) forwards; }
.dragon.is-returning .dragon-body .dragon-layer { animation: rise-in 1.6s steps(20, jump-none); }

@keyframes bob {
  50% { translate: 0 calc(-1 * var(--ap)); }
}

@keyframes recoil {
  0%, 100% { transform: none; }
  20% { transform: translate(3%, -2%) rotate(3deg); }
  80% { transform: translate(2%, -1%) rotate(2deg); }
}

@keyframes fly-out {
  0% { transform: none; }
  15% { transform: translate(0, 3%); }                       /* crouch */
  35% { transform: translate(-3%, -14%) rotate(-6deg); }     /* take off */
  100% { transform: translate(-14%, -170%) rotate(-14deg); } /* gone off the top */
}

@keyframes rise-in {
  0% { transform: translate(0, 70%); }      /* below the ledge, out of sight */
  75% { transform: translate(0, -3%); }     /* climbs up past its spot */
  100% { transform: none; }                 /* and settles */
}

.dragon-fire {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  image-rendering: pixelated;
  mix-blend-mode: difference; /* white flames read black on the page, white over the dragon */
}

/* ---------- statement ---------- */

.tagline {
  max-width: 1360px;
  margin: clamp(64px, 10vw, 180px) var(--gutter) 0;
  font-weight: 500;
  font-size: var(--fs-lead);
  line-height: 1.25;
  letter-spacing: -.015em;
  text-wrap: balance;
}

.role {
  margin: clamp(48px, 9vw, 160px) var(--gutter) 0;
  font-size: var(--fs-large);
  text-align: center;
}

/* ---------- work grid ---------- */

.section-title {
  margin: 0;
  font-family: var(--font-pixel);
  font-weight: 600;
  font-size: var(--fs-title);
  line-height: 1.18;
}

.work {
  width: 100%;
  margin-top: clamp(80px, 10vw, 180px);
  scroll-margin-top: 40px;
}

.work-head { padding: 0 var(--gutter); }

/* every project at once: 3 columns, 2 on tablets, 1 on phones */
.work-grid {
  list-style: none;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 56px 32px;
  padding: 32px var(--gutter) 8px;
}

@media (max-width: 1000px) { .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .work-grid { grid-template-columns: minmax(0, 1fr); } }

.card-link {
  display: block;
  text-decoration: none;
}

.card-screen {
  aspect-ratio: 16 / 10;
  background: var(--surface);
  outline: 1px solid var(--line);   /* keeps white sites from melting into the page */
  outline-offset: -1px;
  overflow: hidden;
}

.card-screen { position: relative; }

/* the card's video sits over the still and shows once it's playing */
.card-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  pointer-events: none;
}

.card.is-playing .card-video.is-ready { opacity: 1; }

.card-screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.card-meta {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  column-gap: 16px;
  padding-top: 16px;
}

.card-title {
  margin: 0;
  font-weight: 500;
  font-size: 17px;
  line-height: 1.3;
}

.card-arrow {
  display: inline-block;
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity .2s, transform .2s;
}

.card-link:hover .card-arrow,
.card-link:focus-visible .card-arrow { opacity: 1; transform: none; }

.card-year {
  font-size: var(--fs-small);
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.card-role {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  font-size: var(--fs-small);
  color: var(--ink-soft);
}

/* ---------- about ---------- */

.about {
  width: 100%;
  max-width: calc(1360px + 2 * var(--gutter));
  padding: clamp(80px, 10vw, 160px) var(--gutter) 0;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 2fr;
  gap: 24px 48px;
  scroll-margin-top: 0;
}

.about-body p {
  margin: 0 0 1em;
  font-size: var(--fs-large);
  line-height: 1.5;
  max-width: 52ch;
}

.contact {
  grid-column: 2;
  margin-top: clamp(24px, 3vw, 40px);
  padding-top: clamp(24px, 3vw, 40px);
  border-top: 1px solid var(--line);
}

.contact-lead {
  margin: 0;
  max-width: 34ch;
  font-size: var(--fs-large);
  color: var(--ink-soft);
}

/* the email is the main call to action */
.contact-mail {
  display: inline-block;
  margin-top: 8px;
  font-weight: 500;
  font-size: var(--fs-lead);
  line-height: 1.25;
  letter-spacing: -.015em;
  overflow-wrap: anywhere;
}

.contact-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  margin: clamp(20px, 2.5vw, 32px) 0 0;
  padding: 0;
  font-size: var(--fs-large);
}

.contact-label {
  margin-right: 10px;
  color: var(--ink-soft);
}

.contact a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}

.contact-mail { text-decoration-thickness: 2px; }

.contact a:hover { text-decoration-color: var(--ink-soft); }

/* ---------- project page ---------- */

.project {
  width: 100%;
  max-width: calc(1360px + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(40px, 6vw, 96px) var(--gutter) 0;
}

.project-back {
  font-size: var(--fs-small);
  color: var(--ink-soft);
  text-decoration: none;
}

.project-back:hover { color: var(--ink); }

.project-head {
  display: grid;
  grid-template-columns: 2fr minmax(220px, 1fr);
  gap: 32px clamp(32px, 6vw, 96px);
  align-items: start;
  margin-top: clamp(24px, 3vw, 40px);
}

.project-title {
  margin: 0;
  font-family: var(--font-pixel);
  font-weight: 600;
  font-size: var(--fs-display);
  line-height: 1.1;
}

.project-lead {
  margin: 20px 0 0;
  max-width: 34ch;
  font-weight: 500;
  font-size: var(--fs-lead);
  line-height: 1.25;
  letter-spacing: -.015em;
  text-wrap: balance;
}

.project-facts {
  margin: 0;
  display: grid;
  gap: 12px;
  font-size: var(--fs-small);
}

.project-facts div {
  display: grid;
  grid-template-columns: 88px 1fr; /* fits «Tecnología» */
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.project-facts dt { color: var(--ink-soft); }
.project-facts dd { margin: 0; }

.project-facts a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}

.shot {
  margin: clamp(32px, 4vw, 56px) 0 0;
  background: var(--surface);
  outline: 1px solid var(--line);
  outline-offset: -1px;
}

.shot img,
.shot video {
  display: block;
  width: 100%;
  height: auto;
}

.shot--lead { margin-top: clamp(40px, 5vw, 72px); }

.project-body {
  margin: clamp(56px, 7vw, 112px) 0 0 auto;
  width: min(100%, calc((100% - clamp(32px, 6vw, 96px)) * 2 / 3));
  margin-right: 0;
  font-size: var(--fs-large);
  line-height: 1.55;
}

.project-body > * { max-width: 60ch; }
.project-body > :first-child { margin-top: 0; }

.project-body h2,
.project-body h3 {
  margin: 2em 0 .6em;
  font-family: var(--font-pixel);
  font-weight: 600;
  font-size: var(--fs-title);
  line-height: 1.2;
}

.project-body p { margin: 0 0 1em; }

.project-body a {
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}

.motion {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: clamp(24px, 3vw, 40px);
  margin-top: clamp(56px, 7vw, 112px);
}

.motion-item { margin: 0; }

.motion-item img,
.motion-item video {
  display: block;
  background: var(--surface);
  width: 100%;
  height: auto;
  outline: 1px solid var(--line);
  outline-offset: -1px;
}

.motion-item figcaption {
  margin-top: 10px;
  font-size: var(--fs-small);
  color: var(--ink-soft);
}

.shots-phone {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 3vw, 48px);
  margin-top: clamp(56px, 7vw, 112px);
}

.shot--phone {
  flex: 0 1 300px;
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
}

.project-next {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: clamp(80px, 10vw, 160px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.project-next-label {
  font-size: var(--fs-small);
  color: var(--ink-soft);
}

.project-next-title {
  font-family: var(--font-pixel);
  font-weight: 600;
  font-size: var(--fs-display);
  line-height: 1.1;
}

.project-next:hover .project-next-title { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: .15em; }

/* ---------- lightbox (js/lightbox.js) ---------- */

.project :is(.shot, .motion-item) :is(img, video) { cursor: zoom-in; }
.project :is(.shot, .motion-item) :is(img, video):focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) {
  .project :is(.shot, .motion-item) video { cursor: auto; } /* players with controls there */
}

html.has-lightbox { overflow: hidden; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  /* the page stays visible behind, frosted in the page's own paper colour */
  background: rgba(255, 255, 255, .72);
  background: color-mix(in srgb, var(--paper) 62%, transparent);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  backdrop-filter: blur(22px) saturate(1.3);
}

.lightbox[hidden] { display: none; }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .lightbox { background: color-mix(in srgb, var(--paper) 94%, transparent); }
}

.lightbox-stage {
  position: absolute;
  inset: 0;
  display: flex;
  padding: clamp(64px, 7vw, 96px) clamp(16px, 6vw, 112px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.lightbox-stage::-webkit-scrollbar { display: none; }

.lightbox-media {
  display: block;
  margin: auto; /* centred, and still scrollable from the top-left once it's bigger than the screen */
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  flex: none;
  background: var(--surface);
  outline: 1px solid var(--line);
  outline-offset: -1px;
  box-shadow: 0 24px 80px rgba(17, 17, 17, .14);
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-media[hidden] { display: none; }

.lightbox.is-zoomed .lightbox-media {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}

.lightbox-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
  opacity: .7;
  transition: opacity .15s;
}

.lightbox-btn svg { display: block; }
.lightbox-btn:hover { opacity: 1; }
.lightbox-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.lightbox-btn[hidden] { display: none; }

.lightbox-close { top: 16px; right: 16px; }
.lightbox-prev,
.lightbox-next { top: 50%; transform: translateY(-50%); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox.is-zoomed .lightbox-prev,
.lightbox.is-zoomed .lightbox-next { display: none; }

.lightbox-count {
  position: absolute;
  left: 50%;
  bottom: 20px;
  margin: 0;
  transform: translateX(-50%);
  font-size: var(--fs-small);
  color: var(--ink-soft);
  pointer-events: none;
}

@media (max-width: 760px) {
  .lightbox-stage { padding: 72px 16px; }
  .lightbox-prev,
  .lightbox-next { top: auto; bottom: 12px; transform: none; }
}

/* ---------- footer ---------- */

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: clamp(80px, 10vw, 160px);
  padding: 24px var(--gutter) 120px; /* room for the fixed «Under construction» sign */
  border-top: 1px solid var(--line);
  font-size: var(--fs-small);
  color: var(--ink-soft);
}

.to-top { text-decoration: none; }
.to-top:hover { text-decoration: underline; }

/* ---------- under construction sign ---------- */

.construction {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 18px 16px 12px;
  background: #000;
  color: #fff;
  /* hazard tape along the top edge */
  background-image: repeating-linear-gradient(-45deg, #fff 0 6px, #000 6px 12px);
  background-size: 100% 6px;
  background-repeat: no-repeat;
  pointer-events: none;
}

.construction-crane {
  display: block;
  flex: none;
  image-rendering: pixelated;
}

.construction-text {
  font-family: var(--font-pixel);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: .02em;
  max-width: 8.5em;
}

/* on a dark page the black sign needs an edge to stand out */
@media (prefers-color-scheme: dark) {
  .construction { outline: 1px solid var(--line); }
}

/* the load bobs on its cable, the warning light blinks */
.construction-load { animation: hoist 2.4s steps(1) infinite; }
.construction-light { fill: #ff3b1f; animation: blink 1s steps(1) infinite; }

@keyframes hoist {
  0%, 100% { transform: translateY(0); }
  25% { transform: translateY(1px); }
  50% { transform: translateY(2px); }
  75% { transform: translateY(1px); }
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ---------- small screens ---------- */

@media (max-width: 760px) {
  body { font-size: 16px; }

  .hero {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "dragon dragon" "about projects";
    row-gap: 28px;
  }

  .hero { --dragon-w: min(68vw, 320px); }
  @supports (width: round(1px, 1px)) { .hero { --dragon-w: round(down, min(68vw, 320px), 80px); } }
  .hero-link { margin-top: 0; }
  .dragon { grid-area: dragon; justify-self: center; }
  .hero-link { font-size: min(var(--fs-display), 7vw); white-space: nowrap; }
  .hero-link--about { grid-area: about; }
  .hero-link--projects { grid-area: projects; }

  .work-grid { gap: 48px 20px; padding-bottom: 32px; }

  .about { grid-template-columns: 1fr; }
  .contact { grid-column: 1; }

  .project-head { grid-template-columns: 1fr; }
  .project-body { width: 100%; }
  .shots-phone {
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .shot--phone { flex: 0 0 70vw; scroll-snap-align: center; }

  .construction { left: 12px; bottom: 12px; gap: 10px; padding: 15px 12px 10px; }
  .construction-crane { width: 39px; height: 33px; }
  .construction-text { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .construction-load, .construction-light { animation: none; }
  .dragon-body, .dragon-body .dragon-layer, .hero-link:hover { animation: none !important; }
  .card-arrow, .dragon-body { transition: none; }
}
