/* moezkayy.com v3: page styles on top of tokens.css (brand/reference, generated; never edit it here).
   Pages use only the classes in this file and the mk-/l- classes in tokens.css. Patterns are listed in PATTERNS.md. */

/* token overrides (tokens.css is generated; override here) */
:root { --page-max: none; --nav-h: 76px; --section-gap: var(--space-xl-3xl); --hero-dim: .45; }

/* ---------- base ---------- */
* { box-sizing: border-box; margin: 0; }
html { background: var(--bg); color: var(--text); -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
body { font: var(--type-body); -webkit-font-smoothing: antialiased; overflow-x: clip; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
main:focus { outline: none; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
ul, ol { padding: 0; }
button { font: inherit; }
h1, h2, h3, h4 { font-weight: inherit; font-size: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
::selection { background: var(--accent-tint); color: var(--on-accent-tint); }
.wm-d, [data-mode="dark"] .wm-l { display: none; }
[data-mode="dark"] .wm-d { display: block; }
.skip { position: fixed; left: var(--margin); top: 8px; z-index: 50; translate: 0 -200%; }
.skip:focus-visible { translate: 0 0; }

/* ---------- type helpers ---------- */
.label { font: var(--type-label); font-stretch: 87.5%; letter-spacing: .08em; text-transform: uppercase; color: var(--text-subtle); }
.label.acc { color: var(--accent); }
.label a { color: inherit; text-decoration: none; }
.label a:hover { color: var(--accent); }
.label a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.htitle { font: var(--type-h4); letter-spacing: var(--type-h4-tracking); margin-top: 4px; }
.lead { font: var(--type-lead); letter-spacing: var(--type-lead-tracking); color: var(--text-muted); max-width: 52ch; }
.muted { color: var(--text-muted); }
.small { font: var(--type-small); }
.tlink { font: var(--type-small); font-size: 15px; font-weight: 650; color: var(--text); text-underline-offset: 5px; text-decoration-color: var(--line-strong); }
.tlink:hover { color: var(--accent); text-decoration-color: var(--accent); }
.tlink:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.acts { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.stack { display: grid; gap: var(--space-m); align-content: start; }
em { font-style: normal; color: var(--accent); }
.term { background: var(--sunken); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 14px 16px; font: var(--type-code); color: var(--text-muted); max-width: 72ch; }
.term .k { color: var(--accent); }

/* ---------- nav and phone menu ---------- */
.mk-nav { transition: box-shadow var(--dur-2), border-color var(--dur-2); }
.mk-nav .brand, .sheet .brand { display: block; padding-block: 8px; }
.brand img { height: 18px; width: auto; }
.brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.sheet__foot .mode-switch { margin: var(--space-s) 0 0; width: 100%; padding: 12px 0; }
.mk-nav__links a { font-size: 15px; font-weight: 550; padding: 8px 12px; }
.mk-nav__links a[aria-current]::after { left: 12px; right: 12px; }
.mk-nav__links { margin-left: auto; }
.mk-nav__cta[aria-current] { background: var(--accent-hover); }
@media (max-width: 760px) { .mk-nav .mode-switch { display: none; } }
.sheet { position: fixed; inset: 0; z-index: 40; background: var(--bg); overflow-y: auto; }
.sheet[hidden] { display: none; }
.sheet__in { min-height: 100%; display: flex; flex-direction: column; padding-bottom: var(--space-l); }
.sheet__head { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); }
.sheet__list { list-style: none; margin-top: var(--space-l); border-top: 1px solid var(--text); }
.sheet__list a { display: flex; justify-content: space-between; align-items: baseline; padding-block: 12px; border-bottom: 1px solid var(--line); text-decoration: none; font: var(--type-h2); letter-spacing: var(--type-h2-tracking); }
.sheet__list a span { font: var(--type-h3); color: var(--accent); }
.sheet__list a:hover { color: var(--accent); }
.sheet__list a:focus-visible { outline: var(--focus-ring) solid var(--accent); outline-offset: 2px; }
.sheet__foot { margin-top: auto; padding-top: var(--space-xl); display: grid; gap: 12px; }
.sheet__foot .mk-btn { width: 100%; }
html.menu-open { overflow: hidden; }

/* ---------- hero (homepage): the fitted name and the working sentence ---------- */
.hero .stage { padding-top: var(--hero-top); }
.name { font: var(--type-display); font-stretch: 125%; letter-spacing: -.01em; text-transform: uppercase; white-space: nowrap; line-height: .8; display: block; }
.hero .grid2 { margin-top: var(--hero-gap); row-gap: var(--hero-gap); }
.hero .hang { grid-column: 1 / span 3; }
.hero .say { grid-column: 4 / -1; min-height: calc(var(--hero-sentence) * 2.4); }
.hero .sentence { font: var(--type-h1); font-size: var(--hero-sentence); letter-spacing: var(--type-h1-tracking); }
.pick { position: relative; display: inline-block; color: var(--accent); border-bottom: .07em solid currentColor; }

/* ---------- inner page header ---------- */
.p-head { padding-top: var(--hero-top); }
.p-head > .l-grid { row-gap: var(--space-s); }
.p-head .l-body { display: grid; gap: var(--space-m); justify-items: start; }
.p-title { font: var(--type-h1); letter-spacing: var(--type-h1-tracking); max-width: 20ch; text-wrap: balance; }
.p-head .tagrow { display: flex; gap: 8px; flex-wrap: wrap; }
.p-head .idea { font: var(--type-lead); letter-spacing: var(--type-lead-tracking); border-left: 2px solid var(--accent); padding-left: var(--space-s); max-width: 52ch; }

/* ---------- sub-grid of nine columns, inside .l-body ---------- */
.sub9 { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); column-gap: var(--gutter); }
@media (max-width: 760px) { .sub9 { grid-template-columns: minmax(0, 1fr); row-gap: 6px; } .sub9 > * { grid-column: 1 / -1 !important; } }

/* ---------- services: accordion (homepage) and rows (index, related) ---------- */
.b-acc details { display: block; width: 100%; border-bottom: 1px solid var(--line); }
.b-acc details:first-child summary { padding-top: 0; }
.b-acc summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding-block: var(--space-s); font: var(--type-h3); letter-spacing: var(--type-h3-tracking); }
.b-acc summary::-webkit-details-marker { display: none; }
.b-acc summary .mark { position: relative; flex: none; width: .9em; height: .9em; color: var(--accent); }
.b-acc summary .mark::before, .b-acc summary .mark::after { content: ""; position: absolute; left: 10%; right: 10%; top: calc(50% - 1px); height: 2px; background: currentColor; }
.b-acc summary .mark::after { rotate: 90deg; transition: rotate var(--dur-2) var(--ease-out); }
.b-acc details[open] summary .mark::after { rotate: 0deg; }
.b-acc details.is-closing summary .mark::after { rotate: 90deg; }
.b-acc details.is-opening summary .mark::after { rotate: 0deg; }
.b-acc .in { overflow: hidden; }
.b-acc summary:hover { color: var(--accent); }
.b-acc summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.b-acc .in { font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem); line-height: 1.6; padding-bottom: var(--space-m); max-width: 60ch; display: grid; gap: 12px; color: var(--text-muted); justify-items: start; }
.b-acc .in ul { padding-left: 18px; font: var(--type-small); display: grid; gap: 4px; }
.a-svc { padding-block: var(--space-s); border-bottom: 1px solid var(--line); align-items: baseline; text-decoration: none; color: inherit; }
.a-svc:first-child { padding-top: 0; }
.a-svc h3 { grid-column: span 4; font: var(--type-h4); }
.a-svc p { grid-column: span 4; font: var(--type-small); color: var(--text-muted); }
.a-svc > span { grid-column: span 1; text-align: right; color: var(--accent); font-weight: 650; }
.a-svc:hover h3 { color: var(--accent); }
.a-svc:focus-visible { outline: var(--focus-ring) solid var(--accent); outline-offset: 4px; }
.a-svc .n { display: block; font: var(--type-label); font-stretch: 87.5%; letter-spacing: .08em; color: var(--text-subtle); margin-bottom: 4px; }

/* ---------- work: outcome-first rows ---------- */
.a-work { padding-block: var(--row-pad); border-bottom: 1px solid var(--line); align-items: baseline; text-decoration: none; color: inherit; }
.a-work:first-child { padding-top: 0; }
.a-work .o { grid-column: span 6; font: var(--type-h3); letter-spacing: var(--type-h3-tracking); text-wrap: balance; }
.a-work .c { grid-column: span 2; font: var(--type-small); color: var(--text-muted); }
.a-work .c b { display: block; font-weight: 650; color: var(--text); }
.a-work .d { grid-column: span 1; font: var(--type-data); font-stretch: 75%; color: var(--text-subtle); text-align: right; }
.a-work:hover .o { color: var(--accent); }
.a-work:focus-visible { outline: var(--focus-ring) solid var(--accent); outline-offset: 4px; }
@media (max-width: 760px) { .a-work .d { text-align: left; } }

/* ---------- projects: image cards ---------- */
.b-proj { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-l) var(--gutter); }
.b-proj > a { text-decoration: none; color: inherit; display: grid; gap: 10px; align-content: start; }
.b-proj img, .b-proj .ph { border-radius: var(--radius-card); aspect-ratio: var(--card-image-aspect); object-fit: cover; width: 100%; border: 1px solid var(--line); }
.b-proj h3 { font: var(--type-h3); letter-spacing: var(--type-h3-tracking); }
.b-proj p { font: var(--type-small); color: var(--text-muted); max-width: 52ch; }
.b-proj .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.b-proj > a:hover h3 { color: var(--accent); }
.b-proj > a:focus-visible { outline: var(--focus-ring) solid var(--accent); outline-offset: 6px; }
.b-proj .ph { background: var(--sunken); display: grid; align-content: end; gap: 2px; padding: var(--space-s); font: var(--type-h4); color: var(--text); }
.b-proj .ph span { display: block; border-top: 1px solid var(--line-strong); padding-top: 6px; }
.b-proj img, .b-proj .ph { transition: translate var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out), border-color var(--dur-2); }
.b-proj > a:hover img, .b-proj > a:focus-visible img, .b-proj > a:hover .ph, .b-proj > a:focus-visible .ph { translate: var(--lift) var(--lift); box-shadow: var(--elev-1); border-color: var(--text); }
.b-proj > a:active img, .b-proj > a:active .ph { translate: 0 0; box-shadow: var(--elev-0); }
@media (max-width: 760px) { .b-proj { grid-template-columns: minmax(0, 1fr); } }

/* ---------- experiences: ink posters ---------- */
.b-doors { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
.door { background: var(--text); color: var(--bg); border-radius: var(--radius-card); padding: var(--space-s); aspect-ratio: auto; min-height: clamp(320px, 32vw, 460px); display: flex; flex-direction: column; gap: 10px; text-decoration: none; }
.door .label { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.door p { font: var(--type-small); color: color-mix(in srgb, var(--bg) 78%, transparent); max-width: 34ch; }
.door-t { margin-top: auto; font-weight: 850; font-stretch: 75%; text-transform: uppercase; letter-spacing: -.01em; line-height: .86; font-size: clamp(44px, 5.2vw, 80px); transition: font-stretch var(--dur-3) var(--ease-out); }
.door-soon, .door-go { align-self: flex-start; font: var(--type-label); font-stretch: 87.5%; letter-spacing: .06em; text-transform: uppercase; padding: 4px 8px; border-radius: var(--radius-control); }
.door-soon { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bg) 45%, transparent); color: color-mix(in srgb, var(--bg) 78%, transparent); }
.door-go { background: var(--accent); color: var(--on-accent); }
.door.is-live { transition: translate var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out); }
.door.is-live:hover, .door.is-live:focus-visible { translate: var(--lift) var(--lift); box-shadow: 4px 4px 0 var(--accent); }
.door.is-live:hover .door-t { font-stretch: 100%; }
.door.is-live:active { translate: 0 0; box-shadow: none; }
.door.is-live:focus-visible { outline: var(--focus-ring) solid var(--accent); outline-offset: 4px; }
@media (max-width: 760px) { .b-doors { grid-template-columns: minmax(0, 1fr); } .door { aspect-ratio: auto; min-height: 260px; } }

/* ---------- about statement, facts ---------- */
.c-state { font: var(--type-h1); letter-spacing: var(--type-h1-tracking); max-width: var(--statement-measure); text-wrap: balance; }
.c-state span, .c-state em { color: var(--accent); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
.facts > div { padding-top: 0; }
.facts strong { display: block; font: var(--type-h2); letter-spacing: var(--type-h2-tracking); }
.facts span { display: block; font: var(--type-small); color: var(--text-muted); margin-top: 6px; max-width: 30ch; }
@media (max-width: 760px) { .facts { grid-template-columns: minmax(0, 1fr); } }

/* ---------- contact: the big email ---------- */
.a-mail { font: var(--type-h1); font-size: clamp(1.5rem, 6vw, 4.768rem); letter-spacing: var(--type-h1-tracking); text-decoration-line: underline; text-decoration-thickness: .05em; text-underline-offset: .12em; color: var(--text); text-decoration-color: var(--accent); overflow-wrap: anywhere; justify-self: start; }
.a-mail:hover { color: var(--accent); }
.a-mail:focus-visible { outline: var(--focus-ring) solid var(--accent); outline-offset: 6px; }

/* ---------- reading blocks (inner pages) ---------- */
.prose, .rows { overflow-wrap: anywhere; }
.prose { font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem); line-height: 1.6; display: grid; gap: var(--space-s); max-width: var(--measure); color: var(--text-muted); }
.prose b, .prose strong { color: var(--text); font-weight: 650; }
.prose a { color: var(--text); text-decoration: underline 1px var(--accent); text-underline-offset: .2em; }
.prose a:hover { color: var(--accent); text-decoration-thickness: 2px; }
.prose a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.prose h3 { font: var(--type-h4); color: var(--text); margin-top: var(--space-xs); }
.prose ul, .prose ol { padding-left: 20px; display: grid; gap: 6px; }
.pull { font: var(--type-h3); letter-spacing: var(--type-h3-tracking); color: var(--text); max-width: 26ch; padding-block: var(--space-xs); text-wrap: balance; }
.rows { list-style: none; }
.rows > li:first-child, .links > a:first-child, .timeline > li:first-child { padding-top: 0; }
.rows > li { padding-block: var(--space-s); border-bottom: 1px solid var(--line); color: var(--text); font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem); line-height: 1.6; }
.rows > li b { color: var(--text); font-weight: 650; }
.rows > li a { color: var(--text); text-decoration: underline 1px var(--accent); text-underline-offset: .2em; }
.rows > li a:hover { color: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.links > a { padding-block: var(--space-s); border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; align-items: baseline; }
.links > a b { grid-column: span 3; font: var(--type-h4); }
.links > a span { grid-column: span 5; font: var(--type-small); color: var(--text-muted); }
.links > a i { grid-column: span 1; font-style: normal; text-align: right; color: var(--accent); font-weight: 650; }
.links > a:hover b { color: var(--accent); }
.links > a:focus-visible { outline: var(--focus-ring) solid var(--accent); outline-offset: 4px; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: var(--space-l) var(--gutter); }
.steps > li { padding-top: 0; display: grid; gap: 6px; align-content: start; }
.steps h3 { font: var(--type-h4); }
.steps p { font: var(--type-small); color: var(--text-muted); }
.timeline { list-style: none; }
.timeline > li { padding-block: var(--space-s); border-bottom: 1px solid var(--line); align-items: baseline; }
.timeline .when { grid-column: span 2; font: var(--type-data); font-stretch: 75%; color: var(--text-subtle); }
.timeline .what { grid-column: span 7; display: grid; gap: 2px; text-decoration: none; color: inherit; }
.timeline .what b { font: var(--type-h4); }
.timeline .what span { font: var(--type-small); color: var(--text-muted); }
.timeline a.what:hover b { color: var(--accent); }
.timeline a.what:focus-visible { outline: var(--focus-ring) solid var(--accent); outline-offset: 4px; }
.quotes { display: grid; gap: var(--space-l); }
.quote { display: grid; gap: 10px; }
.quote blockquote { border-left: 2px solid var(--accent); padding-left: var(--space-s); font: var(--type-lead); letter-spacing: var(--type-lead-tracking); max-width: 52ch; }
.quote figcaption { padding-left: calc(var(--space-s) + 2px); font: var(--type-small); color: var(--text-subtle); }
.quote figcaption b { display: block; color: var(--text); font-weight: 650; }
.shot { display: block; border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden; background: var(--surface); }
.shot img { width: 100%; aspect-ratio: var(--card-image-aspect); object-fit: cover; }
a.shot { transition: translate var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out), border-color var(--dur-2); }
a.shot:hover, a.shot:focus-visible { translate: var(--lift) var(--lift); box-shadow: var(--elev-1); border-color: var(--text); }
a.shot:active { translate: 0 0; box-shadow: var(--elev-0); }
a.shot:focus-visible { outline: var(--focus-ring) solid var(--accent); outline-offset: 4px; }
.shot-cap { margin-top: 10px; }
.next-link { display: flex; justify-content: space-between; align-items: end; gap: var(--space-m); text-decoration: none; color: inherit; }
.next-link .t { display: block; font: var(--type-h2); letter-spacing: var(--type-h2-tracking); margin-top: 4px; }
.next-link .ar { font: var(--type-h2); color: var(--accent); transition: translate var(--dur-2) var(--ease-out); }
.next-link:hover .t { color: var(--accent); }
.next-link:hover .ar { translate: 6px 0; }
.next-link:focus-visible { outline: var(--focus-ring) solid var(--accent); outline-offset: 6px; }
.p-head--portrait .portrait { margin-top: 0; }
.p-head--portrait .portrait { max-width: 260px; }
@media (min-width: 761px) {
  .p-head--portrait .l-body { grid-template-columns: minmax(0, 1fr) minmax(220px, 30%); column-gap: var(--gutter); align-items: start; }
  .p-head--portrait .l-body > :not(.portrait) { grid-column: 1; }
  .p-head--portrait .portrait { grid-column: 2; grid-row: 1 / span 3; align-self: end; max-width: none; justify-self: stretch; }
}
.facts a.tlink { display: inline-block; margin-top: 8px; }
.b-proj > a:only-child { grid-column: 1 / -1; }
@media (min-width: 761px) {
  .b-proj > a:only-child { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: var(--gutter); align-items: center; align-content: center; }
  .b-proj > a:only-child > img, .b-proj > a:only-child > .ph { grid-column: 1; grid-row: 1 / span 3; }
  .b-proj > a:only-child > :not(img):not(.ph) { grid-column: 2; }
}
.portrait { background: var(--sunken); border-radius: var(--radius-card); overflow: hidden; margin-top: var(--space-m); max-width: 320px; }
.portrait img { width: 100%; height: auto; }
@media (max-width: 760px) { .portrait { max-width: 220px; } }

/* ---------- contact form ---------- */
.b-form { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-s); max-width: 720px; }
.b-form .w { grid-column: 1 / -1; }
.sel { position: relative; display: block; }
.sel select.mk-input { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer; }
.sel::after { content: "▾"; position: absolute; right: 16px; top: 50%; translate: 0 -50%; font-size: 18px; color: var(--text); pointer-events: none; }
.b-form .hp { position: absolute; left: -9999px; }
.b-form .status { grid-column: 1 / -1; font: var(--type-small); font-weight: 600; min-height: 1.5em; }
.b-form .status.ok { color: var(--success); }
.b-form .status.err { color: var(--danger); }
.b-form .status a { color: inherit; }
.b-form button { justify-self: start; }
.c-aside { display: grid; gap: var(--space-s); align-content: start; }
.c-aside .links > a b { grid-column: span 2; }
@media (max-width: 760px) { .b-form { grid-template-columns: minmax(0, 1fr); } }

/* ---------- footer: sitemap ---------- */
.foot { margin-top: var(--section-gap); padding-bottom: var(--space-l); }
.foot .l-grid { border-top: 1px solid var(--text); padding-top: var(--space-m); row-gap: var(--space-l); }
.foot .brand img { height: 36px; width: auto; }
.f-brand { grid-column: 1 / span 3; }
.f-brand p { font: var(--type-small); color: var(--text-muted); margin-top: 14px; }
.f-col { grid-column: span 2; }
.f-col:nth-of-type(2) { grid-column: 4 / span 2; }
.foot h2 { font: var(--type-label); font-stretch: 87.5%; letter-spacing: .08em; text-transform: uppercase; color: var(--text-subtle); margin-bottom: 10px; }
.foot ul { list-style: none; display: grid; gap: 6px; font: var(--type-small); }
.foot a { text-decoration: none; color: var(--text-muted); }
.foot a:hover { color: var(--accent); }
.foot a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.foot .fine { grid-column: 1 / -1; font: var(--type-caption); color: var(--text-subtle); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: var(--space-s); }
@media (max-width: 760px) { .f-brand { grid-column: 1 / -1; } .f-col, .f-col:nth-of-type(2) { grid-column: span 2; } }

/* ---------- motion (chapter 08, direction e): type moves on its axes, rules draw in ---------- */
/* reveals: hidden only when scripts run and motion is allowed */
html.js:not(.rm) [data-r] { transition: opacity var(--dur-3) var(--ease-out), translate var(--dur-3) var(--ease-out); }
html.js:not(.rm) [data-r]:not(.is-in) { opacity: 0; translate: 0 var(--rise); }
html.js:not(.rm) .l-section > .l-wrap > .l-grid { border-top-color: transparent; background: linear-gradient(var(--text), var(--text)) top left / 0 1px no-repeat; transition: background-size var(--dur-4) var(--ease-out); }
html.js:not(.rm) .l-section.in-rule > .l-wrap > .l-grid { background-size: 100% 1px; }
html.js:not(.rm) .l-section .htitle { font-weight: 300; transition: font-weight var(--dur-4) var(--ease-out) 200ms; }
html.js:not(.rm) .l-section.in-rule .htitle { font-weight: 750; }
html.rm .l-section .htitle, html:not(.js) .l-section .htitle { font-weight: 750; }
/* hero: the name paints at once, narrow and light, then widens and gains weight; the rest fades in under it */
html.js:not(.rm) .hero .name { transition: font-stretch var(--dur-4) var(--ease-out), font-weight var(--dur-4) var(--ease-out); }
html.js:not(.rm) .hero:not(.hero-in) .name { font-stretch: 75%; font-weight: 400; }
html.js:not(.rm) .hero.hero-in .grid2 > * { transition: opacity var(--dur-3) var(--ease-standard); }
html.js:not(.rm) .hero:not(.hero-in) .grid2 > * { opacity: 0; }
/* a changed word rolls like a departures board */
@keyframes roll { 0% { translate: 0 0; opacity: 1; } 45% { translate: 0 -.5em; opacity: 0; } 55% { translate: 0 .5em; opacity: 0; } 100% { translate: 0 0; opacity: 1; } }
html:not(.rm) .pick.rolling { animation: roll var(--dur-3) var(--ease-standard); }
html:not(.rm) .mk-nav__links a { transition: font-weight var(--dur-2) var(--ease-out); }
html:not(.rm) .mk-nav__links a:hover { font-weight: 750; }
.mk-btn { transition-duration: var(--dur-1); }

/* page to page: the case title morphs from the work list (same view-transition-name on both pages) */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--dur-2); animation-timing-function: var(--ease-standard); }
  ::view-transition-group(*) { animation-duration: var(--dur-3); animation-timing-function: var(--ease-standard); }
}

@media print { .mk-nav, .sheet, .skip, .foot .f-col { display: none; } }

/* text highlight: the whole text sweeps teal from the side the pointer entered, fine pointers only */
@media (hover: hover) and (pointer: fine) {
  @supports ((-webkit-background-clip: text) or (background-clip: text)) {
    html:not(.rm) :is(.name, .p-title, .c-state, .a-work .o, .a-mail, .door-t) {
      --spot-base: var(--text);
      background-image: linear-gradient(90deg, var(--accent) 50%, var(--spot-base) 50%);
      background-size: 200% 100%; background-position: 100% 0; background-repeat: no-repeat;
      -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
      transition: background-position var(--dur-3) var(--ease-out);
    }
    html:not(.rm) .door-t { --spot-base: var(--bg); }
    html:not(.rm) :is(.name, .p-title, .c-state, .a-work .o, .a-mail, .door-t) :is(span, em) { -webkit-text-fill-color: currentColor; }
    html:not(.rm) :is(.name, .p-title, .c-state, .a-work .o, .a-mail, .door-t).spot-r { background-image: linear-gradient(90deg, var(--spot-base) 50%, var(--accent) 50%); background-position: 0 0; }
    html:not(.rm) :is(.name, .p-title, .c-state, .a-work .o, .a-mail, .door-t).spot { background-position: 0 0; }
    html:not(.rm) :is(.name, .p-title, .c-state, .a-work .o, .a-mail, .door-t).spot-r.spot { background-position: 100% 0; }
    html:not(.rm) :is(.name, .p-title, .c-state, .a-work .o, .a-mail, .door-t).spot span,
    html:not(.rm) :is(.name, .p-title, .c-state, .a-work .o, .a-mail, .door-t).spot em { background: none; color: transparent; -webkit-text-fill-color: transparent; }
    html:not(.rm) .a-mail.spot { text-decoration-color: var(--accent); }
  }
}

/* ---------- inner page rhythm (big-type lists, numbered rows) ---------- */
.big-list { list-style: none; }
.big-list > li { padding-block: var(--space-xs); border-bottom: 1px solid var(--line); font-weight: 700; font-size: clamp(1.5rem, 1rem + 2vw, 2.75rem); line-height: 1.08; letter-spacing: -.03em; color: var(--text); text-wrap: balance; overflow-wrap: anywhere; }
.big-list > li:first-child { padding-top: 0; }
.num-rows { list-style: none; }
.num-rows > li { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 7fr); column-gap: var(--space-s); padding-block: var(--space-s); border-bottom: 1px solid var(--line); color: var(--text); font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem); line-height: 1.6; overflow-wrap: anywhere; }
.num-rows > li:first-child { padding-top: 0; }
.num-rows .n { font-family: var(--font-sans); font-weight: 850; font-stretch: 75%; font-size: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); line-height: .9; color: var(--accent); }
.num-rows b { display: block; font: var(--type-h4); font-weight: 650; color: var(--text); margin-bottom: 4px; }
@media (max-width: 760px) { .num-rows > li { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-xs); } }
.statement { font: var(--type-h2); letter-spacing: var(--type-h2-tracking); max-width: 24ch; text-wrap: balance; color: var(--text); }
.statement em { font-style: normal; color: var(--accent); }
/* (rhythm block end) */

/* ---------- homepage hero + selected work (v4) ---------- */
.hero .grid2 { align-items: start; }
.hero .hang { padding-top: .5em; }
.hero .say { grid-column: 4 / -1; border-left: 1px solid var(--line-strong); padding-left: var(--gutter); min-height: 0; display: grid; gap: var(--space-s); justify-items: start; }
.hero .subline { font: var(--type-lead); letter-spacing: var(--type-lead-tracking); color: var(--text-muted); max-width: 52ch; }
.hero .acts { gap: var(--space-s) var(--space-m); }
.tlink-acc { font: var(--type-small); font-size: 15px; font-weight: 650; color: var(--accent); text-decoration: none; }
.tlink-acc .mk-ar { display: inline-block; transition: translate var(--dur-2) var(--ease-out); }
.tlink-acc:hover .mk-ar, .tlink-acc:focus-visible .mk-ar { translate: 4px 0; }
.tlink-acc:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.hero .sel { margin-top: var(--space-l); border-top: 1px solid var(--line-strong); padding-top: var(--space-s); }
.sel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: var(--space-s); }
.sel-title { font: var(--type-label); font-size: 14px; font-stretch: 87.5%; letter-spacing: .16em; text-transform: uppercase; color: var(--text); }
.sel-count { font: var(--type-label); font-size: 14px; letter-spacing: .08em; color: var(--accent); font-variant-numeric: tabular-nums; }
.sel-cards { display: grid; padding-bottom: var(--space-l); }
.sel-set { grid-area: 1 / 1; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gutter); visibility: hidden; transition: visibility 0s linear 300ms; }
.sel-set.is-on { visibility: visible; transition-delay: 0s; }
@media (min-width: 761px) { .sel-set { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sel-set .sel-card { opacity: 0; translate: 0 12px; transition: opacity 260ms var(--ease-out), translate 360ms var(--ease-out), box-shadow var(--dur-2) var(--ease-out), border-color var(--dur-2); will-change: opacity, translate; }
.sel-set.is-on .sel-card { opacity: 1; translate: 0 0; transition-delay: calc(var(--i, 0) * 80ms + 120ms), calc(var(--i, 0) * 80ms + 120ms), 0s, 0s; }
.sel-set.is-on .sel-card:hover, .sel-set.is-on .sel-card:focus-visible { translate: var(--lift) var(--lift); transition-delay: 0s; }
.sel-card { position: relative; display: flex; flex-direction: column; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 2px; overflow: hidden; transition: translate var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out), border-color var(--dur-2), opacity 200ms var(--ease-out); }
.sel-card .mock, .mock-slot .mock { display: block; width: 100%; aspect-ratio: 1200 / 700; background: var(--sunken); overflow: hidden; }
.sel-body { position: relative; display: grid; gap: 6px; padding: var(--space-s); padding-bottom: calc(var(--space-s) + 4px); align-content: start; flex: 1; }
.sel-body .label { font-size: 11px; }
.sel-body h3 { font: var(--type-h3); letter-spacing: var(--type-h3-tracking); transition: color var(--dur-2); padding-right: 28px; }
.sel-body p { font: var(--type-small); color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sel-arrow { position: absolute; right: var(--space-s); bottom: var(--space-s); color: var(--accent); font: var(--type-h3); line-height: 1; transition: translate var(--dur-2) var(--ease-out); }
.sel-card:hover, .sel-card:focus-visible { translate: var(--lift) var(--lift); box-shadow: var(--elev-1); border-color: var(--text); }
.sel-card:hover h3, .sel-card:focus-visible h3 { color: var(--accent); }
.sel-card:hover .sel-arrow, .sel-card:focus-visible .sel-arrow { translate: 4px 0; }
.sel-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@keyframes sel-in { from { opacity: 0; translate: 0 12px; } }
.mock-slot { display: block; }
.b-proj .mock-slot { border-radius: var(--radius-card); border: 1px solid var(--line); overflow: hidden; transition: translate var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out), border-color var(--dur-2); }
.b-proj > a:hover .mock-slot, .b-proj > a:focus-visible .mock-slot { translate: var(--lift) var(--lift); box-shadow: var(--elev-1); border-color: var(--text); }
@media (max-width: 760px) {
  .hero .hang, .hero .say { grid-column: 1 / -1; }
  .hero .say { border-left: 0; padding-left: 0; }
  .hero .acts { flex-direction: column; align-items: stretch; width: 100%; gap: var(--space-xs); }
  .hero .acts .mk-btn { width: 100%; justify-content: center; }
  .hero .acts .tlink-acc { text-align: center; padding-block: 10px; }
}
.sel-head { flex-wrap: wrap; align-items: center; }
.sel-tabs { display: flex; gap: var(--gutter); flex: 1; min-width: 0; margin-inline: var(--space-l); }
.sel-tab { position: relative; flex: 1 1 0; min-width: 0; padding: 10px 0 12px; background: none; border: 0; border-top: 3px solid var(--line); cursor: pointer; text-align: left; color: var(--text-subtle); font: var(--type-label); font-stretch: 87.5%; letter-spacing: .06em; text-transform: uppercase; transition: color var(--dur-2); }
.sel-tab .t-short { display: none; }
.sel-tab span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-tab i { position: absolute; left: 0; right: 0; top: -3px; height: 3px; background: var(--accent); transform-origin: left; scale: 0 1; }
.sel-tab[aria-selected="true"] { color: var(--text); }
.sel-tab[aria-selected="true"] i { scale: 1 1; }
.sel-tab.is-run i { animation: sel-fill var(--left, 3500ms) linear both; }
.sel-tab.is-held i { animation-play-state: paused; }
@keyframes sel-fill { from { scale: var(--done, 0) 1; } to { scale: 1 1; } }
.sel-tab:hover { color: var(--accent); }
.sel-tab:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (max-width: 760px) { .sel-tabs { order: 3; flex-basis: 100%; margin-inline: 0; gap: 8px; } .sel-tab { flex: 1 1 0; font-size: 10px; } .sel-tab .t-long { display: none; } .sel-tab .t-short { display: block; } }
/* entrance: the selected work row follows the sentence in, instead of showing before it */
html.js:not(.rm) .hero .sel-head, html.js:not(.rm) .hero .sel-cards { transition: opacity var(--dur-3) var(--ease-out), translate var(--dur-3) var(--ease-out); }
html.js:not(.rm) .hero .sel-head { transition-delay: 700ms; }
html.js:not(.rm) .hero .sel-cards { transition-delay: 820ms; }
html.js:not(.rm) .hero:not(.hero-in) .sel-head, html.js:not(.rm) .hero:not(.hero-in) .sel-cards { opacity: 0; translate: 0 var(--rise); }
/* the product screens come alive as their set appears: meters fill, chat bubbles and rows rise in */
html:not(.rm) .sel-set .mk-m-meter i { transform-origin: left; scale: 0 1; transition: scale 700ms var(--ease-out); }
html:not(.rm) .sel-set.is-on .mk-m-meter i { scale: 1 1; transition-delay: calc(var(--i, 0) * 80ms + 300ms); }
html:not(.rm) .sel-set .mk-m-bubble { opacity: 0; translate: 0 6px; transition: opacity 400ms var(--ease-out), translate 400ms var(--ease-out); }
html:not(.rm) .sel-set.is-on .mk-m-bubble { opacity: 1; translate: 0 0; }
html:not(.rm) .sel-set.is-on .mk-m-bubble:nth-child(1) { transition-delay: 450ms; }
html:not(.rm) .sel-set.is-on .mk-m-bubble:nth-child(2) { transition-delay: 650ms; }
html:not(.rm) .sel-set.is-on .mk-m-bubble:nth-child(3) { transition-delay: 850ms; }
html:not(.rm) .sel-set.is-on .mk-m-bubble:nth-child(n+4) { transition-delay: 1050ms; }
/* light/dark crossfade */
::view-transition-old(root), ::view-transition-new(root) { mix-blend-mode: normal; }
html.mode-fade::view-transition-old(root), html.mode-fade::view-transition-new(root) { animation-duration: 320ms; animation-timing-function: var(--ease-standard); }
/* (hero v4 end) */

/* ---------- switch, buttons, accordion motion (v4) ---------- */
.mode-switch { display: inline-flex; align-items: center; gap: 12px; margin-right: 8px; padding: 0; background: none; border: 0; border-radius: 999px; font: var(--type-label); font-stretch: 87.5%; letter-spacing: .08em; text-transform: uppercase; color: var(--text); cursor: pointer; transition: scale 120ms var(--ease-out); }
.mode-switch:active { scale: .96; }
.mode-switch__track { position: relative; display: block; flex: none; width: 76px; height: 36px; box-sizing: border-box; border: 1px solid var(--line-strong); border-radius: 999px; background: color-mix(in srgb, var(--text) 6%, transparent); transition: border-color var(--dur-2) var(--ease-out); }
.mode-switch:hover .mode-switch__track { border-color: var(--text); }
.mode-switch__knob { position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); transition: translate 320ms var(--ease-out); }
.mode-switch[aria-checked="true"] .mode-switch__knob { translate: 40px 0; }
.mode-switch__ic { position: absolute; top: 9px; width: 16px; height: 16px; transition: color 320ms var(--ease-out), rotate 320ms var(--ease-out), opacity 320ms var(--ease-out); }
.mode-switch__sun { left: 9px; color: var(--on-accent); rotate: 0deg; }
.mode-switch__moon { left: 49px; color: var(--text-subtle); rotate: -20deg; }
.mode-switch[aria-checked="true"] .mode-switch__sun { color: var(--text-subtle); rotate: 45deg; }
.mode-switch[aria-checked="true"] .mode-switch__moon { color: var(--on-accent); rotate: 0deg; }
.mode-switch:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.mode-switch__text { min-width: 5ch; text-align: left; }
html.rm .mode-switch, html.rm .mode-switch__track, html.rm .mode-switch__knob, html.rm .mode-switch__ic { transition: none; }

/* buttons: lift, hard offset shadow, press, click wave */
.mk-btn { position: relative; }
html:not(.rm) .mk-btn { transition: background-color .15s, border-color .15s, color .15s, translate 160ms var(--ease-out), box-shadow 160ms var(--ease-out), scale 80ms; }
html:not(.rm) .mk-btn:not(:disabled):hover { translate: 0 -2px; box-shadow: 3px 3px 0 color-mix(in srgb, var(--text) 85%, transparent); }
html:not(.rm) .mk-btn:not(:disabled):active { translate: 0 0; box-shadow: none; scale: .98; transition-duration: 80ms; }
.mk-btn::after { content: ""; position: absolute; inset: -1px; border: 2px solid var(--accent); border-radius: var(--radius-control); opacity: 0; pointer-events: none; }
@keyframes mk-wave { from { inset: -1px; opacity: 1; } to { inset: -7px; opacity: 0; } }
html:not(.rm) .mk-btn.is-wave::after { animation: mk-wave 400ms var(--ease-out) forwards; }
.tlink, .tlink-acc { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; padding-bottom: 3px; }
.tlink { background-image: linear-gradient(var(--line-strong), var(--line-strong)); background-size: 100% 1px; }
.tlink:hover { background-image: linear-gradient(var(--accent), var(--accent)); }
html:not(.rm) .tlink, html:not(.rm) .tlink-acc { transition: color var(--dur-1), background-size 280ms var(--ease-out); }
html:not(.rm) .tlink { background-image: linear-gradient(var(--accent), var(--accent)), linear-gradient(var(--line-strong), var(--line-strong)); background-size: 0 1px, 100% 1px; background-position: 0 100%; background-repeat: no-repeat; }
html:not(.rm) .tlink:hover { background-size: 100% 1px, 100% 1px; }
html:not(.rm) .tlink-acc:hover, .tlink-acc:hover { background-size: 100% 1px; }

/* accordion */
.b-acc summary { transition: padding-left 450ms cubic-bezier(.16,1,.3,1), color 300ms; }
.b-acc details[open]:not(.is-closing) summary { padding-left: 8px; color: var(--accent); }
html.rm .b-acc summary { transition: none; }
a.skip.mk-btn { position: fixed; }
/* (controls v4 end) */

/* ===== articles (index rows) ===== */
.a-art { padding-block: var(--space-s); border-bottom: 1px solid var(--line); align-items: baseline; text-decoration: none; color: inherit; }
.a-art:first-child { padding-top: 0; }
.a-art time { grid-column: span 2; }
.a-art .t { grid-column: span 6; }
.a-art h3 { font: var(--type-h4); text-wrap: balance; }
.a-art p { font: var(--type-small); color: var(--text-muted); margin-top: 4px; }
.a-art > span { grid-column: span 1; text-align: right; color: var(--accent); font-weight: 650; }
.a-art:hover h3 { color: var(--accent); }
.a-art:focus-visible { outline: var(--focus-ring) solid var(--accent); outline-offset: 4px; }
@media (max-width: 760px) { .a-art > span { text-align: left; } }
#articles .tlink { display: inline-block; margin-top: var(--space-s); }
/* (articles end) */
