:root {
  --ease-editorial: cubic-bezier(.16, 1, .3, 1);
  --ink-rose: #694151;
}

.hero { overflow: hidden; padding-block: clamp(40px, 7vh, 76px); }
.hero-inner { position: relative; min-width: 0; max-width: 100%; }
.cover-title { position: relative; }
.cover-title span { display: block; }
.cover-mark {
  width: clamp(28px, 5.5vw, 69px);
  position: absolute;
  top: 47%;
  right: 1%;
  color: var(--gold);
  filter: drop-shadow(1px 2px 1px #51384852);
  pointer-events: none;
}
@media (min-width: 1100px) {
  .cover-mark { right: -11%; top: 46%; }
}
.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  margin-top: 22px;
  padding: 9px 15px;
  border: 1px solid #2b272675;
  background: #f2e7df83;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .13em;
  text-decoration: none;
  text-transform: uppercase;
}
.hero-link span { font-size: 17px; line-height: 1; }
.hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.hero-actions .hero-link { margin-top: 0; }
.hero-actions .resume-link { background: transparent; }
.hero-actions .resume-link:is(:hover,:focus-visible) { background: var(--cream); }
.hero-link:hover, .hero-link:focus-visible { background: var(--cream); }
#work, #clients, #contact { scroll-margin-top: 80px; }
header.top nav a { position: relative; }
header.top nav a::after {
  content: "";
  position: absolute;
  inset: auto 0 -4px;
  height: 1px;
  background: var(--ink-rose);
  transform: scaleX(0);
  transform-origin: left;
}
header.top nav a:is(:hover, :focus-visible)::after { transform: scaleX(1); }
.filters button { transition: background-color .2s, color .2s, border-color .2s; }
.filters button[aria-pressed=true] { background: var(--ink-rose); border-color: var(--ink-rose); }
.card { cursor: zoom-in; }
.card .im { position: relative; }
.card img, .card:hover img { transform: none; }
.card .cl { color: var(--ink-rose); }
.card .im::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--gold);
  opacity: 0;
  pointer-events: none;
}
.work-peek {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 1;
  padding: 7px 10px;
  color: var(--ink);
  background: var(--gold);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
}
.card:focus-visible .work-peek, .card:focus-visible .im::after { opacity: 1; }
.card:focus-visible h4 { color: var(--ink-rose); }

dialog { margin: auto; max-height: min(92dvh, 1040px); overflow: auto; }
.project-art { overflow: hidden; background: #eadfd7; }
.project-art img { aspect-ratio: 1100/850; max-height: 68dvh; object-fit: contain; }
dialog button:hover { background: var(--gold); }

@media (hover: hover) and (pointer: fine) {
  .card:hover .work-peek, .card:hover .im::after { opacity: 1; }
  .card:hover img, .card:focus-visible img { transform: scale(1.04); }
  .card:hover h4 { color: var(--ink-rose); }
}

@media (prefers-reduced-motion: no-preference) {
  .hero .who { animation: cover-detail .52s var(--ease-editorial) both; }
  .cover-title span { animation: cover-type .86s var(--ease-editorial) both; }
  .cover-title span:last-child { animation-delay: .11s; }
  .cover-mark path { stroke-dasharray: 1; animation: draw-mark .62s .36s var(--ease-editorial) both; }
  .hero p { animation: cover-detail .58s .22s var(--ease-editorial) both; }
  .hero-link { animation: cover-detail .58s .33s var(--ease-editorial) both; transition: background-color .2s; }
  .hero-link span { transition: transform .26s var(--ease-editorial); }
  .hero-link:is(:hover,:focus-visible) span { transform: translateY(3px); }
  .resume-link:is(:hover,:focus-visible) span { transform: translate(2px,-2px); }
  header.top nav a::after { transition: transform .28s var(--ease-editorial); }
  .card .im::after { transition: opacity .28s; }
  .card img { transition: transform .55s var(--ease-editorial); }
  .work-peek { transform: translateY(5px); transition: opacity .18s, transform .3s var(--ease-editorial); }
  .card:is(:hover,:focus-visible) .work-peek { transform: translateY(0); }
  dialog[open] { animation: open-project .36s var(--ease-editorial) both; }
  dialog[open]::backdrop { animation: gallery-fade .25s ease-out both; }
  @supports (animation-timeline: view()) {
    .intro .script, .clients .script, footer .script {
      animation: editorial-ink linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 94%;
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .card img { transform: none !important; }
}
@keyframes cover-type { from { opacity: 0; transform: translateY(22px) rotate(-2deg); } }
@keyframes cover-detail { from { opacity: 0; transform: translateY(9px); } }
@keyframes draw-mark { from { opacity: 0; stroke-dashoffset: 1; } 20% { opacity: 1; } to { stroke-dashoffset: 0; } }
@keyframes open-project { from { opacity: 0; transform: translateY(12px) scale(.985); } }
@keyframes gallery-fade { from { opacity: 0; } }
@keyframes editorial-ink { from { opacity: .48; } to { opacity: 1; } }
