/* The work archive extends the existing charcoal, olive and orange rooftop. */
.work-page{--work-green:#a5c18f;--work-copy:#c6cdc7;--work-line:#30392f;position:relative;overflow-x:clip}
.work-wrap{width:min(1280px,calc(100% - var(--page-gutter)*2));margin:auto;padding:40px 0 40px}
.work-page :is(h1,h2,h3,h4){max-width:none}
.work-wrap :is(a,button):hover{color:var(--ink)}
.work-return,.work-link,.work-page .notebook-title,.writeup-title,.competition-name,.inline-credit{display:inline-flex;align-items:center;gap:10px}
.work-return{min-height:44px;font-size:15px;color:var(--muted)}
.work-return svg{transform:rotate(180deg)}
.work-wrap svg,.writeup-page .work-link svg,.writeup-page .article-back svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex:none}
.work-return:hover span{text-decoration:underline;text-underline-offset:5px}
.work-hero{padding:48px 0 46px}
.work-hero-copy{display:grid;grid-template-columns:1fr 1fr;align-items:start;gap:72px;margin-top:32px}
.work-hero h1{font-size:clamp(34px,8.8vw,96px);line-height:1.05;letter-spacing:-.04em;font-weight:600;margin:0;white-space:nowrap}
.work-hero h1 span{color:var(--work-green)}
.work-hero .work-lead{font-family:var(--display);font-size:clamp(21px,2.1vw,27px);line-height:1.45;letter-spacing:-.02em;color:var(--ink);margin:0}
.work-hero-copy>p:last-child{max-width:520px;color:var(--work-copy);font-size:17px;line-height:1.75;margin:0}
.work-wayfinding{display:flex;align-items:center;justify-content:center;border-top:1px solid var(--work-line);border-bottom:1px solid var(--work-line);padding:10px 0}
.work-chapters{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px 30px;max-width:100%;font-size:15px}
.work-chapters a{display:flex;align-items:center;flex:none;min-height:44px;white-space:nowrap;color:var(--muted);text-decoration:underline;text-underline-offset:7px;text-decoration-color:transparent}
.work-chapters a:hover,.work-chapters a[aria-current]{color:var(--ink);text-decoration-color:var(--work-green)}
.work-section{padding-top:84px;scroll-margin-top:24px}
.work-section+.work-section{margin-top:84px;border-top:1px solid var(--work-line)}
#notebooks+#ctfs{border-top:0}
.work-section-head{display:grid;grid-template-columns:1fr 1fr;align-items:start;gap:72px;margin-bottom:40px}
.work-section-head h2{max-width:580px;font-size:clamp(33px,3.6vw,46px);line-height:1.12;letter-spacing:-.035em;font-weight:550;margin:0;text-wrap:balance}
.work-section-head>p{font-size:17px;color:var(--work-copy);line-height:1.8;max-width:64ch;margin:0}
.work-section-head strong{font-weight:500;color:var(--ink)}
.work-section-body{width:100%}
.work-features{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-bottom:28px}
.work-project h3{font-size:26px;line-height:1.2;letter-spacing:-.025em;font-weight:550;margin:0 0 9px}
.work-project p{font-size:16px;line-height:1.7;color:var(--work-copy);margin:0 0 14px}
.work-project .project-hook{font-family:var(--display);font-size:19px;line-height:1.5;color:var(--ink);letter-spacing:-.02em}
.work-feature{display:flex;flex-direction:column;min-width:0;padding:34px;background:#1b291e;border-radius:14px}
.work-feature h3{font-size:44px;letter-spacing:-.035em;margin-bottom:15px}
.work-feature:nth-child(2){background:#24251c}
.work-feature .project-copy{flex:1}
.work-feature .project-copy>p:last-child{font-size:17px;line-height:1.8}
.work-feature .project-hook{font-size:22px}
.work-feature .project-foot{padding-top:3px}
.work-feature .project-foot{display:flex;align-items:end;justify-content:space-between;gap:24px}
.project-foot{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:18px}
.project-foot .work-tech,.work-tech{color:#b7c6ac;font-size:13px;line-height:1.7;margin:0}
.project-foot .work-credit,.work-credit{font-size:12px;color:var(--muted);margin:3px 0 0}
.work-link{min-height:44px;font-size:14px;line-height:1.4;text-decoration:underline;text-underline-offset:6px;text-decoration-color:#697b5d;text-decoration-thickness:1px}
.work-link:hover{text-decoration-color:var(--ink)}
.work-link svg{width:17px;height:17px}
.work-feature .work-link{margin-top:14px;white-space:nowrap}
.work-private{font-size:13px;line-height:1.5;color:var(--muted)}
.workflow-diagram{margin:22px 0 14px;padding:16px 0 20px;border-block:1px solid #42503b}
.work-page .workflow-diagram>svg{display:block;width:100%;height:auto;stroke-width:1.7;overflow:visible}
.workflow-diagram .flow-panel{fill:#111a13;stroke:#708269}
.workflow-pwn-ai .flow-panel{fill:#191b14;stroke:#80836a}
.workflow-diagram .flow-dim{stroke:#74876a}
.workflow-diagram .flow-accent{stroke:#b6ce9e}
.workflow-diagram .flow-connector{stroke:#b6ce9e;stroke-width:2}
.workflow-diagram .flow-clip{fill:#658452;stroke:none}
.workflow-diagram .flow-dot{fill:#8c997c;stroke:none}
.workflow-diagram .flow-warm{stroke:#dcb086}
.workflow-diagram .flow-clip.flow-warm{fill:#b78c64;stroke:none}
.workflow-diagram ol{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;list-style:none;padding:0;margin:-1px 0 0;text-align:center}
.workflow-diagram li{min-width:0}
.workflow-diagram strong{display:block;font-size:14px;font-weight:500;color:var(--ink);line-height:1.4}
.workflow-diagram li span{display:block;font-size:12px;line-height:1.5;color:#b5c6aa;margin-top:4px}
.notebook-tools{display:flex;justify-content:space-between;align-items:center;gap:20px;flex-wrap:wrap;margin-bottom:12px;padding:12px 0;border-block:1px solid var(--work-line)}
.notebook-filters{display:flex;gap:5px}
.notebook-filters button{padding:0 18px;min-height:44px;font-size:15px;color:var(--muted);border-radius:8px}
.notebook-filters button[aria-pressed=true]{color:var(--ink);background:#2b3629}
.notebook-search{display:flex;align-items:center;gap:9px;border-bottom:1px solid #65735e;color:var(--muted);width:260px;height:44px}
.notebook-search svg{width:18px;height:18px}
.notebook-search input{border:0;background:transparent;padding:8px 0;font-size:16px;width:100%;min-width:0;outline-offset:5px}
.notebook-search input::placeholder{color:var(--muted);opacity:1}
.notebook-empty{padding:35px 0;border-top:1px solid var(--work-line)}
.notebook-empty h3{font-size:23px;font-weight:500;margin:0 0 10px}
.notebook-empty p{font-size:16px;color:var(--work-copy);margin:0 0 15px}
.experience-row{display:grid;grid-template-columns:320px minmax(0,1fr);gap:64px;border-top:1px solid var(--work-line);padding:28px 0}
.experience-row h3{font-size:22px;line-height:1.35;font-weight:550;letter-spacing:-.02em;margin:0 0 8px}
.experience-row p{font-size:16px;line-height:1.8;color:var(--work-copy);margin:0;max-width:72ch}
.experience-row .experience-role{font-size:14px;line-height:1.5;color:var(--ink)}
.experience-date{display:block;font-size:12px;line-height:1.65;color:var(--muted);margin-top:7px}
.work-close{display:grid;grid-template-columns:1fr auto;column-gap:40px;margin-top:100px;padding:38px 42px;background:#1b251d;border-radius:14px}
.work-close h2{font-size:clamp(30px,4vw,46px);line-height:1.2;letter-spacing:-.035em;font-weight:550;margin:0 0 12px}
.work-close p{grid-column:1;font-size:19px;color:var(--work-copy);margin:0}
.work-close>.work-link{grid-column:2;grid-row:1/3;align-self:center;font-size:18px}
.work-page .laptop-footer{margin-top:20px}
.writeup-page .article-heading h1{max-width:1000px}
.writeup-page .article-back{display:inline-flex;align-items:center;gap:12px}
.writeup-page .article-back svg{transform:rotate(180deg)}
.writeup-byline{font-size:14px;color:var(--muted);margin:20px 0 0}
.writeup-page .article-copy>h2{margin-top:58px}
.writeup-page .article-copy>h2:first-child{margin-top:0}
.writeup-page .article-copy figure{margin:30px 0}
.writeup-page .article-copy figure img{display:block;max-width:100%;height:auto;border-radius:8px;background:#182019}
.writeup-page .article-copy hr{border:0;border-top:1px solid #30392f;margin:40px 0}
.writeup-page .article-copy :is(ol,ul){padding-left:1.4em}
.writeup-page .article-copy li{margin-block:10px}
.writeup-source{border-top:1px solid #30392f;padding-top:20px;margin-top:50px}
[hidden]{display:none!important}
.project-demo{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);align-items:center;gap:55px;padding:44px 0;border-bottom:1px solid var(--work-line)}
.project-demo h3{font-size:37px;letter-spacing:-.035em}
.project-demo .project-hook{font-size:21px}
.project-demo-copy>.work-link{margin-top:14px}
.project-demo-media{margin:0;min-width:0}
.media-frame{padding:8px;background:#202821;border:1px solid #46513f;border-radius:14px;transform:rotate(1deg)}
.media-frame video{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:contain;background:#0c100d;border-radius:7px}
.project-demo-media figcaption{font-size:13px;line-height:1.7;color:var(--muted);text-align:center;margin-top:16px}
.demo-language{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:24px;padding-top:15px;border-top:1px solid var(--work-line)}
.demo-language>div{display:flex;gap:4px;padding:4px;background:#19231b;border-radius:10px}
.demo-language button{min-height:44px;padding:8px 15px;border-radius:7px;font-size:13px;color:var(--work-copy)}
.demo-language button[aria-pressed=true]{background:#34412e;color:var(--ink)}
.demo-language button:disabled{cursor:wait;opacity:.6}
.work-project .demo-language p{font-size:12px;line-height:1.5;margin:0;max-width:22ch}
.work-project .demo-status{font-size:13px;line-height:1.5;color:#dec7aa;margin:12px 0 0}
.work-project .demo-fallback{margin:18px 0 0}
.media-frame video::cue{font-family:var(--sans);font-size:17px;background:#101810e8;color:#f3f1e8}
.photo-mat{display:block;padding:8px;background:#202821;border:1px solid #46513f;border-radius:15px}
.photo-mat img{display:block;width:100%;height:auto;border-radius:8px}
.competition-gallery{display:flex;flex-direction:column;gap:90px;padding-top:18px}
.competition-event{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);align-items:center;gap:70px;min-width:0}
.competition-event.event-delta{grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr)}
.event-delta .event-copy{grid-column:2;grid-row:1}
.event-delta .event-photos{grid-column:1;grid-row:1}
.event-heading{margin-bottom:24px}
.event-heading h3{font-size:34px;font-weight:550;line-height:1.25;letter-spacing:-.03em;margin:0 0 14px}
.event-result{display:flex;align-items:center;gap:18px;margin:0 0 16px;flex-wrap:wrap}
.event-result strong{font-family:var(--display);font-size:23px;font-weight:550;letter-spacing:-.02em;color:var(--work-green)}
.event-delta .event-result strong{color:#deb58c}
.event-result>span{font-size:13px;color:var(--muted)}
.event-description{font-size:17px;line-height:1.75;color:var(--work-copy);max-width:58ch;margin:0}
.event-photos{position:relative;min-width:0;padding:8px 5px 0}
.event-photo{margin:0;transform:rotate(-1.5deg)}
.event-delta .event-photo{transform:rotate(1.5deg)}
.event-photo figcaption{font-size:14px;line-height:1.6;color:#b5c3ad;text-align:center;margin-top:12px}
.photo-swap{position:relative}
.photo-swap .event-photo-primary{aspect-ratio:1600/1066;object-fit:contain;transition:opacity 250ms ease-out}
.photo-swap .event-photo-alternate{position:absolute;inset:8px;width:calc(100% - 16px);height:calc(100% - 16px);object-fit:contain;opacity:0;transition:opacity 250ms ease-out;background:#202821}
.photo-swap:is(:focus-visible,.is-alternate) .event-photo-alternate{opacity:1}
.photo-swap:is(:focus-visible,.is-alternate) .event-photo-primary{opacity:0}
.event-credits{margin-top:28px;padding-top:20px;border-top:1px solid var(--work-line)}
.event-credits p{font-size:14px;line-height:1.8;color:var(--work-copy);margin:0 0 4px;max-width:65ch}
@media(max-width:1000px){
 .work-hero-copy{gap:45px}
 .work-section-head{gap:45px}
 .competition-gallery{gap:70px}
 .competition-event,.competition-event.event-delta{gap:40px}
 .project-demo{grid-template-columns:1fr;gap:28px}
 .project-demo-copy{max-width:70ch}
 .work-feature .project-foot{display:block}
 .work-feature{padding:26px}
 .experience-row{grid-template-columns:240px minmax(0,1fr);gap:40px}
}
@media(max-width:760px){
 .work-hero{padding:36px 0 40px}
 .work-hero-copy{grid-template-columns:1fr;gap:20px;margin-top:26px;max-width:650px}
 .work-section-head{grid-template-columns:1fr;gap:20px;margin-bottom:30px}
 .work-section-head>p{max-width:68ch}
 .work-features{grid-template-columns:1fr}
 .competition-gallery{gap:64px}
 .competition-event,.competition-event.event-delta{display:flex;flex-direction:column;align-items:stretch;gap:25px}
 .event-heading{margin-bottom:22px}
 .event-photos{max-width:620px;margin:auto}
 .work-feature .project-foot{display:flex}
 .work-feature .work-link{margin-top:0}
 .work-section{padding-top:64px}
 .work-section+.work-section{margin-top:64px}
 .experience-row{grid-template-columns:210px minmax(0,1fr);gap:30px}
}
@media(max-width:600px){
 .work-wrap{padding-top:20px;width:calc(100% - 40px)}
 .work-return{font-size:14px}
 .work-hero{padding-top:30px}
 .work-hero .work-lead{font-size:21px;line-height:1.45}
 .work-hero-copy>p:last-child{font-size:16px}
 .work-wayfinding{padding:10px 0}
 .work-chapters{gap:0 18px;width:100%;font-size:14px}
 .work-section{padding-top:50px;scroll-margin-top:20px}
 .work-section+.work-section{margin-top:50px}
 .work-section-head{gap:18px;margin-bottom:28px}
 .work-section-head h2{font-size:33px;line-height:1.14}
 .work-section-head>p{font-size:16px;line-height:1.75}
 .work-feature{padding:24px}
 .work-project h3{font-size:25px}
 .work-feature h3{font-size:33px}
 .work-feature .project-foot{display:block}
 .work-feature .work-link{margin-top:13px}
 .work-private{display:block;margin-top:13px}
 .work-project .project-hook{font-size:18px}
 .work-project p{font-size:16px}
 .workflow-diagram{margin:16px 0 10px;padding:12px 0 16px}
 .workflow-diagram ol{gap:10px}
 .workflow-diagram strong{font-size:12px}
 .workflow-diagram li span{font-size:12px}
 .notebook-tools{gap:8px;align-items:stretch}
 .notebook-search{width:100%}
 .experience-row{grid-template-columns:1fr;gap:15px;padding:26px 0}
 .experience-row h3{font-size:23px}
 .work-close{margin-top:60px;padding:30px 26px;grid-template-columns:1fr}
 .work-close>.work-link{grid-column:1;grid-row:auto;justify-self:start;margin-top:18px}
 .project-demo{padding:32px 0;gap:22px}
 .project-demo h3{font-size:31px}
 .event-heading h3{font-size:29px}
 .event-description{font-size:16px}
 .event-photo figcaption{font-size:13px}
 .event-helwan .event-photo figcaption{min-height:3.2em}
 .writeup-page .article-heading h1{font-size:clamp(35px,9vw,48px)}
}
@media(max-width:360px){
 .work-section-head h2{font-size:31px}
 .work-feature{padding:22px}
}
@media(prefers-reduced-motion:reduce){
 .photo-swap img{transition:none}
}
