/* ---------- tokens ---------- */
:root {
  --cream: #f7f3ec;
  --pill: #eae7e0;
  --pill-active-top: #e3e0da;
  --pill-active-bottom: #d8d5cf;
  --ink: #1b1b1a;
  --navy: #0c2f4e;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "DM Serif Display", Georgia, serif;

  --header-h: 100px;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.36, .5, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  padding: 10px 16px; border-radius: 999px;
  background: var(--ink); color: var(--cream); text-decoration: none;
  transition: top .15s;
}
.skip-link:focus { top: 12px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: center;
  padding: 0 16px;
  background: var(--cream);
  view-transition-name: site-header; /* stays put while pages cross-fade */
  transition: box-shadow .35s;
}
.site-header.is-scrolled { box-shadow: 0 1px 0 rgba(12, 47, 78, .08); }

.nav {
  position: relative;
  display: flex; align-items: center;
  padding: 16px 34px; border-radius: 999px;
  background: var(--pill);
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 10px 30px -12px rgba(12, 47, 78, .28);
}
.nav-track { position: relative; }
.nav ul { position: relative; z-index: 2; display: flex; gap: 0; margin: 0; padding: 0; list-style: none; }

.nav a {
  position: relative;
  display: block;
  padding: 7px 24px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 17px; font-weight: 500; line-height: 1.2;
  text-decoration: none;
  transition: color .25s;
}
.nav a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* sliding pills (added by nav.js) */
.nav-pill {
  position: absolute; left: 0; top: 0; z-index: 1;
  border-radius: 999px;
  pointer-events: none;
  transition:
    transform .55s var(--ease-spring),
    width .55s var(--ease-spring),
    height .35s var(--ease-out),
    opacity .25s;
}
.nav-pill--active {
  background: linear-gradient(135deg, var(--pill-active-top), var(--pill-active-bottom));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), inset 0 -1px 0 rgba(0,0,0,.05), 0 2px 6px -2px rgba(12,47,78,.18);
}
.nav-pill--hover {
  background: rgba(27, 27, 26, .06);
  opacity: 0;
  transition-duration: .35s, .35s, .35s, .2s;
}
.nav-pill--hover.is-visible { opacity: 1; }
.nav-pill.no-anim { transition: none; }

/* without JS, fall back to a static active pill */
.nav:not(.is-enhanced) a[aria-current="page"] {
  background: linear-gradient(135deg, var(--pill-active-top), var(--pill-active-bottom));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -1px 0 rgba(0,0,0,.04);
}

/* ---------- hero ---------- */
.hero {
  /* photo shrinks on short screens so the whole hero (name included) fits under the header */
  --photo-w: clamp(220px, min(34.5vw, (100svh - var(--header-h) - 290px) * 0.668), 442px);
  /* stays pinned while the sections below slide up over it; orbit.js sets --hero-top
     so a hero taller than the screen scrolls fully into view before it pins */
  position: sticky;
  top: var(--hero-top, var(--header-h));
  z-index: 0;
  overflow: hidden;
  isolation: isolate;
  display: flex; flex-direction: column; align-items: center;
  background: linear-gradient(180deg, #0c2f4e 0%, #648dba 50%, #759fc5 100%);
}

.hero-heading {
  position: relative; z-index: 1;
  padding: clamp(16px, 2.5vw, 28px) 16px 0;
  text-align: center;
  color: var(--cream);
}
.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(52px, 10vw, 128px);
  line-height: 1.05;
  letter-spacing: -0.005em;
  animation: rise .9s var(--ease-out) both;
}
.hero-subtitle {
  margin: clamp(10px, 1.4vw, 18px) 0 0;
  font-size: clamp(14px, 1.7vw, 22px);
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  opacity: .85;
  animation: rise .9s .12s var(--ease-out) both;
}

.hero-stage { position: relative; width: 100%; display: flex; justify-content: center;
  margin-top: clamp(24px, 4vw, 50px); }

/* photo sits at z 10 so orbit items can pass in front of or behind it */
.hero-photo {
  position: relative; z-index: 10;
  width: var(--photo-w); aspect-ratio: 442 / 662;
  overflow: hidden;
  animation: rise 1s .1s var(--ease-out) both;
}
.hero-photo img { width: 100%; height: auto; margin-top: 13.1%; }

.orbit { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
.orbit-item {
  position: absolute; left: 0; top: 0;
  width: var(--icon-size, 110px); height: var(--icon-size, 110px);
  will-change: transform, opacity;
  opacity: 0; /* orbit.js fades items in */
}
.orbit-item img {
  width: 100%; height: 100%; object-fit: contain;
  filter: drop-shadow(0 6px 20px rgba(12, 47, 78, .35));
  transition: transform .3s var(--ease-spring);
}
.orbit-item:hover img, .orbit-item:focus-visible img { transform: scale(1.12); }
.orbit-item:focus-visible { outline: none; }
.orbit-label {
  position: absolute; left: 50%; top: 100%;
  translate: -50% 6px;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(247, 243, 236, .92); color: var(--ink);
  font-size: 13px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 6px 16px -6px rgba(12, 47, 78, .45);
  opacity: 0; scale: .9;
  transition: opacity .2s, scale .25s var(--ease-spring), translate .25s var(--ease-spring);
  pointer-events: none;
}
.orbit-item:hover .orbit-label, .orbit-item:focus-visible .orbit-label { opacity: 1; scale: 1; translate: -50% 12px; }

.hero-social {
  position: absolute; left: 30px; bottom: 42px; z-index: 40;
  display: flex; gap: 15px;
}
.hero-social a { display: block; width: 61px; height: 61px; border-radius: 12px;
  transition: transform .25s var(--ease-spring); }
.hero-social a:hover { transform: translateY(-3px); }
.hero-social a:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; }
.hero-social img { width: 100%; height: 100%; object-fit: contain; }

@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

@media (max-width: 600px) {
  .hero-social { left: 16px; bottom: 42px; gap: 10px; }
  .hero-social a { width: 40px; height: 40px; }
}

/* ---------- shipped titles ---------- */
.shipped {
  position: relative; z-index: 1;
  margin-top: -30px; /* rounded top overlaps the hero */
  padding: 30px 16px 32px;
  border-radius: 30px 30px 0 0;
  background: var(--cream);
}
.shipped-inner { max-width: 1040px; margin: 0 auto; }

.section-heading { padding-bottom: 80px; text-align: center; }
.section-heading h2 {
  margin: 0;
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #000;
}
.section-heading p {
  margin: 16px auto 0;
  max-width: 44ch;
  font-family: "Plus Jakarta Sans", var(--font-body);
  font-size: clamp(16px, 1.6vw, 20px);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.005em;
  color: rgba(12, 47, 78, .55);
}
@media (min-width: 900px) { .section-heading p { max-width: none; } }

/* two staggered columns: the right column sits 96px lower */
.shipped-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 500px));
  justify-content: center;
  gap: 32px;
  margin: 0; padding: 0 0 96px; list-style: none;
}
.shipped-card:nth-child(even) { translate: 0 96px; }
.shipped-card:nth-child(2) { --reveal-delay: 120ms; }
.shipped-card:nth-child(4) { --reveal-delay: 120ms; }

.shipped-cover {
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 4px rgba(0, 0, 0, .25);
  transition: transform .45s var(--ease-spring), box-shadow .45s var(--ease-out);
}
.shipped-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.shipped-card:hover .shipped-cover {
  transform: translateY(-8px);
  box-shadow: 0 4px 4px rgba(0, 0, 0, .12), 0 24px 40px -16px rgba(12, 47, 78, .45);
}
.shipped-card:hover .shipped-cover img { transform: scale(1.04); }

@media (max-width: 700px) {
  .section-heading { padding-bottom: 48px; }
  .shipped { padding-bottom: 24px; }
  .shipped-grid { grid-template-columns: minmax(0, 500px); gap: 24px; padding-bottom: 0; }
  .shipped-card:nth-child(even) { translate: none; }
  .shipped-card:nth-child(n) { --reveal-delay: 0ms; }
}

/* ---------- game development projects ---------- */
.projects { position: relative; z-index: 1; padding: 80px 16px 120px; background: var(--cream); }
.projects-inner {
  max-width: 1152px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 80px;
}
.projects .section-heading { padding-bottom: 0; }

.project { display: flex; align-items: center; gap: 64px; }
.project:nth-of-type(odd) { flex-direction: row-reverse; } /* text left, media right */
.project-media, .project-body { flex: 1 1 0; min-width: 0; }

.project-media {
  position: relative;
  aspect-ratio: 544 / 432;
  border-radius: 16px;
  overflow: hidden;
  background: #0c2f4e;
  box-shadow: 0 4px 4px rgba(0, 0, 0, .12);
  transition: transform .45s var(--ease-spring), box-shadow .45s var(--ease-out);
}
.project-media > img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.project:hover .project-media { transform: translateY(-6px); box-shadow: 0 24px 40px -18px rgba(12, 47, 78, .45); }
.project:hover .project-media > img { transform: scale(1.03); }

.project-media--pending {
  display: grid; place-items: center;
  background: linear-gradient(160deg, #0c2f4e 0%, #648dba 70%, #759fc5 100%);
}
.project-media--pending p {
  margin: 0; padding: 10px 18px; border-radius: 999px;
  background: rgba(247, 243, 236, .14); color: var(--cream);
  font-size: 15px; font-weight: 500;
}

/* click-to-play YouTube (video.js adds .has-video once an ID is set) */
.project-video.has-video { cursor: pointer; }
.video-play {
  position: absolute; inset: 0; z-index: 1;
  display: grid; place-items: center;
  border: 0; padding: 0; background: linear-gradient(transparent 55%, rgba(0, 0, 0, .35));
  cursor: pointer;
}
.video-play span {
  display: grid; place-items: center;
  width: 76px; height: 76px; border-radius: 50%;
  background: rgba(247, 243, 236, .92);
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .5);
  transition: transform .35s var(--ease-spring);
}
.video-play span::before {
  content: ""; margin-left: 5px;
  border-style: solid; border-width: 13px 0 13px 21px;
  border-color: transparent transparent transparent var(--ink);
}
.video-play:hover span, .video-play:focus-visible span { transform: scale(1.1); }
.video-play:focus-visible { outline: 3px solid var(--cream); outline-offset: -6px; }
.project-video iframe, .project-video > div { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.project-body { display: flex; flex-direction: column; align-items: flex-start; }
.project-award {
  margin: 0 0 14px; padding: 5px 12px; border-radius: 999px;
  background: #e6ecf3; color: #0c2f4e;
  font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.project-award--gold { background: #f6e7bf; color: #6b4a00; }
.project-body h3 {
  margin: 0;
  font-size: clamp(28px, 3vw, 36px); font-weight: 700;
  line-height: 1.2; letter-spacing: -0.02em; color: #000;
}
.project-event, .project-meta {
  font-size: 18px; font-weight: 500; line-height: 1.45; letter-spacing: -0.005em;
  color: rgba(0, 0, 0, .55);
}
.project-event { margin: 24px 0 0; }
.project-meta { margin: 0 0 48px; }
.project-meta dt, .project-meta dd { display: inline; margin: 0; }
.project-meta dt::after { content: ": "; }

.button {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 12px;
  background: #000; color: #fff;
  font-size: 18px; font-weight: 500; line-height: 1.45; letter-spacing: -0.005em;
  text-decoration: none;
  transition: transform .3s var(--ease-spring), box-shadow .3s var(--ease-out), background-color .2s;
}
.button span { display: inline-block; transition: transform .3s var(--ease-spring); }
.button:hover { transform: translateY(-2px); background: #1c2a3a; box-shadow: 0 10px 20px -10px rgba(12, 47, 78, .6); }
.button:hover span { transform: translateX(4px); }
.button:focus-visible { outline: 2px solid #000; outline-offset: 3px; }

@media (max-width: 800px) {
  .projects { padding-top: 56px; }
  .projects-inner { gap: 64px; }
  .project, .project:nth-of-type(odd) { flex-direction: column; align-items: stretch; gap: 24px; }
  .project-media, .project-body { flex: none; } /* a 0 basis would collapse the media's height */
  .project-event { margin-top: 16px; }
  .project-meta { margin-bottom: 28px; }
}

/* ---------- about page ---------- */
.about-wrap { max-width: 1040px; margin: 0 auto; }

.about-intro { padding: 120px 16px 120px; background: rgba(12, 47, 78, .04); }
.about-intro h1 {
  margin: 0 0 80px;
  font-size: clamp(44px, 6vw, 64px); font-weight: 700;
  line-height: 1.1; letter-spacing: -0.025em; color: #000;
}
.about-feature { display: flex; align-items: center; gap: 64px; }
.about-portrait {
  flex: 1 1 0; min-width: 0;
  aspect-ratio: 576 / 388;
  border-radius: 16px; overflow: hidden;
}
.about-portrait img { width: 100%; height: 100%; object-fit: cover; }
.about-text { flex: 0 0 400px; }

.about-text h2, .about-copy h2 {
  margin: 0 0 24px;
  font-size: clamp(28px, 3vw, 36px); font-weight: 700;
  line-height: 1.2; letter-spacing: -0.02em; color: #000;
}
.about-text p, .about-copy p {
  margin: 0;
  font-size: 18px; font-weight: 500; line-height: 1.45; letter-spacing: -0.005em;
  color: rgba(0, 0, 0, .55);
}

.about-interests { padding: 80px 16px 120px; }
.about-copy { margin-bottom: 64px; }
.about-gallery {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px;
  margin: 0; padding: 0; list-style: none;
}
.about-gallery li:nth-child(2) { --reveal-delay: 100ms; }
.about-gallery li:nth-child(3) { --reveal-delay: 200ms; }
.about-gallery img {
  width: 100%; height: auto; aspect-ratio: 362.67 / 340; object-fit: cover;
  border-radius: 16px;
  transition: transform .45s var(--ease-spring), box-shadow .45s var(--ease-out);
}
.about-gallery li:hover img { transform: translateY(-6px); box-shadow: 0 24px 40px -18px rgba(12, 47, 78, .45); }

@media (max-width: 800px) {
  .about-intro { padding: 64px 16px 72px; }
  .about-intro h1 { margin-bottom: 40px; }
  .about-feature { flex-direction: column; align-items: stretch; gap: 32px; }
  .about-portrait, .about-text { flex: none; } /* a 0 basis would collapse the portrait's height */
  .about-interests { padding: 64px 16px 96px; }
  .about-copy { margin-bottom: 40px; }
  .about-gallery { grid-template-columns: 1fr; gap: 20px; }
  .about-gallery li:nth-child(n) { --reveal-delay: 0ms; }
}

/* ---------- resume page ---------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.button--ghost {
  background: transparent; color: #000;
  box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .8);
  border: 0; font-family: inherit; cursor: pointer;
}
.button--ghost:hover { background: rgba(12, 47, 78, .06); box-shadow: inset 0 0 0 1.5px #000, 0 10px 20px -12px rgba(12, 47, 78, .4); }
button.button { border: 0; font-family: inherit; cursor: pointer; }

.resume { padding: 48px 16px 120px; }
.resume-toolbar {
  max-width: 816px; margin: 0 auto 24px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
}
.resume-hint { margin: 0; font-size: 14px; color: rgba(0, 0, 0, .5); }
.resume-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.resume-actions .button { font-size: 16px; padding: 10px 16px; }

/* the sheet: 816px = 8.5in at 96dpi, so it prints 1:1 on Letter */
.cv {
  max-width: 816px; margin: 0 auto;
  padding: 32px 44px 24px;
  background: #fff; color: var(--ink);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 24px 60px -24px rgba(12, 47, 78, .35);
  font-size: 12.8px; line-height: 1.5;
  animation: rise .7s var(--ease-out) both;
}
.cv a { color: inherit; text-underline-offset: 2px; }
.cv h2, .cv h3, .cv p, .cv ul { margin: 0; }

.cv-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 16px; }
.cv-name {
  font-size: 42px; font-weight: 700; line-height: .95;
  letter-spacing: .03em; text-transform: uppercase; color: #22272e;
}
.cv-name span { display: block; font-weight: 400; letter-spacing: .12em; }
.cv-title { margin-top: 10px !important; font-size: 16px; font-weight: 600; letter-spacing: .04em; color: var(--navy); }
.cv-summary { margin-top: 5px !important; max-width: 46ch; font-size: 12px; color: rgba(0, 0, 0, .62); line-height: 1.35; }
.cv-print-only { display: none !important; }
.cv-header-meta { list-style: none; padding: 0; font-size: 12px; color: rgba(0, 0, 0, .62); }
.cv-header-meta li { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.cv-header-meta li + li { margin-top: 5px; }
.cv-header-meta img { width: 13px; height: 13px; object-fit: contain; }

.cv-body { display: grid; grid-template-columns: minmax(0, 1fr) 236px; gap: 26px; }
.cv-side { padding-left: 22px; border-left: 1.5px solid rgba(12, 47, 78, .18); }

.cv-section + .cv-section { margin-top: 11px; }
.cv-section > h2 {
  margin-bottom: 10px;
  padding: 5px 8px; border-radius: 4px;
  background: var(--navy); color: var(--cream);
  font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; text-align: center;
}

/* work + project entries */
.cv-entry + .cv-entry { margin-top: 10px; }
.cv-entry header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.cv-entry h3 { font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em; color: #101418; }
.cv-date {
  flex: none;
  padding: 2px 9px; border-radius: 999px;
  background: rgba(12, 47, 78, .07); color: var(--navy);
  font-size: 11px; font-weight: 600; letter-spacing: .01em; white-space: nowrap;
}
.cv-sub { margin-top: 1px !important; font-size: 12px; font-style: italic; color: rgba(0, 0, 0, .58); }
/* phrases worth catching a reader's eye first */
.cv-key { font-weight: 700; color: #0b1520; }
.cv-entry ul { margin-top: 6px; padding-left: 17px; line-height: 1.45; }
.cv-entry li { padding-left: 2px; }
.cv-entry li::marker { color: rgba(12, 47, 78, .55); }
.cv-entry li + li { margin-top: 3px; }

/* sidebar blocks */
.cv-list { list-style: none; padding: 0; }
.cv-list li { display: flex; align-items: center; gap: 6px; }
.cv-list li + li { margin-top: 5px; }
.cv-list img { width: 13px; height: 13px; object-fit: contain; flex: none; }
.cv-school + .cv-school { margin-top: 9px; padding-top: 9px; border-top: 1px solid rgba(12, 47, 78, .12); }
.cv-school-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.cv-school h3 { font-size: 12.5px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
.cv-school p {
  margin-top: 1px !important;
  font-size: 12px; color: rgba(0, 0, 0, .6); line-height: 1.35;
}
.cv-year {
  flex: none;
  padding: 1px 7px; border-radius: 999px;
  background: rgba(12, 47, 78, .07); color: var(--navy);
  font-size: 11px; font-weight: 600;
}

.cv-titles { list-style: none; padding: 0; }
.cv-titles li { display: flex; align-items: center; gap: 8px; }
.cv-titles li + li { margin-top: 6px; }
.cv-titles img { flex: none; width: 28px; height: 28px; border-radius: 5px; object-fit: cover; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.cv-titles span { font-size: 12px; font-weight: 600; line-height: 1.25; }
.cv-titles b { font-weight: 500; color: rgba(0, 0, 0, .55); }

.cv-tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.cv-tags li {
  display: flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(12, 47, 78, .07); font-weight: 500;
}
.cv-tags img { width: 15px; height: 15px; object-fit: contain; }

.cv-awards { list-style: none; padding: 0; }
.cv-awards li { display: flex; align-items: center; gap: 8px; }
.cv-awards li + li { margin-top: 7px; }
.cv-awards img { flex: none; width: 30px; height: 30px; object-fit: contain; }
.cv-awards span { font-size: 12px; line-height: 1.25; }
.cv-awards b { display: block; font-weight: 700; }

/* "screen" so a narrow printable area (paper + dialog margins) never triggers the phone layout */
@media screen and (max-width: 760px) {
  .resume { padding-top: 32px; }
  .cv { padding: 28px 20px; font-size: 14px; }
  .cv-header { flex-direction: column; gap: 12px; }
  .cv-header-meta { text-align: left; }
  .cv-name { font-size: 38px; }
  .cv-body { grid-template-columns: 1fr; gap: 22px; }
  .cv-side { padding-left: 0; border-left: 0; }
  .cv-entry header { flex-direction: column; gap: 2px; }
}

/* on desktop the sheet is a full Letter page (816×1056), so what you see is what prints */
@media screen and (min-width: 761px) {
  .cv { min-height: 1056px; }
}

/* printing (and "Save as PDF") outputs just the sheet on one Letter page, laid out exactly as on screen */
@media print {
  @page { size: letter; margin: 0; }
  .site-header, .skip-link, .resume-toolbar { display: none !important; }
  html, body { background: #fff; }
  .resume { padding: 0; container: cv-page / inline-size; }
  /* If the dialog adds margins the printable width shrinks; scale the sheet down with it
     so the layout (and the one-page fit) matches the full-width version. */
  @container cv-page (max-width: 812px) { .cv { zoom: .9; } }
  @container cv-page (max-width: 733px) { .cv { zoom: .86; } }
  @container cv-page (max-width: 701px) { .cv { zoom: .82; } }
  .cv {
    max-width: none; width: auto; margin: 0;
    border-radius: 0; box-shadow: none; animation: none;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .cv a { text-decoration: none; }
  .cv-print-only { display: flex !important; } /* phone number appears on the PDF/print copy */
}

/* ---------- scroll reveal (only when JS is running) ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .7s var(--ease-out), transform .9s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- page transitions (Chrome, Edge, Safari 18.2+; others just load normally) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: page-out .22s ease-in both; }
::view-transition-new(root) { animation: page-in .45s var(--ease-out) both; }
@keyframes page-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes page-in { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 480px) {
  :root { --header-h: 76px; }
  .nav { padding: 6px 8px; }
  .nav a { padding: 9px 14px; font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  @view-transition { navigation: none; }
}
