/* Shared design tokens: change these to recolor every page. */
:root {
  --paper: #fff9ed;
  --ink: #193b33;
  --muted: #4d6258;
  --mint: #d9ebdf;
  --coral: #f7a697;
  --yellow: #f6d86b;
  --lavender: #ded5f4;
  --line: #cdd2c2;
  --display: 'Avenir Next', 'Trebuchet MS', Arial, sans-serif;
  --body: 'Avenir Next', 'Segoe UI', Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 17px/1.65 var(--body); }
::selection { color: var(--ink); background: var(--yellow); }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
img, svg { max-width: 100%; }
img { display: block; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; }
h1, h2 { letter-spacing: -.055em; }
h3 { letter-spacing: -.035em; }
p + p { margin-top: 18px; }
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 6px; border-radius: 4px; }
.wrap { width: min(1240px, calc(100% - 96px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 99; top: -100px; left: 16px; padding: 12px 20px; background: var(--yellow); }
.skip-link:focus { top: 12px; }
.reading-progress { position: fixed; top: 0; left: 0; z-index: 20; width: 100%; height: 4px; background: var(--ink); transform: scaleX(0); transform-origin: left; }
.site-header { min-height: 112px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.wordmark { font: 800 30px/1 var(--display); letter-spacing: -.055em; text-decoration: none; white-space: nowrap; }
.wordmark span { display: inline-block; margin-left: 7px; color: #9c6700; font-size: 35px; vertical-align: -3px; transition: transform .4s; }
.wordmark:hover span { transform: rotate(90deg); }
.site-header nav { display: flex; align-items: center; gap: 30px; font-size: 15px; font-weight: 700; }
.site-header nav a { text-decoration: none; padding: 10px 0; }
.site-header nav a:hover { text-decoration: underline; text-underline-offset: 6px; }
.site-header nav .nav-contact { background: var(--ink); color: var(--paper); padding: 12px 22px; border-radius: 30px; }
.hero { display: grid; grid-template-columns: 1.3fr .9fr; align-items: center; gap: 68px; padding-top: 50px; padding-bottom: 90px; min-height: 620px; }
.hello { display: inline-flex; align-items: center; gap: 13px; margin-bottom: 26px; font: 600 19px/1.4 ui-monospace, 'Courier New', monospace; }
.wave { display: inline-block; font-size: 23px; transform-origin: 70% 80%; }
.hello:hover .wave { animation: wave .7s ease-in-out; }
.hero h1 { font-size: clamp(48px, 5.05vw, 73px); font-weight: 850; line-height: 1.08; letter-spacing: -.065em; }
.underlined { display: inline-block; position: relative; z-index: 0; }
.underlined::after { content: ''; position: absolute; height: 13px; background: var(--yellow); inset: auto -2% 1px 0; border-radius: 50%; z-index: -1; transform: rotate(-2deg); }
.hero-description { max-width: 510px; font-size: 22px; line-height: 1.5; margin-top: 27px; }
.hero-role { margin-top: 15px; max-width: 500px; font-size: 14px; color: var(--muted); }
.button-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 23px; padding: 15px 25px; border-radius: 40px; font-size: 16px; font-weight: 750; text-decoration: none; border: 2px solid transparent; transition: transform .2s, box-shadow .2s; }
.button:hover { transform: translateY(-4px); box-shadow: 0 5px 0 var(--ink); }
.button-dark { color: var(--paper); background: var(--ink); }
.button-dark:hover { box-shadow: 0 5px 0 var(--coral); }
.button-coral { background: var(--coral); }
.portrait-scene { position: relative; width: min(100%, 420px); aspect-ratio: .9; justify-self: center; transform-style: preserve-3d; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .18s ease-out; }
.portrait-backdrop { position: absolute; inset: 10px -13px -13px 13px; background: var(--coral); border-radius: 49% 49% 24px 24px; transform: rotate(3deg); }
.portrait { width: 100%; height: 100%; object-fit: cover; object-position: center; border-radius: 49% 49% 24px 24px; position: relative; border: 7px solid var(--paper); }
.sun { width: 80px; height: 80px; color: #c58800; }
.portrait-sun { position: absolute; right: -42px; top: -24px; width: 100px; height: 100px; transform: translateZ(35px) rotate(var(--sun-turn, 0deg)); }
.paper-tag { position: absolute; right: -26px; bottom: -17px; padding: 17px 22px; color: var(--ink); background: var(--lavender); font: 600 20px/1.3 ui-monospace, 'Courier New', monospace; transform: translateZ(40px) rotate(-7deg); box-shadow: 3px 5px 0 #193b3318; border-radius: 4px 4px 15px 5px; }
.portrait-arrow { position: absolute; width: 115px; left: 4px; bottom: -43px; fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; transform: translateZ(20px); }
.skill-ribbon { background: var(--mint); border-radius: 44px; padding: 19px 26px; display: flex; justify-content: space-around; align-items: center; gap: 16px; font: 600 15px/1.5 ui-monospace, 'Courier New', monospace; }
.skill-ribbon b { color: #866100; font-size: 23px; }
.work-ribbon { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr) auto) minmax(0, 1fr); text-align: center; gap: clamp(6px, 1.2vw, 16px); }
.ribbon-break { color: #b83232; font: inherit; text-decoration: none; }
.ribbon-break:hover { text-decoration: underline; text-underline-offset: 4px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font: 650 11px/1.5 ui-monospace, 'Courier New', monospace; margin-bottom: 17px; }
.work-section, .experience-section { padding-block: 112px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 50px; margin-bottom: 45px; }
h2 { font-size: clamp(32px, 3.6vw, 49px); font-weight: 800; }
.section-heading > p { color: var(--muted); font-size: 16px; padding-bottom: 4px; }
.soft-word { color: var(--muted); }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.project-card { display: block; text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 27px; }
.project-art { min-height: 235px; border-radius: 20px; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; transition: transform .3s, border-radius .3s; }
.erp .project-art, .erp .node-icon { background: var(--mint); }
.study .project-art, .study .node-icon { background: var(--lavender); }
.mail .project-art, .mail .node-icon { background: var(--coral); }
.project-card:hover .project-art { transform: translateY(-6px) rotate(-1deg); border-radius: 35px 12px 35px 12px; }
.project-card:nth-child(2):hover .project-art { transform: translateY(-6px) rotate(1deg); }
.mini-flow { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; padding: 25px; }
.mini-flow > div { display: grid; justify-items: center; gap: 12px; flex: 1; }
.icon { width: 56px; height: 56px; flex-shrink: 0; }
.mini-flow span { font-size: 11px; font-weight: 700; }
.mini-flow .flow-arrow { font-size: 25px; align-self: center; padding-bottom: 20px; }
.mini-flow .icon { transition: transform .3s; }
.project-card:hover .mini-flow > div:nth-of-type(2) .icon { transform: translateY(-9px) rotate(5deg); }
.art-note { position: absolute; bottom: 15px; left: 20px; font: 600 10px/1.5 ui-monospace, 'Courier New', monospace; }
.project-card-copy { padding: 25px 2px 0; }
.project-card h3 { font-size: 24px; max-width: 340px; }
.project-card p { color: var(--muted); font-size: 15px; margin-top: 16px; }
.text-link { display: inline-flex; justify-content: space-between; gap: 15px; margin-top: 24px; font-weight: 750; font-size: 14px; }
.text-link > span { transition: transform .2s; }
.project-card:hover .text-link > span { transform: translate(4px, -4px); }
.about-section { background: #edf2e7; padding-block: 100px; }
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 100px; align-items: center; }
.about-grid p:not(.eyebrow) { color: var(--muted); }
.about-grid .large-copy { font-size: 20px; margin-top: 28px; }
.approach-board { background: var(--paper); padding: 40px; border-radius: 8px; box-shadow: 10px 10px 0 #c9d9c8; transform: rotate(1deg); position: relative; }
.board-pin { position: absolute; top: -16px; left: 45%; width: 80px; height: 29px; background: #f6d86bd9; transform: rotate(-7deg); }
.approach-board h3 { font-size: 29px; }
.approach-flow { display: flex; justify-content: space-between; gap: 8px; padding-block: 27px; font-weight: 750; }
.approach-flow span:nth-child(odd) { border-bottom: 6px solid var(--yellow); }
.approach-board > p:not(.eyebrow) { font-size: 15px; }
.audience-switch { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 25px; }
.audience-switch button { border: 1px solid var(--line); border-radius: 25px; padding: 10px 15px; background: transparent; font-size: 12px; font-weight: 650; }
.audience-switch button[aria-pressed=true] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.audience-copy { min-height: 100px; padding-top: 15px; }
.career-timeline { list-style: none; padding: 0; margin: 0; }
.career-timeline li { display: grid; grid-template-columns: 180px 1fr; gap: 35px; padding: 30px 0; border-top: 1px solid var(--line); }
.career-date { font: 600 13px/1.8 ui-monospace, 'Courier New', monospace; }
.career-timeline h3 { font-size: 22px; }
.career-timeline h3 span { color: var(--muted); font-weight: 500; }
.career-timeline p { color: var(--muted); margin-top: 12px; max-width: 800px; font-size: 15px; }
.education { margin-top: 25px; font-size: 14px; color: var(--muted); }
.education span { color: var(--ink); margin-right: 13px; font-size: 22px; }
.contact-section { border-top: 1px solid var(--line); padding-block: 65px; display: flex; justify-content: space-between; align-items: center; gap: 45px; position: relative; }
.contact-section h2 { font-size: clamp(36px, 4.5vw, 60px); }
.contact-section p:not(.eyebrow) { color: var(--muted); max-width: 570px; margin-top: 22px; }
.contact-section .sun { position: absolute; right: 210px; top: 38px; width: 60px; transform: rotate(18deg); }
.contact-section .button { flex-shrink: 0; }
.site-footer { border-top: 1px solid var(--line); padding-block: 27px; display: flex; justify-content: space-between; align-items: center; gap: 25px; font-size: 12px; color: var(--muted); }
.site-footer > div { display: flex; align-items: center; gap: 25px; }
.site-footer a { text-underline-offset: 4px; }
.motion-toggle { border: 1px solid var(--line); background: transparent; border-radius: 24px; padding: 10px 15px; font-size: 12px; }
/* Case-study pages reuse the same header, footer and motion behavior. */
.case-hero { position: relative; padding-block: 42px 65px; }
.back-link { display: inline-block; margin-bottom: 45px; font-size: 14px; text-underline-offset: 5px; }
.case-hero h1 { max-width: 980px; font-size: clamp(43px, 5.2vw, 72px); }
.case-intro { max-width: 800px; font-size: 22px; margin-top: 30px; }
.case-meta { display: grid; grid-template-columns: .8fr 1.2fr; gap: 50px; max-width: 900px; margin-top: 40px; font-size: 14px; color: var(--muted); }
.case-meta b { display: block; margin-bottom: 7px; color: var(--ink); font-size: 12px; }
.case-sun { position: absolute; right: 0; bottom: 73px; width: 75px; }
.workflow-section { border-block: 1px solid var(--line); padding-block: 65px 35px; }
.workflow-heading { max-width: 780px; }
.workflow-heading h2 { font-size: 40px; }
.workflow-heading p:not(.eyebrow) { margin-top: 22px; color: var(--muted); font-size: 16px; }
.workflow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; margin-block: 48px 30px; }
.workflow-step { background: none; border: 0; padding: 10px; position: relative; border-radius: 18px; display: flex; flex-direction: column; align-items: center; }
.workflow-step:not(:last-child)::after { content: '⤳'; position: absolute; top: 45px; right: -40px; width: 40px; font-size: 36px; }
.node-icon { width: 135px; height: 135px; border-radius: 46% 54% 40% 60%; display: grid; place-items: center; border: 2px solid transparent; transition: transform .3s, border-color .3s, box-shadow .3s; }
.workflow-step.step-1 .node-icon { background: var(--yellow); }
.workflow-step.step-2 .node-icon { background: var(--lavender); }
.workflow-step.step-3 .node-icon { background: var(--coral); }
.workflow-step .icon { width: 70px; height: 70px; }
.node-label { font-weight: 750; margin-top: 20px; font-size: 17px; line-height: 1.3; }
.step-number { font: 500 11px/1.5 ui-monospace, 'Courier New', monospace; margin-top: 10px; color: var(--muted); }
.workflow-step[aria-pressed=true] .node-icon { border-color: var(--ink); box-shadow: 5px 5px 0 var(--ink); transform: translate(-3px, -3px); }
.workflow-step:hover .node-icon { transform: translateY(-8px) rotate(-4deg); }
.workflow-detail { background: #f3eddc; padding: 30px 35px; border-radius: 18px; display: flex; align-items: start; gap: 28px; min-height: 172px; }
.detail-index { font: 700 32px/1.2 var(--display); color: #667466; }
.workflow-detail h3 { font-size: 24px; }
.workflow-detail p { margin-top: 12px; max-width: 900px; color: var(--muted); font-size: 16px; }
.illustration-note { font: 500 11px/1.5 ui-monospace, 'Courier New', monospace; margin-top: 22px; color: var(--muted); }
.project-context { padding-block: 65px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 65px; border-bottom: 1px solid var(--line); }
.project-context h2 { font-size: 37px; }
.project-context p:not(.eyebrow) { color: var(--muted); font-size: 16px; margin-top: 22px; }
.context-phases { display: grid; gap: 25px; align-content: center; }
.context-phases > div { border-left: 2px solid var(--ink); padding-left: 25px; position: relative; }
.context-phases h3 { font-size: 23px; }
.context-phases p:not(.eyebrow) { margin-top: 12px; }
.context-dot { position: absolute; left: -9px; top: 3px; width: 16px; height: 16px; background: var(--yellow); border-radius: 50%; border: 2px solid var(--ink); }
.context-phases > div + div .context-dot { background: var(--lavender); }
.story-section { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 52px; padding-block: 85px; }
.story-section h2 { font-size: 29px; letter-spacing: -.04em; }
.story-section article > p:last-child { margin-top: 22px; font-size: 16px; color: var(--muted); }
.principles-section { background: var(--mint); padding-block: 65px; }
.principles-section h2 { font-size: 39px; }
.principles-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 60px; padding-top: 40px; }
.principles-grid .icon { width: 43px; height: 43px; margin-bottom: 17px; }
.principles-grid h3 { font-size: 24px; }
.principles-grid p { margin-top: 14px; color: var(--muted); font-size: 16px; }
.next-project { display: flex; justify-content: space-between; align-items: center; gap: 25px; padding-block: 65px; text-decoration: none; }
.next-project .eyebrow { display: block; }
.next-project strong { font: 750 29px/1.2 var(--display); letter-spacing: -.04em; max-width: 650px; display: block; }
.next-arrow { display: grid; place-items: center; min-width: 65px; height: 65px; border-radius: 50%; background: var(--yellow); font-size: 32px; transition: transform .25s; }
.next-project:hover .next-arrow { transform: rotate(45deg); }
/* Content remains visible if JavaScript is unavailable. */
.motion-ready [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .65s, transform .65s; }
.motion-ready [data-reveal].is-visible { opacity: 1; transform: translateY(0); }
.motion-ready .page-enter { animation: page-enter .75s both; }
.motion-ready .page-enter:nth-child(2) { animation-delay: .12s; }
.motion-off *, .motion-off *::before, .motion-off *::after { animation: none !important; transition: none !important; }
.motion-off [data-reveal] { opacity: 1; transform: none; }
.motion-off .portrait-scene { transform: none; }
.motion-off { scroll-behavior: auto; }
@keyframes page-enter { from { opacity: 0; translate: 0 22px; } to { opacity: 1; translate: 0 0; } }
@keyframes wave { 25% { rotate: 20deg; } 75% { rotate: -12deg; } }
@media (min-width: 901px) { .project-card:nth-child(2) { margin-top: 32px; } .project-card:nth-child(3) { margin-top: 64px; } }
@media (max-width: 1100px) {
  .wrap { width: calc(100% - 64px); }
  .hero { gap: 38px; padding-top: 30px; }
  .hero h1 { font-size: 56px; }
  .hero-description { font-size: 20px; }
  .about-grid { gap: 55px; }
  .project-grid { gap: 20px; }
  .mini-flow { padding-inline: 14px; gap: 3px; }
  .mini-flow .icon { width: 45px; }
  .case-sun { display: none; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr 1fr; min-height: 540px; }
  .hero h1 { font-size: 47px; }
  .hero-role { font-size: 12px; }
  .hero-description { font-size: 18px; }
  .button { padding: 12px 19px; font-size: 14px; }
  .portrait-sun { width: 75px; right: -22px; }
  .paper-tag { font-size: 15px; right: -8px; }
  .site-header nav { gap: 20px; font-size: 13px; }
  .wordmark { font-size: 25px; }
  .project-grid { grid-template-columns: 1fr; gap: 38px; }
  .project-card { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
  .project-art { min-height: 230px; }
  .mini-flow .icon { width: 56px; }
  .project-card-copy { padding-top: 12px; }
  .about-grid { grid-template-columns: 1fr; gap: 50px; }
  .approach-board { max-width: 600px; }
  .section-heading { align-items: start; }
  .section-heading > p { max-width: 270px; }
  .career-timeline li { grid-template-columns: 135px 1fr; gap: 25px; }
  .workflow { gap: 18px; }
  .workflow-step:not(:last-child)::after { right: -23px; width: 30px; font-size: 27px; }
  .node-icon { width: 115px; height: 115px; }
  .node-label { font-size: 15px; }
  .story-section { gap: 30px; }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 40px); }
  .site-header { min-height: 110px; flex-wrap: wrap; gap: 10px; padding-block: 20px; }
  .wordmark { font-size: 25px; }
  .wordmark span { font-size: 28px; }
  .site-header nav { width: 100%; gap: 20px; justify-content: space-between; font-size: 12px; }
  .site-header nav .nav-contact { padding: 8px 14px; }
  .hero { grid-template-columns: 1fr; gap: 47px; padding-top: 32px; padding-bottom: 70px; }
  .hello { font-size: 16px; margin-bottom: 20px; }
  .hero h1 { font-size: clamp(38px, 9.2vw, 58px); }
  .hero-description { font-size: 19px; margin-top: 22px; }
  .hero-role { font-size: 12px; }
  .button-row { margin-top: 25px; }
  .button { padding: 13px 19px; gap: 15px; }
  .portrait-scene { width: 78%; max-width: 330px; }
  .portrait-sun { right: -33px; top: -22px; }
  .paper-tag { right: -15px; font-size: 16px; }
  .skill-ribbon { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; border-radius: 20px; font-size: 12px; text-align: center; }
  .skill-ribbon b { display: none; }
  .work-ribbon .ribbon-break { grid-column: 1 / -1; grid-row: 2; }
  .work-section, .experience-section { padding-block: 65px; }
  .section-heading { display: block; margin-bottom: 30px; }
  .section-heading > p { margin-top: 23px; font-size: 15px; max-width: 100%; }
  .section-heading > p br { display: none; }
  .project-card { display: block; padding-bottom: 25px; }
  .project-card-copy { padding-top: 23px; }
  .project-card h3 { font-size: 27px; max-width: 100%; }
  .project-art { min-height: 230px; }
  .about-section { padding-block: 65px; }
  .about-grid .large-copy { font-size: 18px; }
  .approach-board { padding: 30px 23px; box-shadow: 6px 6px 0 #c9d9c8; }
  .approach-board h3 { font-size: 26px; }
  .career-timeline li { grid-template-columns: 1fr; gap: 12px; }
  .career-timeline h3 { font-size: 22px; }
  .career-timeline h3 span { display: block; margin-top: 8px; font-size: 18px; }
  .contact-section { display: block; padding-block: 55px; }
  .contact-section .button { margin-top: 28px; }
  .contact-section .sun { width: 50px; right: 0; top: 30px; }
  .site-footer { flex-direction: column; align-items: start; gap: 15px; }
  .site-footer > div { width: 100%; justify-content: space-between; }
  .case-hero { padding-top: 25px; padding-bottom: 45px; }
  .back-link { margin-bottom: 30px; }
  .case-hero h1 { font-size: 43px; }
  .case-intro { font-size: 19px; margin-top: 24px; }
  .case-meta { grid-template-columns: 1fr; gap: 20px; margin-top: 27px; }
  .workflow-section { padding-top: 45px; }
  .workflow-heading h2 { font-size: 32px; }
  .workflow { grid-template-columns: 1fr 1fr; column-gap: 16px; row-gap: 28px; margin-top: 30px; }
  .workflow-step:not(:last-child)::after { display: none; }
  .node-icon { width: 110px; height: 110px; }
  .workflow-step .icon { width: 60px; height: 60px; }
  .node-label { font-size: 15px; }
  .workflow-detail { padding: 24px 20px; gap: 15px; min-height: 260px; }
  .detail-index { font-size: 24px; }
  .workflow-detail h3 { font-size: 22px; }
  .workflow-detail p { font-size: 15px; }
  .story-section { grid-template-columns: 1fr; gap: 40px; padding-block: 50px; }
  .project-context { grid-template-columns: 1fr; gap: 35px; padding-block: 45px; }
  .project-context h2 { font-size: 32px; }
  .story-section h2 { font-size: 29px; }
  .principles-section { padding-block: 50px; }
  .principles-section h2 { font-size: 32px; }
  .principles-grid { grid-template-columns: 1fr; gap: 33px; }
  .next-project { padding-block: 40px; }
  .next-project strong { font-size: 25px; }
  .next-arrow { min-width: 48px; height: 48px; font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .motion-ready [data-reveal] { opacity: 1; transform: none; }
  .portrait-scene { transform: none; }
}

/* A tiny illustrated sky lives in the whitespace above each section. */
.hero, .work-section, .experience-section, .workflow-section, .principles-section { position: relative; }
.little-sky { position: absolute; inset: 6px 0 auto; height: 64px; overflow: hidden; pointer-events: none; user-select: none; }
.hero > .little-sky { top: -10px; }
.bird-flight { position: absolute; width: 43px; height: 34px; animation: bird-drift 7s ease-in-out infinite; animation-delay: var(--delay); }
.bird-escape { display: block; transform: translate(var(--escape-x, 0px), var(--escape-y, 0px)); transition: transform .55s cubic-bezier(.2,.8,.2,1); }
.bird-facing { display: block; }
.bird-flight:nth-of-type(even) .bird-facing { transform: scaleX(-1); }
.bird-flight svg { display: block; width: 100%; overflow: visible; stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; }
.bird-body { fill: var(--bird-color); }
.bird-wing { fill: var(--yellow); transform-origin: 32px 29px; animation: bird-flap 1.1s ease-in-out infinite alternate; animation-delay: var(--delay); }
.bird-wing-back { fill: var(--bird-color); opacity: .7; animation-direction: alternate-reverse; }
.bird-beak { fill: var(--yellow); }
.bird-eye { fill: var(--ink); stroke: none; }
.is-startled .bird-wing { animation-duration: .15s; }
.sky-cloud { position: absolute; width: 67px; height: 32px; left: 45%; top: 10px; stroke: var(--ink); stroke-width: 1.8; opacity: .24; }
.sky-spark { position: absolute; left: 66%; top: 22px; color: #9c6700; font-size: 25px; line-height: 1; animation: sky-twinkle 5s ease-in-out infinite; }
.contact-section > .little-sky { top: 0; width: 65%; }
.motion-off .bird-escape { transform: none; }
@keyframes bird-drift { 0%, 100% { transform: translate(-12px, 0) rotate(-5deg); } 50% { transform: translate(18px, -7px) rotate(5deg); } }
@keyframes bird-flap { from { transform: rotate(-15deg) scaleY(.55); } to { transform: rotate(12deg) scaleY(1); } }
@keyframes sky-twinkle { 0%, 100% { transform: scale(.8) rotate(-12deg); opacity: .45; } 50% { transform: scale(1.1) rotate(12deg); opacity: .9; } }
.doodle-garden { position: relative; height: 170px; margin-block: 32px 0; pointer-events: none; user-select: none; }
.doodle-garden > svg { position: absolute; fill: none; stroke: var(--ink); stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.garden-peace { width: 55px; left: 3%; top: 29px; transform: rotate(-14deg); animation: doodle-rock 6s ease-in-out infinite; }
.garden-tree { width: 112px; height: 144px; left: 16%; bottom: 10px; }
.tree-trunk { stroke-width: 5; }
.tree-crown { transform-origin: 63px 110px; animation: doodle-rock 5s ease-in-out infinite; }
.garden-flowers { width: 120px; height: 100px; left: 38%; bottom: 10px; }
.flower-head { transform-box: fill-box; transform-origin: center bottom; animation: doodle-rock 3.8s ease-in-out infinite; }
.flower-yellow { animation-delay: -2s; }
.garden-totoro { width: 100px; height: 124px; left: 59%; bottom: 10px; }
.totoro-bob { animation: cartoon-breathe 3s ease-in-out infinite; transform-origin: 65px 146px; }
.garden-snoopy { width: 119px; height: 119px; left: 77%; bottom: 10px; }
.snoopy-bounce { animation: cartoon-breathe 2.4s ease-in-out infinite; transform-origin: 75px 138px; }
.snoopy-arm { transform-origin: 91px 101px; animation: cartoon-wave 1.8s ease-in-out infinite; }
.snoopy-tail { transform-origin: 115px 122px; animation: cartoon-wave .6s ease-in-out infinite alternate; }
.cartoon-eye { animation: cartoon-blink 5s linear infinite; transform-box: fill-box; transform-origin: center; }
.garden-balance { width: 49px; right: 0; top: 13px; }
.balance-turn { transform-origin: 40px 40px; animation: balance-turn 24s linear infinite; }
.doodle-garden > .garden-ground { width: 100%; height: 14px; left: 0; bottom: 0; opacity: .22; stroke-width: 1.5; }
.doodle-garden + .work-section { padding-top: 80px; }
.project-mascot { pointer-events: none; user-select: none; }
.project-mascot svg { display: block; width: 100%; height: 100%; fill: none; stroke: var(--ink); stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.project-card .project-art { flex-direction: column; gap: 5px; padding-block: 20px 36px; }
.project-art > .project-mascot { width: 105px; height: 115px; }
.project-art .mini-flow { padding-block: 10px; }
.doodle-garden > .project-mascot { position: absolute; left: 64%; bottom: 10px; width: 120px; height: 140px; }
.doraemon-bob { animation: cartoon-breathe 2.8s ease-in-out infinite; transform-origin: 70px 149px; }
.doraemon-wave { animation: cartoon-wave 1.5s ease-in-out infinite alternate; transform-origin: 100px 100px; }
@keyframes doodle-rock { 0%, 100% { rotate: -5deg; } 50% { rotate: 6deg; } }
@keyframes cartoon-breathe { 0%, 100% { transform: translateY(0) scaleY(1); } 50% { transform: translateY(-4px) scaleY(1.025); } }
@keyframes cartoon-wave { from { rotate: -9deg; } to { rotate: 13deg; } }
@keyframes cartoon-blink { 0%, 43%, 47%, 100% { scale: 1 1; } 45% { scale: 1 .1; } }
@keyframes balance-turn { to { rotate: 360deg; } }
@media (max-width: 640px) {
  .little-sky { top: 3px; height: 47px; }
  .bird-flight { width: 31px; height: 25px; }
  .sky-cloud { width: 48px; height: 24px; }
  .sky-spark { font-size: 19px; top: 12px; }
  .hero > .little-sky { top: -12px; }
  .doodle-garden { height: 133px; margin-top: 24px; }
  .garden-peace { width: 32px; left: 0; top: 7px; }
  .garden-tree { width: 68px; height: 94px; left: 4%; }
  .garden-flowers { width: 66px; height: 62px; left: 29%; }
  .garden-totoro { width: 64px; height: 85px; left: 51%; }
  .garden-snoopy { width: 72px; height: 78px; left: 76%; }
  .garden-balance { width: 30px; top: 3px; right: 5%; }
  .doodle-garden + .work-section { padding-top: 65px; }
  .doodle-garden > .project-mascot { left: 65%; width: 78px; height: 96px; }
}

/* The arcade borrows the portfolio's paper, ink and cheerful little visitors. */
.site-header nav a[aria-current=page] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.games-hero { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: center; padding-block: 70px 65px; }
.games-hero h1 { font-size: clamp(78px, 8.5vw, 120px); letter-spacing: -.07em; }
.games-hero .hero-description { font-size: 26px; }
.games-intro { max-width: 430px; color: var(--muted); font-size: 16px; }
.games-hero .button { margin-top: 28px; }
.arcade-scene { position: relative; padding: 32px 12px; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .18s ease-out; }
.controller-doodle { width: 100%; animation: controller-float 7s ease-in-out infinite; }
.play-sticker { position: absolute; top: 10px; left: 10px; padding: 12px 18px; border: 2px solid var(--ink); border-radius: 5px; background: var(--mint); transform: rotate(-9deg); font: 700 13px/1.4 ui-monospace, monospace; }
.coin-sticker { position: absolute; right: -10px; bottom: 8px; width: 112px; height: 112px; display: grid; place-content: center; background: var(--yellow); border: 2px solid var(--ink); border-radius: 50%; font-size: 33px; text-align: center; transform: rotate(12deg); line-height: 1; }
.coin-sticker small { font: 700 10px/1.4 ui-monospace, monospace; margin-top: 6px; }
.scene-spark { position: absolute; right: 15px; top: -4px; font-size: 56px; color: #9c6700; animation: sky-twinkle 5s infinite; }
.arcade-section { position: relative; padding-block: 80px 90px; }
.games-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 34px; }
.game-card { min-width: 0; border-bottom: 1px solid var(--line); padding-bottom: 30px; }
.game-art { position: relative; display: block; border-radius: 23px; text-decoration: none; overflow: hidden; transition: transform .3s; }
.game-art:hover { transform: translateY(-5px) rotate(-1deg); }
.game-card:nth-child(even) .game-art:hover { transform: translateY(-5px) rotate(1deg); }
.game-art > svg { display: block; width: 100%; height: auto; }
.game-art-sign { position: absolute; left: 18px; bottom: 14px; padding: 7px 11px; border: 1px solid var(--ink); border-radius: 4px; background: var(--paper); font: 650 10px/1.4 ui-monospace, monospace; transform: rotate(-3deg); }
.game-mascot { display: block; pointer-events: none; }
.game-mascot svg { display: block; width: 100%; height: 100%; fill: none; stroke: var(--ink); stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.game-art > .game-mascot { position: absolute; width: 73px; height: 88px; right: 14px; bottom: 10px; }
.game-art .little-sky { top: 0; height: 52px; }
.game-art .bird-flight { width: 32px; height: 25px; }
.game-art .sky-cloud { width: 43px; height: 23px; }
.game-art .sky-spark { font-size: 18px; }
.game-card-copy { padding-top: 25px; }
.game-card-copy .eyebrow { margin-bottom: 10px; }
.game-card h3 { font-size: 34px; }
.game-card-copy > p:not(.eyebrow) { color: var(--muted); font-size: 16px; max-width: 470px; margin-top: 16px; min-height: 54px; }
.game-card-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 15px; margin-top: 24px; }
.game-card-bottom .button { font-size: 14px; padding: 12px 20px; gap: 15px; }
.game-tag { font: 600 11px/1.5 ui-monospace, monospace; padding: 7px 11px; border: 1px solid var(--line); border-radius: 25px; }
.arcade-note { position: relative; align-self: stretch; background: #edf2e7; border-radius: 20px 70px 20px 20px; padding: 40px 38px 150px; }
.arcade-note h2 { font-size: 42px; }
.arcade-note > p:not(.eyebrow) { font-size: 16px; color: var(--muted); max-width: 350px; margin-top: 22px; }
.arcade-note a { text-underline-offset: 4px; }
.note-flower { display: block; color: #ab5c50; font-size: 56px; line-height: 1; margin-bottom: 30px; animation: doodle-rock 5s infinite; transform-origin: 25px 35px; }
.note-character { position: absolute; width: 99px; height: 113px; right: 32px; bottom: 22px; }
.note-peace { position: absolute; left: 40px; bottom: 35px; font-size: 43px; color: #607f6b; transform: rotate(-14deg); }
.break-footer { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 35px; padding-block: 80px 65px; border-top: 1px solid var(--line); }
.break-footer > span { font-size: 70px; color: #9c6700; }
.break-footer h2 { font-size: 38px; }
.break-footer .button { flex-shrink: 0; }
.pac-chase { animation: pac-chase 3s ease-in-out infinite; }
.ghost-bob { animation: controller-float 2s ease-in-out infinite; }
.invader-march { animation: invader-march 3s steps(4) infinite alternate; }
.tetris-drop { animation: tetris-drop 3.2s ease-in-out infinite; }
.gem-spark { animation: sky-twinkle 4s infinite; transform-box: fill-box; transform-origin: center; }
.motion-off .arcade-scene { transform: none; }
@keyframes controller-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -9px; } }
@keyframes pac-chase { 0%, 100% { translate: -6px 0; } 50% { translate: 14px 0; } }
@keyframes invader-march { from { translate: -12px 0; } to { translate: 12px 7px; } }
@keyframes tetris-drop { 0%, 100% { translate: 0 -6px; } 55%, 75% { translate: 0 10px; } }
@media (max-width: 900px) {
  .site-header nav { gap: 15px; }
  .games-hero { gap: 30px; }
  .games-hero h1 { font-size: 85px; }
  .games-hero .hero-description { font-size: 22px; }
  .coin-sticker { width: 90px; height: 90px; right: -5px; bottom: -2px; }
  .play-sticker { font-size: 10px; padding: 9px 12px; }
  .games-grid { gap: 35px 25px; }
  .arcade-note { padding: 30px 25px 135px; }
  .arcade-note h2 { font-size: 34px; }
  .break-footer > span { display: none; }
}
@media (max-width: 640px) {
  .site-header nav { gap: 8px; font-size: 11px; }
  .site-header nav .nav-contact { padding: 8px 11px; }
  .games-hero { grid-template-columns: 1fr; padding-block: 55px 45px; gap: 42px; }
  .games-hero h1 { font-size: clamp(75px, 20vw, 105px); }
  .games-hero .hero-description { font-size: 23px; }
  .games-intro { font-size: 15px; }
  .arcade-scene { width: 90%; max-width: 420px; justify-self: center; padding-block: 28px; }
  .play-sticker { top: 0; }
  .games-ribbon { grid-template-columns: 1fr; gap: 7px; }
  .arcade-section { padding-block: 65px; }
  .games-grid { grid-template-columns: 1fr; gap: 40px; }
  .game-card h3 { font-size: 32px; }
  .game-art > .game-mascot { width: 54px; height: 65px; right: 8px; bottom: 7px; }
  .game-art-sign { font-size: 8px; left: 11px; bottom: 10px; padding: 5px 8px; }
  .game-card-copy > p:not(.eyebrow) { min-height: 0; }
  .arcade-note { min-height: 460px; padding: 30px 25px 140px; }
  .break-footer { display: block; padding-block: 65px 45px; }
  .break-footer h2 { font-size: 32px; }
  .break-footer .button { margin-top: 28px; }
}
@media (prefers-reduced-motion: reduce) { .arcade-scene { transform: none; } }
