/* Layout: fixed centered nav; full-height hero that slides up + blurs on scroll;
   pinned works gallery that scrolls horizontally. */
:root {
  --bg: #1a1b1e;
  --surface: #26272b;
  --surface-hover: #303136;
  --text: #f2f2f2;
  --text-muted: #8f8f8f;
  --text-soft: #c9c9c9;
  --line: #3b3c41;
  --ok: #3ccf6a;

  --font-body: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Roboto", system-ui, sans-serif;
  --font-mono: "Roboto", system-ui, sans-serif;

  --gutter: clamp(16px, 3.2vw, 64px);
  /* Hero column = exactly the avatar + gap + "Brand & Web Designer" headline row (in em of the title size),
     so the nav and every hero element share the same left and right edges. */
  --title-size: clamp(44px, 6.2vw, 66px);
  /* Type scale: the only six text sizes on the site */
  --fs-h1: var(--title-size);              /* page headline, big statements */
  --fs-h2: clamp(32px, 4vw, 48px);         /* section headings, big numbers */
  --fs-h3: clamp(24px, 2.4vw, 30px);       /* sub-headings, intro lines */
  --fs-title: clamp(18px, 1.5vw, 21px);    /* card / item titles */
  --fs-body: 17px;                         /* main text, links, buttons, fields */
  --fs-small: 13px;                        /* labels, meta, captions */
  --avatar: calc(var(--title-size) * 1.33);
  --head-gap: calc(var(--title-size) * .55);
  --content: calc(var(--title-size) * 11.23);
  --nav-h: 96px;

  /* works card size */
  --card-w: min(56vw, 840px);
  --card-gap: clamp(24px, 4vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p, ol, ul { margin: 0; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 6px; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  justify-content: center;
  padding: 36px var(--gutter) 28px;
  background: linear-gradient(to bottom, var(--bg) 45%, rgba(26, 27, 30, 0));
}
/* Nav spans the same centered column as the hero, so both share one axis and edges */
.nav { display: flex; justify-content: space-between; gap: 16px; width: 100%; max-width: var(--content); }
.nav__link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: var(--fs-body);
  white-space: nowrap;
  transition: color .2s;
}
.nav__link:hover, .nav__link.is-active { color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  justify-content: center;
  padding: calc(var(--nav-h) + clamp(40px, 9vh, 110px)) var(--gutter) 56px;
}
.hero__inner {
  width: 100%;
  max-width: var(--content);
  display: flex;
  flex-direction: column;
  will-change: transform, filter, opacity;
}

.hero__main { margin-top: auto; padding-top: clamp(24px, 6vh, 80px); }
.hero__head { display: flex; align-items: center; gap: var(--head-gap); }
.avatar-wrap { position: relative; flex: 0 0 auto; }
.avatar {
  width: var(--avatar);
  height: var(--avatar);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 35%, #5a5a5a, #2a2a2a 70%);
  color: #d8d8d8;
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  overflow: hidden;
}
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.avatar { transition: transform .3s cubic-bezier(.25,.8,.25,1); will-change: transform; }

.hero__title {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-h1);
  line-height: 1;
  letter-spacing: -0.035em;
}

.hero__bio { margin-top: clamp(20px, 3vh, 32px); font-size: var(--fs-title); font-weight: 400; line-height: 1.4; color: var(--text-soft); }

.hero__status {
  margin-top: clamp(20px, 3vh, 32px);
  font-size: var(--fs-body);
  line-height: 1.6;
}
.status-dot {
  display: inline-block;
  vertical-align: middle;
  position: relative;
  top: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(60, 207, 106, .22);
  margin: 0 8px 0 3px;            /* the 3px glow ring then starts exactly on the column edge */
}
.hero__status-text { color: var(--text-muted); }
.cta {
  margin-left: 6px;
  white-space: nowrap;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  transition: border-color .2s;
}
.cta:hover { border-color: var(--text); }

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
  margin-top: auto;
  padding: 96px 0 0;
  list-style: none;
}
.socials a {
  display: inline-block;
  padding: 7px 13px;
  border-radius: 6px;
  background: var(--surface);
  font-size: var(--fs-body);
  font-weight: 500;
  color: var(--text-soft);
  transition: background .2s, color .2s;
}
.socials a:hover { background: var(--surface-hover); color: var(--text); }

/* Hover: pills lean toward the cursor (main.js) and reveal the network's icon */
.socials a {
  display: inline-flex;
  align-items: center;
  translate: 0 0;
  transition: background .2s, color .2s, translate .3s cubic-bezier(.2, .8, .2, 1);
}
.ico {
  flex: none;
  width: 0;
  height: 14px;
  margin-left: 0;
  opacity: 0;
  fill: currentColor;
  transform: scale(.4) rotate(-20deg);
  transition: width .25s, margin .25s, opacity .2s, transform .35s cubic-bezier(.3, 1.6, .5, 1);
}
.socials a:hover .ico,
.socials a:focus-visible .ico { width: 14px; margin-left: 8px; opacity: 1; transform: none; transition-delay: 0s, 0s, .05s, .05s; }

/* ---------- Works ---------- */
.works {
  position: relative;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  padding-top: var(--nav-h);
  overflow: hidden;
}
.works__head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 8px var(--gutter) 0;
}
.works__count {
  font-size: var(--fs-body);
  font-weight: 500;
  color: var(--text-soft);
  white-space: nowrap;
}
.works__num {
  font-size: var(--fs-h3);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-right: 6px;
  font-variant-numeric: tabular-nums;
}

.filters { display: flex; gap: 6px; }
.filter {
  display: inline-flex;
  align-items: flex-start;
  gap: 3px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-size: var(--fs-body);
  font-weight: 500;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.filter sup { font-size: var(--fs-small); line-height: 1; margin-top: 2px; }
.filter:hover { color: var(--text); }
.filter.is-active { background: #e9e9e9; color: #111; }

.works__viewport {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  overflow-x: auto;              /* fallback without JS: native swipe */
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: clamp(16px, 3vh, 40px) 0 clamp(24px, 5vh, 56px);
}
.works__viewport::-webkit-scrollbar { display: none; }
.is-gsap .works__viewport,
.is-sticky-works .works__viewport { overflow: visible; scroll-snap-type: none; }
.is-sticky-works .works { position: sticky; top: 0; }

.works__track {
  display: flex;
  gap: var(--card-gap);
  list-style: none;
  padding: 0 calc((100vw - var(--card-w)) / 2);
  will-change: transform;
}
.work {
  flex: 0 0 var(--card-w);
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.work[hidden] { display: none; }
.work__title {
  font-size: var(--fs-h3);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.work__media {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  transform-origin: center center;
  will-change: transform;
}
.work__art {
  /* keep the card inside the viewport height */
  aspect-ratio: 3 / 2;
  max-height: calc(100svh - var(--nav-h) - 240px);
  width: 100%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 6vw, 96px);
  line-height: .92;
  letter-spacing: -0.035em;
  text-align: center;
  text-transform: uppercase;
}
.art-1 { background: linear-gradient(135deg, #f1efe9, #d9d5cb); color: #141414; }
.art-2 { background: linear-gradient(160deg, #ff5a36, #b3200b); color: #fff3ec; }
.art-3 { background: linear-gradient(140deg, #2b48ff, #0e1a7a); color: #e6eaff; }
.art-4 { background: radial-gradient(circle at 30% 30%, #3a3a3a, #111); color: #f2f2f2; }
.art-5 { background: linear-gradient(150deg, #ffd23f, #f29f05); color: #231a00; }
.art-6 { background: linear-gradient(150deg, #18b67b, #0a5c3d); color: #e8fff5; }
.art-7 { background: linear-gradient(150deg, #f5b8d0, #d76a9b); color: #2a0a18; }
.art-8 { background: linear-gradient(145deg, #c9b8ff, #6b4fd8); color: #140a33; }
.art-9 { background: linear-gradient(150deg, #1f1f1f, #050505); color: #e9e4d8; }

.work__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text);
}
.work__idx { display: inline-flex; align-items: center; gap: 8px; }
.work__idx::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.work__cat b { color: var(--text-muted); font-weight: 500; margin-left: .6em; }

/* ---------- Services: sticky heading + cards that stack on scroll ---------- */
.services {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: clamp(96px, 14vh, 160px) var(--gutter) clamp(96px, 16vh, 200px);
  max-width: 1440px;
  margin: 0 auto;
}
.services--page { padding-top: calc(var(--nav-h) + clamp(32px, 6vh, 72px)); }
.services__aside {
  grid-column: 1;
  grid-row: 1;
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  align-self: start;
}
.services__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-h1);
  line-height: .95;
  letter-spacing: -0.035em;
}
.services__lead {
  margin-top: 20px;
  max-width: 340px;
  font-size: var(--fs-body);
  font-weight: 500;
  color: var(--text-muted);
}
.services__list {
  grid-column: 2;
  grid-row: 1;
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.service {
  --i: 0;
  position: sticky;
  top: calc(var(--nav-h) + 24px + var(--i) * 22px);
  min-height: 300px;
  padding: clamp(28px, 3vw, 44px);
  padding-right: 88px;
  border: 1px solid #2c2c2e;
  border-radius: 20px;
  background: #121212;
  transform-origin: center top;
  will-change: transform;
}
.service:nth-child(2) { --i: 1; }
.service:nth-child(3) { --i: 2; }
.service:nth-child(4) { --i: 3; }
.service:nth-child(5) { --i: 4; }
.service:nth-child(6) { --i: 5; }
.service > :not(.service__go) { transition: opacity .3s; }
.service.is-covered > :not(.service__go) { opacity: .35; }
.service__pill {
  display: inline-flex;
  padding: 4px 12px;
  border: 1px solid #3a3a3e;
  border-radius: 8px;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--text-muted);
}
.service__name {
  margin-top: clamp(36px, 5vw, 64px);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-h2);
  line-height: 1;
  letter-spacing: -0.03em;
}
.service__desc {
  margin-top: 14px;
  max-width: 440px;
  font-size: var(--fs-body);
  color: var(--text-soft);
}
/* arrow sits in a notch cut into the bottom-right corner */
.service__go {
  position: absolute;
  right: -1px;
  bottom: -1px;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid #2c2c2e;
  border-radius: 16px 0 20px 0;
  background: var(--bg);
  font-size: var(--fs-title);
  color: var(--text-muted);
  transition: color .2s, background .2s;
}
.service__go:hover, .service:hover .service__go { color: var(--text); background: var(--surface); }

/* ---------- Footer ---------- */
.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 40px var(--gutter);
  color: var(--text-muted);
  font-size: var(--fs-small);
  border-top: 1px solid var(--surface);
}
.footer a:hover { color: var(--text); }

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  :root { --card-w: 72vw; }
  .works__head { grid-template-columns: 1fr; justify-items: center; gap: 12px; }
  .works__count { justify-self: start; }
}
@media (max-width: 1024px) and (orientation: portrait) {
  .work__art { aspect-ratio: 4 / 5; }
}

@media (max-width: 900px) {
  .services { grid-template-columns: 1fr; gap: 32px; }
  .services__aside, .services__list { grid-column: 1; grid-row: auto; }
  .services__aside { position: static; }
}

/* ---------- Phone ---------- */
@media (max-width: 640px) {
  .service { min-height: 240px; padding-right: 28px; padding-bottom: 72px; top: calc(var(--nav-h) + 12px + var(--i) * 14px); }
  :root { --nav-h: 72px; --card-w: 80vw; --card-gap: 16px; }
  .topbar { padding: 24px var(--gutter) 18px; }
  .nav { overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav { gap: 18px; }

  .hero { padding-bottom: 32px; }
  /* phones: headline (and so the column) fills the width between the gutters */
  :root { --title-size: min(calc((100vw - 2 * var(--gutter)) / 11.23), 48px); }
  :root { --fs-body: 16px; }
  .socials { padding-top: 64px; gap: 8px; }
  .socials a { padding: 6px 11px; }

  .works__head { justify-items: stretch; }
  .filters {
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 calc(var(--gutter) * -1);
    padding: 0 var(--gutter);
  }
  .filters::-webkit-scrollbar { display: none; }
  .filter { padding: 7px 12px; }
  .work__art { aspect-ratio: 4 / 5; font-size: 44px; max-height: calc(100svh - var(--nav-h) - 280px); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .socials a { translate: 0 0 !important; }
}

/* ---------- Contact page ---------- */
.contact {
  min-height: 100svh;
  padding: calc(var(--nav-h) + clamp(40px, 8vh, 96px)) var(--gutter) clamp(64px, 10vh, 120px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 560px);
  gap: clamp(40px, 6vw, 120px);
  align-items: start;
  max-width: 1320px;
  margin: 0 auto;
}
.contact__title {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  line-height: .9;
  letter-spacing: -.02em;
  text-transform: uppercase;
}
.contact__lead { margin-top: 24px; max-width: 420px; font-size: var(--fs-body); line-height: 1.45; color: var(--text-soft); }
.contact__list { list-style: none; padding: 0; margin-top: 48px; display: grid; gap: 24px; }
.contact__label { display: block; font-family: var(--font-mono); font-size: var(--fs-small); text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 6px; }
.contact__value { font-size: var(--fs-title); font-weight: 500; }
a.contact__value { border-bottom: 1px solid var(--line); transition: border-color .2s; }
a.contact__value:hover { border-color: var(--text); }
.contact__socials { display: flex; flex-wrap: wrap; gap: 8px; }
.contact__socials a { padding: 8px 14px; border-radius: 999px; background: var(--surface); color: var(--text-soft); font-size: var(--fs-body); transition: background .2s, color .2s; }
.contact__socials a:hover { background: var(--surface-hover); color: var(--text); }

.form {
  background: #141414;
  border: 1px solid #262626;
  border-radius: 28px;
  padding: clamp(24px, 3.5vw, 44px);
  display: grid;
  gap: 20px;
}
.field { display: grid; gap: 8px; }
.field label { font-size: var(--fs-small); color: var(--text-muted); }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit;
  font-size: var(--fs-body);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  transition: border-color .2s;
  color-scheme: dark;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--text-soft); }
.field input::placeholder, .field textarea::placeholder { color: #5f5f5f; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.chips legend { font-size: var(--fs-small); color: var(--text-muted); margin-bottom: 8px; padding: 0; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-soft); font-size: var(--fs-body); cursor: pointer; transition: all .2s; }
.chip:hover span { border-color: var(--text-muted); color: var(--text); }
.chip input:checked + span { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 3px; }
.form__submit {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 26px;
  border: 0; border-radius: 999px;
  background: var(--text); color: var(--bg);
  font: inherit; font-weight: 700; font-size: var(--fs-body);
  cursor: pointer; transition: transform .2s;
}
.form__submit:hover { transform: translateY(-1px); }
.form__note { font-size: var(--fs-small); color: var(--text-muted); }
.form__error { font-size: var(--fs-small); color: #ff7a6b; }
.form__submit:disabled { opacity: .6; cursor: progress; transform: none; }
.form__done { display: none; text-align: left; }
.form__done h2 { font-family: var(--font-display); font-size: var(--fs-h2); text-transform: uppercase; line-height: 1; }
.form__done p { margin-top: 12px; color: var(--text-soft); }
.form.is-sent > :not(.form__done) { display: none; }
.form.is-sent .form__done { display: block; }
.modal.is-sent .modal__head { display: none; }

@media (max-width: 900px) {
  .contact { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .form__row { grid-template-columns: 1fr; }
  .form { border-radius: 22px; }
}

/* ---------- Frame: the whole site sits in one rounded dark panel ---------- */
:root { --frame: 8px; --frame-r: 22px; --frame-color: #e8e8e8; }
body::after {
  content: "";
  position: fixed;
  inset: var(--frame);
  border-radius: var(--frame-r);
  box-shadow: 0 0 0 calc(var(--frame) + 40px) var(--frame-color);
  pointer-events: none;
  z-index: 100;
}
html { background: var(--frame-color); }
/* No rubber-band bounce at the page ends: the bounce shifted the page under the
   pinned works carousel and made it jump when scrolling to the last card. */
html, body { overscroll-behavior-y: none; }
.topbar { padding-top: calc(36px + var(--frame)); }
@media (max-width: 640px) {
  :root { --frame: 5px; --frame-r: 16px; }
  .topbar { padding-top: calc(24px + var(--frame)); }
}

/* ---------- One-screen pages (About, Contact): exactly one viewport on tablet & desktop ---------- */
.about {
  min-height: 100svh;
  padding: calc(var(--nav-h) + clamp(24px, 6vh, 80px)) var(--gutter) clamp(40px, 7vh, 96px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 120px);
  align-items: center;
  max-width: 1320px;
  margin: 0 auto;
}
.about__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-h1);
  line-height: .9;
  letter-spacing: -.035em;
}
.about__lead { margin-top: clamp(16px, 3vh, 32px); max-width: 560px; font-size: var(--fs-h3); line-height: 1.3; font-weight: 500; }
.about__body { margin-top: clamp(12px, 2.4vh, 28px); max-width: 540px; display: grid; gap: clamp(8px, 1.6vh, 16px); color: var(--text-soft); font-size: var(--fs-body); line-height: 1.5; }
.about__cta { display: inline-block; margin: clamp(16px, 3.4vh, 40px) 0 0; font-size: var(--fs-body); }
.about__side { display: grid; gap: clamp(16px, 3vh, 32px); justify-items: start; }
.about__photo {
  width: min(100%, 44vh, 420px);
  aspect-ratio: 1;
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface);
}
.about__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.about__facts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 2.2vh, 24px) 32px; width: 100%; max-width: 520px; }
.about__facts dt { font-family: var(--font-mono); font-size: var(--fs-small); text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 4px; }
.about__facts dd { margin: 0; font-size: var(--fs-body); font-weight: 500; }

/* Contact: everything scales with the screen height so it fits without scrolling */
.contact__title { font-size: var(--fs-h1); }
.contact__lead { margin-top: clamp(12px, 2.6vh, 24px); font-size: var(--fs-body); }
.contact__list { margin-top: clamp(20px, 4.5vh, 48px); gap: clamp(10px, 2.4vh, 24px); }
.contact__value { font-size: var(--fs-title); }
.contact__label { margin-bottom: clamp(2px, .6vh, 6px); }
.form { gap: clamp(10px, 1.9vh, 20px); padding: clamp(20px, min(3.5vw, 4.4vh), 44px); }
.field { gap: clamp(4px, .8vh, 8px); }
.field input, .field select, .field textarea { padding: clamp(9px, 1.5vh, 14px) 16px; font-size: var(--fs-body); }
.chips legend { margin-bottom: clamp(4px, .8vh, 8px); }
.chip span { padding: clamp(6px, 1vh, 9px) 16px; }
.form__submit { height: clamp(42px, 5.6vh, 52px); }

@media (min-width: 901px) and (min-height: 600px), (min-width: 641px) and (max-width: 900px) and (min-height: 700px) {
  body.is-fit { height: 100vh; height: 100svh; overflow: hidden; }
  body.is-fit .footer { display: none; }
  body.is-fit main { height: 100vh; height: 100svh; min-height: 0; }

  /* Contact: columns stretch to the screen; the message box takes the leftover height */
  .is-fit .contact {
    padding-top: calc(var(--nav-h) + clamp(12px, 4vh, 56px));
    padding-bottom: clamp(20px, 5vh, 64px);
    align-items: stretch;
  }
  .is-fit .contact__intro { align-self: center; }
  .is-fit .form { display: flex; flex-direction: column; min-height: 0; height: 100%; max-height: 720px; align-self: center; }
  .is-fit .form > .field:has(textarea) { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .is-fit .form textarea { flex: 1; min-height: 56px; resize: none; }
  .is-fit .form__submit { align-self: flex-start; flex: none; }
}

/* Tablet portrait: stacked, compressed so it still fits one screen */
@media (min-width: 641px) and (max-width: 900px) and (min-height: 700px) {
  .is-fit .contact { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); gap: clamp(16px, 3vh, 32px); }
  .is-fit .contact__title br { display: none; }
  .is-fit .contact__title { font-size: var(--fs-h1); }
  .is-fit .contact__lead { max-width: 600px; }
  .is-fit .contact__list { grid-template-columns: repeat(3, auto); justify-content: start; column-gap: clamp(24px, 6vw, 56px); margin-top: clamp(16px, 3vh, 32px); }
  .is-fit .form .field:has(textarea) { min-height: 96px; }

  .about { grid-template-columns: 1fr; align-content: center; gap: clamp(20px, 4vh, 48px); }
  .about__side { grid-template-columns: auto 1fr; align-items: center; gap: 32px; }
  .about__photo { width: min(40vw, 30vh); }
  .about__facts { grid-template-columns: 1fr; }
}

/* Phones: normal scrolling page */
@media (max-width: 640px) {
  .about { grid-template-columns: 1fr; align-items: start; }
  .about__photo { width: 100%; max-width: 360px; }
}

/* Budget select: custom chevron with the same right inset as the text */
.field select {
  -webkit-appearance: none; appearance: none;
  padding-right: 48px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%23a3a3a3' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
  background-size: 12px 8px;
  cursor: pointer;
}

/* ---------- Contact popup: liquid glass ---------- */
html.modal-open { overflow: hidden; }
.modal {
  position: fixed; inset: 0;
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: clamp(12px, 3vw, 40px);
  border: 0; background: transparent; color: var(--text);
  display: none; place-items: center;
  overflow-y: auto; overscroll-behavior: contain;
}
.modal[open] { display: grid; }
.modal::backdrop {
  background: rgba(8, 8, 8, .35);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  animation: modal-backdrop-in .55s cubic-bezier(.2, .8, .2, 1) both;
}
.modal__glass {
  position: relative;
  width: min(100%, 640px);
  padding: clamp(22px, 3.6vw, 40px);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.14), rgba(255,255,255,.03) 42%, rgba(255,255,255,.07)),
    rgba(22, 22, 22, .48);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(255,255,255,.16);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.28),
    inset 0 -1px 0 rgba(255,255,255,.06),
    inset 0 0 40px rgba(255,255,255,.04),
    0 30px 80px rgba(0,0,0,.45);
  animation: modal-liquid-in .9s cubic-bezier(.25, .8, .25, 1) backwards;
  transform-origin: 50% 50%;
}
/* soft moving highlight, like light on liquid glass */
.modal__glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 60% at 20% 0%, rgba(255,255,255,.18), transparent 60%);
  mix-blend-mode: screen; opacity: .7;
  animation: modal-sheen 1.2s ease-out both;
}
.modal.is-closing::backdrop { animation: modal-backdrop-out .38s ease-in both; }
.modal.is-closing .modal__glass { animation: modal-liquid-out .38s ease-in both; }

@keyframes modal-backdrop-in { from { background: rgba(8,8,8,0); backdrop-filter: blur(0) saturate(100%); -webkit-backdrop-filter: blur(0) saturate(100%); } }
@keyframes modal-backdrop-out { to { background: rgba(8,8,8,0); backdrop-filter: blur(0) saturate(100%); -webkit-backdrop-filter: blur(0) saturate(100%); } }
@keyframes modal-liquid-in {
  0%   { opacity: 0; filter: url(#modal-liquid) blur(26px); transform: scale(.97); }
  45%  { opacity: 1; filter: url(#modal-liquid) blur(6px); }
  100% { opacity: 1; filter: url(#modal-liquid) blur(0); transform: none; }
}
@keyframes modal-liquid-out { to { opacity: 0; filter: url(#modal-liquid) blur(20px); transform: scale(.98); } }
@keyframes modal-sheen { from { opacity: 0; } 60% { opacity: .9; } to { opacity: .7; } }

.modal__close {
  position: absolute; top: 16px; right: 16px;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  color: var(--text); cursor: pointer; transition: background .2s;
}
.modal__close:hover { background: rgba(255,255,255,.16); }
.modal__head { padding-right: 48px; }
.modal__title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h2); line-height: .95; letter-spacing: -.03em; text-transform: uppercase; }
.modal__lead { margin-top: 10px; color: var(--text-soft); font-size: var(--fs-body); line-height: 1.5; }
.modal__form { margin-top: clamp(16px, 2.6vh, 24px); background: none; border: 0; padding: 0; border-radius: 0; gap: clamp(10px, 1.8vh, 18px); }
.modal .field input, .modal .field select, .modal .field textarea { background-color: rgba(0,0,0,.35); border-color: rgba(255,255,255,.14); }
.modal textarea { min-height: clamp(72px, 14vh, 140px); }
.modal .form__submit { justify-self: start; }

@media (max-width: 640px) {
  .modal { padding: 8px; align-items: end; }
  .modal__glass { border-radius: 26px; }
  .modal .form__row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .modal::backdrop, .modal__glass, .modal__glass::before { animation: none !important; }
}
.modal__lead .cta { margin: 0; padding: 0; white-space: nowrap; }
.modal textarea { resize: none; }

/* Availability dot: continuous soft pulse */
.status-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--ok);
  animation: dot-pulse 1.8s cubic-bezier(.2, .6, .4, 1) infinite;
}
.status-dot { animation: dot-glow 1.8s ease-in-out infinite; }
@keyframes dot-pulse { 0% { transform: scale(1); opacity: .65; } 80%, 100% { transform: scale(2.8); opacity: 0; } }
@keyframes dot-glow { 0%, 100% { box-shadow: 0 0 0 3px rgba(60,207,106,.22); } 50% { box-shadow: 0 0 0 3px rgba(60,207,106,.38); } }

/* About page now = Services on top, then About */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.services + .about {
  max-width: 1440px;
  min-height: 0;
  padding-top: 0;
  padding-bottom: clamp(72px, 12vh, 160px);
}
@media (min-width: 901px) { .services + .about { grid-template-columns: 1fr 1fr; gap: 48px; } }
@media (max-width: 900px) { .services + .about { grid-template-columns: 1fr; } }

/* ---------- About: "One brand, everywhere" interactive cards ---------- */
.pillars { max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter) clamp(96px, 16vh, 200px); }
.pillars__head { text-align: center; max-width: 720px; margin: 0 auto clamp(40px, 7vh, 80px); }
.pillars__title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h2); line-height: .95; letter-spacing: -.035em; }
.pillars__lead { margin-top: 18px; color: var(--text-soft); font-size: var(--fs-body); line-height: 1.5; }
.pillars__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 24px); }
.pillar { perspective: 800px; transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1); }
.pillar.is-hidden { opacity: 0; transform: translateY(80px); }
.pillar__card {
  --gx: 50%; --gy: 50%;
  position: relative; height: 100%;
  display: flex; flex-direction: column;
  min-height: clamp(280px, 30vw, 360px);
  padding: clamp(22px, 2.2vw, 32px);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(153,153,153,.06));
  border: 1px solid rgba(255,255,255,.08);
  transform-style: preserve-3d;
  transition: border-color .3s, background .3s;
  will-change: transform;
}
/* soft light that follows the cursor */
.pillar__card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(360px circle at var(--gx) var(--gy), rgba(255,255,255,.10), transparent 60%);
  opacity: 0; transition: opacity .35s;
}
.pillar.is-hover .pillar__card { border-color: rgba(255,255,255,.18); }
.pillar.is-hover .pillar__card::after { opacity: 1; }
.pillar__icon {
  width: clamp(84px, 7.4vw, 116px); height: auto; flex: none;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.45));
  transform-origin: 50% 60%;
  will-change: transform;
}
.pillar__name { margin-top: auto; padding-top: 32px; font-size: var(--fs-title); font-weight: 500; letter-spacing: -.01em; line-height: 1.15; transform: translateZ(18px); }
.pillar__text { margin-top: 14px; max-width: 34ch; color: var(--text-soft); font-size: var(--fs-body); line-height: 1.5; transform: translateZ(10px); }

@media (max-width: 900px) { .pillars__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .pillars__grid { grid-template-columns: 1fr; }
  .pillar__card { min-height: 0; }
  .pillar__name { padding-top: 40px; }
}

/* =========================================================
   About page (reference: print-studio site): black canvas, glowing liquid orb,
   light lowercase display type, print registration marks
   ========================================================= */
.ab { --ab-line: rgba(255,255,255,.28); --ab-dim: rgba(242,242,242,.55); overflow-x: clip; }
.ab-label { font-size: var(--fs-small); letter-spacing: .02em; color: var(--ab-dim); text-transform: lowercase; }

/* glowing orb: three soft blobs that drift and morph */
.ab-orb { position: absolute; pointer-events: none; filter: blur(42px); }
.ab-orb i { position: absolute; border-radius: 50%; animation: ab-drift 14s ease-in-out infinite alternate; }
.ab-orb i:nth-child(1) { inset: 18% 30% 22% 6%;  background: radial-gradient(circle at 40% 50%, #fff 0 18%, #8f86ff 40%, rgba(80,60,255,0) 70%); }
.ab-orb i:nth-child(2) { inset: 26% 6% 14% 34%;  background: radial-gradient(circle at 55% 50%, #fff 0 14%, #ff8fd8 38%, rgba(255,80,190,0) 70%); animation-duration: 17s; animation-delay: -6s; }
.ab-orb i:nth-child(3) { inset: 30% 28% 20% 26%; background: radial-gradient(circle, rgba(140,255,240,.9) 0 10%, rgba(70,200,255,.45) 40%, rgba(0,0,0,0) 70%); animation-duration: 11s; animation-delay: -3s; }
@keyframes ab-drift {
  0%   { transform: translate(0,0) scale(1) rotate(0deg); border-radius: 50% 45% 55% 50%; }
  50%  { transform: translate(6%, -5%) scale(1.12, .92) rotate(18deg); border-radius: 42% 58% 46% 54%; }
  100% { transform: translate(-5%, 4%) scale(.94, 1.08) rotate(-12deg); border-radius: 56% 44% 52% 48%; }
}

/* registration mark (circle + cross) */
.ab-mark, .ab-cross { position: absolute; width: 18px; height: 18px; border: 1px solid var(--ab-line); border-radius: 50%; }
.ab-mark::before, .ab-mark::after, .ab-cross::before, .ab-cross::after { content: ""; position: absolute; background: var(--ab-line); }
.ab-mark::before, .ab-cross::before { left: 50%; top: -6px; bottom: -6px; width: 1px; }
.ab-mark::after,  .ab-cross::after  { top: 50%; left: -6px; right: -6px; height: 1px; }

/* 1. Intro */
.ab-intro { position: relative; min-height: 100svh; display: grid; place-items: center; align-content: center; gap: clamp(16px, 3vh, 32px); padding: var(--nav-h) var(--gutter) 64px; text-align: center; isolation: isolate; }
.ab-orb--intro { width: min(70vw, 640px); aspect-ratio: 1; left: 50%; top: 52%; translate: -50% -50%; opacity: .55; z-index: -1; }
.ab-intro__title { font-weight: 300; font-size: var(--fs-h1); line-height: .9; letter-spacing: -.04em; color: #e9e9e9; }
.ab-intro__more { display: inline-flex; align-items: center; gap: 16px; color: var(--ab-dim); font-size: var(--fs-title); }
.ab-intro__more em { font-style: italic; font-weight: 300; }
.ab-dots { width: 44px; height: 44px; border: 1px solid var(--ab-line); border-radius: 50%; display: grid; place-content: center; gap: 3px; transition: border-color .3s, transform .3s; }
.ab-dots b { width: 3px; height: 3px; border-radius: 50%; background: currentColor; animation: ab-dot 1.6s ease-in-out infinite; }
.ab-dots b:nth-child(2) { animation-delay: .15s; } .ab-dots b:nth-child(3) { animation-delay: .3s; }
@keyframes ab-dot { 0%, 60%, 100% { opacity: .35; } 30% { opacity: 1; } }
.ab-intro__more:hover .ab-dots { border-color: var(--text); transform: translateY(3px); }
.ab-intro__meta { position: absolute; bottom: 28px; font-size: var(--fs-small); color: var(--ab-dim); }
.ab-intro__meta--l { left: var(--gutter); } .ab-intro__meta--r { right: var(--gutter); }
.ab-mark--l { left: var(--gutter); top: 50%; } .ab-mark--r { right: var(--gutter); top: 50%; } .ab-mark--b { left: 50%; bottom: 24px; translate: -50% 0; }

/* 2. Statement (sticky) */
.ab-story { height: 320vh; position: relative; }
.ab-story__stage { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; place-items: center; overflow: hidden; }
.ab-frame {
  --w: 38vw; --h: 70vh;                     /* set by about.js while scrolling */
  position: relative; width: var(--w); height: var(--h);
  max-width: calc(100vw - 2 * var(--gutter) - 40px);
  border: 1px solid var(--ab-line);
  display: grid; align-content: start; padding: clamp(18px, 2.4vw, 36px);
  isolation: isolate;
}
.ab-crop { position: absolute; inset: -22px; pointer-events: none;
  background:
    linear-gradient(var(--ab-line), var(--ab-line)) 0 22px / 14px 1px no-repeat,
    linear-gradient(var(--ab-line), var(--ab-line)) 22px 0 / 1px 14px no-repeat,
    linear-gradient(var(--ab-line), var(--ab-line)) 100% 22px / 14px 1px no-repeat,
    linear-gradient(var(--ab-line), var(--ab-line)) calc(100% - 22px) 0 / 1px 14px no-repeat,
    linear-gradient(var(--ab-line), var(--ab-line)) 0 calc(100% - 22px) / 14px 1px no-repeat,
    linear-gradient(var(--ab-line), var(--ab-line)) 22px 100% / 1px 14px no-repeat,
    linear-gradient(var(--ab-line), var(--ab-line)) 100% calc(100% - 22px) / 14px 1px no-repeat,
    linear-gradient(var(--ab-line), var(--ab-line)) calc(100% - 22px) 100% / 1px 14px no-repeat; }
.ab-cross--t { left: 50%; top: -30px; translate: -50% 0; } .ab-cross--b { left: 50%; bottom: -30px; translate: -50% 0; }
.ab-cross--l { top: 50%; left: -30px; translate: 0 -50%; } .ab-cross--r { top: 50%; right: -30px; translate: 0 -50%; }
.ab-orb--story { inset: 18% 4% 8%; z-index: -1; transform: scale(var(--orb, .6)); opacity: var(--orb-o, .7); }
.ab-story__lines { font-weight: 300; font-size: var(--fs-h2); line-height: 1.05; letter-spacing: -.025em; color: #e9e9e9; }
.ab-story__lines span { display: block; opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.ab-story__lines span.is-on { opacity: 1; transform: none; }
.ab-frame__label { position: absolute; right: 12px; bottom: -22px; font-size: var(--fs-small); color: var(--ab-dim); }

/* 3. What I do */
.ab-do { max-width: 1440px; margin: 0 auto; padding: clamp(80px, 14vh, 160px) var(--gutter); }
.ab-do__list { list-style: none; margin: 24px 0 0; padding: 0; border-top: 1px solid var(--ab-line); }
.ab-do__row { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1.3fr) minmax(0, 1fr) 72px; align-items: center; gap: 24px; padding: clamp(24px, 4vh, 44px) 0; border-bottom: 1px solid var(--ab-line); isolation: isolate; }
.ab-do__row::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .5s;
  background: radial-gradient(60% 120% at var(--mx, 30%) 50%, rgba(255,255,255,.09), rgba(255,255,255,.03) 40%, transparent 70%); }
.ab-do__row:hover::before { opacity: 1; }
.ab-do__num { font-size: var(--fs-small); color: var(--ab-dim); }
.ab-do__name { font-weight: 300; font-size: var(--fs-h1); line-height: .9; letter-spacing: -.04em; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.ab-do__row:hover .ab-do__name { transform: translateX(12px); }
.ab-do__text { color: var(--text-soft); font-size: var(--fs-body); line-height: 1.5; max-width: 38ch; }
.ab-do__go { justify-self: end; width: 64px; height: 64px; border: 1px solid var(--ab-line); border-radius: 50%; display: grid; place-items: center; font-size: var(--fs-title); transition: background .3s, color .3s, border-color .3s; }
.ab-do__go span { transition: transform .3s; }
.ab-do__go:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.ab-do__go:hover span { transform: rotate(45deg); }
.ab-do__aside { margin-top: 28px; color: var(--ab-dim); font-size: var(--fs-body); }

/* 4. About me */
.ab-me { max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter) clamp(96px, 16vh, 180px); }
.ab-me__grid { margin-top: 24px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 120px); align-items: end; }
.ab-me__text { display: grid; gap: 18px; color: var(--text-soft); font-size: var(--fs-body); line-height: 1.55; max-width: 720px; }
.ab-me__big { font-weight: 300; font-size: var(--fs-h3); line-height: 1.12; letter-spacing: -.02em; color: #e9e9e9; margin-bottom: 12px; }
.ab-me__photo { margin: 0; border-radius: 24px; overflow: hidden; aspect-ratio: 4 / 5; max-height: 560px; position: relative; }
.ab-me__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; filter: grayscale(1) contrast(1.05); transition: filter .6s; scale: 1.06; will-change: translate; }
.ab-me__photo { will-change: transform; }
.ab-me__photo:hover img { filter: grayscale(1) contrast(1.12) brightness(1.08); }
.ab-stats { margin: clamp(56px, 10vh, 112px) 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ab-line); }
.ab-stats div { padding: 28px 24px 0 0; }
.ab-stats div + div { padding-left: 24px; border-left: 1px solid var(--ab-line); }
.ab-stats dt { font-weight: 300; font-size: var(--fs-h2); line-height: 1; letter-spacing: -.04em; }
.ab-stats dd { margin: 10px 0 0; color: var(--ab-dim); font-size: var(--fs-small); }

.ab-reveal { opacity: 0; filter: blur(10px); transition: opacity 1s ease-out, filter 1s ease-out; }
.ab-reveal.is-in { opacity: 1; filter: blur(0); }

@media (max-width: 900px) {
  .ab-do__row { grid-template-columns: 40px minmax(0, 1fr) 56px; }
  .ab-do__text { grid-column: 2 / 3; grid-row: 2; }
  .ab-do__go { grid-column: 3; grid-row: 1; width: 52px; height: 52px; }
  .ab-me__grid { grid-template-columns: 1fr; }
  .ab-me__photo { max-width: 420px; }
  .ab-stats { grid-template-columns: 1fr 1fr; }
  .ab-stats div:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 640px) {
  .ab-intro__meta { display: none; }
  .ab-story { height: 260vh; }
  .ab-do__row { grid-template-columns: minmax(0, 1fr) 48px; gap: 12px 16px; }
  .ab-do__num { display: none; }
  .ab-do__text { grid-column: 1 / -1; }
  .ab-do__go { grid-column: 2; width: 48px; height: 48px; }
  .ab-stats div { padding-right: 12px; }
  .ab-stats div + div { padding-left: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .ab-orb i, .ab-dots b { animation: none; }
  .ab-story__lines span, .ab-reveal { opacity: 1; transform: none; transition: none; }
}
.ab ~ * .pillars__title, .ab .pillars__title { font-weight: 300; letter-spacing: -.04em; }

.ab > .ab-do:first-child { padding-top: calc(var(--nav-h) + clamp(32px, 7vh, 96px)); }
h1.ab-label { font-weight: 400; }



/* ---------- Avatar name tooltip: springs up on hover, sways with the cursor ---------- */
.avatar-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%) translateY(16px) scale(.6);
  transform-origin: 50% 100%;
  transition: opacity .18s ease, transform .45s cubic-bezier(.34, 1.56, .64, 1);
}
.avatar-wrap.is-tip .avatar-tip { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
.avatar-tip__inner {
  position: relative;
  display: block;
  padding: 7px 14px;
  border-radius: 8px;
  background: #121315;
  border: 1px solid #2c2c2c;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  color: var(--text);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.6;
  white-space: nowrap;
  transform: translateX(var(--tip-x, 0px)) rotate(var(--tip-r, 0deg));
}
.avatar-tip__inner::after {   /* thin light line under the name */
  content: "";
  position: absolute;
  left: 22%; right: 22%; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e9e9e9, transparent);
}

/* ---------- Fade content: blur + opacity load-in (fade.js) ---------- */
/* html.js-fade is set by an inline script in <head>, so the hidden state is there before first paint */
html.js-fade :is(.nav, .hero__main, .socials, .works__head, .works__viewport, .ab-label, .pillars__head, .footer) { opacity: 0; filter: blur(10px); }
html.js-fade .fade-content.is-in { opacity: 1; filter: blur(0); transition: opacity 1s ease-out, filter 1s ease-out; }
html.js-fade .fade-content.fade-done { filter: none; transition: none; }


/* ---------- Hero: bio, status line and socials centred under the headline ---------- */
.hero__bio, .hero__status { text-align: center; }
.socials { justify-content: center; }

/* ---------- Cursor dot trail (trail.js) ---------- */
.dot-trail { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 9999; }

/* ---------- Contact popup v2: black vignette, calm two-step entrance, fits the viewport ---------- */
/* the popup itself never scrolls: it always fits the visible screen */
.modal { overflow: hidden; overscroll-behavior: none; height: 100dvh; padding: clamp(12px, 3vh, 40px) clamp(12px, 3vw, 40px); }
.modal__glass { max-height: calc(100dvh - 2 * clamp(12px, 3vh, 40px)); }
/* black vignette darkening the screen edges */
.modal::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(ellipse 75% 70% at 50% 50%, transparent 40%, rgba(0,0,0,.35) 70%, rgba(0,0,0,.85) 100%);
  box-shadow: inset 0 0 120px 30px rgba(0,0,0,.6);
  animation: modal-vignette-in .7s ease-out both;
}
.modal.is-closing::before { animation: modal-vignette-out .38s ease-in both; }
@keyframes modal-vignette-in { from { opacity: 0; } }
@keyframes modal-vignette-out { to { opacity: 0; } }

/* step 1: the glass window fades and settles in, sharp, no blur */
.modal__glass { animation: modal-glass-in .55s cubic-bezier(.2, .8, .2, 1) backwards; }
.modal.is-closing .modal__glass { animation: modal-glass-out .38s ease-in both; }
@keyframes modal-glass-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes modal-glass-out { to { opacity: 0; transform: translateY(8px) scale(.985); } }

/* step 2: a beat later the content comes out of a blur */
.modal__glass > .modal__close,
.modal__glass > .modal__head,
.modal__glass > .modal__form { animation: modal-content-in .7s ease-out .32s backwards; }
.modal__glass > .modal__form { animation-delay: .42s; }
@keyframes modal-content-in { from { opacity: 0; filter: blur(12px); } }

/* tighter vertical rhythm on short screens so everything fits without scrolling */
@media (max-height: 820px) {
  .modal__glass { padding-block: clamp(16px, 3vh, 28px); }
  .modal textarea { min-height: 56px; height: 9vh; }
  .modal .field label, .modal .chips legend { margin-bottom: 4px; }
}
@media (max-width: 640px) {
  .modal { padding: 8px; }
  .modal__glass { max-height: calc(100dvh - 16px); }
}
@media (prefers-reduced-motion: reduce) {
  .modal::before, .modal__glass > * { animation: none !important; }
}
/* phones: compact the form so it fits the screen without scrolling */
@media (max-width: 640px) {
  .modal__glass { padding: 18px 16px; }
  .modal__lead { margin-top: 6px; font-size: var(--fs-small); }
  .modal__form { margin-top: 12px; gap: 10px; }
  .modal .form__row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .modal .chip span { padding: 6px 12px; font-size: var(--fs-small); }
  .modal .chips { gap: 6px; }
  .modal .field { gap: 4px; }
  .modal .field input, .modal .field select, .modal .field textarea { padding-block: 9px; font-size: 16px; }
  .modal textarea { min-height: 48px; height: 12vh; }
}
@media (max-width: 640px) and (max-height: 700px) {
  .modal textarea { height: 7vh; }
}

/* =====================================================================
   Consistency pass (2026-11-30): one set of radii, spacing and edge padding
   ===================================================================== */
:root {
  --r-lg: 20px;     /* panels: cards, photos, forms, popup */
  --r-md: 14px;     /* work images, inputs */
  --r-sm: 8px;      /* small tags: social chips, pills, tooltip */
  --r-pill: 999px;  /* chips, filters, buttons */
  --space-group: clamp(28px, 5vh, 56px);  /* gap between grouped blocks */
}
@media (max-width: 640px) {
  :root { --gutter: 24px; --r-lg: 18px; --r-md: 12px; --space-group: 32px; }
}

/* radii */
.service, .about__photo, .ab-me__photo, .form, .modal__glass { border-radius: var(--r-lg); }
.work__art, .field input, .field select, .field textarea { border-radius: var(--r-md); }
.socials a, .service__pill, .avatar-tip__inner { border-radius: var(--r-sm); }

/* hero: avatar row, bio, status and socials sit together in the middle of the screen */
.hero { padding-top: var(--nav-h); padding-bottom: var(--nav-h); align-items: center; }
.hero__inner { justify-content: center; }
.hero__main { margin-top: 0; padding-top: 0; }
.socials { margin-top: var(--space-group); padding-top: 0; }
@media (max-width: 640px) {
  .socials { padding-top: 0; justify-content: center; }
  .hero__bio { margin-top: 20px; }
  .hero__status { margin-top: 16px; }
}

/* popup: centred on phones too, and no white focus ring on the close button */
@media (max-width: 640px) {
  .modal { align-items: center; padding: 12px; }
  .modal__glass { max-height: calc(100dvh - 24px); }
}
.modal__close:focus { outline: none; }
.modal__close:focus-visible { outline: none; background: rgba(255,255,255,.18); }
@media (max-width: 640px) {
  .socials { gap: 6px; }
  .socials a { padding: 6px 10px; }
  .modal textarea { min-height: 64px; }
}

/* ---------- Touch screens: no hover / cursor-driven animation (a tap would leave them stuck on) ---------- */
@media (hover: none), (pointer: coarse) {
  .socials a:hover .ico { width: 0; margin-left: 0; opacity: 0; transform: scale(.4) rotate(-20deg); }
  .socials a { translate: 0 0 !important; }
  .ab-do__row:hover::before { opacity: 0; }
  .ab-do__row:hover .ab-do__name { transform: none; }
  .ab-do__go:hover span { transform: none; }
  .ab-me__photo:hover img { filter: grayscale(1) contrast(1.05); }
  .form__submit:hover { transform: none; }
  .avatar-wrap.is-tip .avatar-tip { opacity: 0; visibility: hidden; }
  .service:hover .service__go { background: none; }
}

/* ---------- Page-load intro (preloader.js) ---------- */
.preloader { display: none; }
html.has-intro { overflow: hidden; }
html.has-intro .preloader {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  background: var(--frame-color); color: #0b0b0b;
  transition: transform 1s cubic-bezier(.76, 0, .24, 1);
  animation: preloader-failsafe 0s 7s forwards;   /* never trap the page if the script fails */
}
.preloader__curve {
  position: absolute; left: -10%; right: -10%; top: calc(100% - 1px);
  height: 18vh; background: inherit;
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  transition: height 1s cubic-bezier(.76, 0, .24, 1);
}
.preloader__word {
  display: inline-flex; align-items: center; gap: .45em;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(36px, 6vw, 72px); letter-spacing: -.02em; line-height: 1;
  opacity: 0; transform: translateY(12px);
  transition: opacity .5s ease-out, transform .5s ease-out;
}
.preloader.is-on .preloader__word { opacity: 1; transform: none; }
html.intro-out .preloader { transform: translateY(-100%); }
html.intro-out .preloader__curve { height: 0; }
html.intro-out .preloader__word { opacity: 0; transform: translateY(-40px); transition-duration: .5s; }
@keyframes preloader-failsafe { to { visibility: hidden; } }

/* =====================================================================
   Light theme (html[data-theme="light"]) + the sun/moon toggle
   ===================================================================== */
.theme-toggle {
  position: absolute; right: calc(var(--gutter) + var(--frame)); top: 50%; translate: 0 -50%;
  margin-top: calc(var(--frame) / 2 + 4px);
  width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: transparent; color: var(--text-muted);
  transition: color .2s, background .2s;
}
.theme-toggle:hover { color: var(--text); background: var(--surface); }
.theme-toggle svg { width: 22px; height: 22px; grid-area: 1 / 1; transition: opacity .35s, transform .5s cubic-bezier(.2, .8, .2, 1); }
/* the icon shows the current theme: moon on dark, sun on light */
.theme-toggle .i-sun { opacity: 0; transform: rotate(-90deg) scale(.6); }
html[data-theme="light"] .theme-toggle .i-sun { opacity: 1; transform: none; }
html[data-theme="light"] .theme-toggle .i-moon { opacity: 0; transform: rotate(90deg) scale(.6); }
@media (max-width: 640px) {
  .theme-toggle { width: 36px; height: 36px; right: calc(var(--frame) + 8px); margin-top: calc(var(--frame) / 2 + 3px); }
  .nav { margin-right: 44px; }
}
/* smooth switch between themes (not on first paint) */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color .4s, color .4s, border-color .4s, fill .4s !important;
}

html[data-theme="light"] {
  --bg: #f4f4f2;
  --surface: #e7e7e5;
  --surface-hover: #dcdcda;
  --text: #121212;
  --text-muted: #6d6d6d;
  --text-soft: #3a3a3a;
  --line: #cfcfcd;
  --frame-color: #121212;
  color-scheme: light;
}
html[data-theme="light"] .topbar { background: linear-gradient(to bottom, var(--bg) 45%, rgba(244, 244, 242, 0)); }
html[data-theme="light"] .avatar { background: radial-gradient(circle at 50% 35%, #d6d6d6, #a9a9a9 70%); color: #2a2a2a; }
html[data-theme="light"] .filter.is-active { background: #121212; color: #f4f4f2; }
html[data-theme="light"] .form { background: #ececea; border-color: #d9d9d7; }
html[data-theme="light"] .modal__form { background: none; border: 0; }
html[data-theme="light"] .field input, html[data-theme="light"] .field select, html[data-theme="light"] .field textarea { color-scheme: light; }
html[data-theme="light"] .field input::placeholder, html[data-theme="light"] .field textarea::placeholder { color: #9a9a9a; }
html[data-theme="light"] .form__submit { background: #121212; color: #f4f4f2; }
html[data-theme="light"] .chip input:checked + span { background: #121212; color: #f4f4f2; border-color: #121212; }
html[data-theme="light"] .service { background: #ececea; border-color: #d9d9d7; }
html[data-theme="light"] .service__pill { border-color: #cfcfcd; }

/* popup: frosted white glass */
html[data-theme="light"] .modal::backdrop { background: rgba(244, 244, 242, .35); }
html[data-theme="light"] .modal__glass {
  background: linear-gradient(135deg, rgba(255,255,255,.75), rgba(255,255,255,.45) 42%, rgba(255,255,255,.6)), rgba(240, 240, 238, .55);
  border-color: rgba(0,0,0,.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 30px 80px rgba(0,0,0,.18);
}
html[data-theme="light"] .modal__close { background: rgba(0,0,0,.05); border-color: rgba(0,0,0,.1); }
html[data-theme="light"] .modal__close:hover, html[data-theme="light"] .modal__close:focus-visible { background: rgba(0,0,0,.1); }
html[data-theme="light"] .modal .field input, html[data-theme="light"] .modal .field select, html[data-theme="light"] .modal .field textarea { background-color: rgba(255,255,255,.7); border-color: rgba(0,0,0,.12); }
html[data-theme="light"] .modal::before {
  background: radial-gradient(ellipse 75% 70% at 50% 50%, transparent 45%, rgba(0,0,0,.18) 70%, rgba(0,0,0,.55) 100%);
  box-shadow: inset 0 0 120px 30px rgba(0,0,0,.3);
}

/* avatar tooltip */
html[data-theme="light"] .avatar-tip__inner { background: #121212; color: #f4f4f2; border-color: #121212; box-shadow: 0 10px 30px rgba(0,0,0,.18); }

/* About page */
html[data-theme="light"] .ab { --ab-line: rgba(0,0,0,.22); --ab-dim: rgba(18,18,18,.55); }
html[data-theme="light"] .ab-intro__title, html[data-theme="light"] .ab-story__lines, html[data-theme="light"] .ab-me__big { color: #121212; }
html[data-theme="light"] .ab-do__row::before { background: radial-gradient(60% 120% at var(--mx, 30%) 50%, rgba(0,0,0,.06), rgba(0,0,0,.02) 40%, transparent 70%); }
html[data-theme="light"] .ab-do__go:hover { background: #121212; color: #f4f4f2; border-color: #121212; }
html[data-theme="light"] .ab-orb { opacity: .75; }
/* the linocut "Why it works" cards stay dark in both themes */
html[data-theme="light"] .pillar__card {
  --text: #f2f2f2; --text-muted: #8f8f8f; --text-soft: #c9c9c9;
  background: linear-gradient(180deg, #2a2a2a, #161616); color: #f2f2f2;
}

/* preloader: dark panel, light words */
html[data-theme="light"] .preloader { color: #f4f4f2; }
@media (hover: none), (pointer: coarse) { .theme-toggle:hover { background: transparent; color: var(--text-muted); } }

/* ---------- Pull to refresh (ptr.js, touch screens) ---------- */
.ptr {
  position: fixed; left: 0; right: 0; top: 0; z-index: 150;
  display: flex; justify-content: center;
  padding-top: calc(env(safe-area-inset-top, 0px) + 14px);
  pointer-events: none;
  opacity: var(--pull, 0);
  transform: translateY(calc(-100% + var(--pull-px, 0px)));
}
.ptr__text { font-size: var(--fs-small); font-weight: 500; letter-spacing: .02em; color: var(--text-muted); transition: color .2s; }
.ptr.is-ready .ptr__text, .ptr.is-loading .ptr__text { color: var(--text); }
html.ptr-on body::after, html.ptr-back body::after { opacity: calc(1 - var(--pull, 0)); }
html.ptr-on .topbar, html.ptr-back .topbar { opacity: calc(1 - var(--pull, 0)); }
html.ptr-on .topbar { transform: translateY(calc(var(--pull-px, 0px) * .35)); }
html.ptr-back .ptr, html.ptr-back body::after, html.ptr-back .topbar { transition: opacity .3s ease-out, transform .3s ease-out; }

/* ---------- Phones: no frame around the site (desktop and tablet keep it) ---------- */
@media (max-width: 640px) {
  :root { --frame: 0px; --frame-r: 0px; }
  body::after { display: none; }
  html { background: var(--bg); }
}

/* ---------- Hero: photo links to About, scroll cue at the bottom ---------- */
.hero { position: relative; }
a.avatar { cursor: pointer; }
.scroll-cue {
  position: absolute; left: 50%; bottom: clamp(24px, 5vh, 48px); translate: -50% 0;
  display: inline-flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--text-muted); font-size: var(--fs-small); letter-spacing: .02em;
  transition: color .2s;
}
.scroll-cue:hover { color: var(--text); }
.scroll-cue svg { animation: cue-bob 1.8s ease-in-out infinite; }
@keyframes cue-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .scroll-cue svg { animation: none; } }

/* touch screens: there is no hover, so the "Click to learn more" note is always shown, tilted left */
@media (hover: none), (pointer: coarse) {
  .avatar-wrap .avatar-tip,
  .avatar-wrap.is-tip .avatar-tip { opacity: 1; visibility: visible; transform: translateX(-12%) translateY(0) scale(1); }
  .avatar-tip__inner { transform: rotate(-7deg); font-size: var(--fs-small); padding: 5px 10px; }
}

/* ---------- Home mark: the ornament in the top-left corner links home ---------- */
.home-mark {
  position: absolute; left: calc(var(--gutter) + var(--frame)); top: 50%; translate: 0 -50%;
  margin-top: calc(var(--frame) / 2 + 4px);
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}
.home-mark__img {
  width: 34px; height: 34px;
  display: block;
  animation: home-spin 24s linear infinite;
  transition: scale .45s cubic-bezier(.3, 1.6, .5, 1);
}
/* a slow constant turn says "alive"; hover speeds it up and the mark pops */
.home-mark:hover .home-mark__img { scale: 1.18; animation-duration: 3s; }
.home-mark:active .home-mark__img { scale: .9; }
.home-mark:focus-visible { outline: 1.5px solid var(--text-muted); outline-offset: 2px; }
@keyframes home-spin { to { rotate: 360deg; } }
/* the mark is white; on the light theme it turns near-black */
html[data-theme="light"] .home-mark__img { filter: invert(.93); }
@media (max-width: 640px) {
  .home-mark { width: 36px; height: 36px; left: calc(var(--frame) + 8px); margin-top: calc(var(--frame) / 2 + 3px); }
  .home-mark__img { width: 28px; height: 28px; }
}
@media (prefers-reduced-motion: reduce) { .home-mark__img { animation: none; } }
@media (hover: none), (pointer: coarse) { .home-mark:hover .home-mark__img { scale: 1; animation-duration: 24s; } }

/* =====================================================================
   Header with links on the right + side menu (menu.js)
   ===================================================================== */
.topbar { transition: translate .6s cubic-bezier(.7, 0, .2, 1), opacity .45s ease; }
html.nav-collapsed .topbar { translate: 0 -110%; opacity: 0; pointer-events: none; }

.hnav {
  position: absolute; top: 50%; translate: 0 -50%;
  right: calc(var(--gutter) + var(--frame) + 56px);
  margin-top: calc(var(--frame) / 2 + 4px);
  display: flex; gap: clamp(20px, 2.4vw, 36px);
}
.hnav__link {
  position: relative; display: inline-block; padding: 6px 2px;
  color: var(--text-muted); font-size: var(--fs-body); font-weight: 500;
  transition: color .3s, translate .45s cubic-bezier(.3, 1.4, .5, 1);
}
/* a small dot grows under the link on hover; the current page keeps it */
.hnav__link::after {
  content: ""; position: absolute; left: 50%; bottom: -6px;
  width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%;
  background: currentColor; scale: 0;
  transition: scale .35s cubic-bezier(.3, 1.6, .5, 1);
}
.hnav__link:hover, .hnav__link.is-active { color: var(--text); }
.hnav__link:hover::after, .hnav__link.is-active::after { scale: 1; }

/* round menu button: hidden while the header is in view (desktop) */
.menu-btn {
  position: fixed; z-index: 130;
  top: calc(var(--frame) + 20px); right: calc(var(--gutter) + var(--frame) - 8px);
  width: 60px; height: 60px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--text); color: var(--bg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  scale: 0; pointer-events: none;
  transition: scale .45s cubic-bezier(.3, 1.4, .5, 1), translate .45s cubic-bezier(.3, 1.4, .5, 1), background .3s, color .3s;
  -webkit-tap-highlight-color: transparent;
}
html.nav-collapsed .menu-btn, html.menu-open .menu-btn { scale: 1; pointer-events: auto; }
.menu-btn:hover { scale: 1.06; }
.menu-btn__lines { position: relative; width: 22px; height: 8px; }
.menu-btn__lines i {
  position: absolute; left: 0; right: 0; height: 1.5px; border-radius: 2px; background: currentColor;
  transition: top .4s cubic-bezier(.7, 0, .2, 1), rotate .4s cubic-bezier(.7, 0, .2, 1);
}
.menu-btn__lines i:first-child { top: 0; }
.menu-btn__lines i:last-child { top: 6.5px; }
html.menu-open .menu-btn { background: #f2f2f2; color: #121212; }
html.menu-open .menu-btn__lines i { top: 3.25px; }
html.menu-open .menu-btn__lines i:first-child { rotate: 45deg; }
html.menu-open .menu-btn__lines i:last-child { rotate: -45deg; }

/* side panel: always dark, slides in from the right with a curved leading edge */
.side-menu { position: fixed; inset: 0; z-index: 120; pointer-events: none; }
html.menu-open .side-menu { pointer-events: auto; }
html.menu-open { overflow: hidden; }
.side-menu__shade { position: absolute; inset: 0; background: rgba(0, 0, 0, .4); opacity: 0; transition: opacity .6s ease; }
html.menu-open .side-menu__shade { opacity: 1; }
.side-menu__panel {
  --text: #f2f2f2; --text-muted: #8f8f8f; --surface: #262626; --line: #333;
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(480px, 100vw);
  display: flex; flex-direction: column;
  padding: clamp(96px, 16vh, 150px) clamp(32px, 5vw, 72px) clamp(32px, 6vh, 56px);
  background: #151515; color: var(--text);
  translate: calc(100% + 120px) 0;
  transition: translate .8s cubic-bezier(.76, 0, .24, 1);
}
html.menu-open .side-menu__panel { translate: 0 0; }
.side-menu__panel::before {
  content: ""; position: absolute; top: -10%; bottom: -10%; left: -119px; width: 120px;
  background: #151515; border-radius: 100% 0 0 100% / 50% 0 0 50%;
  transform-origin: right; scale: 1 1;
  transition: scale .8s cubic-bezier(.76, 0, .24, 1);
}
html.menu-open .side-menu__panel::before { scale: 0 1; }
.side-menu__label {
  font-size: var(--fs-small); color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em;
  padding-bottom: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--line);
}
.side-menu__links { list-style: none; padding: 0; display: grid; gap: 4px; }
.side-menu__links li {
  translate: 80px 0;
  transition: translate .8s cubic-bezier(.76, 0, .24, 1);
  transition-delay: calc(var(--i) * .05s);
}
html.menu-open .side-menu__links li { translate: 0 0; }
.side-menu__link {
  position: relative; display: inline-block; padding: 4px 0;
  font-size: var(--fs-h2); font-weight: 500; line-height: 1.15; letter-spacing: -.02em;
  color: var(--text-muted); transition: color .3s;
}
.side-menu__link::before {
  content: ""; position: absolute; left: -28px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%;
  background: var(--text); scale: 0; transition: scale .35s cubic-bezier(.3, 1.6, .5, 1);
}
.side-menu__link:hover, .side-menu__link.is-active { color: var(--text); }
.side-menu__link:hover::before, .side-menu__link.is-active::before { scale: 1; }
.side-menu__foot { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.side-menu__foot .side-menu__label { border: 0; padding: 0; margin-bottom: 10px; }
.side-menu__socials { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.side-menu__socials a { color: var(--text); font-size: var(--fs-body); transition: color .2s; }
.side-menu__socials a:hover { color: var(--text-muted); }
.theme-toggle.side-menu__theme { position: static; translate: none; margin: 0 0 0 -10px; color: var(--text); }
html[data-theme="light"] .side-menu__panel .i-sun { opacity: 1; transform: none; }

/* tablets & phones: links fold into the button, which is always there */
@media (max-width: 768px) {
  .hnav { display: none; }
  .menu-btn { scale: 1; pointer-events: auto; width: 48px; height: 48px; top: calc(var(--frame) + 14px); right: calc(var(--frame) + 12px); }
  .menu-btn__lines { width: 18px; }
  .theme-toggle { right: calc(var(--frame) + 68px); }
}
@media (max-width: 640px) {
  .menu-btn { top: calc(var(--frame) + 6px); right: calc(var(--frame) + 8px); width: 42px; height: 42px; }
  .theme-toggle { right: calc(var(--frame) + 58px); }
}
@media (hover: none), (pointer: coarse) {
  .hnav__link:hover:not(.is-active) { color: var(--text-muted); }
  .hnav__link:hover:not(.is-active)::after { scale: 0; }
  .menu-btn:hover { scale: 1; }
  .side-menu__link:hover:not(.is-active) { color: var(--text-muted); }
  .side-menu__link:hover:not(.is-active)::before { scale: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .side-menu__panel, .side-menu__panel::before, .side-menu__links li, .topbar, .menu-btn { transition-duration: .01s; }
}

/* =====================================================================
   Contact page (contact.html)
   ===================================================================== */
.ct {
  width: 100%; max-width: 1280px; margin: 0 auto;
  padding: calc(var(--nav-h) + clamp(32px, 8vh, 96px)) var(--gutter) clamp(64px, 10vh, 120px);
}
.ct-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.ct-head__title { font-size: var(--fs-h1); font-weight: 700; line-height: 1.02; letter-spacing: -.035em; max-width: 13em; }
.ct-head__avatar {
  display: inline-block; vertical-align: -.1em; margin-right: .2em;
  width: 1.05em; height: 1.05em; border-radius: 50%; overflow: hidden; background: var(--surface);
}
.ct-head__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ct-head__arrow { width: clamp(28px, 3vw, 44px); height: auto; flex: none; color: var(--text-muted); margin-bottom: .4em; }

.ct-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 280px); gap: clamp(40px, 8vw, 140px);
  margin-top: clamp(48px, 9vh, 104px);
}
.ct-qs { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.ct-q {
  display: grid; grid-template-columns: clamp(40px, 5vw, 64px) 1fr; column-gap: 8px;
  padding: clamp(24px, 4vh, 40px) 0; border-bottom: 1px solid var(--line);
}
.ct-q__num { grid-row: span 2; font-size: var(--fs-small); color: var(--text-muted); padding-top: .35em; }
.ct-q__label { display: block; font-size: var(--fs-title); font-weight: 500; color: var(--text); padding: 0; margin-bottom: 10px; }
.ct-q__input {
  width: 100%; border: 0; padding: 4px 0; background: none; color: var(--text);
  font: inherit; font-size: var(--fs-title); resize: none;
}
.ct-q__input::placeholder { color: var(--text-muted); opacity: .7; }
.ct-q__input:focus { outline: none; }
.ct-q__input:focus-visible { outline: none; box-shadow: none; }
textarea.ct-q__input { min-height: 3.2em; line-height: 1.5; }
.ct-q__select {
  -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 28px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%23a3a3a3' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 4px center / 12px 8px;
}
.ct-q__select option { background: var(--bg); color: var(--text); }
.ct-q__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ct-q__chips legend { float: left; width: 100%; font-size: var(--fs-title); color: var(--text); margin-bottom: 14px; }

/* big round button sitting on a line, like a stamp */
.ct-send { position: relative; height: clamp(150px, 18vw, 180px); margin-top: clamp(24px, 4vh, 48px); }
.ct-send::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.ct-send__btn {
  position: absolute; top: 50%; right: clamp(40px, 10%, 120px); translate: 0 -50%;
  width: clamp(130px, 15vw, 170px); aspect-ratio: 1; border: 0; border-radius: 50%;
  background: var(--text); color: var(--bg); font-size: var(--fs-body); font-weight: 600;
  transition: scale .45s cubic-bezier(.3, 1.4, .5, 1), opacity .2s;
}
.ct-send__btn:hover { scale: 1.07; }
.ct-send__btn:active { scale: .96; }
.ct-send__btn:disabled { opacity: .6; cursor: progress; }
.ct-error { margin-top: 12px; }
.ct-form.is-sent .ct-qs, .ct-form.is-sent .ct-send { display: none; }
.ct-done { padding: clamp(32px, 6vh, 64px) 0; border-top: 1px solid var(--line); }
.ct-done__title { font-size: var(--fs-h2); font-weight: 700; letter-spacing: -.02em; margin-bottom: 8px; }
.ct-done p { color: var(--text-soft); max-width: 32em; }

.ct-info { display: grid; align-content: start; gap: clamp(32px, 5vh, 48px); }
.ct-info__label { font-size: var(--fs-small); font-weight: 400; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.ct-info ul { list-style: none; padding: 0; display: grid; gap: 6px; }
.ct-info a { color: var(--text); background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px; padding-bottom: 2px; transition: background-size .35s ease; }
.ct-info a:hover { background-size: 100% 1px; }

@media (max-width: 900px) {
  .ct-grid { grid-template-columns: 1fr; }
  .ct-info { grid-template-columns: repeat(2, minmax(0, 1fr)); order: -1; }
}
@media (max-width: 640px) {
  .ct { padding-top: calc(var(--nav-h) + 8px); }
  .ct-head__arrow { display: none; }
  .ct-q { grid-template-columns: 32px 1fr; }
  .ct-send__btn { right: 8px; }
}
@media (hover: none), (pointer: coarse) { .ct-send__btn:hover { scale: 1; } .ct-info a:hover { background-size: 0 1px; } }
html.js-fade :is(.ct-head, .ct-grid) { opacity: 0; filter: blur(10px); }

/* ---------- 2026-11-30: no ornament; phones keep the theme toggle only in the side menu; no avatar tooltip on touch ---------- */
@media (max-width: 768px) { .topbar .theme-toggle { display: none; } }
@media (hover: none), (pointer: coarse) { .avatar-tip { display: none !important; } }

/* =====================================================================
   Type system (one set of styles for every page, header, menu, footer)
   Sizes: only --fs-h1 / h2 / h3 / title / body / small.
   Weights: 700 headlines, 500 sub-headings, labels, links & buttons, 400 running text.
   ===================================================================== */
:root {
  --ls-h1: -.035em; --lh-h1: 1.02;
  --ls-h2: -.025em; --lh-h2: 1.08;
  --ls-h3: -.012em; --lh-h3: 1.25;
  --lh-text: 1.5;
  --ls-label: .08em;
}
/* H1: page headlines */
.hero__title, .hero__title-text, .ct-head__title, .ab-do__name {
  font-size: var(--fs-h1); font-weight: 700; letter-spacing: var(--ls-h1); line-height: var(--lh-h1);
}
/* H2: big menu links, big numbers, thank-you title */
.side-menu__link, .ab-stats dt, .ct-done__title {
  font-size: var(--fs-h2); font-weight: 700; letter-spacing: var(--ls-h2); line-height: var(--lh-h2);
}
/* H3: section counters, card titles, intro statement */
.works__num, .work__title, .ab-me__big {
  font-size: var(--fs-h3); font-weight: 500; letter-spacing: var(--ls-h3); line-height: var(--lh-h3);
}
/* Title: lead text (400) and question labels (500) */
.hero__bio, .ct-q__input, .ct-q__select option { font-size: var(--fs-title); font-weight: 400; letter-spacing: 0; line-height: var(--lh-text); }
.ct-q__label, .ct-q__chips legend { font-size: var(--fs-title); font-weight: 500; letter-spacing: 0; line-height: 1.4; }
/* Body: running text (400), links & buttons (500) */
.hero__status-text, .ab-do__text, .ab-do__aside, .ab-me p:not(.ab-label):not(.ab-me__big), .ct-done p, .ct-info li a { font-size: var(--fs-body); font-weight: 400; line-height: var(--lh-text); letter-spacing: 0; }
.hnav__link, .cta, .socials a, .side-menu__socials a, .chip span, .ct-send__btn, .filter { font-size: var(--fs-body); font-weight: 500; letter-spacing: 0; }
/* Small: uppercase labels + plain small text */
.ab-label, .side-menu__label, .ct-info__label, .work__idx, .work__cat {
  font-size: var(--fs-small); font-weight: 400; letter-spacing: var(--ls-label); text-transform: uppercase; line-height: var(--lh-text);
}
h1.ab-label { font-weight: 400; }
.scroll-cue, .ab-do__num, .ct-q__num, .ab-stats dd, .footer, .footer a, .avatar-tip__inner, .ptr__text { font-size: var(--fs-small); letter-spacing: 0; line-height: var(--lh-text); }
.scroll-cue, .ab-do__num, .ct-q__num, .ab-stats dd, .footer, .footer a { font-weight: 400; }

/* Contact submit: a pill like the rest of the site's buttons (replaces the round stamp) */
.ct-send { height: auto; margin-top: clamp(28px, 4.5vh, 44px); }
.ct-send::before { display: none; }
.ct-send__btn {
  position: static; translate: none; width: auto; aspect-ratio: auto;
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 26px; border-radius: var(--r-pill);
  background: var(--text); color: var(--bg); font-size: var(--fs-body); font-weight: 500;
  transition: background .25s, color .25s, opacity .2s;
}
.ct-send__arrow { display: inline-block; transition: translate .35s cubic-bezier(.3, 1.4, .5, 1); }
.ct-send__btn:hover { scale: 1; background: var(--text-soft); }
.ct-send__btn:hover .ct-send__arrow { translate: 4px 0; }
.ct-send__btn:active { scale: .98; }
@media (max-width: 640px) { .ct-send__btn { width: 100%; justify-content: center; } }
@media (hover: none), (pointer: coarse) { .ct-send__btn:hover { background: var(--text); } .ct-send__btn:hover .ct-send__arrow { translate: none; } }
/* About stats: three items in one row at every width */
.ab-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ab-stats div:nth-child(3) { border-left: 1px solid var(--ab-line); padding-left: 24px; }
@media (max-width: 640px) { .ab-stats div:nth-child(3) { padding-left: 12px; } }
