/* Local language picker; scoped to the homepage controls. */
#langSwitchWrapper{position:relative}
#langButton{gap:5px!important;min-height:32px;white-space:nowrap!important;flex-shrink:0!important}
#langButton[aria-expanded=true]{background:#e7eef0;border-color:#9db2bc}
.language-control{position:relative;display:inline-flex;align-items:center;flex:0 0 auto;margin-inline-start:auto}
.language-control :is(#photoLang,#musicLang,#blogLang){display:inline-flex;align-items:center;justify-content:center;width:max-content!important;min-width:64px;min-height:32px;white-space:nowrap;flex-shrink:0;line-height:1.2;padding:6px 10px}
.journal-settings .language-control{margin:0}
.paper-journal .language-popover{background:#f8f4ebf7;border-color:#c8b7a6;color:#633b3d;box-shadow:0 14px 40px #3b292126}
.paper-journal .language-option[aria-checked=true]{background:#ebddd7;color:#6b303b}
.paper-journal .language-option:hover{background:#efe6dd}
.language-popover{position:absolute;inset-inline-end:0;top:calc(100% + 12px);width:278px;max-width:calc(100vw - 24px);max-height:min(560px,calc(100svh - 90px));overflow-y:auto;overscroll-behavior:contain;padding:10px;background:#fffdf8f7;border:1px solid #bccbd2;border-radius:17px;box-shadow:0 14px 40px #29475626;z-index:150;backdrop-filter:blur(18px);font:13px/1.4 system-ui,sans-serif;direction:ltr;color:#355267;scrollbar-width:thin}
.language-popover[hidden]{display:none}
.language-popover .language-heading{font:500 10px/1.4 system-ui,sans-serif;letter-spacing:.14em;color:#7a8e98;padding:8px 10px 10px;margin:0}
.language-option{display:flex;align-items:center;gap:10px;width:100%;min-height:39px;border:0;border-radius:9px;background:none;color:inherit;padding:8px 10px;text-align:start;cursor:pointer;font:inherit}
.language-option:hover,.language-option:focus-visible{background:#eef0f7;outline:2px solid transparent}
.language-option[aria-checked=true]{background:#e4ebf2;color:#254761}
.language-option .native-name{flex:1}
.language-option .language-code{font-size:10px;letter-spacing:.06em;opacity:.55;min-width:28px;text-align:end}
.language-option .language-check{width:14px;opacity:0}
.language-option[aria-checked=true] .language-check{opacity:1}
.language-option:focus-visible{outline:2px solid #6487a2;outline-offset:-2px}
html[data-portfolio-locale=ar] body{direction:ltr}
html[data-portfolio-locale=ar] :is(#about,#experience,#highlights,#ai-practice,.project-dialog .detail-body,body>footer){direction:rtl;text-align:start}
html[data-portfolio-locale=ar] :is(#about,#experience,#highlights,#ai-practice,.project-dialog .detail-body) :is(p,h2,h3,button){font-family:Tahoma,'Segoe UI',Arial,sans-serif;letter-spacing:normal}
html[data-portfolio-locale=ar] .project-dialog .work-note p{text-align:right}
html[data-portfolio-locale=ar] .project-dialog .detail-body>h3{grid-column:1}
html[data-portfolio-locale=ar] .case-facts{justify-content:flex-start}
html[data-portfolio-locale=ar] :is(.case-facts span,.work-tags span){unicode-bidi:plaintext}
html[data-portfolio-locale=ar] :is(.photo-hero>div,.collection-heading,.photo-card figcaption,.photo-outro,.viewer-caption,.music-intro,.music-notes-text,.music-notes-label,.journal-intro,.journal-description,.notebook-page,.feature-copy,.journal-endnote){direction:rtl;text-align:start}
html[data-portfolio-locale=ar] :is(.photo-hero,.collection-heading,.music-intro,.music-notes-text,.journal-intro,.notebook-page,.feature-copy) :is(p,h2,h3){letter-spacing:normal;font-family:Tahoma,'Segoe UI',Arial,sans-serif}
html[data-portfolio-locale=ar] .photo-card figcaption{unicode-bidi:plaintext}
html[data-portfolio-locale=ar] .notebook-tabs{direction:rtl}
html[data-portfolio-locale=ar] .notebook-story>span{direction:rtl}
html[data-portfolio-locale=ar] :is(.photo-intro,.collection-heading,#viewerCaption,#musicNotesText,#musicModeNote,#musicPlaybackStatus,#flipDetails){direction:rtl;text-align:start}
html[data-portfolio-locale=ar] :is(#musicNotesText,#musicModeNote,#musicPlaybackStatus,#viewerCaption){font-family:Tahoma,'Segoe UI',Arial,sans-serif;letter-spacing:normal}
.music-play-mode select,.music-controls select{max-width:100%}
html[data-portfolio-locale] .card-nav-links{min-width:0}
@media(max-width:600px){.language-popover{position:fixed;top:68px;inset-inline-end:12px;max-height:calc(100svh - 84px);width:260px}.language-option{min-height:42px}}
@media(prefers-reduced-motion:no-preference){.language-popover:not([hidden]){animation:language-menu-in .16s ease-out}@keyframes language-menu-in{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:none}}}
