/* ═══════════════════════════════════════════════════════════════
   RUFF DRAFT STUDIO · Brian Nelson
   Dark cinematic editorial system
   Tokens first: change colors/type here and the whole site follows.
   Shape rule: media + panels are sharp (radius 0), interactive
   elements (buttons, pills) are full-pill. Documented + locked.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg: #0d0d0e;
  --bg-2: #141416;
  --bg-3: #1b1b1e;
  --ink: #edebe6;
  --ink-dim: #b9b6af;
  --muted: #8a8781;
  --line: rgba(237, 235, 230, 0.14);
  --accent: #e8933f;        /* ember, pulled from the portrait rim light */
  --accent-bright: #f7ab5c;
  --accent-ink: #16100a;    /* text on accent */
  --font-display: 'Clash Display', 'Avenir Next', sans-serif;
  --font-body: 'Satoshi', 'Helvetica Neue', sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 72px;
}

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

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; border: none; background: none; cursor: pointer; color: inherit; }

.wrap {
  width: min(100% - 48px, 1400px);
  margin-inline: auto;
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 40px); }
}

/* ── Film grain (fixed overlay, zero repaint cost) ─────────────── */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 90;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-reduced-motion: no-preference) {
  .grain { animation: grain-shift 0.9s steps(4) infinite; }
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 3%); }
  50% { transform: translate(3%, -2%); }
  75% { transform: translate(-3%, -3%); }
  100% { transform: translate(2%, 2%); }
}

/* ── Navigation ────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(13, 13, 14, 0.82);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 48px, 1400px);
  margin-inline: auto;
}
.nav__logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.01em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.nav__logo em {
  font-style: normal;
  color: var(--accent);
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav__link {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-dim);
  position: relative;
  transition: color 0.3s var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__link.is-active { color: var(--ink); }

/* mobile nav */
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
}
.nav__burger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}
@media (max-width: 768px) {
  .nav__burger { display: flex; }
  .nav__links {
    position: fixed;
    inset: 0;
    background: var(--bg);
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--ease);
  }
  .nav__links .nav__link { font-size: 32px; font-family: var(--font-display); font-weight: 500; color: var(--ink); }
  body.nav-open .nav__links { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }
  body.nav-open .nav__burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  body.nav-open .nav__burger span:nth-child(2) { opacity: 0; }
  body.nav-open .nav__burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* ── Buttons (pill = interactive shape rule) ───────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn--primary:hover { background: var(--accent-bright); }
.btn--ghost {
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-bright); }
.btn .btn__arrow { transition: transform 0.3s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* ── Reveal animations (JS adds .is-inview; hidden only when JS runs) ── */
html.js .reveal:not(.is-inview) {
  opacity: 0;
  transform: translateY(32px);
}
.reveal {
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}
.reveal-line > span {
  display: block;
  transition: transform 1s var(--ease);
}
html.js .reveal-line:not(.is-inview) > span { transform: translateY(110%); }
.reveal-line:nth-of-type(2) > span { transition-delay: 0.1s; }
.reveal-line:nth-of-type(3) > span { transition-delay: 0.2s; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-line > span {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ── Hero ──────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--nav-h);
}
.hero__glow {
  position: absolute;
  right: 10%;
  top: 10%;
  width: 55vw;
  height: 55vw;
  max-width: 800px;
  max-height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 147, 63, 0.12) 0%, transparent 62%);
  pointer-events: none;
  z-index: 0;
}
/* full-height cover panel, flush right, no floating gaps */
.hero__portrait {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: clamp(320px, 46vw, 760px);
  z-index: 1;
}
.hero__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  -webkit-mask-image: linear-gradient(to left, black 58%, transparent 99%);
  mask-image: linear-gradient(to left, black 58%, transparent 99%);
}
.hero__content {
  position: relative;
  z-index: 3;
  width: min(100% - 48px, 1400px);
  margin-inline: auto;
  /* optical center: leave room for the name strip below */
  padding-bottom: clamp(110px, 15vw, 230px);
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(44px, 6.2vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.hero__title .accent { color: var(--accent); }
.hero__sub {
  margin-top: 26px;
  max-width: 42ch;
  font-size: 18px;
  color: var(--ink-dim);
}
.hero__cta {
  margin-top: 38px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
/* giant signature cropping through the hero's bottom edge */
.hero__name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(48px, 13vw, 230px);
  line-height: 0.78;
  letter-spacing: -0.03em;
  transform: translateY(14%);
  color: transparent;
  -webkit-text-stroke: 1px rgba(237, 235, 230, 0.30);
}
.hero__name > span { display: inline-block; will-change: transform; }
.hero__name .fill { color: rgba(237, 235, 230, 0.06); -webkit-text-stroke: 1px rgba(232, 147, 63, 0.45); font-style: normal; }
@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    padding-top: var(--nav-h);
  }
  .hero__portrait {
    position: relative;
    inset: auto;
    width: 100%;
    height: 42dvh;
    flex-shrink: 0;
  }
  .hero__portrait img {
    object-position: 50% 14%;
    -webkit-mask-image: linear-gradient(to top, black 68%, transparent 100%);
    mask-image: linear-gradient(to top, black 68%, transparent 100%);
  }
  .hero__content { padding-top: 8px; padding-bottom: clamp(90px, 22vw, 140px); }
  .hero__name { font-size: 15vw; }
}

/* ── Marquee (the one and only) ────────────────────────────────── */
.marquee {
  border-block: 1px solid var(--line);
  overflow: hidden;
  padding: 22px 0;
  display: flex;
}
.marquee__track {
  display: flex;
  flex-shrink: 0;
  gap: 56px;
  padding-right: 56px;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.marquee__track .spark { color: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .marquee__track { animation: marquee 28s linear infinite; }
}
@keyframes marquee {
  to { transform: translateX(calc(-100% - 56px)); }
}

/* ── Section scaffolding ───────────────────────────────────────── */
.section { padding: 128px 0; }
.section--tight { padding: 96px 0; }
@media (max-width: 768px) {
  .section { padding: 88px 0; }
  .section--tight { padding: 64px 0; }
}
.section__head {
  max-width: 720px;
  margin-bottom: 72px;
}
.section__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.015em;
}
.section__desc {
  margin-top: 20px;
  color: var(--ink-dim);
  max-width: 56ch;
}

/* ── Work grid (asymmetric) ────────────────────────────────────── */
.work-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  row-gap: 72px;
}
.work-card { position: relative; display: block; }
.work-card--w7 { grid-column: span 7; }
.work-card--w5 { grid-column: span 5; }
.work-card--w12 { grid-column: span 12; }
@media (max-width: 768px) {
  .work-grid { row-gap: 56px; }
  .work-card--w7, .work-card--w5, .work-card--w12 { grid-column: span 12; }
}
.work-card__media {
  overflow: hidden;
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-2);
}
.work-card--w12 .work-card__media { aspect-ratio: 21 / 9; }
.work-card--w7 .work-card__media { aspect-ratio: 16 / 10; }
.work-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 1s var(--ease), filter 1s var(--ease);
  filter: saturate(0.92);
}
.work-card:hover .work-card__media img {
  transform: scale(1.1);
  filter: saturate(1.05);
}
.work-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13, 13, 14, 0.35), transparent 45%);
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}
.work-card:hover .work-card__media::after { opacity: 1; }
.work-card__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
}
.work-card__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.15;
  transition: color 0.3s var(--ease);
}
.work-card:hover .work-card__title { color: var(--accent-bright); }
.work-card__tag {
  flex-shrink: 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
}
.work-card__arrow {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translate(-8px, 8px) scale(0.8);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.work-card:hover .work-card__arrow {
  opacity: 1;
  transform: none;
}

/* ── Capabilities (hover list + preview) ───────────────────────── */
.caps {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 64px;
  align-items: start;
}
.caps__list { border-top: 1px solid var(--line); }
.caps__item {
  border-bottom: 1px solid var(--line);
  padding: 34px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  cursor: default;
  transition: padding 0.4s var(--ease);
}
.caps__item:hover { padding-left: 20px; }
.caps__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 3vw, 38px);
  transition: color 0.3s var(--ease);
}
.caps__item:hover .caps__name { color: var(--accent-bright); }
.caps__note {
  max-width: 30ch;
  font-size: 14.5px;
  color: var(--muted);
  text-align: right;
}
.caps__preview {
  position: sticky;
  top: calc(var(--nav-h) + 32px);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--bg-2);
}
.caps__preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 0.6s var(--ease), transform 0.8s var(--ease);
}
.caps__preview img.is-active {
  opacity: 1;
  transform: scale(1);
}
@media (max-width: 900px) {
  .caps { grid-template-columns: 1fr; }
  .caps__preview { display: none; }
  .caps__note { display: none; }
}

/* ── Stats band ────────────────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--line);
}
.stat {
  padding: 56px 32px;
  text-align: left;
}
.stat + .stat { border-left: 1px solid var(--line); }
.stat__num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1;
  color: var(--accent);
}
.stat__label {
  margin-top: 14px;
  color: var(--ink-dim);
  font-size: 15px;
  max-width: 22ch;
}
@media (max-width: 900px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 36px 24px; }
  .stat:nth-child(3) { border-left: none; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
  .stat + .stat { border-left: none; border-top: 1px solid var(--line); }
}

/* ── About teaser (split) ──────────────────────────────────────── */
.about-teaser {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 72px;
  align-items: center;
}
.about-teaser__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--bg-2);
}
.about-teaser__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.about-teaser__body .section__title { max-width: 14ch; }
.about-teaser__text {
  margin-top: 24px;
  color: var(--ink-dim);
  max-width: 54ch;
}
.about-teaser__text + .about-teaser__text { margin-top: 16px; }
.about-teaser .btn { margin-top: 36px; }
@media (max-width: 900px) {
  .about-teaser { grid-template-columns: 1fr; gap: 40px; }
  .about-teaser__media { max-width: 420px; }
}

/* ── Contact / footer ──────────────────────────────────────────── */
.contact {
  padding: 160px 0 96px;
  text-align: left;
}
.contact__kicker {
  color: var(--ink-dim);
  margin-bottom: 20px;
  font-size: 17px;
}
.contact__mail {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 6.4vw, 96px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  display: inline-block;
  position: relative;
  word-break: break-word;
}
.contact__mail::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.02em;
  width: 100%;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.6s var(--ease);
}
.contact__mail:hover { color: var(--accent-bright); }
.contact__mail:hover::after { transform: scaleX(1); transform-origin: left; }
.contact__row {
  margin-top: 48px;
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 15px;
}
.contact__row a { color: var(--ink-dim); transition: color 0.3s var(--ease); }
.contact__row a:hover { color: var(--accent-bright); }
.footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13.5px;
}

/* ── Page hero (about / project pages) ─────────────────────────── */
.page-hero {
  padding: calc(var(--nav-h) + 96px) 0 72px;
}
.page-hero__kicker {
  color: var(--accent);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 20px;
}
.page-hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(42px, 6.4vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 16ch;
}
.page-hero__sub {
  margin-top: 26px;
  font-size: 18px;
  color: var(--ink-dim);
  max-width: 58ch;
}

/* ── Project page ──────────────────────────────────────────────── */
.project-hero-media {
  aspect-ratio: 21 / 9;
  overflow: hidden;
  background: var(--bg-2);
}
.project-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
}
.project-meta__item h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
}
.project-meta__item p { color: var(--ink); font-size: 16px; }
@media (max-width: 768px) {
  .project-meta { grid-template-columns: 1fr 1fr; }
}
.project-body {
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: 48px;
  padding: 72px 0;
}
.project-body h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 26px;
}
.project-body__copy { color: var(--ink-dim); max-width: 62ch; }
.project-body__copy p + p { margin-top: 18px; }
@media (max-width: 768px) {
  .project-body { grid-template-columns: 1fr; gap: 20px; padding: 56px 0; }
}
.project-gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  padding-bottom: 48px;
}
.project-gallery figure { margin: 0; }
.project-gallery .g-full { grid-column: span 12; }
.project-gallery .g-half { grid-column: span 6; }
.project-gallery .ph {
  display: grid;
  place-items: center;
  background: var(--bg-2);
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  padding: 24px;
}
.project-gallery .g-full .ph { aspect-ratio: 21 / 9; }
.project-gallery .g-half .ph { aspect-ratio: 4 / 3; }
.project-gallery img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 768px) {
  .project-gallery .g-half { grid-column: span 12; }
}
.project-next {
  border-top: 1px solid var(--line);
  padding: 96px 0;
  text-align: center;
}
.project-next__label { color: var(--muted); margin-bottom: 16px; }
.project-next__link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(34px, 5.4vw, 72px);
  letter-spacing: -0.02em;
  transition: color 0.3s var(--ease);
}
.project-next__link:hover { color: var(--accent-bright); }

/* ── About page ────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 72px;
  align-items: start;
}
.about-grid__media {
  position: sticky;
  top: calc(var(--nav-h) + 32px);
  overflow: hidden;
}
.about-grid__media img { width: 100%; }
.about-grid__body h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 28px;
  margin: 40px 0 16px;
}
.about-grid__body h3:first-child { margin-top: 0; }
.about-grid__body p { color: var(--ink-dim); max-width: 62ch; }
.about-grid__body p + p { margin-top: 16px; }
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-grid__media { position: static; max-width: 420px; }
}

/* timeline */
.timeline { border-top: 1px solid var(--line); margin-top: 8px; }
.timeline__row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  transition: padding 0.4s var(--ease);
}
.timeline__row:hover { padding-left: 14px; }
.timeline__years {
  color: var(--accent);
  font-weight: 700;
  font-size: 15px;
  padding-top: 4px;
}
.timeline__role {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 21px;
}
.timeline__org { color: var(--muted); font-size: 15px; margin-top: 2px; }
.timeline__desc { color: var(--ink-dim); font-size: 15.5px; margin-top: 10px; max-width: 60ch; }
@media (max-width: 640px) {
  .timeline__row { grid-template-columns: 1fr; gap: 6px; }
}

/* skills cloud */
.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}
.skill-pills li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 14.5px;
  color: var(--ink-dim);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}
.skill-pills li:hover {
  border-color: var(--accent);
  color: var(--accent-bright);
  transform: translateY(-2px);
}

/* ── Page veil: preloader + page-transition curtain ────────────── */
.veil {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #0a0a0b;
  display: grid;
  place-items: center;
  transform: translateY(103%);
  pointer-events: none;
}
html.veiled .veil {
  transform: translateY(0);
  /* failsafe: if scripts never lift the veil, CSS does at 3.5s */
  animation: veil-failsafe 0.6s cubic-bezier(0.76, 0, 0.24, 1) 3.5s forwards;
}
@keyframes veil-failsafe { to { transform: translateY(-103%); } }
.veil.is-leaving {
  transition: transform 0.7s cubic-bezier(0.76, 0, 0.24, 1);
  transform: translateY(-103%) !important;
}
body.pt-exit .veil {
  transition: transform 0.5s cubic-bezier(0.76, 0, 0.24, 1);
  transform: translateY(0);
  pointer-events: auto;
}
.veil__mark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 4.5vw, 58px);
  letter-spacing: 0.01em;
  color: var(--ink);
  opacity: 0;
}
.veil__mark em { font-style: normal; color: var(--accent); }
.veil__mark.is-on { animation: mark-in 0.8s var(--ease) forwards; }
@keyframes mark-in {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}

/* ── Cross-document view transitions (card image morphs into
      project hero on supporting browsers; veil covers the rest) ── */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: no-preference) {
  /* fluid, weighted page swap: old page lifts away, new one rises in */
  ::view-transition-old(root) { animation: vt-leave 0.5s cubic-bezier(0.76, 0, 0.24, 1) both; }
  ::view-transition-new(root) { animation: vt-enter 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.08s both; }
  /* morphing elements (card image -> project hero, portrait -> about)
     travel slower with a liquid ease so the movement reads */
  ::view-transition-group(*) {
    animation-duration: 0.8s;
    animation-timing-function: cubic-bezier(0.76, 0, 0.24, 1);
  }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
}
@keyframes vt-leave {
  to { opacity: 0; transform: translateY(-3.5%) scale(0.985); }
}
@keyframes vt-enter {
  from { opacity: 0; transform: translateY(5%); }
  to { opacity: 1; transform: none; }
}

/* ── Work card title roll (desktop only; falls back to color) ──── */
@media (min-width: 1024px) {
  .work-card__title { position: relative; overflow: hidden; }
  .work-card__title .t {
    display: block;
    transition: transform 0.5s var(--ease);
  }
  .work-card__title::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    color: var(--accent-bright);
    transition: transform 0.5s var(--ease);
  }
  .work-card:hover .work-card__title .t,
  .work-card:hover .work-card__title::after { transform: translateY(-100%); }
}

/* Lenis smooth scroll: hand scrolling over to the library */
html.lenis-on { scroll-behavior: auto; }

/* ── Utility ───────────────────────────────────────────────────── */
.hidden { display: none !important; }
