/* Portfolio and reading shelf extend the existing dark editorial design. */
.site-nav a{white-space:nowrap}.site-nav a:focus-visible,summary:focus-visible,.book-source:focus-visible,.book-cover:focus-visible{outline:2px solid var(--amber);outline-offset:5px}
::selection{background:var(--amber);color:var(--canvas)}
.portfolio-list{border-top:1px solid rgb(237 179 108 / 60%)}
.portfolio-project{border-bottom:1px solid rgb(255 255 255 / 18%)}
.portfolio-project summary{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,.8fr) 130px;gap:32px;align-items:center;padding:32px 0;cursor:pointer;list-style:none}
.portfolio-project summary::-webkit-details-marker{display:none}
.project-heading h3{max-width:25ch;margin:0;font-family:var(--display);font-size:clamp(26px,3.2vw,43px);font-weight:500;line-height:1.12;letter-spacing:-.02em;text-wrap:balance}
.project-domain{margin:12px 0 0;color:var(--amber);font-size:13px;line-height:1.6}
.project-intro{max-width:38ch;margin:0;color:var(--body);font-size:15px;line-height:1.7}
.project-control{display:flex;align-items:center;justify-content:flex-end;gap:12px;color:var(--muted);font-size:12px}
.project-toggle-icon{width:22px;height:22px;flex:0 0 auto;fill:none;stroke:var(--amber);stroke-width:1.5;transition:transform 180ms ease}
.when-open{display:none}.portfolio-project[open] .when-open{display:inline}.portfolio-project[open] .when-closed{display:none}.portfolio-project[open] .project-toggle-icon{transform:rotate(45deg)}
.portfolio-project summary:hover .project-heading h3,.portfolio-project summary:hover .project-control{color:var(--amber)}
.project-body-content{padding:0 0 30px}.project-case{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:40px;margin:0;padding:24px 0;border-top:1px solid rgb(255 255 255 / 10%)}
.project-case dt{margin:0 0 10px;color:var(--ink);font-size:15px;font-weight:600}.project-case dd{margin:0;max-width:44ch;color:var(--body);font-size:14px;line-height:1.75}.project-scope{margin:8px 0 0;color:var(--muted);font-size:12px;line-height:1.8}
.book-shelf{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 64px;margin:0;padding:0;list-style:none;border-top:1px solid rgb(237 179 108 / 55%)}
.book-shelf>li{min-width:0;padding:30px 0 32px;border-bottom:1px solid rgb(255 255 255 / 15%)}
.book-heading{display:grid;grid-template-columns:96px minmax(0,1fr);gap:24px;align-items:center}.book-cover{display:block;width:96px;aspect-ratio:2/3;background:#24221e;box-shadow:0 8px 22px rgb(0 0 0 / 35%)}.book-cover img{display:block;width:100%;height:100%;object-fit:cover}
.book-heading h3{max-width:25ch;margin:0 0 8px;font-size:23px;font-weight:500;line-height:1.2;letter-spacing:-.015em;text-wrap:balance}.book-heading .book-author{margin:0 0 14px;color:var(--muted);font-size:13px;line-height:1.5}.book-source{color:var(--amber);font-size:12px;text-underline-offset:4px}
.book-takeaways{display:grid;gap:14px;margin:26px 0 0;padding-inline-start:18px;color:var(--body);font-size:14px;line-height:1.7}.book-takeaways li{padding-inline-start:5px}.book-takeaways li::marker{color:var(--amber);font-size:.75em}.book-takeaways strong{color:var(--ink);font-weight:600}
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
[dir=rtl] .project-heading h3{font-family:'Noto Sans Arabic',Tahoma,sans-serif;line-height:1.6;letter-spacing:0;font-size:clamp(24px,2.6vw,36px)}
[dir=rtl] .project-intro,[dir=rtl] .project-case dd,[dir=rtl] .book-takeaways{line-height:1.95}
[dir=rtl] .book-heading h3{font-family:'Source Sans 3',sans-serif;line-height:1.3}
[dir=rtl] .book-heading .book-author{text-align:right}
@media(max-width:1000px){.portfolio-project summary{grid-template-columns:minmax(0,1fr) minmax(0,.8fr);gap:18px 28px}.project-control{grid-column:1/-1;justify-content:flex-start}.book-shelf{gap:0 36px}.project-case{gap:26px}}
@media(max-width:680px){.portfolio-project summary{grid-template-columns:1fr;gap:16px;padding:26px 0}.project-heading h3{font-size:32px;max-width:22ch}.project-domain{margin-top:10px}.project-intro{max-width:46ch;font-size:14px}.project-control{justify-content:space-between;min-height:30px}.project-case{grid-template-columns:1fr;gap:24px;padding-top:22px}.project-case dd{max-width:60ch}.project-body-content{padding-bottom:26px}.book-shelf{grid-template-columns:1fr}.book-shelf>li{padding-block:28px}.book-heading{grid-template-columns:80px minmax(0,1fr);gap:20px}.book-cover{width:80px}.book-heading h3{font-size:23px}.book-takeaways{margin-top:22px;font-size:14px}.reading-credit{line-height:1.7}[dir=rtl] .project-heading h3{font-size:28px}}
@media(prefers-reduced-motion:reduce){.project-toggle-icon{transition:none}}
/* Keep the language control visible rather than inside the scrolling nav. */
.site-header{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:24px}
.site-header .site-nav{justify-content:flex-end;min-width:0}
.site-header>.language-switch{display:inline-flex;min-height:36px;align-items:center;padding:0 12px;border:1px solid rgb(237 179 108 / 55%);border-radius:4px;color:var(--amber);font-size:12px;text-decoration:none;white-space:nowrap}
.site-header>.language-switch:focus-visible{outline:2px solid var(--amber);outline-offset:4px}
[dir=rtl] .feature-context,[dir=rtl] .organization-label,[dir=rtl] .case-sequence small,[dir=rtl] .route-labels{text-transform:none}
@media(max-width:1000px){.site-header{grid-template-columns:minmax(0,1fr) auto;gap:4px 20px}.site-header .site-nav{grid-column:1/-1;grid-row:2;justify-content:space-between;flex-wrap:nowrap;gap:12px}.site-header>.language-switch{grid-column:2;grid-row:1}.site-header .wordmark{grid-column:1;grid-row:1}}
