/* v13, the optional Memphis palette. All artwork keeps its original colors. */
.bottom-utilities{display:flex;align-items:center;gap:.8rem;flex-wrap:wrap}
.theme-toggle{
  min-width:44px;min-height:44px;display:inline-grid;place-items:center;
  padding:.2rem;border:1px solid var(--edge);border-radius:50%;
  color:var(--ink);background:var(--card);cursor:pointer;
}
.theme-toggle:hover{border-color:var(--yellow)}
.theme-icon{line-height:1;font-size:1.15rem}

:root[data-theme="memphis"]{
  color-scheme:light;
  --paper:#fff7dc;--dark:#eadfff;--card:#fffdf1;--edge:#241738;
  --ink:#241738;--muted:#4d3a59;--yellow:#5522ba;
  --pink:#fa4ba6;--aqua:#59e4d1;--sun:#ffdc3c;--violet:#7445ec;
}
[data-theme="memphis"] body{background:#fff7dc}
[data-theme="memphis"] header{background:#fffdf2;border-bottom-width:2px}
[data-theme="memphis"] .mark{color:#4d22b4}
[data-theme="memphis"] .mark img{background:var(--aqua);border:2px solid var(--ink)}
[data-theme="memphis"] .v8-hero{position:relative;isolation:isolate}
[data-theme="memphis"] .v8-hero::after{
  content:"";position:absolute;z-index:-1;right:0;bottom:10%;width:min(32%,23rem);height:80%;
  background:url("assets/memphis-shapes.svg") center right / contain no-repeat;pointer-events:none;
}
[data-theme="memphis"] .v9-lockup{font-weight:790;letter-spacing:-.062em}
[data-theme="memphis"] .v9-hero-amp path{fill:#da248a}
[data-theme="memphis"] .section{border-top:2px solid var(--ink)}
[data-theme="memphis"] #work{background:#fae4ee}
[data-theme="memphis"] #previous{background:#fff7dc}
[data-theme="memphis"] #archive{background:#d8f6ef}
[data-theme="memphis"] :is(.sectionhead h2,.archive-piece h2)::after{
  content:"";display:block;width:3.1rem;height:.34rem;margin-top:.45rem;
  background:linear-gradient(90deg,var(--pink) 0 33.33%,var(--sun) 33.33% 66.66%,var(--violet) 66.66%);
  transform:skewX(-18deg);
}
[data-theme="memphis"] .v8-card{--pop:#fa6db3}
[data-theme="memphis"] .v8-card:nth-child(4n+2){--pop:#5edcc9}
[data-theme="memphis"] .v8-card:nth-child(4n+3){--pop:#ffda42}
[data-theme="memphis"] .v8-card:nth-child(4n+4){--pop:#a88cf8}
[data-theme="memphis"] .v8-plate{
  border:2px solid var(--ink);border-radius:2px;box-shadow:4px 4px 0 var(--pop);
}
[data-theme="memphis"] .archive-plate{background:#fffaf0}
[data-theme="memphis"] .v8-card:is(:hover,:focus-visible) .v8-plate{
  border-color:var(--yellow);box-shadow:4px 4px 0 var(--yellow);
}
[data-theme="memphis"] .artifact img{background:#fffaf0;border-width:2px;box-shadow:3px 3px 0 var(--pink)}
[data-theme="memphis"] .artifact:nth-child(3n+2) img{box-shadow:3px 3px 0 var(--aqua)}
[data-theme="memphis"] .artifact:nth-child(3n) img{box-shadow:3px 3px 0 var(--violet)}
[data-theme="memphis"] .v8-project-head,
[data-theme="memphis"] .pagehead{background:url("assets/memphis-shapes.svg") right 48% / min(24%,17rem) auto no-repeat}
[data-theme="memphis"] .pagehead h1{max-width:15ch;color:var(--ink)}
[data-theme="memphis"] .pagehead .intro{max-width:50ch;color:var(--muted)}
[data-theme="memphis"] .accent{
  background:var(--sun);color:var(--ink);border:2px solid var(--ink);
  box-shadow:3px 3px 0 var(--ink);border-radius:2px;
}
[data-theme="memphis"] .accent:hover{background:var(--aqua)}
[data-theme="memphis"] footer{background:#ffdceb;border-top:2px solid var(--ink);border-bottom:0}
[data-theme="memphis"] .theme-toggle{background:var(--aqua);border:2px solid var(--ink);box-shadow:2px 2px 0 var(--ink)}
[data-theme="memphis"] .theme-toggle:hover{background:var(--sun)}
[data-theme="memphis"] .lightbox{border:2px solid var(--ink);box-shadow:5px 5px 0 var(--pink)}
[data-theme="memphis"] .lightbox-button{border-width:2px}
@media(max-width:1020px){
  [data-theme="memphis"] .v8-hero::after{width:25%;opacity:.45;}
  [data-theme="memphis"] .pagehead{background-size:min(19%,12rem) auto;background-position:right top}
}
@media(max-width:660px){
  [data-theme="memphis"] .v8-hero::after{display:none}
  [data-theme="memphis"] .pagehead{background:none}
  [data-theme="memphis"] .v8-hero p{border-left:4px solid var(--pink);padding-left:.7rem}
}
@media(forced-colors:active){
  [data-theme="memphis"] .v8-hero::after,[data-theme="memphis"] .sectionhead h2::after{display:none}
  [data-theme="memphis"] .pagehead{background-image:none}
}

/* Reference pass: graph paper, saturated accents, and printed textures. */
:root[data-theme="memphis"]{
  --pink:#fa329e;--aqua:#20ded4;--violet:#5444e6;
  --memphis-grid:rgb(44 32 70 / 13%);
}
[data-theme="memphis"] .v8-hero::before{
  content:"";position:absolute;z-index:-2;inset:0;pointer-events:none;
  background-image:linear-gradient(90deg,var(--memphis-grid) 1px,transparent 1px),
                   linear-gradient(var(--memphis-grid) 1px,transparent 1px);
  background-size:18px 18px;
  mask-image:linear-gradient(90deg,transparent 43%,#000 100%);
}
[data-theme="memphis"] .v9-hero-amp path{fill:#d61e89}
[data-theme="memphis"] .v8-card:nth-child(4n+1){--pop:var(--pink)}
[data-theme="memphis"] .v8-card:nth-child(4n+2){--pop:var(--aqua)}
[data-theme="memphis"] .v8-card:nth-child(4n+4){--pop:#907efb}
[data-theme="memphis"] #archive{background:#e1deff}
@media(max-width:660px){
  [data-theme="memphis"] .v8-hero::before{
    mask-image:linear-gradient(90deg,transparent 46%,rgb(0 0 0 / 55%) 100%);
  }
}
@media(forced-colors:active){[data-theme="memphis"] .v8-hero::before{display:none}}

/* v13.1: theme controls live with the rest of the navigation. */
.top{
  display:grid;grid-template-columns:minmax(max-content,1fr) auto auto;
  column-gap:clamp(1rem,2.8vw,2.5rem);
}
.top .mark{justify-self:start}
.top .nav{justify-content:flex-end}
.top .theme-toggle{justify-self:end}
@media(max-width:850px){
  .top{grid-template-columns:1fr auto;row-gap:.7rem}
  .top .nav{grid-column:1/-1;justify-content:flex-start}
}
@media(max-width:405px){.top .nav{column-gap:.75rem}}
/* Use the hero's graph-paper vocabulary in concentrated, alternating bands. */
[data-theme="memphis"] #work{--section-art:url("assets/memphis-work.svg")}
[data-theme="memphis"] #previous{--section-art:url("assets/memphis-previous.svg")}
[data-theme="memphis"] #archive{--section-art:url("assets/memphis-archive.svg")}
[data-theme="memphis"] #resume{--section-art:url("assets/memphis-resume.svg")}
[data-theme="memphis"] .v8-home :is(#work,#previous,#archive){
  position:relative;isolation:isolate;
}
[data-theme="memphis"] .v8-home :is(#work,#previous,#archive)::before{
  content:"";position:absolute;z-index:-1;inset:0;pointer-events:none;
  background-image:linear-gradient(90deg,var(--memphis-grid) 1px,transparent 1px),
                   linear-gradient(var(--memphis-grid) 1px,transparent 1px);
  background-size:18px 18px;
  mask-image:radial-gradient(ellipse 48% 82% at 93% 0%,#000 4%,transparent 91%);
}
[data-theme="memphis"] .v8-home #previous::before{
  mask-image:radial-gradient(ellipse 53% 47% at 0% 87%,#000 4%,transparent 91%);
}
[data-theme="memphis"] .v8-home :is(#work,#previous,#archive,#resume) .sectionhead{
  position:relative;display:flex;flex-wrap:nowrap;align-items:center;gap:.5rem;
}
[data-theme="memphis"] .v8-home :is(#work,#previous,#archive,#resume) .sectionhead::after{
  content:"";flex:0 0 clamp(4.2rem,15vw,10rem);height:clamp(2.4rem,6vw,4.4rem);
  background:var(--section-art) center right / contain no-repeat;pointer-events:none;
}

@media(max-width:660px){
  [data-theme="memphis"] .v8-home :is(#work,#previous,#archive)::before{opacity:.68}
}
@media(forced-colors:active){
  [data-theme="memphis"] .v8-home :is(#work,#previous,#archive)::before,
  [data-theme="memphis"] .v8-home :is(#work,#previous,#archive,#resume) .sectionhead::after{display:none}
}
