@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(assets/fonts/plex-sans-var.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url(assets/fonts/plex-cond-700.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(assets/fonts/plex-mono-400.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(assets/fonts/plex-mono-500.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 600; font-display: swap; src: url(assets/fonts/plex-arabic-600.woff2) format("woff2"); }
:root {
--fog: #EEF1F5;
--paper: #FFFFFF;
--ink: #0F141A;
--graphite: #59636F;
--line: #D6DCE3;
--cobalt: #2348F5;
--cobalt-ink: #FFFFFF;
--amber: #E39B2D;
--shadow: 0 1px 2px rgba(15, 20, 26, .06), 0 12px 32px -12px rgba(15, 20, 26, .22);
--f-display: "IBM Plex Sans Condensed", "Arial Narrow", sans-serif;
--f-body: "IBM Plex Sans", system-ui, sans-serif;
--f-mono: "IBM Plex Mono", ui-monospace, monospace;
--f-ar: "IBM Plex Sans Arabic", "Noto Sans Arabic", sans-serif;
--wrap: 1200px;
--gut: clamp(20px, 4vw, 40px);
--r: 10px;
--ease: cubic-bezier(.2, .7, .2, 1);
color-scheme: light;
}
[data-theme="dark"] {
--fog: #0D1117;
--paper: #151B23;
--ink: #E8ECF1;
--graphite: #8E98A4;
--line: #263040;
--cobalt: #7B93FF;
--cobalt-ink: #0D1117;
--amber: #F0B04B;
--shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px -16px rgba(0, 0, 0, .7);
color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
--fog: #0D1117;
--paper: #151B23;
--ink: #E8ECF1;
--graphite: #8E98A4;
--line: #263040;
--cobalt: #7B93FF;
--cobalt-ink: #0D1117;
--amber: #F0B04B;
--shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px -16px rgba(0, 0, 0, .7);
color-scheme: dark;
}
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
margin: 0;
background: var(--fog);
color: var(--ink);
font: 400 17px/1.6 var(--f-body);
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3, p { margin: 0; }
[lang="ar"] { font-family: var(--f-ar); }
::selection { background: color-mix(in srgb, var(--cobalt) 26%, transparent); color: var(--ink); }
html { accent-color: var(--cobalt); caret-color: var(--cobalt); scrollbar-color: color-mix(in srgb, var(--graphite) 55%, transparent) var(--fog); }
.stack, .meta, .when, .site-sub, .m-stack { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.skip {
position: absolute; left: 12px; top: -60px; z-index: 50;
background: var(--ink); color: var(--fog); padding: 10px 14px; border-radius: 6px;
}
.skip:focus { top: 12px; }
.btn {
display: inline-flex; align-items: center; gap: .5em;
padding: 12px 20px; border-radius: 8px;
background: var(--cobalt); color: var(--cobalt-ink);
font: 600 15px/1 var(--f-body); text-decoration: none;
border: 1px solid var(--cobalt);
transition: transform .2s var(--ease), background-color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { border-color: var(--graphite); }
.btn-small { padding: 9px 14px; font-size: 14px; }
.bar {
position: sticky; top: 0; z-index: 20;
background: color-mix(in srgb, var(--fog) 82%, transparent);
backdrop-filter: saturate(1.4) blur(12px);
-webkit-backdrop-filter: saturate(1.4) blur(12px);
border-bottom: 1px solid transparent;
transition: border-color .2s;
}
.bar.scrolled { border-bottom-color: var(--line); }
.bar-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.mark {
font: 700 18px/1 var(--f-display); letter-spacing: .02em; text-decoration: none;
border: 1.5px solid var(--ink); border-radius: 6px; padding: 6px 7px;
}
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { font-size: 15px; color: var(--graphite); text-decoration: none; padding: 6px 0; }
.nav a:hover, .nav a.on { color: var(--ink); }
.nav a.on { box-shadow: inset 0 -2px 0 var(--cobalt); }
.bar-actions { display: flex; align-items: center; gap: 10px; }
.theme {
width: 38px; height: 38px; display: grid; place-items: center;
background: transparent; color: var(--ink);
border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
}
.theme svg { width: 18px; height: 18px; }
.hero { padding: clamp(40px, 7vw, 88px) 0 0; overflow: hidden; }
.hero-grid {
display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
gap: clamp(28px, 5vw, 64px); align-items: center;
}
.status { display: flex; align-items: center; gap: 10px; margin-top: 22px; font-size: 14.5px; color: var(--graphite); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px color-mix(in srgb, var(--amber) 22%, transparent); flex: none; }
.name {
margin-top: 0;
font: 700 clamp(52px, 8.4vw, 104px)/.9 var(--f-display);
letter-spacing: -.025em;
}
.name-ar {
margin-top: 10px;
font: 600 clamp(26px, 3.4vw, 40px)/1.2 var(--f-ar);
color: var(--cobalt);
text-align: left;
}
.lede { margin-top: 26px; font-size: clamp(17px, 1.6vw, 19.5px); line-height: 1.55; max-width: 34em; }
.role-line { margin-top: 16px; font: 500 15px/1.5 var(--f-body); color: var(--graphite); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.screens { position: relative; aspect-ratio: 1 / .82; min-height: 320px; }
.screen {
position: absolute; margin: 0;
background: var(--paper); border: 1px solid var(--line);
border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow);
}
.screen img { width: 100%; }
.s1 { width: 80%; top: 0; right: 0; }
.s2 { width: 72%; left: 0; top: 34%; }
.s3 { width: 25%; right: 4%; bottom: -4%; border-radius: 18px; border-width: 5px; border-color: #161B22; }
.s3 img { aspect-ratio: 575 / 860; object-fit: cover; object-position: top; }
.chrome {
display: flex; align-items: center; gap: 6px;
height: 28px; padding: 0 10px;
background: var(--fog); border-bottom: 1px solid var(--line);
}
.chrome i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.chrome span { margin-left: 8px; font: 400 11.5px/1 var(--f-mono); color: var(--graphite); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ready .hero-copy > * { animation: rise .7s var(--ease) both; }
.ready .hero-copy > :nth-child(2) { animation-delay: .06s; }
.ready .hero-copy > :nth-child(3) { animation-delay: .12s; }
.ready .hero-copy > :nth-child(4) { animation-delay: .18s; }
.ready .hero-copy > :nth-child(5) { animation-delay: .24s; }
.ready .hero-copy > :nth-child(6) { animation-delay: .30s; }
.ready .s1 { animation: slide .9s var(--ease) .15s both; }
.ready .s2 { animation: slide .9s var(--ease) .32s both; }
.ready .s3 { animation: slide .9s var(--ease) .5s both; }
@keyframes rise { from { transform: translateY(14px); } to { transform: none; } }
@keyframes slide { from { transform: translateY(36px) scale(.97); } to { transform: none; } }
.ledger {
display: grid; grid-template-columns: repeat(3, 1fr);
margin-top: clamp(48px, 7vw, 84px);
border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.ledger > div { padding: 18px 20px; border-left: 1px solid var(--line); }
.ledger > div:nth-child(3n+1) { padding-left: 0; border-left: 0; }
.ledger > div:nth-child(n+4) { border-top: 1px solid var(--line); }
.ledger dt { font: 500 11.5px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--graphite); }
.ledger dd { margin-top: 8px; font: 600 16px/1.35 var(--f-body); }
.work, .exp, .skills, .contact { padding: clamp(64px, 9vw, 120px) 0 0; }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 40px; margin-bottom: clamp(36px, 5vw, 60px); }
.sec-head h2 { font: 700 clamp(34px, 4.6vw, 54px)/1 var(--f-display); letter-spacing: -.02em; }
.sec-head p { max-width: 30em; color: var(--graphite); font-size: 15.5px; }
.case {
display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
gap: clamp(28px, 5vw, 64px); align-items: center;
padding: clamp(36px, 5vw, 56px) 0;
border-top: 1px solid var(--line);
}
.case.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.case.flip .case-text { order: 2; }
.case.flip .case-media { order: 1; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font: 500 12.5px/1.4 var(--f-mono); color: var(--graphite); }
.live { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.case h3 {
margin-top: 14px;
font: 700 clamp(32px, 3.6vw, 44px)/1 var(--f-display); letter-spacing: -.015em;
display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px;
}
.case h3 [lang="ar"] { font: 600 .62em/1.2 var(--f-ar); color: var(--cobalt); letter-spacing: 0; }
.what { margin-top: 14px; font-size: 18px; line-height: 1.5; }
.role { margin-top: 16px; padding: 12px 14px; background: color-mix(in srgb, var(--cobalt) 7%, var(--paper)); border: 1px solid color-mix(in srgb, var(--cobalt) 22%, var(--line)); border-radius: 8px; font-size: 15.5px; }
.role b { font-weight: 600; color: var(--cobalt); }
.did { margin-top: 16px; display: grid; gap: 9px; }
.did li { position: relative; padding-left: 18px; font-size: 15.5px; line-height: 1.55; color: var(--ink); }
.did li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 1.5px; background: var(--graphite); }
.stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.stack li { font: 500 12px/1 var(--f-mono); padding: 6px 8px; border: 1px solid var(--line); border-radius: 5px; color: var(--graphite); }
.links { margin-top: 8px; }
.links a { display: inline-block; padding: 10px 0; font-weight: 600; color: var(--cobalt); text-decoration: none; }
.links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.shot {
display: block; width: 100%; padding: 0; cursor: zoom-in;
background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
overflow: hidden; box-shadow: var(--shadow); color: inherit; font: inherit; text-align: left;
transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.shot:hover { transform: translateY(-4px); }
.shot img { width: 100%; }
.case-media.pair { display: grid; grid-template-columns: 1fr; position: relative; }
.case-media.pair .shot:first-child { width: 88%; }
.case-media.pair .shot:last-child { width: 62%; margin: -22% 0 0 auto; position: relative; }
.case-media.phones { display: flex; justify-content: center; gap: clamp(14px, 3vw, 32px); }
.shot.phone { width: min(44%, 270px); border: 6px solid #161B22; border-radius: 26px; }
.shot.phone img { aspect-ratio: 575 / 1000; object-fit: cover; }
.case-media.phones .shot.phone:last-child { margin-top: 48px; }
.case-media.crm { display: grid; grid-template-columns: 1fr 34%; gap: 16px; align-items: start; }
.shot.tall img { aspect-ratio: 753 / 1040; object-fit: cover; object-position: top; }
.case-media.crm .shot.tall { margin-top: 40px; }
.sites { padding: clamp(36px, 5vw, 56px) 0; border-top: 1px solid var(--line); }
.sites-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 64px); align-items: baseline; }
.sites-head h3 { font: 700 clamp(28px, 3vw, 36px)/1 var(--f-display); }
.sites-head p { color: var(--graphite); font-size: 15.5px; }
.site-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; }
.site { display: block; text-decoration: none; }
.site-img { display: block; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.site-img img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top; transition: transform .6s var(--ease); }
.site:hover .site-img img { transform: scale(1.04); }
.site-name { display: block; margin-top: 14px; font: 600 17px/1.3 var(--f-body); }
.site-sub { display: block; margin-top: 4px; font: 400 12.5px/1.4 var(--f-mono); color: var(--graphite); }
.more { padding: clamp(36px, 5vw, 56px) 0 0; border-top: 1px solid var(--line); }
.more h3 { font: 700 clamp(28px, 3vw, 36px)/1 var(--f-display); margin-bottom: 20px; }
.more-list li {
display: grid; grid-template-columns: 190px minmax(0, 1fr) 250px 100px;
gap: 8px 24px; align-items: baseline;
padding: 16px 0; border-bottom: 1px solid var(--line);
}
.m-name { font-weight: 600; }
.m-what { color: var(--ink); font-size: 15.5px; }
.m-stack, .m-none { font: 400 12.5px/1.4 var(--f-mono); color: var(--graphite); }
.more-list a { font: 600 14px/1 var(--f-body); color: var(--cobalt); text-decoration: none; justify-self: end; padding: 12px 0 12px 12px; margin: -12px 0; }
.more-list a:hover { text-decoration: underline; text-underline-offset: 3px; }
.m-none { justify-self: end; }
.timeline > li {
display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 8px 40px;
padding: 28px 0; border-top: 1px solid var(--line);
}
.when { font: 500 13.5px/1.6 var(--f-mono); color: var(--graphite); }
.timeline h3 { font: 600 22px/1.25 var(--f-body); }
.where { margin-top: 4px; color: var(--graphite); font-size: 15.5px; }
.timeline .did { max-width: 46em; }
.certs { margin-top: 24px; padding-top: 28px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 8px 40px; }
.certs h3 { font: 500 13.5px/1.6 var(--f-mono); color: var(--graphite); }
.certs ul { display: grid; gap: 10px; }
.certs li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.certs li a { font-weight: 600; color: var(--cobalt); text-decoration: none; }
.certs li a:hover { text-decoration: underline; text-underline-offset: 3px; }
.c-name { font-weight: 600; }
.certs li > span:last-child { font: 400 12.5px/1.6 var(--f-mono); color: var(--graphite); }
.skill-list > div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 6px 40px; padding: 18px 0; border-top: 1px solid var(--line); }
.skill-list > div:last-child { border-bottom: 1px solid var(--line); }
.skill-list dt { font: 500 13.5px/1.6 var(--f-mono); color: var(--graphite); }
.skill-list dd { font-size: 16px; }
.contact { padding-bottom: clamp(64px, 9vw, 110px); }
.contact-grid {
display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 64px);
padding: clamp(32px, 5vw, 56px); background: var(--ink); color: var(--fog); border-radius: 16px;
}
.contact h2 { font: 700 clamp(32px, 4.4vw, 52px)/1.02 var(--f-display); letter-spacing: -.02em; }
.contact-grid > div > p { margin-top: 16px; color: color-mix(in srgb, var(--fog) 72%, var(--ink)); }
.big-mail {
display: inline-block; margin-top: 28px;
font: 600 clamp(18px, 2.4vw, 28px)/1.2 var(--f-body); text-decoration: none;
border-bottom: 2px solid var(--amber); padding-bottom: 4px; word-break: break-all;
}
.big-mail:hover { color: var(--amber); }
.contact-list { display: grid; align-content: center; }
.contact-list li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid color-mix(in srgb, var(--fog) 18%, var(--ink)); }
.contact-list li span { font: 400 12.5px/1.6 var(--f-mono); color: color-mix(in srgb, var(--fog) 62%, var(--ink)); }
.contact-list a { font-weight: 600; text-decoration: none; text-align: right; }
.contact-list a:hover { color: var(--amber); }
.contact :focus-visible { outline-color: var(--amber); }
.foot { border-top: 1px solid var(--line); }
.foot-inner { display: flex; justify-content: space-between; padding: 22px var(--gut); font: 400 12.5px/1 var(--f-mono); color: var(--graphite); }
.foot a { text-decoration: none; padding: 10px 0; margin: -10px 0; }
.foot a:hover { color: var(--ink); }
.js .reveal .shot, .js .reveal .site-img { clip-path: inset(0 0 100% 0 round var(--r)); transition: clip-path 1s var(--ease) .15s, transform .35s var(--ease); }
.js .reveal.in .shot, .js .reveal.in .site-img { clip-path: inset(0 0 0 0 round var(--r)); }
.js .reveal .shot.phone { clip-path: inset(0 0 100% 0 round 26px); }
.js .reveal.in .shot.phone { clip-path: inset(0 0 0 0 round 26px); }
.viewer {
width: min(1200px, 94vw); max-height: 92vh; padding: 0;
border: 1px solid var(--line); border-radius: 12px;
background: var(--paper); color: var(--ink); overflow: auto;
}
.viewer::backdrop { background: rgba(8, 11, 15, .78); backdrop-filter: blur(3px); }
.viewer img { width: 100%; }
.viewer p { padding: 14px 18px; font: 400 13px/1.4 var(--f-mono); color: var(--graphite); }
.viewer form { position: sticky; top: 0; display: flex; justify-content: flex-end; padding: 10px; background: var(--paper); border-bottom: 1px solid var(--line); z-index: 1; }
.close { font: 600 14px/1 var(--f-body); padding: 9px 14px; border-radius: 7px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; }
.viewer.narrow { width: min(460px, 94vw); }
@media (max-width: 980px) {
.hero-grid, .case, .case.flip, .sites-head, .contact-grid { grid-template-columns: minmax(0, 1fr); }
.case.flip .case-text, .case.flip .case-media { order: 0; }
.case-media { order: -1; }
.case.flip .case-media { order: -1; }
.screens { max-width: 640px; }
.more-list li { grid-template-columns: 1fr auto; }
.m-what { grid-column: 1 / -1; grid-row: 2; }
.m-stack { grid-column: 1; grid-row: 3; }
.more-list a, .m-none { grid-column: 2; grid-row: 1; }
}
@media (max-width: 720px) {
body { font-size: 16px; }
.bar-inner { flex-wrap: wrap; height: auto; padding-top: 10px; gap: 4px 12px; }
.bar-actions { margin-left: auto; }
.nav { order: 3; width: 100%; margin: 0; gap: 4px; justify-content: space-between; border-top: 1px solid var(--line); }
.nav a { padding: 12px 6px; min-height: 44px; display: inline-flex; align-items: center; }
.theme { width: 44px; height: 44px; }
.btn-small { min-height: 44px; }
html { scroll-padding-top: 120px; }
.timeline li, .certs, .skill-list > div { grid-template-columns: 1fr; }
.site-grid { grid-template-columns: 1fr; }
.case-media.crm { grid-template-columns: 1fr; }
.case-media.crm .shot.tall { display: none; }
.contact-list li { flex-direction: column; gap: 2px; }
.contact-list a { text-align: left; }
}
@media (max-width: 460px) {
.s3 { width: 32%; }
}
@media (prefers-reduced-motion: reduce) {
html { scroll-behavior: auto; }
*, *::before, *::after { animation: none !important; transition: none !important; }
.js .reveal .shot, .js .reveal .site-img { clip-path: none !important; }
}


/* ---------- Hero additions ---------- */
.title-line { margin-top: 22px; font: 600 clamp(19px, 1.9vw, 23px)/1.35 var(--f-body); }
.title-line span { color: var(--graphite); font-weight: 500; }
.hero .lede { margin-top: 14px; }
.btn-ghost-wa { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost-wa:hover { border-color: var(--graphite); }
@media (max-width: 980px) {
.ledger { grid-template-columns: repeat(2, 1fr); }
.ledger > div, .ledger > div:nth-child(3n+1) { padding: 16px 16px; border-left: 1px solid var(--line); border-top: 0; }
.ledger > div:nth-child(odd) { padding-left: 0; border-left: 0; }
.ledger > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
.screens { display: none; }
.hero .ledger { margin-top: 32px; }
}
/* screenshot captions */
.shot-note { margin-top: 10px; font: 400 12.5px/1.4 var(--f-mono); color: var(--graphite); }
.case-media .shot-note { grid-column: 1 / -1; width: 100%; }

/* ---------- How I work ---------- */
.how { padding: clamp(64px, 9vw, 120px) 0 0; }
.how-list > div { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 6px 40px; padding: 22px 0; border-top: 1px solid var(--line); }
.how-list > div:last-child { border-bottom: 1px solid var(--line); }
.how-list dt { font: 600 18px/1.35 var(--f-body); }
.how-list dd { font-size: 16px; max-width: 62ch; }
@media (max-width: 720px) { .how-list > div { grid-template-columns: 1fr; } }

.colophon { max-width: 60ch; }

/* ---------- Case-study pages ---------- */
.cs { padding: clamp(28px, 5vw, 56px) 0 0; }
.back { display: inline-flex; align-items: center; gap: 8px; padding: 10px 0; font-weight: 600; color: var(--cobalt); text-decoration: none; }
.back:hover { text-decoration: underline; text-underline-offset: 3px; }
.cs-title { margin-top: 18px; font: 700 clamp(48px, 7vw, 88px)/.95 var(--f-display); letter-spacing: -.025em; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 20px; }
.cs-title [lang="ar"] { font: 600 .5em/1.2 var(--f-ar); color: var(--cobalt); letter-spacing: 0; }
.cs-impact { margin-top: 18px; font-size: clamp(19px, 2vw, 23px); line-height: 1.45; max-width: 40em; }
.cs-facts { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 36px; border-top: 1px solid var(--line); }
.cs-facts > div { padding: 16px 20px 16px 0; border-bottom: 1px solid var(--line); }
.cs-facts dt { font: 500 11.5px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--graphite); }
.cs-facts dd { margin-top: 8px; font-size: 15.5px; }
.cs-facts a { color: var(--cobalt); font-weight: 600; }
.cs-hero-shot { margin-top: 40px; }
.cs-body { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; padding: clamp(48px, 7vw, 88px) 0 0; }
.toc { position: sticky; top: 88px; align-self: start; }
.toc p { font: 500 11.5px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--graphite); margin-bottom: 10px; }
.toc a { display: block; padding: 7px 0; color: var(--graphite); text-decoration: none; font-size: 15px; }
.toc a:hover { color: var(--ink); }
.cs-section { padding-bottom: 56px; }
.cs-section + .cs-section { padding-top: 48px; border-top: 1px solid var(--line); }
.cs-section h2 { font: 700 clamp(28px, 3vw, 38px)/1.05 var(--f-display); letter-spacing: -.015em; margin-bottom: 18px; }
.prose { max-width: 68ch; }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: 14px; }
.prose p, .prose li { font-size: 17px; line-height: 1.65; }
.prose .did { margin-top: 14px; }
.prose code, .decision code { font: 500 .88em/1 var(--f-mono); background: color-mix(in srgb, var(--cobalt) 8%, var(--paper)); border: 1px solid var(--line); border-radius: 5px; padding: 2px 5px; }
.decision { padding: 22px 0; border-top: 1px dashed var(--line); max-width: 68ch; }
.decision:first-of-type { border-top: 0; padding-top: 4px; }
.decision h3 { font: 600 20px/1.35 var(--f-body); }
.decision dl { margin-top: 10px; display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px 18px; }
.decision dt { font: 500 12px/1.9 var(--f-mono); color: var(--graphite); text-transform: uppercase; letter-spacing: .05em; }
.decision dd { font-size: 16.5px; line-height: 1.6; }
.diagram { margin-top: 8px; padding: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; }
.diagram svg { display: block; width: 100%; min-width: 640px; height: auto; }
.diagram figcaption { margin-top: 12px; font-size: 14.5px; color: var(--graphite); }
.d-box { fill: var(--paper); stroke: var(--line); stroke-width: 1.5; }
.d-sys { fill: color-mix(in srgb, var(--cobalt) 10%, var(--paper)); stroke: var(--cobalt); stroke-width: 1.5; }
.d-ext { fill: var(--fog); stroke: var(--graphite); stroke-width: 1.2; stroke-dasharray: 5 4; }
.d-db { fill: color-mix(in srgb, var(--amber) 14%, var(--paper)); stroke: var(--amber); stroke-width: 1.5; }
.d-t { fill: var(--ink); font: 600 15px var(--f-body); }
.d-s { fill: var(--graphite); font: 400 12.5px var(--f-mono); }
.d-l { fill: var(--graphite); font: 500 12px var(--f-body); }
.d-line { stroke: var(--graphite); stroke-width: 1.4; fill: none; }
.d-arrow { fill: var(--graphite); }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.gallery figure { margin: 0; }
.gallery figcaption { margin-top: 10px; font-size: 14.5px; color: var(--graphite); }
.gallery .shot.phone { width: min(100%, 300px); }
.next { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 24px 0 0; }
.next a { display: block; padding: 22px; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; background: var(--paper); transition: border-color .2s; }
.next a:hover { border-color: var(--cobalt); }
.next span { display: block; font: 500 12px/1 var(--f-mono); color: var(--graphite); text-transform: uppercase; letter-spacing: .06em; }
.next b { display: block; margin-top: 10px; font: 700 26px/1.1 var(--f-display); }
@media (max-width: 980px) {
.cs-body { grid-template-columns: minmax(0, 1fr); }
.toc { display: none; }
.cs-facts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
.cs-facts { grid-template-columns: 1fr; }
.gallery, .next { grid-template-columns: 1fr; }
.decision dl { grid-template-columns: 1fr; gap: 2px; }
.decision dd { margin-bottom: 8px; }
}

/* ================= Motion system ================= */
/* 1. Cross-page transitions: project title and lead screenshot glide into the case page */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .28s var(--ease) both; }
::view-transition-new(root) { animation: vt-in .42s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-12px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(16px); } }
::view-transition-group(*) { animation-duration: .5s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
.vt-masna3 { view-transition-name: t-masna3; }
.vt-subcover { view-transition-name: t-subcover; }
.vt-clinicqueue { view-transition-name: t-clinicqueue; }
.vs-masna3 { view-transition-name: s-masna3; }
.vs-subcover { view-transition-name: s-subcover; }
.vs-clinicqueue { view-transition-name: s-clinicqueue; }

/* 2. Hero entrance: name rises line by line, then the screens arrive */
.name .ln { display: block; overflow: hidden; padding-bottom: .04em; }
.name .ln > span { display: block; }
.ready .name .ln > span { animation: line-up .9s cubic-bezier(.2, .8, .2, 1) both; }
.ready .name .ln:nth-child(2) > span { animation-delay: .08s; }
@keyframes line-up { from { transform: translateY(105%); } to { transform: none; } }
.screens { --px: 0; --py: 0; perspective: 1400px; }
.screen { transition: translate .6s cubic-bezier(.2, .8, .2, 1); }
.s1 { translate: calc(var(--px) * 10px) calc(var(--py) * 8px); }
.s2 { translate: calc(var(--px) * -16px) calc(var(--py) * -10px); }
.s3 { translate: calc(var(--px) * 24px) calc(var(--py) * 16px); }

/* project cards: titles are links, case-study CTA is a real button */
.case h3 a { text-decoration: none; color: inherit; }
.case h3 a:hover { color: var(--cobalt); }
.btn-case { margin-top: 18px; }
.btn-case .arr { transition: transform .25s var(--ease); }
.btn-case:hover .arr { transform: translateX(4px); }
.case .links { margin-top: 0; }

/* 3. Diagrams draw themselves */
.js .diagram.reveal .d-line { stroke-dasharray: 260; stroke-dashoffset: 260; }
.js .diagram.reveal.in .d-line { stroke-dashoffset: 0; transition: stroke-dashoffset 1.1s cubic-bezier(.4, 0, .2, 1) .35s; }
.js .diagram.reveal rect { opacity: 0; transform: translateY(8px); transform-box: fill-box; }
.js .diagram.reveal.in rect { opacity: 1; transform: none; transition: opacity .5s var(--ease), transform .5s var(--ease); }
.js .diagram.reveal text { opacity: 0; }
.js .diagram.reveal.in text { opacity: 1; transition: opacity .5s var(--ease) .15s; }
.js .diagram.reveal .d-arrow { opacity: 0; }
.js .diagram.reveal.in .d-arrow { opacity: 1; transition: opacity .3s 1.2s; }

/* 4. Reading progress on case pages (scroll-driven, no JS) */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; background: var(--cobalt); transform-origin: 0 50%; transform: scaleX(0); z-index: 30; }
@supports (animation-timeline: scroll()) {
.progress { animation: progress linear both; animation-timeline: scroll(root); }
}
@keyframes progress { to { transform: scaleX(1); } }

@media (prefers-reduced-motion: reduce) {
@view-transition { navigation: none; }
.screens { --px: 0 !important; --py: 0 !important; }
.js .diagram.reveal .d-line { stroke-dasharray: none; stroke-dashoffset: 0; }
.js .diagram.reveal rect, .js .diagram.reveal text, .js .diagram.reveal .d-arrow { opacity: 1; transform: none; }
.progress { display: none; }
}
/* case CTA must beat the generic .links a rule (0,1,1) */
.links .btn-case { display: inline-flex; padding: 12px 20px; color: var(--cobalt-ink); text-decoration: none; }
.links .btn-case:hover { text-decoration: none; }
