/* ————————————————————————————————————————
   Yousef Alamiri Designs — drawing-sheet minimal
   ———————————————————————————————————————— */

:root {
  --paper: #f6f4ef;
  --paper-deep: #efece5;
  --ink: #161616;
  --ink-soft: #6b6862;
  --hairline: rgba(22, 22, 22, 0.18);
  --hairline-soft: rgba(22, 22, 22, 0.09);
  --charcoal: #181b20;
  --frame: clamp(10px, 2vw, 22px);
  --gutter: clamp(22px, 6vw, 96px);
  --radius: 14px;
  --radius-sm: 10px;
  --sans: "Instrument Sans", "Helvetica Neue", sans-serif;
  --mono: "IBM Plex Mono", monospace;
}

/* dusk: for visitors in dark mode the paper warms and dims a few percent —
   the same sheet, seen in evening light. Photos and ink stay true. */
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #f2efe8;
    --paper-deep: #eae6dc;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%; /* stop Android/iOS font inflation in landscape */
  text-size-adjust: 100%;
}

body {
  -webkit-tap-highlight-color: transparent;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* faint paper grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.035 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--ink); color: var(--paper); }

a { color: inherit; }

/* ——— sheet frame & registration marks ——— */

.sheet-frame {
  position: fixed;
  inset: var(--frame);
  border: 1px solid var(--hairline);
  pointer-events: none;
  z-index: 60;
}

.reg-mark {
  position: fixed;
  width: 13px;
  height: 13px;
  pointer-events: none;
  z-index: 60;
}
.reg-mark::before,
.reg-mark::after {
  content: "";
  position: absolute;
  background: var(--hairline);
}
.reg-mark::before { left: 50%; top: 0; width: 1px; height: 100%; }
.reg-mark::after  { top: 50%; left: 0; height: 1px; width: 100%; }
.reg-tl { top: calc(var(--frame) - 6.5px); left: calc(var(--frame) - 6.5px); }
.reg-tr { top: calc(var(--frame) - 6.5px); right: calc(var(--frame) - 6.5px); }
.reg-bl { bottom: calc(var(--frame) - 6.5px); left: calc(var(--frame) - 6.5px); }
.reg-br { bottom: calc(var(--frame) - 6.5px); right: calc(var(--frame) - 6.5px); }

/* ——— sheet border coordinates (A–H down the left, 1–6 across the top) ——— */

.coords {
  position: fixed;
  pointer-events: none;
  z-index: 55;
  font-family: var(--mono);
  font-size: 8.5px;
  color: rgba(22, 22, 22, 0.34);
}
.coords-y { top: var(--frame); bottom: var(--frame); left: 0; width: var(--frame); }
.coords-x { left: var(--frame); right: var(--frame); top: 0; height: var(--frame); }

.coords .cell {
  position: absolute;
  transition: color 0.4s ease, font-weight 0.4s ease;
}
.coords-y .cell {
  left: 0;
  width: 100%;
  text-align: center;
  transform: translateY(-50%);
}
.coords-x .cell {
  top: 50%;
  transform: translate(-50%, -50%);
}
.coords .cell.is-here { color: var(--ink); font-weight: 500; }

.coords .tick { position: absolute; background: var(--hairline); }
.coords-y .tick { left: 50%; transform: translateX(-50%); width: 7px; height: 1px; }
.coords-x .tick { top: 50%; transform: translateY(-50%); height: 7px; width: 1px; }

/* the runner: where you are on the sheet */
.coords-run {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 9px;
  height: 1px;
  background: var(--ink);
}

/* the margin band is too thin on small screens — the sheet goes quiet */
@media (max-width: 1099px) {
  .coords { display: none; }
}

/* ——— shared annotation style ——— */

.anno {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.anno a {
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 1px;
  position: relative;
  display: inline-block;
}
.anno a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}
.anno a:hover { color: var(--ink); }
.anno a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ——— top bar ——— */

.topbar {
  position: fixed;
  top: var(--frame);
  left: var(--frame);
  right: var(--frame);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(16px, 3vw, 34px);
  border-bottom: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  z-index: 50;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-mark { width: 58px; height: auto; display: block; }
.topbar-name {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.topbar-nav { display: flex; gap: clamp(14px, 2.6vw, 36px); }
.topbar-nav a {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.25s ease;
  padding: 10px 2px; /* comfortable touch target */
  margin: -10px -2px;
}
.topbar-nav a {
  position: relative;
}
.topbar-nav a sup {
  font-size: 7.5px;
  margin-right: 5px;
  color: var(--ink-soft);
  transition: color 0.25s ease;
}
.topbar-nav a::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 6px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  /* pen passes through: enters from the left, exits to the right */
  transform-origin: right;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}
.topbar-nav a:hover { color: var(--ink); }
.topbar-nav a.is-current { color: var(--ink); }
.topbar-nav a.is-current sup { color: var(--ink); }
.topbar-nav a.is-current::after,
.topbar-nav a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ——— hero ——— */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px var(--gutter) 60px;
  position: relative;
}

.hero-anno { margin-bottom: clamp(28px, 5vh, 56px); }

.hero-mark svg {
  width: clamp(210px, 30vw, 340px);
  height: auto;
  display: block;
}

/* the logo draws itself — one pen stroke at a time:
   baseline → threshold → doorway → inner arch → coil hatching */
.hero-mark path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw-stroke 1s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
.hero-mark path:nth-child(1) { animation-delay: 0.25s; animation-duration: 0.6s; }
.hero-mark path:nth-child(2) { animation-delay: 0.9s; animation-duration: 0.1s; animation-timing-function: linear; }
.hero-mark path:nth-child(3) { animation-delay: 1.0s; animation-duration: 0.8s; }
.hero-mark path:nth-child(4) { animation-delay: 1.8s; animation-duration: 0.08s; animation-timing-function: linear; }
.hero-mark path:nth-child(5) { animation-delay: 1.88s; animation-duration: 0.55s; }
.hero-mark path:nth-child(6) { animation-delay: 2.45s; animation-duration: 0.11s; animation-timing-function: linear; }
.hero-mark path:nth-child(7) { animation-delay: 2.51s; animation-duration: 0.11s; animation-timing-function: linear; }
.hero-mark path:nth-child(8) { animation-delay: 2.57s; animation-duration: 0.11s; animation-timing-function: linear; }
.hero-mark path:nth-child(9) { animation-delay: 2.63s; animation-duration: 0.11s; animation-timing-function: linear; }
.hero-mark path:nth-child(10) { animation-delay: 2.69s; animation-duration: 0.11s; animation-timing-function: linear; }
.hero-mark path:nth-child(11) { animation-delay: 2.75s; animation-duration: 0.11s; animation-timing-function: linear; }
.hero-mark path:nth-child(12) { animation-delay: 2.81s; animation-duration: 0.11s; animation-timing-function: linear; }
.hero-mark path:nth-child(13) { animation-delay: 2.87s; animation-duration: 0.11s; animation-timing-function: linear; }

@keyframes draw-stroke {
  to { stroke-dashoffset: 0; }
}

/* hero text holds back until the pen has nearly finished */
.hero .hero-title.reveal[data-delay="2"] { transition-delay: 2.4s; }
.hero .hero-sub.reveal[data-delay="3"] { transition-delay: 2.65s; }
.hero .hero-dim.reveal[data-delay="4"] { transition-delay: 3.1s; }

@media (prefers-reduced-motion: reduce) {
  .hero-mark path { animation: none; stroke-dashoffset: 0; }
  .hero .hero-title.reveal[data-delay="2"],
  .hero .hero-sub.reveal[data-delay="3"],
  .hero .hero-dim.reveal[data-delay="4"] { transition-delay: 0s; }
}

.hero-title {
  margin-top: clamp(26px, 4vh, 44px);
  font-size: clamp(26px, 4.4vw, 54px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: 0.30em;
  text-transform: uppercase;
  text-indent: 0.30em; /* optically recenter tracked type */
}

.hero-sub {
  margin-top: clamp(20px, 3vh, 34px);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  line-height: 2.1;
  text-indent: 0.14em; /* optically recenter tracked type (matches title) */
}
.hero-sub-loc { display: block; color: color-mix(in srgb, var(--ink-soft) 65%, transparent); }

/* dimension-line scroll cue */
.hero-dim {
  position: absolute;
  bottom: clamp(34px, 6vh, 64px);
  display: flex;
  align-items: center;
  gap: 10px;
}
.dim-line { width: clamp(40px, 7vw, 90px); height: 1px; background: var(--hairline); }
.dim-tick { width: 1px; height: 9px; background: var(--hairline); }
.dim-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ——— sections ——— */

.section { padding: clamp(70px, 12vh, 130px) var(--gutter); }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: clamp(44px, 8vh, 84px);
}
.section-no {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
}
.section-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  white-space: nowrap;
}
.section-rule { flex: 1; height: 1px; background: var(--hairline-soft); align-self: center; }
.section-count {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}

.section-foot {
  margin-top: clamp(56px, 10vh, 110px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 2vh, 20px);
}
.section-foot-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.section-foot-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 0.18em;
  font-size: clamp(20px, 2.8vw, 32px);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.section-foot-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.08em;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}
.section-foot-link:hover::after { transform: scaleX(1); transform-origin: left; }

/* ——— project boards ——— */

.board {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
  margin-bottom: clamp(70px, 12vh, 130px);
}
.board:last-of-type { margin-bottom: 0; }
.board-alt { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
.board-alt .board-img, .board-alt > .dev { order: 2; }
.board-alt .board-caption { order: 1; text-align: right; }
.board-alt .board-meta div { flex-direction: row-reverse; }

.board-img {
  aspect-ratio: 4 / 3;
  width: 100%;
  display: block;
  object-fit: cover;
  border-radius: var(--radius);
}

/* photos ease in as they load (JS adds .is-loading only to not-yet-loaded imgs) */
.board-img,
.board-gallery img {
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.board-img.is-loading,
.board-gallery img.is-loading {
  opacity: 0;
  transform: scale(1.03);
}

/* the wash: while a photo loads, its space holds a pale tint of the
   project's pigment — the print develops over it */
.dev {
  display: block;
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: color-mix(in srgb, var(--wash, #d8d2c4) 38%, var(--paper));
}
.board > .dev { border-radius: var(--radius); }

.board-no {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.board-name {
  font-size: clamp(19px, 2.1vw, 26px);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.board-meta {
  border-top: 1px solid var(--hairline);
  margin-bottom: 22px;
}
.board-meta div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--hairline-soft);
}
.board-meta dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.board-meta dd {
  font-size: 13px;
  letter-spacing: 0.02em;
}

.board-desc {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: 38ch;
}
.board-alt .board-desc { margin-left: auto; }

/* ——— project gallery (multi-image studio) ——— */

.board-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(8px, 1vw, 14px);
  margin-bottom: clamp(70px, 12vh, 130px);
}
/* a hero board followed by its gallery sits tight to it; the gallery
   carries the gap to the next project */
.board:has(+ .board-gallery) { margin-bottom: clamp(18px, 3vh, 32px); }
.board-gallery:last-of-type { margin-bottom: 0; }
.board-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-sm);
}
.board-gallery img[data-zoom] {
  cursor: zoom-in;
  transition: opacity 0.3s ease;
}
@media (hover: hover) {
  .board-gallery img[data-zoom]:hover { opacity: 0.82; }
}

/* ——— lightbox ——— */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 56px);
  padding-bottom: clamp(94px, 14vh, 120px);
  background: color-mix(in srgb, var(--ink) 86%, transparent);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  cursor: zoom-out;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  transform: scale(0.97);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.lightbox.is-open .lightbox-img { transform: scale(1); }
.lightbox-close {
  position: absolute;
  top: clamp(12px, 2vw, 24px);
  right: clamp(12px, 2vw, 28px);
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  color: var(--paper);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease;
  z-index: 2;
}
.lightbox-close:hover { opacity: 1; }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: color-mix(in srgb, var(--paper) 14%, transparent);
  color: var(--paper);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.75;
  transition: opacity 0.2s ease, background 0.2s ease;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
}
.lightbox-nav:hover { opacity: 1; background: color-mix(in srgb, var(--paper) 24%, transparent); }
.lightbox-prev { left: clamp(8px, 2vw, 28px); }
.lightbox-next { right: clamp(8px, 2vw, 28px); }

.lightbox-count {
  position: absolute;
  top: clamp(16px, 3vh, 30px);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper);
  opacity: 0.7;
  z-index: 2;
}

.lightbox-thumbs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(14px, 3vh, 26px);
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  padding: 0 16px;
  max-width: 100%;
  overflow-x: auto;
  cursor: default;
  scrollbar-width: none;
  z-index: 2;
}
.lightbox-thumbs::-webkit-scrollbar { display: none; }
.lightbox-thumbs img {
  flex: 0 0 auto;
  width: 58px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.4;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: opacity 0.2s ease, outline-color 0.2s ease;
}
.lightbox-thumbs img:hover { opacity: 0.75; }
.lightbox-thumbs img.is-active {
  opacity: 1;
  outline-color: var(--paper);
}

@media (max-width: 560px) {
  .lightbox-nav { width: 46px; height: 46px; font-size: 26px; }
  .lightbox-thumbs img { width: 46px; height: 34px; }
}

/* ——— material swatches — watercolor palette dots ——— */

.swatches {
  display: flex;
  margin-bottom: 14px;
}
.swatches i {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  margin-right: -14px;
  mix-blend-mode: multiply;
  background: radial-gradient(
    circle at 38% 36%,
    color-mix(in srgb, var(--c) 88%, transparent) 0%,
    color-mix(in srgb, var(--c) 72%, transparent) 45%,
    color-mix(in srgb, var(--c) 30%, transparent) 64%,
    transparent 74%
  );
}
.board-alt .swatches { justify-content: flex-end; }
.board-alt .swatches i { margin-right: 0; margin-left: -14px; }

/* ——— placeholder imagery (profile portrait) ——— */

.ph {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}
.ph::after {
  /* hairline inset, like a mounted print */
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(22, 22, 22, 0.12);
  border-radius: inherit;
  pointer-events: none;
}
.ph-note {
  position: absolute;
  left: 14px;
  bottom: 12px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

/* ——— profile ——— */

.profile {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
}

.profile-img { aspect-ratio: 3 / 4; border-radius: var(--radius); }
.ph-portrait {
  background:
    radial-gradient(90% 70% at 50% 28%, rgba(255,255,255,0.10), transparent 60%),
    linear-gradient(180deg, #23262d 0%, var(--charcoal) 60%, #0e1014 100%);
}

.profile-lede {
  font-size: clamp(19px, 2.3vw, 28px);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.01em;
  margin-bottom: 26px;
  max-width: 26ch;
}
.profile-text > p:not(.profile-lede) {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--ink-soft);
  max-width: 52ch;
}

/* ——— services ——— */

.services { list-style: none; }
.services li {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.4fr);
  align-items: baseline;
  gap: 18px;
  padding: clamp(20px, 3vh, 30px) 0;
  border-bottom: 1px solid var(--hairline-soft);
  transition: padding-left 0.35s ease;
}
.services li:first-child { border-top: 1px solid var(--hairline); }
.services li:hover { padding-left: 14px; }

.svc-no { font-family: var(--mono); font-size: 10.5px; color: var(--ink-soft); }
.svc-name {
  font-size: clamp(16px, 1.8vw, 21px);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.svc-note { font-size: 13px; color: var(--ink-soft); text-align: right; }

/* ——— contact ——— */

.section-contact { padding-bottom: clamp(110px, 18vh, 190px); }

/* a quiet invitation — deferential, not a headline that shouts */
.contact-statement {
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.005em;
  color: var(--ink-soft);
  max-width: 18ch;
  margin-bottom: clamp(40px, 8vh, 86px);
}

/* the email — the single focal point, given room */
.contact-email-row {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: clamp(16px, 2vw, 28px);
}
.contact-email {
  font-size: clamp(26px, 5.4vw, 64px);
  font-weight: 400;
  letter-spacing: -0.018em;
  color: var(--ink);
  text-decoration: none;
  position: relative;
}
.contact-email::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.12em;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}
.contact-email:hover::after { transform: scaleX(1); transform-origin: left; }

/* copy — dissolved until the gesture is wanted; quiet feedback */
.contact-copy {
  flex: 0 0 auto;
  align-self: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: none;
  border: none;
  padding: 4px 2px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.4s ease, color 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}
.contact-email-row:hover .contact-copy,
.contact-email-row:focus-within .contact-copy { opacity: 0.5; }
.contact-copy:hover { opacity: 1; color: var(--ink); }
.contact-copy.is-copied { opacity: 1; color: var(--ink); }
@media (hover: none) { .contact-copy { opacity: 0.5; } }

/* channels — label with its mark beneath, grounded by a dimension line */
.contact-channels {
  position: relative;
  margin-top: clamp(54px, 11vh, 120px);
  padding-top: clamp(26px, 4.5vh, 40px);
  display: flex;
  gap: clamp(30px, 6vw, 76px);
}
.contact-channels::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 52px;
  height: 1px;
  background: var(--ink);
}
.contact-channel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--ink-soft);
}
.contact-channel-name {
  font-size: 13.5px;
  letter-spacing: 0.04em;
  transition: color 0.3s ease;
}
.contact-channel-icon {
  display: block;
  color: var(--ink-soft);
  transition: color 0.3s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.contact-channel-icon svg {
  width: clamp(26px, 3vw, 32px);
  height: clamp(26px, 3vw, 32px);
  display: block;
}
.contact-channel:hover .contact-channel-name { color: var(--ink); }
.contact-channel:hover .contact-channel-icon {
  color: var(--ink);
  transform: translateY(-2px);
}

/* ——— title block footer ——— */

.titleblock {
  margin: 0 var(--gutter) calc(var(--frame) + 26px);
  padding-top: clamp(28px, 5vh, 48px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(16px, 3vh, 26px);
  border-top: 1px solid var(--hairline);
}
.tb-mark {
  width: clamp(72px, 9vw, 96px);
  height: auto;
  color: var(--ink-soft);
}
.tb-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.tb-foot-name {
  font-size: 11.5px;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  color: var(--ink-soft);
}
.tb-foot-services { font-size: 9.5px; letter-spacing: 0.2em; text-indent: 0.2em; color: var(--ink-soft); opacity: 0.8; }
.tb-foot-meta { letter-spacing: 0.22em; text-indent: 0.22em; }

/* ——— reveal on scroll ——— */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal[data-delay="1"] { transition-delay: 0.12s; }
.reveal[data-delay="2"] { transition-delay: 0.24s; }
.reveal[data-delay="3"] { transition-delay: 0.36s; }
.reveal[data-delay="4"] { transition-delay: 0.48s; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ——— responsive ——— */

@media (max-width: 860px) {
  .topbar { padding: 12px 16px; }
  .topbar-name { display: none; }
  .topbar-nav a sup { display: none; }

  .board,
  .board-alt { grid-template-columns: 1fr; align-items: start; }
  .board-alt .board-img, .board-alt > .dev { order: 1; }
  .board-alt .board-caption { order: 2; text-align: left; }
  .board-alt .board-meta div { flex-direction: row; }
  .board-alt .board-desc { margin-left: 0; }

  .board-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .profile { grid-template-columns: 1fr; }
  .profile-img { max-width: 340px; }

  .services li { grid-template-columns: 44px 1fr; }
  .svc-note { grid-column: 2; text-align: left; }

  .contact-email-row { display: flex; flex-wrap: wrap; align-items: baseline; }
  .contact-email { font-size: clamp(22px, 6.5vw, 40px); word-break: break-word; }

}

/* small phones (iPhone SE/mini, compact Androids) */
@media (max-width: 420px) {
  .topbar { padding: 12px 12px; }
  .topbar-nav { gap: 12px; }
  .topbar-nav a { font-size: 9.5px; letter-spacing: 0.1em; }
  .brand-mark { width: 52px; }

  .hero { padding-top: 96px; }
  .hero-title { letter-spacing: 0.22em; text-indent: 0.22em; }

  .section-head { flex-wrap: wrap; row-gap: 8px; }
  .board-meta dd { font-size: 12.5px; text-align: right; }

  .contact-channels { gap: 26px; }
  .contact-channel-name { font-size: 12.5px; }
}
