:root {
  --cream: #fffaf3;
  --paper: #fffefb;
  --blue: #6ea9e9;
  --blue-dark: #2f5f91;
  --sky: #b9daf7;
  --ink: #17191d;
  --muted: #6d7077;
  --line: #202226;
  --soft-line: #d8d6d0;
  --pink: #efb8bd;
  --navy: #10213f;
  --navy-deep: #09142a;
  --screen-blue: #dcecff;
  --electric: #91c7ff;
  --shadow: 8px 8px 0 var(--ink);
  --pixel: "Pixelify Sans", monospace;
  --sans: "DM Sans", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
a { color: inherit; }
img { max-width: 100%; display: block; }

.site-header {
  width: min(1400px, calc(100% - 48px));
  height: 88px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1.5px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 13px; width: fit-content; text-decoration: none; }
.brand-name { position: relative; padding: 3px 0 4px; font-family: var(--sans); font-size: 1.06rem; font-weight: 700; letter-spacing: -.015em; }
.brand-name::after { content: ""; position: absolute; left: 0; bottom: 0; width: 34px; height: 3px; background: var(--blue); transition: width .2s ease; }
.brand:hover .brand-name::after { width: 100%; }
.brand-note { padding-left: 13px; border-left: 1px solid var(--soft-line); color: var(--muted); font-size: .7rem; line-height: 1.15; letter-spacing: .08em; text-transform: uppercase; }
.site-header nav { display: flex; gap: 36px; font-size: .9rem; }
.site-header nav a { text-decoration: none; position: relative; }
.site-header nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -5px; height: 1px; background: var(--ink); transition: right .2s ease; }
.site-header nav a:hover::after, .site-header nav a:focus-visible::after { right: 0; }
.site-header nav a[aria-current="page"]::after { right: 0; background: var(--blue-dark); }
.header-cta { justify-self: end; display: inline-flex; align-items: center; gap: 18px; padding-block: 6px; font-size: .9rem; font-weight: 600; text-decoration: none; border-bottom: 1.5px solid var(--ink); }
.header-cta span:last-child { transition: transform .2s ease; }
.header-cta:hover span:last-child { transform: translateY(4px); }

main { overflow: hidden; }
.intro, .closet-section, footer { width: min(1400px, calc(100% - 48px)); margin-inline: auto; }
.intro {
  min-height: 720px;
  display: grid;
  grid-template-columns: 1.08fr .84fr .5fr;
  gap: clamp(34px, 4.5vw, 70px);
  align-items: center;
  padding: 72px 0 88px;
}
h1, h2, h3, p { text-wrap: pretty; }
h1 { margin: 0; font-family: var(--pixel); font-size: clamp(4.8rem, 8vw, 8.8rem); line-height: .78; letter-spacing: -.055em; font-weight: 600; }
h1 em { font-style: normal; color: var(--blue); }
.intro-lede { margin: 38px 0 28px; max-width: 620px; font-size: clamp(1.05rem, 1.5vw, 1.35rem); line-height: 1.55; }
.practice-line { max-width: 510px; margin: 0; padding-top: 16px; border-top: 1px solid var(--ink); color: #474950; font-family: var(--pixel); font-size: .92rem; line-height: 1.8; }
.practice-line i { margin-inline: 7px; color: var(--blue-dark); font-style: normal; }
.portrait-card { position: relative; min-height: 520px; border: 1.5px solid var(--ink); border-radius: 6px 54px 6px 6px; background: var(--blue); overflow: hidden; box-shadow: 7px 7px 0 var(--ink); perspective: 1200px; }
.portrait-grid { position: absolute; inset: 0; opacity: .22; background-image: linear-gradient(rgba(255,255,255,.7) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.7) 1px, transparent 1px); background-size: 28px 28px; }
.portrait-flipper { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .66s cubic-bezier(.2,.75,.2,1); }
.portrait-card.is-flipped .portrait-flipper { transform: rotateY(180deg); }
.portrait-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.portrait-face-photo { overflow: hidden; background: #d5e8f7; transform: rotateY(180deg); }
.portrait-headshot { width: 100%; height: 100%; object-fit: cover; object-position: center center; }
.portrait-photo-tag { position: absolute; left: 18px; top: 18px; padding: 7px 10px 6px; border: 2px solid var(--ink); background: rgba(255,254,251,.92); box-shadow: 3px 3px 0 var(--ink); font-family: var(--pixel); font-size: .7rem; letter-spacing: .08em; }
.portrait-character { position: absolute; z-index: 1; width: min(118%, 560px); max-width: none; aspect-ratio: 1 / 1; left: 50%; top: 50%; padding: 0; border: 0; background: transparent; transform: translate(-50%, -50%); filter: drop-shadow(0 10px 0 rgba(47,95,145,.22)); cursor: pointer; transition: transform .24s cubic-bezier(.2,.8,.2,1), filter .24s ease; }
.portrait-character img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; pointer-events: none; }
.portrait-character:hover, .portrait-character:focus-visible { transform: translate(-50%, -50%) translateY(-7px) scale(1.025); filter: drop-shadow(0 15px 0 rgba(47,95,145,.19)); }
.portrait-character:focus-visible { outline: 3px dashed rgba(255,255,255,.9); outline-offset: -18px; }
.portrait-character.is-playful { animation: hero-pop .52s cubic-bezier(.2,.8,.2,1); }
.portrait-flip-button { position: absolute; z-index: 4; right: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 9px; min-height: 42px; padding: 9px 12px 8px; border: 2px solid var(--ink); border-radius: 2px; background: rgba(255,254,251,.96); box-shadow: 4px 4px 0 var(--ink); font-family: var(--pixel); font-size: .75rem; font-weight: 700; letter-spacing: .07em; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.portrait-flip-button:hover, .portrait-flip-button:focus-visible { background: #eef6ff; transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--ink); }
.portrait-flip-button:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--ink); }
.portrait-flip-button:focus-visible { outline: 3px solid white; outline-offset: 3px; }
.portrait-flip-icon { display: inline-block; font-family: var(--sans); font-size: 1.15rem; line-height: 1; transition: transform .6s cubic-bezier(.2,.75,.2,1); }
.portrait-card.is-flipped .portrait-flip-icon { transform: rotate(180deg); }
.tiny-label { font-family: var(--pixel); font-size: .73rem; letter-spacing: .09em; color: var(--muted); }
.intro-aside { align-self: end; margin-bottom: 56px; border-top: 1.5px solid var(--ink); padding-top: 20px; font-size: .95rem; }
.aside-kicker { margin: 0 0 12px; font-family: var(--pixel); color: var(--blue-dark); font-size: 1.05rem; font-weight: 700; }
.intro-aside > p:not(.aside-kicker) { color: #42444a; }
.intro-aside a { display: inline-flex; gap: 20px; margin-top: 14px; font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 5px; }

.closet-section { padding: 80px 0 110px; border-top: 1.5px solid var(--ink); }
.section-heading { display: flex; justify-content: space-between; gap: 48px; align-items: end; margin-bottom: 42px; }
.section-label { margin: 0 0 12px; color: var(--blue-dark); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.section-heading h2 { margin: 0; font-family: var(--pixel); font-size: clamp(3rem, 6vw, 6rem); line-height: .9; letter-spacing: -.04em; }
.section-heading > p { max-width: 390px; margin: 0 0 8px; color: var(--muted); font-size: 1.05rem; }
.game-shell { border: 1.5px solid var(--ink); border-radius: 6px; background: var(--paper); overflow: hidden; box-shadow: 5px 5px 0 var(--ink); }
.game-topbar { min-height: 72px; display: flex; justify-content: space-between; align-items: center; padding: 14px 24px; border-bottom: 1.5px solid var(--ink); background: var(--cream); }
.game-topbar > div:first-child { display: flex; align-items: center; gap: 14px; }
.game-topbar strong { font-size: 1rem; }
.counter { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.counter span { margin-inline: 4px; color: var(--blue-dark); font-family: var(--pixel); font-size: 1.35rem; }
.experience-grid { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(350px, .78fr); min-height: 832px; border-bottom: 1.5px solid var(--ink); }
.character-stage { position: relative; overflow: hidden; background: var(--sky); border-right: 1.5px solid var(--ink); isolation: isolate; }
.stage-sky { position: absolute; inset: 0; background: linear-gradient(#a8d1f5 0 73%, #dce7d2 73% 100%); z-index: -3; }
.stage-sky::after { content: ""; position: absolute; left: 50%; top: 50px; width: 130px; height: 130px; border-radius: 50%; background: #fff4c5; opacity: .8; box-shadow: 0 0 0 18px rgba(255,244,197,.18); }
.cloud { position: absolute; width: 95px; height: 30px; border-radius: 30px; background: rgba(255,255,255,.75); box-shadow: 26px -14px 0 rgba(255,255,255,.75), 52px 0 0 rgba(255,255,255,.75); }
.cloud-one { top: 90px; left: 12%; }
.cloud-two { top: 155px; right: 18%; transform: scale(.72); }
.park-scene { position: absolute; z-index: -1; bottom: 0; left: -4%; width: 108%; max-width: none; image-rendering: pixelated; }
.character { position: absolute; z-index: 2; bottom: 7%; left: 50%; transform: translateX(-50%); height: 83%; width: auto; image-rendering: pixelated; filter: drop-shadow(8px 10px 0 rgba(47,57,74,.16)); cursor: pointer; transition: opacity .16s ease, transform .24s cubic-bezier(.2,.8,.2,1), filter .24s ease; }
.character:not(.is-changing):hover, .character:not(.is-changing):focus-visible { transform: translateX(-50%) translateY(-8px) scale(1.02); filter: drop-shadow(10px 16px 0 rgba(47,57,74,.13)); }
.character:focus-visible { outline: 3px dashed rgba(255,255,255,.94); outline-offset: 4px; }
.character.is-changing { opacity: 0; transform: translateX(-50%) translateY(12px) scale(.98); }
.character.is-playful { animation: character-hop .5s cubic-bezier(.2,.8,.2,1); }
.achievement-card { position: absolute; z-index: 3; left: 22px; top: 22px; width: 208px; padding: 14px; border: 1.5px solid var(--ink); border-radius: 16px; background: rgba(255,250,243,.96); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
.achievement-card[href]:hover, .achievement-card[href]:focus-visible { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.achievement-card img { width: 176px; height: 130px; margin: 7px auto 10px; object-fit: contain; image-rendering: pixelated; }
.achievement-card[data-media="photo"] img { height: 106px; border: 1.5px solid var(--ink); object-fit: cover; image-rendering: auto; }
.achievement-card strong { display: block; font-size: .88rem; line-height: 1.2; }
.experience-card-action { display: block; margin-top: 6px; color: var(--blue-dark); font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.achievement-card.is-static { cursor: default; }
.stat-card { position: absolute; z-index: 3; left: 22px; bottom: 24px; width: 248px; padding: 12px 16px 12px 10px; display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--ink); border-radius: 15px; background: rgba(255,250,243,.94); box-shadow: 4px 4px 0 var(--ink); }
.stat-card img { flex: 0 0 88px; width: 88px; height: 88px; object-fit: contain; image-rendering: pixelated; }
.stat-card span { display: flex; flex-direction: column; line-height: 1.15; }
.stat-card small { font-family: var(--pixel); color: var(--muted); font-size: .7rem; letter-spacing: .08em; }
.stat-card strong { margin-top: 4px; font-size: .92rem; }
.role-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: clamp(28px, 3vw, 44px); background: var(--cream); }
.role-copy { position: relative; z-index: 1; margin-top: auto; margin-bottom: auto; }
.role-copy.is-refreshing { animation: role-refresh .34s ease-out; }
.role-category { margin: 0 0 14px; color: var(--blue-dark); font-family: var(--pixel); font-size: .82rem; letter-spacing: .12em; }
.role-card h3 { margin: 0; max-width: 430px; font-family: var(--pixel); font-size: clamp(2.2rem, 3vw, 3.7rem); line-height: .9; letter-spacing: -.04em; }
.role-intro { margin: 24px 0 26px; color: #474950; font-size: 1.05rem; line-height: 1.55; }
.role-card ul { list-style: none; margin: 0; padding: 0; }
.role-card li { position: relative; padding: 11px 0 11px 24px; border-top: 1px solid var(--soft-line); font-size: .93rem; }
.role-card li::before { content: "•"; position: absolute; left: 2px; color: var(--blue-dark); }
.experience-proof { margin-top: 24px; padding-top: 18px; border-top: 2px dashed var(--blue-dark); }
.experience-proof.is-fallback { display: none; }
.experience-proof-heading { display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; }
.experience-proof-heading span { color: var(--blue-dark); font-family: var(--pixel); font-size: .68rem; letter-spacing: .1em; }
.experience-proof-heading strong { font-size: .9rem; line-height: 1.25; }
.experience-gallery { display: grid; grid-auto-flow: column; grid-auto-columns: 132px; gap: 10px; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x mandatory; scrollbar-color: var(--blue-dark) transparent; }
.experience-gallery img { width: 100%; height: 84px; border: 1.5px solid var(--ink); object-fit: cover; }
.experience-photo-button { min-width: 0; padding: 0; border: 0; background: transparent; text-align: left; scroll-snap-align: start; cursor: zoom-in; }
.experience-photo-button img { transition: transform .16s ease, box-shadow .16s ease; }
.experience-photo-button:hover img, .experience-photo-button:focus-visible img { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.experience-photo-button span { display: block; min-height: 2.6em; margin-top: 7px; color: #474950; font-size: .67rem; font-weight: 600; line-height: 1.3; }
.experience-gallery.is-badge { grid-auto-columns: minmax(210px, 1fr); }
.experience-gallery.is-badge img { width: 92px; height: 72px; background: #edf5ff; object-fit: contain; image-rendering: pixelated; scroll-snap-align: start; }
.experience-fallback-link { display: flex; align-items: center; gap: 12px; width: fit-content; color: var(--ink); font-size: .76rem; font-weight: 700; line-height: 1.3; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.experience-fallback-link span { max-width: 150px; }
.role-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; padding-top: 18px; border-top: 1.5px solid var(--ink); color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; }
.role-arrows { display: flex; gap: 8px; }
.role-arrows button { width: 42px; height: 42px; border: 1.5px solid var(--ink); border-radius: 2px; background: var(--paper); cursor: pointer; transition: background .16s ease, color .16s ease, transform .16s ease; }
.role-arrows button:hover { background: var(--ink); color: white; transform: translateY(-2px); }
.wardrobe-panel { padding: 0 24px 30px; }
.tabs { display: flex; gap: 44px; overflow-x: auto; border-bottom: 1px solid var(--soft-line); scrollbar-width: none; }
.tab { flex: 0 0 auto; padding: 22px 2px 16px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; }
.tab.is-active { color: var(--ink); border-bottom-color: var(--blue); }
.outfit-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; padding-top: 22px; }
.outfit-button { position: relative; min-height: 236px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 16px 12px 14px; border: 1.5px solid var(--soft-line); border-radius: 3px; background: #fbfaf7; cursor: pointer; overflow: hidden; transition: border-color .18s ease, transform .18s ease, background .18s ease; }
.outfit-button::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: transparent; pointer-events: none; }
.outfit-button:hover { transform: translateY(-3px); border-color: var(--ink); }
.outfit-button:active { transform: translateY(1px) scale(.98); }
.outfit-button.is-selected { border-color: var(--ink); background: #eaf4fd; }
.outfit-button.is-selected::before { background: var(--blue-dark); }
.outfit-button img { width: min(180px, 100%); height: 180px; object-fit: contain; image-rendering: pixelated; transition: transform .2s ease; }
.outfit-button:hover img { transform: scale(1.06) rotate(-2deg); }
.outfit-button.is-selected img { animation: equipped-pop .34s cubic-bezier(.2,.8,.2,1); }
.outfit-button span { position: relative; z-index: 1; font-family: var(--pixel); font-size: .92rem; text-align: center; }

footer { min-height: 130px; display: flex; justify-content: space-between; align-items: center; border-top: 1.5px solid var(--ink); }
footer p { margin: 0; }
footer p span { margin-right: 18px; color: var(--blue-dark); font-family: var(--pixel); font-weight: 700; }
footer a { font-size: .9rem; text-underline-offset: 5px; }

/* Project index */
.projects-page { width: min(1400px, calc(100% - 48px)); margin-inline: auto; overflow: visible; }
.projects-intro { min-height: 410px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: clamp(40px, 8vw, 140px); align-items: end; padding: 92px 0 64px; border-bottom: 1.5px solid var(--ink); }
.projects-intro > * { min-width: 0; }
.projects-eyebrow { margin: 0 0 22px; color: var(--blue-dark); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.projects-intro h1 { font-size: clamp(5.5rem, 12vw, 11.5rem); line-height: .7; }
.projects-intro > p { max-width: 430px; margin: 0 0 8px; padding-top: 18px; border-top: 1.5px solid var(--ink); font-size: clamp(1rem, 1.4vw, 1.2rem); }
.project-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 30px 24px; padding: 64px 0 110px; }
.project-card { grid-column: span 6; min-width: 0; display: flex; flex-direction: column; color: inherit; border: 1.5px solid var(--ink); background: var(--paper); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
.project-card-wide { grid-column: span 7; }
.project-card-narrow { grid-column: span 5; }
.project-card-full { grid-column: 2 / span 10; flex-direction: row; }
.project-card:hover, .project-card:focus-visible { transform: translate(-5px, -5px); box-shadow: 7px 7px 0 var(--ink); }
.project-card:active { transform: translate(-1px, -1px) scale(.995); box-shadow: 3px 3px 0 var(--ink); }
.project-preview { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1.5px solid var(--ink); background: #e7e4dc; }
.project-preview::after { content: ""; position: absolute; inset: 0; border: 7px solid rgba(255,255,255,.18); pointer-events: none; }
.project-preview img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .35s ease; }
.project-card:hover .project-preview img { transform: scale(1.018); }
.project-details { flex: 1; display: flex; flex-direction: column; padding: 25px 28px 27px; }
.project-type { width: fit-content; display: inline-flex; align-items: center; gap: 8px; margin: 0 0 17px; padding: 6px 9px 5px; border: 1px solid var(--ink); background: #eaf4fd; color: var(--ink); font-size: .76rem; font-weight: 700; line-height: 1; letter-spacing: .065em; text-transform: uppercase; }
.project-type::before { content: ""; width: 7px; height: 7px; background: var(--blue-dark); }
.project-title-row { display: flex; justify-content: space-between; align-items: start; gap: 24px; }
.project-title-row h2 { margin: 0; font-family: var(--pixel); font-size: clamp(2.15rem, 4vw, 4.2rem); line-height: .9; letter-spacing: -.035em; }
.project-title-row > span { flex: 0 0 auto; width: 43px; height: 43px; display: grid; place-items: center; border: 1.5px solid var(--ink); font-size: 1.25rem; transition: background .18s ease, color .18s ease; }
.project-card:hover .project-title-row > span { color: var(--paper); background: var(--ink); }
.project-details > p:not(.project-type) { max-width: 580px; margin: 18px 0 28px; color: #4c4e54; }
.project-domain { margin-top: auto; padding-top: 15px; border-top: 1px solid var(--soft-line); color: var(--muted); font-size: .8rem; letter-spacing: .045em; }
.project-card-full .project-preview { flex: 1.55; aspect-ratio: auto; border-right: 1.5px solid var(--ink); border-bottom: 0; }
.project-card-full .project-details { flex: .75; min-height: 350px; }
.project-preview-poster img { image-rendering: auto; }

body.lightbox-open { overflow: hidden; }
.photo-lightbox[hidden] { display: none; }
.photo-lightbox { position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center; gap: 22px; padding: 74px clamp(20px, 4vw, 64px) 36px; background: rgba(9, 20, 42, .9); }
.photo-lightbox figure { width: min(1100px, 100%); max-height: calc(100vh - 110px); margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.photo-lightbox figure img { max-width: 100%; max-height: calc(100vh - 180px); width: auto; height: auto; border: 3px solid var(--paper); background: var(--paper); object-fit: contain; box-shadow: 9px 9px 0 #000; }
.photo-lightbox figcaption { margin-top: 18px; padding: 8px 14px; background: var(--paper); color: var(--ink); font-family: var(--pixel); font-size: .92rem; line-height: 1.3; text-align: center; box-shadow: 4px 4px 0 #000; }
.lightbox-close, .lightbox-nav { border: 2px solid var(--paper); background: var(--navy); color: var(--paper); cursor: pointer; box-shadow: 4px 4px 0 #000; }
.lightbox-close:hover, .lightbox-nav:hover, .lightbox-close:focus-visible, .lightbox-nav:focus-visible { background: var(--blue); color: var(--ink); }
.lightbox-close { position: absolute; top: 22px; right: 24px; width: 48px; height: 48px; font-size: 1.8rem; line-height: 1; }
.lightbox-nav { width: 58px; height: 58px; font-size: 1.5rem; }

:focus-visible { outline: 3px solid var(--blue-dark); outline-offset: 4px; }
@keyframes hero-pop {
  0%, 100% { transform: translate(-50%, -50%); }
  28% { transform: translate(-50%, -50%) translateY(-14px) rotate(-2deg) scale(1.035); }
  55% { transform: translate(-50%, -50%) translateY(-5px) rotate(2deg) scale(1.018); }
  76% { transform: translate(-50%, -50%) translateY(-9px) rotate(-1deg) scale(1.025); }
}
@keyframes character-hop {
  0%, 100% { transform: translateX(-50%); }
  30% { transform: translateX(-50%) translateY(-18px) rotate(-1.5deg) scale(1.025); }
  58% { transform: translateX(-50%) translateY(-3px) rotate(1.5deg) scale(1.012); }
  78% { transform: translateX(-50%) translateY(-8px) rotate(-.5deg) scale(1.018); }
}
@keyframes role-refresh {
  from { opacity: .3; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes equipped-pop {
  0% { transform: scale(.94); }
  65% { transform: scale(1.045) rotate(-1deg); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

@media (max-width: 1080px) {
  .intro { grid-template-columns: 1fr .86fr; min-height: auto; }
  .intro-aside { grid-column: 1 / -1; margin: 0; max-width: 620px; }
  .experience-grid { grid-template-columns: 1.15fr .85fr; }
  .outfit-grid { grid-template-columns: repeat(3, 1fr); }
  .project-card, .project-card-wide, .project-card-narrow { grid-column: span 6; }
  .project-card-full { grid-column: 1 / -1; }
}
@media (max-width: 780px) {
  .site-header, .intro, .closet-section, .projects-page, footer { width: min(calc(100% - 28px), 680px); }
  .site-header { height: 72px; grid-template-columns: 1fr auto; }
  .site-header nav { display: none; }
  .header-cta { font-size: .78rem; padding: 8px 11px; }
  .brand > span:last-child { display: none; }
  .intro { grid-template-columns: 1fr; gap: 34px; padding: 54px 0 70px; }
  h1 { font-size: clamp(4.7rem, 25vw, 7rem); }
  .portrait-card { min-height: 440px; border-radius: 5px 42px 5px 5px; }
  .intro-aside { grid-column: auto; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 22px; }
  .closet-section { padding: 62px 0 80px; }
  .game-shell { border-radius: 5px; box-shadow: 4px 4px 0 var(--ink); }
  .experience-grid { grid-template-columns: 1fr; min-height: 0; }
  .character-stage { min-height: 590px; border-right: 0; border-bottom: 1.5px solid var(--ink); }
  .role-card { min-height: 590px; }
  .outfit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tabs { gap: 28px; }
  footer { min-height: 150px; align-items: flex-start; flex-direction: column; justify-content: center; gap: 18px; }
  .projects-intro { min-height: 330px; grid-template-columns: minmax(0, 1fr); gap: 34px; padding: 70px 0 48px; }
  .projects-intro h1 { font-size: clamp(4.3rem, 19vw, 7rem); line-height: .8; }
  .project-grid { display: block; padding: 42px 0 78px; }
  .project-card, .project-card-full { display: flex; flex-direction: column; margin-bottom: 26px; }
  .project-card-full .project-preview { aspect-ratio: 16 / 9; border-right: 0; border-bottom: 1.5px solid var(--ink); }
  .project-card-full .project-details { min-height: 0; }
}
@media (max-width: 600px) {
  .site-header { grid-template-columns: 1fr auto; gap: 16px; }
  .header-cta { display: inline-flex; gap: 8px; padding-inline: 0; white-space: nowrap; }
  .header-cta-back .cta-label { display: none; }
  h1 { max-width: 100%; font-size: 14.5vw; line-height: .88; }
  .intro-lede { font-size: 1rem; }
  .practice-line { font-size: .82rem; }
  .game-topbar { padding: 12px 14px; }
  .game-topbar .tiny-label { display: none; }
  .character-stage { min-height: 510px; }
  .character { height: 78%; bottom: 10%; }
  .achievement-card { left: 12px; top: 14px; width: 150px; padding: 10px; }
  .achievement-card img { width: 128px; height: 96px; margin-block: 6px 8px; }
  .achievement-card[data-media="photo"] img { height: 78px; }
  .achievement-card strong { font-size: .76rem; }
  .experience-card-action { font-size: .62rem; }
  .stat-card { left: 12px; bottom: 14px; width: 190px; padding: 9px 11px 9px 7px; }
  .stat-card img { flex-basis: 66px; width: 66px; height: 66px; }
  .wardrobe-panel { padding-inline: 14px; }
  .outfit-button { min-height: 190px; }
  .outfit-button img { width: min(138px, 100%); height: 138px; }
  .projects-intro { min-height: 290px; padding-top: 54px; }
  .projects-intro > p { font-size: 1rem; }
  .project-details { padding: 20px 20px 22px; }
  .project-title-row h2 { font-size: 2.35rem; }
  .project-title-row > span { width: 38px; height: 38px; }
  .experience-gallery { grid-auto-columns: 116px; }
  .experience-gallery img { height: 76px; }
  .photo-lightbox { grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr) 52px; gap: 16px 10px; padding: 74px 16px 22px; }
  .photo-lightbox figure { grid-column: 1 / -1; grid-row: 1; max-height: calc(100vh - 156px); }
  .photo-lightbox figure img { max-height: calc(100vh - 220px); box-shadow: 6px 6px 0 #000; }
  .photo-lightbox figcaption { margin-top: 14px; font-size: .82rem; }
  .lightbox-nav { width: 100%; height: 48px; }
  .lightbox-previous { grid-column: 1; }
  .lightbox-next { grid-column: 2; }
  .lightbox-close { top: 14px; right: 16px; }
}

/* Pixel game world */
body {
  min-height: 100vh;
  background-color: #d9effb;
  background-image:
    linear-gradient(rgba(255, 255, 255, .06), rgba(240, 226, 244, .22)),
    url("./assets/pixel-pastel-background.png");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;
}

.site-header {
  position: relative;
  z-index: 10;
  height: 76px;
  margin-top: 18px;
  padding-inline: 22px;
  border: 2px solid var(--ink);
  background: rgba(255, 254, 251, .96);
  box-shadow: 7px 7px 0 var(--navy-deep);
}
.site-header nav { gap: 14px; }
.site-header nav a { padding: 7px 12px; border: 1px solid transparent; font-weight: 600; }
.site-header nav a:hover, .site-header nav a:focus-visible, .site-header nav a[aria-current="page"] { border-color: var(--ink); background: var(--screen-blue); }
.site-header nav a::after { display: none; }
.header-cta { padding: 8px 2px; border-bottom-width: 2px; }

.intro {
  min-height: 760px;
  grid-template-columns: minmax(0, 1.04fr) minmax(330px, .76fr) minmax(180px, .4fr);
  gap: clamp(24px, 3vw, 46px);
  align-items: stretch;
  padding: 68px 0 92px;
}
.intro-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(30px, 4vw, 52px);
  border: 3px solid var(--ink);
  background: rgba(255, 254, 251, .95);
  box-shadow: 9px 9px 0 var(--navy-deep);
}
.intro-copy::after {
  content: "";
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 28px;
  height: 28px;
  border-top: 3px solid var(--ink);
  border-left: 3px solid var(--ink);
  background: var(--blue);
}
.intro-copy h1 { font-size: clamp(4.4rem, 7vw, 7.4rem); }
.intro-lede { margin-top: 32px; }
.practice-line { border-top: 2px dashed var(--blue-dark); }

.portrait-card {
  min-height: 590px;
  border: 3px solid var(--ink);
  border-radius: 0;
  background: rgba(84, 142, 211, .82);
  box-shadow: 10px 10px 0 var(--navy-deep);
}
.portrait-grid { opacity: .35; background-size: 32px 32px; }

.intro-aside {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0;
  padding: 24px 22px;
  border: 3px solid var(--ink);
  background: rgba(236, 227, 248, .96);
  color: var(--ink);
  box-shadow: 7px 7px 0 #a9cee9;
}
.intro-aside .aside-kicker { color: #5a6f9e; }
.intro-aside > p:not(.aside-kicker) { color: #424a59; }
.intro-aside a { color: var(--ink); }

.closet-section {
  margin-bottom: 96px;
  padding: clamp(28px, 4vw, 52px);
  border: 3px solid var(--ink);
  background: rgba(247, 242, 252, .94);
  box-shadow: 12px 12px 0 rgba(148, 194, 225, .82);
}
.section-label { color: #6179a8; }
.section-heading h2 { color: var(--navy-deep); }
.section-heading > p { color: #4d5564; }
.game-shell { border-width: 3px; border-radius: 0; box-shadow: 8px 8px 0 #000; }
.game-topbar { border-bottom-width: 3px; background: #dfeeff; color: var(--ink); }
.game-topbar .tiny-label, .game-topbar .counter { color: #53647f; }
.game-topbar .counter span { color: var(--blue-dark); }
.character-stage { border-right-width: 3px; }
.character { max-width: none; }
.role-card { background: rgba(255, 254, 251, .98); }
.wardrobe-panel { background: #edf5ff; }
.tabs { border-bottom-color: #9ab7d8; }
.tab.is-active { border-bottom-color: var(--blue-dark); }
.outfit-button { border-width: 2px; background: #f9fcff; }
.outfit-button.is-selected { box-shadow: 4px 4px 0 var(--navy); }

footer {
  min-height: 104px;
  margin-bottom: 24px;
  padding-inline: 24px;
  border: 3px solid var(--ink);
  background: rgba(255, 254, 251, .96);
  color: var(--ink);
  box-shadow: 7px 7px 0 #bba9d6;
}
footer p span { color: #6179a8; }

/* Projects become a second game screen, not a separate beige template. */
.projects-intro {
  min-height: 390px;
  margin-top: 54px;
  padding: clamp(36px, 5vw, 64px);
  border: 3px solid var(--ink);
  background: rgba(250, 247, 255, .95);
  color: var(--ink);
  box-shadow: 10px 10px 0 #bba9d6;
}
.projects-eyebrow { color: #6179a8; }
.projects-intro > p { border-top-color: #8caed0; color: #465064; }
.project-grid {
  margin: 40px 0 96px;
  padding: 28px;
  border: 3px solid var(--ink);
  background: rgba(228, 239, 252, .9);
  box-shadow: 10px 10px 0 rgba(187, 169, 214, .78);
}
.project-card { border-width: 3px; box-shadow: 5px 5px 0 rgba(0, 0, 0, .45); }
.project-card:hover, .project-card:focus-visible { box-shadow: 9px 9px 0 #000; }
.project-preview { border-bottom-width: 3px; }
.project-card-full .project-preview { border-right-width: 3px; }

@media (max-width: 1080px) {
  .intro { grid-template-columns: minmax(0, 1fr) minmax(320px, .82fr); }
  .intro-aside { grid-column: 1 / -1; max-width: 620px; }
  .achievement-card { display: none; }
  .experience-proof.is-fallback { display: block; }
}

@media (max-width: 780px) {
  body { background-attachment: fixed; background-position: 54% bottom; }
  .site-header { margin-top: 10px; padding-inline: 14px; box-shadow: 5px 5px 0 var(--navy-deep); }
  .intro { grid-template-columns: 1fr; gap: 28px; padding-top: 42px; }
  .intro-aside { grid-column: auto; max-width: none; }
  .intro-copy { padding: 36px 30px; box-shadow: 7px 7px 0 var(--navy-deep); }
  .portrait-card { min-height: 520px; border-radius: 0; box-shadow: 7px 7px 0 var(--navy-deep); }
  .portrait-flipper {
    transform: none !important;
    transform-style: flat;
  }
  .portrait-face {
    backface-visibility: visible;
    -webkit-backface-visibility: visible;
    transition: opacity .34s ease, transform .34s cubic-bezier(.2,.75,.2,1);
  }
  .portrait-face-pixel { opacity: 1; transform: none; }
  .portrait-face-photo {
    opacity: 0;
    transform: translateY(12px) scale(.985);
    pointer-events: none;
  }
  .portrait-card.is-flipped .portrait-face-pixel {
    opacity: 0;
    transform: translateY(-10px) scale(.985);
    pointer-events: none;
  }
  .portrait-card.is-flipped .portrait-face-photo {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .portrait-headshot { object-position: center 42%; }
  .closet-section { padding: 30px 22px; box-shadow: 8px 8px 0 rgba(110, 169, 233, .82); }
  .character-stage { border-right: 0; border-bottom-width: 3px; }
  .project-grid { padding: 18px; }
  .projects-intro { margin-top: 38px; }
}

@media (max-width: 600px) {
  .site-header { height: 68px; }
  .intro-copy { padding: 30px 22px; }
  .intro-copy h1 { font-size: clamp(3.45rem, 15vw, 4.6rem); }
  .portrait-card { min-height: 0; aspect-ratio: 4 / 5; }
  .portrait-character { width: 112%; }
  .portrait-flip-button { right: 12px; bottom: 12px; min-height: 40px; padding: 8px 10px 7px; }
  .portrait-photo-tag { left: 14px; top: 14px; }
  .closet-section { padding: 24px 12px; }
  .section-heading h2 { font-size: 3.35rem; }
  .character-stage { min-height: 510px; }
  .character { width: 115%; height: auto; max-width: none; bottom: 8%; }
  #character-image[data-outfit="photography"] { width: 105%; bottom: 4%; }
  .outfit-button img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; }
  .projects-intro { padding: 34px 22px; }
  .project-grid { padding: 12px; }
  footer { padding-inline: 18px; }
}
