/* ==========================================================================
   Tokens
   ========================================================================== */

:root {
  --bg: #050505;
  --fg: #f3f1ed;
  --muted: #a19f9a;
  --dim: #6b6965;
  --line: rgba(243, 241, 237, 0.32);
  --line-soft: rgba(243, 241, 237, 0.14);
  --ghost: rgba(243, 241, 237, 0.055);

  --font-display: "Playfair Display", "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --header-h: 80px;
  --section-y: clamp(96px, 14vh, 168px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 0.25s;

  color-scheme: dark;
}

/* ==========================================================================
   Base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol,
dl,
dd,
figure,
p,
h1,
h2,
h3 {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

:focus-visible {
  outline: 1px solid var(--fg);
  outline-offset: 4px;
}

::selection {
  background: var(--fg);
  color: var(--bg);
}

.sprite {
  position: absolute;
  overflow: hidden;
}

.icon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--fg);
  color: var(--bg);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* Thin horizontal rules that frame the navigation and socials */
.rule {
  display: block;
  height: 1px;
  background: var(--line);
}

.rule--grow {
  flex: 1 1 auto;
  min-width: 24px;
}

.rule--short {
  flex: 0 0 48px;
}

/* Photos blend into the black background on every edge */
.photo {
  position: relative;
  isolation: isolate;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to top, var(--bg) 0%, transparent 22%),
    linear-gradient(to bottom, var(--bg) 0%, transparent 12%),
    linear-gradient(to right, var(--bg) 0%, transparent 14%),
    linear-gradient(to left, var(--bg) 0%, transparent 14%);
}

/* ==========================================================================
   Header
   ========================================================================== */

.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  transition: background-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}

.header.is-scrolled {
  background: rgba(5, 5, 5, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* backdrop-filter would trap the fixed mobile menu inside the header */
.header.is-menu-open {
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.header__inner {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.8vw, 40px);
  height: 100%;
}

/* Nav sits nearer the left: the line before it is longer than the one after */
.header .rule--grow:not(.rule--mid) {
  flex-grow: 2;
}

.header__socials {
  gap: 4px;
  margin-inline: -8px;
}

.header__socials .icon {
  width: 22px;
  height: 22px;
}

.header__brand {
  display: none;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.01em;
}

.nav__list {
  display: flex;
  gap: clamp(24px, 3vw, 44px);
}

.nav__link {
  position: relative;
  display: inline-block;
  padding-block: 6px;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  transition: color var(--t-fast) ease;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--fg);
}

.nav__link.is-active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
}

/* ==========================================================================
   Controls
   ========================================================================== */

.button {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  height: 56px;
  padding-inline: 24px 22px;
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.01em;
  transition:
    background-color var(--t-fast) ease,
    color var(--t-fast) ease,
    border-color var(--t-fast) ease;
}

.button .icon {
  width: 20px;
  height: 20px;
  transition: transform 0.4s var(--ease);
}

.button:hover {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--bg);
}

.button:hover .icon {
  transform: translateX(4px);
}

.link-underline {
  position: relative;
  padding-block: 8px;
  font-size: 14px;
  font-weight: 400;
}

.link-underline::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--line);
  transition: background-color var(--t-fast) ease;
}

.link-underline:hover::after {
  background: var(--fg);
}

.socials {
  display: flex;
  gap: 12px;
}

.socials__link {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--muted);
  transition: color var(--t-fast) ease, transform var(--t-fast) var(--ease);
}

.socials__link:hover {
  color: var(--fg);
  transform: translateY(-2px);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
}

.hero__grid {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(32px, 6vw, 96px);
}

.hero__photo {
  align-self: stretch;
  min-height: 0;
}

.hero__photo img {
  position: absolute;
  inset: 0;
  object-position: 50% 30%;
}

.hero__photo::after {
  background:
    linear-gradient(to top, var(--bg) 0%, transparent 28%),
    linear-gradient(to right, var(--bg) 0%, transparent 10%),
    linear-gradient(to left, var(--bg) 0%, transparent 16%);
}

.hero__content {
  padding-block: calc(var(--header-h) + 24px) 72px;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(44px, 4.6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.line-mask {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}

.line-mask > span {
  display: block;
}

.hero__role {
  margin-top: 28px;
  font-size: clamp(17px, 1.5vw, 21px);
  font-weight: 400;
  letter-spacing: 0.005em;
}

.hero__lead {
  max-width: 30em;
  margin-top: 20px;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 36px;
  margin-top: 48px;
}

/* Entrance animation, only when JS is available to trigger it */
.js .hero__photo img {
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.6s var(--ease), transform 2.4s var(--ease);
}

.js .line-mask > span {
  transform: translateY(105%);
  transition: transform 1.1s var(--ease);
}

.js .line-mask:nth-child(2) > span {
  transition-delay: 0.1s;
}

.js .hero__role,
.js .hero__lead,
.js .hero__actions {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}

.js .hero__role { transition-delay: 0.35s; }
.js .hero__lead { transition-delay: 0.45s; }
.js .hero__actions { transition-delay: 0.55s; }

.is-loaded .hero__photo img {
  opacity: 1;
  transform: none;
}

.is-loaded .line-mask > span,
.is-loaded .hero__role,
.is-loaded .hero__lead,
.is-loaded .hero__actions {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
  position: relative;
  padding-block: var(--section-y);
}

.section-head {
  position: relative;
  margin-bottom: clamp(40px, 6vw, 64px);
}

.ghost {
  position: absolute;
  top: -0.42em;
  left: -0.18em;
  z-index: -1;
  font-family: var(--font-display);
  font-size: clamp(88px, 11vw, 150px);
  line-height: 1;
  white-space: nowrap;
  color: var(--ghost);
  pointer-events: none;
  user-select: none;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 4.4vw, 60px);
  line-height: 1.1;
}

.section-lead {
  max-width: 34em;
  margin-top: 20px;
  color: var(--muted);
}

/* Ghost titles drift slightly as the section scrolls past */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .ghost {
      animation: ghost-drift linear both;
      animation-timeline: view();
    }

    @keyframes ghost-drift {
      from { translate: 4% 0; }
      to { translate: -6% 0; }
    }
  }
}

/* Scroll reveal */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--delay, 0s);
}

.js [data-reveal="fade"] {
  transform: none;
  transition-duration: 1.6s;
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   About
   ========================================================================== */

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(32px, 6vw, 96px);
}

.about__content {
  position: relative;
  z-index: 1;
}

.about__text {
  max-width: 31em;
  font-size: 17px;
}

.about__text p + p {
  margin-top: 1.2em;
  color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  margin-top: clamp(48px, 6vw, 72px);
}

.stats__item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-inline: clamp(20px, 2.6vw, 36px);
  border-left: 1px solid var(--line-soft);
}

.stats__item:first-child {
  padding-left: 0;
  border-left: 0;
}

.stats__value {
  font-family: var(--font-display);
  font-size: clamp(28px, 2.6vw, 36px);
  line-height: 1.1;
  white-space: nowrap;
}

.stats__label {
  max-width: 9.5em;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

/* About and contacts: the photo bleeds off the right edge of the viewport */
.about,
.contacts {
  display: flex;
  align-items: center;
  min-height: min(100vh, 960px);
}

.about__photo,
.contacts__photo {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 50vw;
}

.about__photo::after,
.contacts__photo::after {
  background:
    linear-gradient(to right, var(--bg) 0%, rgba(5, 5, 5, 0.55) 16%, transparent 34%),
    linear-gradient(to top, var(--bg) 0%, transparent 24%),
    linear-gradient(to bottom, var(--bg) 0%, transparent 16%);
}

.about__photo img {
  object-position: 70% 30%;
}

/* ==========================================================================
   Focus areas
   ========================================================================== */

.focus {
  padding-top: calc(var(--section-y) * 0.5);
}

.focus__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.focus__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 2.8vw, 36px);
  line-height: 1.15;
}

.focus__note {
  font-size: 14px;
  color: var(--muted);
  text-align: right;
}

.focus__item {
  display: grid;
  grid-template-columns: clamp(56px, 10vw, 140px) 1fr;
  align-items: baseline;
  padding-block: clamp(22px, 2.6vw, 34px);
  border-bottom: 1px solid var(--line-soft);
}

.focus__num {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

.focus__name {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.4vw, 46px);
  line-height: 1.15;
}

/* ==========================================================================
   Skills
   ========================================================================== */

.skills__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: start;
  column-gap: clamp(32px, 6vw, 96px);
}

.skills__photo {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  aspect-ratio: 7 / 9;
  max-height: calc(100vh - var(--header-h) - 48px);
  margin-left: calc(var(--gutter) * -0.5);
}

.skills__photo img {
  object-position: 45% 35%;
}

.skills__content {
  position: relative;
  z-index: 1;
  padding-top: clamp(24px, 6vw, 72px);
}

.skill-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(40px, 4vw, 56px) clamp(32px, 4vw, 56px);
}

.skill-group__title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.2;
}

.skill-group__title .icon {
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags li {
  padding: 5px 12px 6px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: #d9d7d2;
}

/* ==========================================================================
   Works
   ========================================================================== */

.works__head {
  margin-bottom: clamp(32px, 5vw, 56px);
}

.project {
  display: grid;
  grid-template-columns: minmax(0, 4.3fr) minmax(0, 5.7fr) minmax(0, 3.5fr);
  align-items: center;
  column-gap: clamp(28px, 3.2vw, 48px);
  padding-block: clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--line);
}

.project:last-child {
  border-bottom: 1px solid var(--line);
}

.project__intro {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-content: start;
}

.project__intro > * {
  grid-column: 2;
}

.project__num {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  justify-self: start;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--fg);
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.project__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 3vw, 42px);
  line-height: 1.1;
}

.project__subtitle {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.3;
}

.project__desc {
  margin-top: 16px;
  font-size: 15px;
  color: var(--muted);
}

/* Stacked; several buttons share the width of the widest one. */
.project__actions {
  display: grid;
  grid-template-columns: max-content;
  gap: 12px;
  margin-top: 32px;
}

.project__actions .button {
  justify-content: space-between;
}

.project__media {
  position: relative;
}

.project__media img {
  width: 100%;
}

.project__media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to top, var(--bg) 0%, transparent 7%),
    linear-gradient(to bottom, var(--bg) 0%, transparent 7%),
    linear-gradient(to right, var(--bg) 0%, transparent 4%),
    linear-gradient(to left, var(--bg) 0%, transparent 4%);
}

.project__label {
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.3;
}

.project__role p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.project__stats {
  margin-top: 28px;
}

.project__stats .stats__value {
  font-size: clamp(26px, 2.2vw, 32px);
}

.project__stack {
  margin-top: 24px;
}

/* ==========================================================================
   Contacts
   ========================================================================== */

.contacts__photo {
  width: 56vw;
}

.contacts__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(32px, 6vw, 96px);
}

.contacts__content {
  position: relative;
  z-index: 1;
}

.contact-list {
  max-width: 440px;
  border-top: 1px solid var(--line-soft);
}

.contact {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-block: 22px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 17px;
  font-weight: 400;
}

.contact__icon {
  color: var(--muted);
  transition: color var(--t-fast) ease;
}

.contact__value {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.contact__note {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 300;
  color: var(--muted);
}

.contact__arrow {
  width: 18px;
  height: 18px;
  opacity: 0;
  transform: translate(-6px, 6px);
  transition: opacity var(--t-fast) ease, transform 0.4s var(--ease);
}

a.contact:hover .contact__icon {
  color: var(--fg);
}

a.contact:hover .contact__arrow,
a.contact:focus-visible .contact__arrow {
  opacity: 1;
  transform: none;
}

.contact--static {
  align-items: flex-start;
}

.contacts__photo img {
  object-position: 50% 20%;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  padding-block: 32px 40px;
}

.footer__inner {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer__copy {
  font-size: 13px;
  color: var(--dim);
  white-space: nowrap;
}

/* ==========================================================================
   Tablet
   ========================================================================== */

@media (max-width: 1100px) {
  .skill-groups {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Works: text and image side by side, details in a row below */
  .project {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    row-gap: 32px;
  }

  .project__meta {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: clamp(28px, 3.2vw, 48px);
    align-items: start;
  }

  .project__role {
    grid-row: span 2;
  }

  .project__stats,
  .project__stack {
    margin-top: 0;
  }

  .project__stats + .project__stack {
    margin-top: 24px;
  }
}

@media (max-width: 899px) {
  :root {
    --header-h: 68px;
  }

  /* Hero: photo on top, text overlapping its faded bottom edge */
  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
  }

  .hero__photo {
    height: min(68svh, 780px);
    margin-inline: calc(var(--gutter) * -1);
  }

  .hero__photo img {
    object-position: 50% 22%;
  }

  .hero__photo::after {
    background:
      linear-gradient(to top, var(--bg) 0%, transparent 40%),
      linear-gradient(to bottom, var(--bg) 0%, transparent 18%);
  }

  .hero__content {
    position: relative;
    margin-top: -88px;
    padding-block: 0 72px;
  }

  .about__grid,
  .contacts__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .about,
  .contacts {
    display: block;
    min-height: 0;
  }

  .about__photo,
  .contacts__photo {
    position: relative;
    inset: auto;
    width: auto;
    aspect-ratio: 640 / 716;
    order: -1;
    max-height: 72svh;
    margin: 0 calc(var(--gutter) * -1) -48px;
  }

  .about__photo {
    aspect-ratio: 4 / 5;
  }

  .about__photo::after,
  .contacts__photo::after {
    background:
      linear-gradient(to top, var(--bg) 0%, transparent 34%),
      linear-gradient(to bottom, var(--bg) 0%, transparent 14%);
  }

  .about__photo img {
    object-position: 65% 25%;
  }

  .skills__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .skills__photo {
    position: relative;
    top: 0;
    aspect-ratio: 4 / 3;
    max-height: none;
    margin: 0 calc(var(--gutter) * -1) -40px;
  }

  .skills__photo img {
    object-position: 50% 30%;
  }

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

/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 719px) {
  :root {
    --section-y: 88px;
  }

  .header__inner {
    gap: 20px;
  }

  .header__brand {
    display: block;
  }

  .header .rule--grow,
  .header .rule--short {
    display: none;
  }

  /* Socials move into the open full-screen menu */
  .header__socials {
    position: fixed;
    left: var(--gutter);
    bottom: 48px;
    z-index: 2;
    margin: 0 0 0 -8px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--ease), visibility 0s linear 0.4s;
  }

  .header.is-menu-open .header__socials {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s var(--ease) 0.1s;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    padding: 10px 0;
    border: 0;
    background: none;
    color: var(--fg);
    font: inherit;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
  }

  .menu-toggle__icon {
    position: relative;
    width: 22px;
    height: 7px;
    border-block: 1px solid currentColor;
    transition: border-color var(--t-fast) ease;
  }

  .menu-toggle__icon::before,
  .menu-toggle__icon::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 2px;
    height: 1px;
    background: currentColor;
    opacity: 0;
    transition: transform 0.4s var(--ease), opacity var(--t-fast) ease;
  }

  .menu-toggle[aria-expanded="true"] .menu-toggle__icon {
    border-color: transparent;
  }

  .menu-toggle[aria-expanded="true"] .menu-toggle__icon::before {
    opacity: 1;
    transform: rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] .menu-toggle__icon::after {
    opacity: 1;
    transform: rotate(-45deg);
  }

  .header__brand,
  .menu-toggle {
    position: relative;
    z-index: 2;
  }

  /* Full-screen menu */
  .nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    padding: var(--header-h) var(--gutter) 128px;
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--ease), visibility 0s linear 0.4s;
  }

  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s var(--ease);
  }

  .nav__list {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  .nav__list li {
    border-bottom: 1px solid var(--line-soft);
  }

  .nav__link {
    display: block;
    padding-block: 14px;
    font-family: var(--font-display);
    font-size: 36px;
    line-height: 1.2;
  }

  .nav__link::after {
    display: none;
  }

  .hero__title {
    font-size: clamp(40px, 12vw, 56px);
  }

  .hero__role {
    margin-top: 20px;
  }

  .hero__actions {
    margin-top: 36px;
  }

  .hero__actions .button {
    flex: 1 1 100%;
    justify-content: space-between;
  }

  .ghost {
    font-size: clamp(64px, 19vw, 96px);
  }

  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stats__item {
    padding-inline: 14px;
  }

  .stats__value {
    font-size: 24px;
    white-space: normal;
  }

  .stats__label {
    font-size: 13px;
  }

  .focus__note {
    text-align: left;
  }

  .focus__note br {
    display: none;
  }

  .skill-groups {
    grid-template-columns: minmax(0, 1fr);
  }

  .project {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 28px;
  }

  .project__intro {
    grid-template-columns: minmax(0, 1fr);
  }

  .project__intro > *,
  .project__num {
    grid-column: 1;
    grid-row: auto;
  }

  .project__num {
    margin-bottom: 20px;
  }

  .project__actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .project__media {
    margin-inline: calc(var(--gutter) * -0.5);
  }

  .project__meta {
    display: block;
  }

  .project__stats {
    margin-top: 28px;
  }

  .project__stack {
    margin-top: 24px;
  }

  .contact {
    gap: 20px;
    font-size: 16px;
  }

  .contact__arrow {
    opacity: 1;
    transform: none;
    color: var(--dim);
  }

  .footer__inner {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .footer .rule {
    display: none;
  }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    animation-duration: 0.01ms !important;
  }
}
