/* ==========================================================================
   Grace Najean / links
   Brand: Zen Gold #B99831, Sand #D8C67C, Aurora Black #202020, White
   Type: Lora (titles / subheads), Poppins (body / UI)
   ========================================================================== */

@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/lora-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Lora';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/lora-italic-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/poppins-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/poppins-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/poppins-500.woff2') format('woff2');
}

:root {
  --ink: #14110d;
  --aurora: #202020;
  --gold: #b99831;
  --sand: #d8c67c;
  --paper: #f6f1e8;
  --muted: #c4bbab;
  --line: rgba(216, 198, 124, 0.22);
  --line-strong: rgba(216, 198, 124, 0.46);

  --font-display: 'Lora', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Poppins', 'Helvetica Neue', Arial, sans-serif;

  --radius: 12px;

  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

@media (prefers-contrast: more) {
  :root {
    --muted: #e4dccf;
    --line: rgba(216, 198, 124, 0.48);
    --line-strong: rgba(216, 198, 124, 0.8);
  }

  .intro__bio,
  .link__meta {
    color: var(--muted);
  }
}

/* Film grain, generated locally, kept almost invisible. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.035;
  background-image: url('../img/grain.png');
  background-size: 128px 128px;
  mix-blend-mode: overlay;
}

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

img,
svg {
  display: block;
}

:focus-visible {
  outline: 2px solid var(--sand);
  outline-offset: 3px;
}

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

/* --------------------------------------------------------------------------
   Frame
   -------------------------------------------------------------------------- */

.page {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  min-height: 100vh;
  min-height: 100dvh;
}

/* --------------------------------------------------------------------------
   Visual panel
   -------------------------------------------------------------------------- */

.visual {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(26px, 3.6vw, 56px);
  overflow: hidden;
  isolation: isolate;
  background: var(--ink);
}

.visual__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

/* A quiet corner scrim keeps the gold mark legible over the brightest frame. */
.visual::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(46% 38% at 0% 0%, rgba(20, 17, 13, 0.9) 0%, rgba(20, 17, 13, 0.62) 48%, rgba(20, 17, 13, 0) 80%);
}

.visual__bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  --bg-scale: 1.1;
  object-position: 55% 60%;
  transform: scale(var(--bg-scale));
  filter: saturate(0.68) sepia(0.5) brightness(0.54) contrast(1.06);
  opacity: 0.7;
}

.visual__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 17, 13, 0.9) 0%, rgba(20, 17, 13, 0.38) 34%, rgba(20, 17, 13, 0.12) 55%, rgba(20, 17, 13, 0.94) 100%),
    linear-gradient(92deg, rgba(20, 17, 13, 0.72) 0%, rgba(20, 17, 13, 0.08) 58%, rgba(20, 17, 13, 0.32) 100%);
}

.visual__brand {
  position: relative;
  z-index: 4;
  display: block;
  width: clamp(116px, 10.3vw, 148px);
  color: inherit;
  text-decoration: none;
}

.visual__brand img {
  width: 100%;
  height: auto;
}

.visual__statement {
  position: relative;
  z-index: 4;
  width: min(12ch, 44%);
  margin: clamp(26px, 4.6vh, 46px) 0 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 2.9vw, 2.65rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--paper);
  text-wrap: balance;
}

.visual__statement em {
  font-style: italic;
  color: var(--sand);
}

.visual__meta {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  max-width: 62%;
  margin-top: clamp(20px, 3.2vh, 34px);
}

.visual__rule {
  width: 34px;
  height: 1px;
  flex: none;
  background: var(--sand);
  opacity: 0.7;
}

.visual__meta p {
  margin: 0;
  font-size: 0.58rem;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(246, 241, 232, 0.72);
}

.portrait {
  position: absolute;
  right: clamp(14px, 4vw, 54px);
  bottom: 0;
  z-index: 3;
  height: clamp(320px, 56vh, 500px);
  width: auto;
  aspect-ratio: 668 / 774;
  translate: 0 0;
  isolation: isolate;
}

.portrait__img {
  width: 100%;
  height: auto;
  filter: saturate(0.94) contrast(1.035) brightness(1.015) drop-shadow(0 26px 46px rgba(0, 0, 0, 0.4));
}

/* --------------------------------------------------------------------------
   The book, treated as an object in the lower-left of the cover
   -------------------------------------------------------------------------- */

.book {
  position: absolute;
  left: clamp(26px, 3.6vw, 56px);
  bottom: clamp(26px, 3.6vw, 56px);
  z-index: 5;
  display: block;
  width: clamp(84px, 8.9vw, 128px);
  color: var(--paper);
  text-decoration: none;
  isolation: isolate;
}

.book::before {
  content: '';
  position: absolute;
  left: -18%;
  bottom: -8%;
  z-index: -1;
  width: 136%;
  aspect-ratio: 1;
  pointer-events: none;
  background: radial-gradient(circle, rgba(185, 152, 49, 0.22) 0%, rgba(185, 152, 49, 0.07) 42%, rgba(185, 152, 49, 0) 70%);
}

.book__kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 0.5625rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sand);
}

.book__rule {
  width: 20px;
  height: 1px;
  flex: none;
  background: var(--sand);
  opacity: 0.72;
  transition: width 0.4s var(--ease);
}

.book__cover-wrap {
  display: block;
  margin-top: 10px;
}

.book__cover {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.5s var(--ease);
}

.book__title {
  display: block;
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.32;
  color: var(--paper);
  text-wrap: pretty;
}

.book__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  margin-top: 12px;
  padding: 12px 10px;
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  background: var(--sand);
  color: var(--ink);
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition:
    background-color 0.24s var(--ease),
    border-color 0.24s var(--ease),
    color 0.24s var(--ease);
}

.book__cta svg {
  width: 13px;
  height: 13px;
  flex: none;
  transition: transform 0.4s var(--ease);
}

.book:focus-visible {
  outline: 2px solid var(--sand);
  outline-offset: 6px;
}

@media (hover: hover) and (pointer: fine) {
  .book:hover .book__cover,
  .book:focus-visible .book__cover {
    transform: translateY(-5px) rotate(-1.2deg);
  }

  .book:hover .book__rule,
  .book:focus-visible .book__rule {
    width: 32px;
  }

  .book:hover .book__cta,
  .book:focus-visible .book__cta {
    border-color: var(--gold);
    background: var(--gold);
    color: var(--ink);
  }

  .book:hover .book__cta svg,
  .book:focus-visible .book__cta svg {
    transform: translate(2px, -2px);
  }
}

@media (min-width: 1201px) {
  .book {
    width: clamp(148px, 12vw, 172px);
  }

  .book__kicker {
    font-size: 0.625rem;
  }

  .book__rule {
    width: 24px;
  }

  .book__title {
    margin-top: 13px;
    font-size: 0.875rem;
    line-height: 1.3;
  }

  .book__cta {
    margin-top: 11px;
    font-size: 0.625rem;
  }
}

@media (max-width: 1359px) {
  .book__title {
    display: none;
  }
}

@media (max-width: 1200px) {
  .book__cta {
    min-height: 34px;
    gap: 4px;
    margin-top: 9px;
    padding: 9px 6px;
    font-size: 0.5625rem;
  }

  .book__cta svg {
    width: 11px;
    height: 11px;
  }
}

/* The portrait sits in the page, not on top of it. */
.visual::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  height: 24%;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(20, 17, 13, 0.98) 0%, rgba(20, 17, 13, 0.82) 30%, rgba(20, 17, 13, 0.28) 65%, rgba(20, 17, 13, 0) 100%);
}

/* --------------------------------------------------------------------------
   Link panel
   -------------------------------------------------------------------------- */

.panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(30px, 5vh, 66px) clamp(24px, 4.2vw, 64px);
  overflow: hidden;
  border-left: 1px solid var(--line);
  background:
    radial-gradient(120% 82% at 100% 0%, rgba(185, 152, 49, 0.12), rgba(185, 152, 49, 0) 58%),
    var(--ink);
}

/* Gold dust, an Unsplash night-sky frame tinted toward the brand. */
.panel::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url('../img/gold-dust.webp');
  background-size: cover;
  background-position: center;
  opacity: 0.1;
  filter: sepia(1) saturate(2.4) hue-rotate(-8deg) brightness(0.72) contrast(1.15);
  mix-blend-mode: screen;
}

/* Pointer-following warmth. A static gradient moved on the compositor. */
.panel::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(216, 198, 124, 0.11) 0%, rgba(216, 198, 124, 0.05) 36%, rgba(216, 198, 124, 0) 70%);
  transform: translate3d(calc(var(--mx, 0px) - 320px), calc(var(--my, 0px) - 320px), 0);
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .panel.is-live::after {
    opacity: 1;
    will-change: transform;
  }
}

.panel__inner {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
  margin-inline: auto;
}

.intro__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.45rem, 3.9vw, 3.45rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--paper);
  text-wrap: balance;
}

.intro__role .amp {
  color: var(--gold);
}

.intro__role {
  margin: 14px 0 0;
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--sand);
}

.intro__bio {
  max-width: 43ch;
  margin: 20px 0 0;
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--muted);
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   Links
   -------------------------------------------------------------------------- */

.links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: clamp(26px, 4vh, 38px);
  scroll-margin-top: 24px;
}

.link,
.link-row {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  isolation: isolate;
  color: var(--paper);
  transition:
    border-color 0.24s var(--ease),
    color 0.24s var(--ease);
}

.link {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 16px;
  min-height: 70px;
  padding: 12px 20px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.link::before,
.link-row::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, var(--sand) 0%, var(--gold) 100%);
  border-radius: var(--radius);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.42s var(--ease);
}

.link > *,
.link-row > * {
  position: relative;
}

.link__icon {
  display: grid;
  place-items: center;
  color: var(--gold);
  transition: color 0.24s var(--ease);
}

.link__icon svg {
  width: 22px;
  height: 22px;
}

.link__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.link__label {
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.005em;
}

.link__meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.6875rem;
  font-weight: 300;
  line-height: 1.4;
  letter-spacing: 0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.24s var(--ease);
}

.link__arrow {
  display: grid;
  place-items: center;
  color: rgba(216, 198, 124, 0.62);
  transition:
    color 0.24s var(--ease),
    transform 0.42s var(--ease);
}

.link__arrow svg {
  width: 18px;
  height: 18px;
}

/* Featured: the website is the primary action. */
.link--feature {
  min-height: 98px;
  padding: 18px 20px;
  border-color: rgba(216, 198, 124, 0.66);
  background:
    linear-gradient(105deg, #c8a73f 0%, var(--gold) 56%, #a58428 100%);
  color: var(--ink);
}

.link--feature::before {
  background: linear-gradient(100deg, #e7d99c 0%, var(--sand) 100%);
}

.link--feature .link__icon,
.link--feature .link__arrow {
  color: var(--ink);
}

.link--feature .link__label {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.link--feature .link__meta {
  color: rgba(20, 17, 13, 0.8);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.03em;
}

/* Hover, only where hovering is a real input. */
@media (hover: hover) and (pointer: fine) {
  .link:hover,
  .link:focus-visible {
    border-color: var(--gold);
    color: var(--ink);
  }

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

  .link:hover .link__icon,
  .link:focus-visible .link__icon,
  .link:hover .link__arrow,
  .link:focus-visible .link__arrow {
    color: var(--ink);
  }

  .link:hover .link__meta,
  .link:focus-visible .link__meta {
    color: rgba(20, 17, 13, 0.76);
  }

  .link:hover .link__arrow,
  .link:focus-visible .link__arrow {
    transform: translate(2px, -2px);
  }

  .link:active {
    transform: scale(0.995);
  }

  .link--feature:hover,
  .link--feature:focus-visible {
    border-color: var(--sand);
  }
}

/* Keyboard focus gets the same gold fill, even without a pointer. */
.link:focus-visible {
  outline: 2px solid var(--sand);
  outline-offset: 3px;
  border-color: var(--gold);
  color: var(--ink);
}
.link:focus-visible::before {
  transform: scaleX(1);
}
.link:focus-visible .link__icon,
.link:focus-visible .link__arrow {
  color: var(--ink);
}
.link:focus-visible .link__meta {
  color: rgba(20, 17, 13, 0.76);
}

/* Email row: mailto plus a copy action. */
.link-row {
  display: flex;
  align-items: stretch;
  min-height: 70px;
}

.link-row__main {
  display: grid;
  border-radius: var(--radius) 0 0 var(--radius);
  flex: 1;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 12px 10px 12px 20px;
  color: inherit;
  text-decoration: none;
}

.copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  align-self: stretch;
  min-width: 96px;
  height: auto;
  margin: 0;
  padding: 0 14px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: transparent;
  color: var(--sand);
  font-family: var(--font-body);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    color 0.2s var(--ease),
    background-color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    transform 0.12s var(--ease);
}

.copy svg {
  width: 14px;
  height: 14px;
}

.copy:focus-visible,
.link-row__main:focus-visible {
  outline: 2px solid var(--sand);
  outline-offset: -4px;
}

.copy__glyph {
  display: inline-flex;
}

.copy__glyph--check {
  display: none;
}

.copy.is-copied {
  border-color: var(--gold);
  background: var(--ink);
  color: var(--sand);
}

.copy.is-copied .copy__glyph--copy {
  display: none;
}

.copy.is-copied .copy__glyph--check {
  display: inline-flex;
}

.copy:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .link-row:hover {
    border-color: var(--gold);
    color: var(--ink);
  }

  .link-row:hover::before {
    transform: scaleX(1);
  }

  .link-row:hover .link__icon {
    color: var(--ink);
  }

  .link-row:hover .link__meta {
    color: rgba(20, 17, 13, 0.76);
  }

  .link-row:hover .copy {
    border-left-color: rgba(20, 17, 13, 0.32);
    background: rgba(20, 17, 13, 0.06);
    color: var(--ink);
  }

  .link-row:hover .copy:hover {
    background: rgba(20, 17, 13, 0.12);
  }

  .link-row:hover .copy.is-copied,
  .link-row:hover .copy.is-copied:hover {
    border-left-color: var(--gold);
    background: var(--ink);
    color: var(--sand);
  }
}

.link-row:focus-within {
  border-color: var(--sand);
}

/* --------------------------------------------------------------------------
   The book, as a special link card on stacked layouts
   -------------------------------------------------------------------------- */

.book-card {
  display: none;
}

@media (max-width: 980px) {
  .book {
    display: none;
  }

  .book-card {
    position: relative;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 104px;
    padding: 14px 16px;
    overflow: visible;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background:
      linear-gradient(110deg, rgba(185, 152, 49, 0.17) 0%, rgba(185, 152, 49, 0.06) 54%, rgba(255, 255, 255, 0.015) 100%);
    color: var(--paper);
    text-decoration: none;
    isolation: isolate;
  }

  .book-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(70% 110% at 0% 50%, rgba(216, 198, 124, 0.14), rgba(216, 198, 124, 0) 70%);
  }

  .book-card__cover {
    display: block;
    width: 52px;
    transition: transform 0.45s var(--ease);
  }

  .book-card__cover img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.48));
  }

  .book-card__body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
  }

  .book-card__kicker {
    font-size: 0.5625rem;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--sand);
  }

  .book-card__title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.2;
    color: var(--paper);
  }

  .book-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 32px;
    padding: 0 10px;
    border-radius: var(--radius);
    background: var(--sand);
    color: var(--ink);
    font-size: 0.5625rem;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: background-color 0.24s var(--ease);
  }

  .book-card__cta svg {
    width: 12px;
    height: 12px;
    flex: none;
  }

  .book-card:focus-visible {
    outline: 2px solid var(--sand);
    outline-offset: 3px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .book-card:hover {
    border-color: var(--sand);
  }

  .book-card:hover .book-card__cover {
    transform: translateY(-3px) rotate(-1deg);
  }

  .book-card:hover .book-card__cta {
    background: var(--gold);
  }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px 18px;
  margin-top: clamp(24px, 4vh, 34px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: rgba(246, 241, 232, 0.58);
  font-size: 0.6rem;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer p {
  margin: 0;
}

.footer__left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.footer p.footer__credit {
  margin-left: auto;
  text-align: right;
}

.footer__dev a {
  color: var(--sand);
  text-decoration: none;
  border-bottom: 1px solid rgba(216, 198, 124, 0.45);
  transition:
    color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.footer__dev a:hover,
.footer__dev a:focus-visible {
  color: var(--paper);
  border-color: var(--paper);
}

/* --------------------------------------------------------------------------
   Load choreography
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .visual__bg {
    animation: bg-settle 1.5s var(--ease) both;
  }

  .visual__brand {
    animation: fade-drop 0.8s var(--ease) 0.08s both;
  }

  .visual__statement {
    animation: rise 0.9s var(--ease) 0.32s both;
  }

  .visual__meta {
    animation: fade 0.9s ease-out 0.55s both;
  }

  .portrait__img {
    animation: portrait-rise 1.05s var(--ease) 0.12s both;
  }

  .book {
    animation: rise 0.8s var(--ease) 0.45s both;
  }

  .intro__name {
    animation: rise 0.8s var(--ease) 0.18s both;
  }

  .intro__role {
    animation: rise 0.8s var(--ease) 0.26s both;
  }

  .intro__bio {
    animation: rise 0.8s var(--ease) 0.34s both;
  }

  .links > * {
    animation: rise 0.7s var(--ease) both;
  }

  .links > *:nth-child(1) {
    animation-delay: 0.42s;
  }
  .links > *:nth-child(2) {
    animation-delay: 0.48s;
  }
  .links > *:nth-child(3) {
    animation-delay: 0.54s;
  }
  .links > *:nth-child(4) {
    animation-delay: 0.6s;
  }
  .links > *:nth-child(5) {
    animation-delay: 0.66s;
  }
  .links > *:nth-child(6) {
    animation-delay: 0.72s;
  }

  .footer {
    animation: fade 0.8s ease-out 0.8s both;
  }
}

@keyframes bg-settle {
  from {
    transform: scale(calc(var(--bg-scale) * 1.06));
    opacity: 0.3;
  }
  to {
    transform: scale(var(--bg-scale));
    opacity: 0.7;
  }
}

@keyframes portrait-rise {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-drop {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1180px) {
  .visual {
    padding: clamp(24px, 3vw, 40px);
  }

  .book {
    left: clamp(24px, 3vw, 40px);
    bottom: clamp(24px, 3vw, 40px);
  }

  .portrait {
    height: clamp(300px, 54vh, 470px);
    width: auto;
  }

  .visual__statement {
    font-size: clamp(1.8rem, 2.8vw, 2.2rem);
  }

  .intro__name {
    font-size: clamp(2.35rem, 3.9vw, 2.95rem);
  }
}

/* Short laptops: keep the full link stack above the fold. */
@media (min-width: 981px) and (max-height: 800px) {
  .panel {
    padding-block: 26px;
  }

  .link {
    min-height: 64px;
  }

  .link--feature {
    min-height: 90px;
  }

  .links {
    gap: 8px;
    margin-top: 24px;
  }

  .intro__bio {
    margin-top: 16px;
  }

  .footer {
    margin-top: 20px;
    padding-top: 14px;
  }
}

@media (max-width: 980px) {
  .page {
    display: block;
  }

  .visual {
    min-height: 0;
    height: clamp(400px, 58vh, 620px);
    height: clamp(400px, 58dvh, 620px);
    padding: 24px;
  }

  .visual__bg {
    --bg-scale: 1.14;
    object-position: 55% 60%;
    opacity: 0.72;
  }

  .visual__veil {
    background:
      linear-gradient(180deg, rgba(20, 17, 13, 0.8) 0%, rgba(20, 17, 13, 0.16) 38%, rgba(20, 17, 13, 0.66) 100%),
      linear-gradient(90deg, rgba(20, 17, 13, 0.55) 0%, rgba(20, 17, 13, 0.04) 70%);
  }

  .visual__brand {
    width: clamp(104px, 17vw, 128px);
  }

  .visual__statement,
  .visual__meta {
    display: none;
  }

  .portrait {
    right: auto;
    left: 50%;
    height: clamp(280px, 74%, 480px);
    width: auto;
    translate: -50% 0;
  }

  .panel {
    display: block;
    padding: clamp(34px, 6vw, 54px) clamp(20px, 6vw, 40px) 38px;
    border-left: 0;
    border-top: 0;
    background:
      radial-gradient(120% 60% at 80% 0%, rgba(185, 152, 49, 0.12), rgba(185, 152, 49, 0) 60%),
      var(--ink);
  }

  .panel::before {
    opacity: 0.1;
  }

  .panel__inner {
    width: min(100%, 520px);
  }

  .intro__name {
    font-size: clamp(2.25rem, 8.2vw, 2.85rem);
  }

  .links {
    margin-top: 28px;
  }

  .footer {
    justify-content: space-between;
  }
}

@media (max-width: 480px) {
  .visual {
    height: clamp(360px, 52vh, 560px);
    height: clamp(360px, 52dvh, 560px);
  }

  .visual__brand {
    width: clamp(104px, 28vw, 126px);
  }

  .portrait {
    height: clamp(250px, 72%, 340px);
  }
}

@media (max-width: 420px) {
  .visual {
    height: clamp(350px, 52vh, 500px);
    height: clamp(350px, 52dvh, 500px);
    padding: 20px;
  }

  .visual__brand {
    width: clamp(100px, 28vw, 112px);
  }

  .panel {
    padding: 32px 18px 30px;
  }

  .link {
    gap: 13px;
    min-height: 66px;
    padding: 11px 14px;
    grid-template-columns: 22px minmax(0, 1fr) 20px;
  }

  .link__icon svg {
    width: 20px;
    height: 20px;
  }

  .link--feature {
    min-height: 92px;
    padding: 16px 14px;
  }

  .link--feature .link__label {
    font-size: 1.3rem;
  }

  .link-row {
    min-height: 66px;
  }

  .link-row__main {
    gap: 13px;
    padding: 11px 8px 11px 14px;
  }

  .copy {
    min-width: 88px;
    padding: 0 10px;
  }

  .copy__label {
    font-size: 0.58rem;
  }

  .intro__bio {
    font-size: 0.84rem;
  }

  .footer {
    font-size: 0.56rem;
  }
}

@media (max-width: 350px) {
  .book-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .book-card__cover {
    display: none;
  }

  .link__meta {
    font-size: 0.64rem;
  }

  .copy {
    min-width: 42px;
    padding: 0 8px;
  }

  .copy__label {
    display: none;
  }
}

/* Landscape phones: keep the cover shallow. */
@media (max-width: 980px) and (max-height: 520px) {
  .visual {
    height: 240px;
  }

  .portrait {
    height: 200px;
    width: auto;
  }

  .visual__brand {
    width: 110px;
  }
}

/* --------------------------------------------------------------------------
   Reduced motion: keep the colour, lose the movement.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .visual__bg,
  .visual__brand,
  .visual__statement,
  .visual__meta,
  .portrait__img,
  .book,
  .intro__name,
  .intro__role,
  .intro__bio,
  .links > *,
  .footer {
    animation: none !important;
  }

  .link,
  .link-row,
  .link__icon,
  .link__meta,
  .link__arrow,
  .copy,
  .book__cover,
  .book__rule,
  .book-card__cover {
    transition-duration: 0.15s;
  }

  .link::before,
  .link-row::before {
    transition-duration: 0.15s;
  }

  .link:active,
  .copy:active,
  .book:hover .book__cover,
  .book:focus-visible .book__cover,
  .book-card:hover .book-card__cover,
  .book:hover .book__cta svg,
  .book:focus-visible .book__cta svg {
    transform: none;
  }

  .book:hover .book__rule,
  .book:focus-visible .book__rule {
    width: 20px;
  }
}
