/* One stable portrait, a physical noticeboard, and a full-page reading sheet. */
.projects-page{--projects-header-height:86px;min-height:100svh;background:var(--black,#090b0a)}
.projects-header{position:sticky;top:0;z-index:20;justify-content:space-between;gap:20px;min-height:calc(var(--projects-header-height) + env(safe-area-inset-top));padding-bottom:8px;background:var(--black,#090b0a)}
.projects-page .skip-link{z-index:25}
.projects-back{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:44px;padding:10px 15px;border-radius:25px;color:#e8e5d7;font-size:15px;font-weight:800;line-height:1.35;flex-shrink:0;transition:color .16s,background .16s}
.projects-back:hover{color:var(--cream,#fffbe7);background:#202319}
.projects-back-arrow{display:block;width:10px;height:10px;flex-shrink:0;border-top:2px solid currentColor;border-right:2px solid currentColor;transform:rotate(-135deg)}
.projects-layout{position:relative;isolation:isolate;width:100%;max-width:1160px;margin:0 auto;padding:0 max(38px,env(safe-area-inset-right)) calc(64px + env(safe-area-inset-bottom)) max(38px,env(safe-area-inset-left))}
.projects-intro{display:grid;grid-template-columns:240px minmax(0,540px);align-items:center;justify-content:center;gap:24px;width:100%;max-width:840px;margin:0 auto 32px}
.projects-scene{position:relative;width:100%;height:280px;margin:0;isolation:isolate;user-select:none;touch-action:pan-y}
.projects-scene canvas{display:block;width:100%;height:100%;outline:none}
.projects-fallback{position:absolute;inset:0;pointer-events:none}
.projects-static-avatar{position:absolute;left:50%;bottom:4%;height:92%;aspect-ratio:384/512;transform:translateX(-50%);background-image:url('./assets/tajada-projects-v2.webp');background-size:400% 400%;background-position:100% 100%;background-repeat:no-repeat}
.projects-fallback.is-unavailable .projects-static-avatar{background-image:url('./assets/miguel-sprites-v4.webp');background-size:400% 200%}
.projects-loader{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none}
.projects-loader span{width:24px;height:17px;background:var(--green,#bcd77e);border-radius:75% 10% 75% 10%;transform:rotate(-25deg);animation:breathe 1.5s ease-in-out infinite}
.projects-dialogue.dialogue{grid-column:auto;grid-row:auto;order:initial;min-height:0;width:100%;margin:0;padding:31px 34px 30px;animation:none;opacity:1;transform:none;transition:opacity .24s ease,transform .3s cubic-bezier(.16,1,.3,1)}
.projects-dialogue .speaker{margin:0}
.projects-dialogue p{min-height:0;font-size:20px;font-weight:800;line-height:1.55;text-wrap:pretty}
.projects-dialogue:focus,.projects-board:focus,.project-story:focus{outline:none}
.projects-dialogue:focus-visible,.projects-board:focus-visible{outline:3px solid var(--green);outline-offset:8px}
.projects-layout[data-enhanced=true]:not([data-projects-state=reading]) :is(.projects-dialogue,.projects-board){visibility:hidden;opacity:0;pointer-events:none}
.projects-layout[data-enhanced=true]:not([data-projects-state=reading]) .projects-content{display:none}
.projects-layout[data-enhanced=true][data-project-view=story] :is(.projects-intro,.projects-board){display:none}
.projects-layout[data-enhanced=true][data-project-view=board] .projects-content{display:none}
.projects-layout[data-enhanced=true][data-projects-state=leaving] .projects-intro{display:grid}
.projects-board,.projects-dialogue,.project-story,.project-story :is(section,h2,h3,h4,[id]){scroll-margin-top:calc(var(--projects-header-height) + env(safe-area-inset-top) + 24px)}

/* The notes are links; their order and size carry the hierarchy. */
.projects-board{position:relative;padding:46px 34px 37px;border:15px solid #885d37;border-radius:27px;background-color:#b68a56;background-image:radial-gradient(ellipse at 20% 30%,#75542b26 0 1px,transparent 1.6px),radial-gradient(ellipse at 70% 60%,#f4d2a640 0 1px,transparent 1.7px),linear-gradient(130deg,#c49a65,#ae804e);background-size:7px 11px,13px 9px,100% 100%;box-shadow:inset 0 0 0 2px #6c482c,inset 0 4px 12px #68442055,0 3px 0 3px #51351f,0 0 0 2px #bc8c58;transition:opacity .28s ease}
.projects-board:before{content:'';position:absolute;inset:-11px;pointer-events:none;border:1px solid #c394604d;border-radius:17px}
.board-title{position:absolute;top:-29px;left:50%;transform:translateX(-50%) rotate(-2deg);margin:0;padding:8px 34px 10px;background:#e4bd80;color:#624020;border:3px solid #a87942;border-radius:46% 42% 28% 35% / 19% 24% 30% 29%;box-shadow:0 3px 2px #55391b40;font-size:22px;font-weight:900;line-height:1.2}
.project-notes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:26px 25px;align-items:stretch}
.project-note{--tilt:-1.5deg;position:relative;display:flex;flex-direction:column;align-items:flex-start;min-width:0;min-height:229px;padding:25px 22px 24px;background:#fffbe7;color:#60543f;border-radius:2px 4px 3px 2px;box-shadow:1px 3px 4px #50341742;transform:rotate(var(--tilt));transform-origin:50% 9px;transition:transform .18s ease,box-shadow .18s ease;overflow-wrap:break-word}
.project-note:nth-child(2n){--tilt:1.2deg;background:#fff5d2}
.project-note:nth-child(3n){--tilt:-.6deg}
.project-note:before{content:'';position:absolute;z-index:2;top:8px;left:calc(50% - 5px);width:11px;height:11px;border-radius:50%;background:radial-gradient(circle at 35% 28%,#f6cb86 0 12%,#c87f3e 40%,#985126 100%);box-shadow:1px 3px 2px #603c3466}
.project-note:hover{transform:rotate(0) translateY(-3px);box-shadow:2px 7px 8px #50341750}
.project-note:focus-visible{outline:3px solid #334e20;outline-offset:5px;transform:rotate(0) translateY(-3px);z-index:3}
.note-art{display:flex;align-items:center;justify-content:center;width:100%;height:86px;min-height:86px;margin:0 0 20px;overflow:hidden}
.note-art img{display:block;max-width:100%;max-height:76px;width:100%;height:auto;object-fit:contain}
.note-art-photo img{height:100%;max-height:none;object-fit:cover;object-position:50% 0;border-radius:2px}
.note-art-dark{padding:15px 17px;background:#1b1c23;border-radius:3px}
.note-art-dark img{max-height:50px}
.note-name{justify-content:flex-start;font-size:36px;font-weight:900;line-height:1.05;letter-spacing:-1.4px}
.note-taleme .note-name{color:#5f5686;font-size:43px;transform:rotate(-2deg)}
.note-exameny .note-name{color:#3f6479}
.note-mimber .note-name{font-size:33px;letter-spacing:-.8px}
.note-blogs .note-name{font-size:32px;letter-spacing:-1px}
.note-title{display:block;margin:0 0 7px;font-size:20px;font-weight:900;line-height:1.2}
.note-description{display:block;max-width:25ch;font-size:15px;font-weight:650;line-height:1.5;text-wrap:pretty}
.project-note-featured{min-height:250px}
.note-exameny .note-title,.note-bonsai .note-title,.note-mimber .note-title,.note-blogs .note-title{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.note-taleme .note-description,.note-exameny .note-description,.note-mimber .note-description,.note-blogs .note-description{font-size:17px;line-height:1.5}

/* With no script, the board links to all stories in one readable document. */
.projects-content{width:100%;max-width:800px;min-width:0;margin:52px auto 0;color:#60543f;overflow-wrap:break-word}
.projects-layout[data-enhanced=true][data-project-view=story] .projects-content{margin-top:16px}
.project-story{padding:32px 58px 45px;background:var(--cream,#fffbe7);border-radius:8px 10px 7px 9px;box-shadow:0 4px 0 #d8cfaa;min-width:0;font-size:17px;font-weight:600;line-height:1.78}
.project-story+.project-story{margin-top:48px}
.project-story header{margin:23px 0 31px;padding-bottom:27px;border-bottom:1px solid #ddd2b7}
.project-story h2{margin:0 0 14px;font-size:42px;font-weight:900;line-height:1.13;letter-spacing:-1px;text-wrap:balance}
.project-story h3{margin:0 0 15px;font-size:24px;font-weight:900;line-height:1.3;letter-spacing:-.25px;text-wrap:balance}
.project-story h4{margin:27px 0 10px;font-size:19px;font-weight:850;line-height:1.4}
.project-story p{margin:0 0 22px}
.project-story :is(p,ul,ol,blockquote){max-width:68ch}
.project-story p:last-child{margin-bottom:0}
.project-section+.project-section{margin-top:36px}
.project-story .project-lead{max-width:45ch;font-size:23px;font-weight:750;line-height:1.5}
.project-story .project-role{margin-top:14px;font-size:15px;font-weight:700;color:#786648}
.project-story ul,.project-story ol{margin:0 0 22px;padding-left:23px}
.project-story li+li{margin-top:11px}
.projects-content a{color:#45652b;text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1.5px}
.projects-content a:hover{color:#2c4718}
.projects-content a:focus-visible{outline-color:#45652b;outline-offset:3px;border-radius:2px}
.projects-content :is(section,h2,h3,h4):focus-visible{outline:2px solid #80965e;outline-offset:5px}
.project-board-back{display:inline-flex;align-items:center;min-height:44px;gap:10px;font-size:14px;font-weight:850;line-height:1.4}
.project-board-back:before{content:'';width:8px;height:8px;border-left:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg)}
.project-board-back-end{margin-top:30px}
.project-brand{width:180px;margin:0 0 27px}
.project-brand img{display:block;width:100%;height:auto;max-height:72px;object-fit:contain}
.project-brand-dark{width:210px;padding:14px 18px;background:#1b1c23;border-radius:4px}
.project-story blockquote{margin:30px 0;padding:2px 0 2px 19px;border-left:3px solid #c4cc91;color:#526342}
.project-story figure{margin:32px 0}
.project-story figure img{display:block;width:100%;height:auto;border-radius:7px}
.project-story figcaption{margin-top:9px;color:#7a6747;font-size:13px;line-height:1.5}
.project-story :is(img,video){max-width:100%}
.project-story :is(strong,b){font-weight:850}

@media(max-width:979px){
  .projects-page{--projects-header-height:76px}
  .projects-header{padding-top:calc(8px + env(safe-area-inset-top))}
  .projects-header .wordmark{width:132px;height:59px}
  .projects-layout{padding-left:max(28px,env(safe-area-inset-left));padding-right:max(28px,env(safe-area-inset-right))}
  .projects-intro{grid-template-columns:190px minmax(0,470px);gap:18px}
  .projects-scene{height:250px}
  .projects-dialogue.dialogue{padding:30px 28px}
  .projects-dialogue p{font-size:18px}
  .project-notes{grid-template-columns:repeat(2,minmax(0,1fr));gap:25px}
  .project-note{min-height:220px}
  .project-note-featured{min-height:242px}
  .project-story{padding:28px 42px 39px;font-size:18px;line-height:1.75}
}
@media(max-width:600px){
  .projects-page{--projects-header-height:68px}
  .projects-header{gap:10px;padding-left:max(18px,env(safe-area-inset-left));padding-right:max(18px,env(safe-area-inset-right));padding-bottom:4px}
  .projects-header .wordmark{width:116px;height:52px}
  .projects-back{gap:8px;min-height:44px;padding:9px 7px;font-size:13px}
  .projects-back-arrow{width:8px;height:8px}
  .projects-layout{padding-left:max(18px,env(safe-area-inset-left));padding-right:max(18px,env(safe-area-inset-right));padding-bottom:calc(36px + env(safe-area-inset-bottom))}
  .projects-intro{display:flex;flex-direction:column;gap:14px;max-width:400px;margin-bottom:42px}
  .projects-scene{width:100%;height:210px}
  .projects-dialogue.dialogue{padding:27px 26px 26px;border-radius:36px 40px 31px 37px / 38px 37px 29px 27px}
  .projects-dialogue p{font-size:17px;line-height:1.5}
  .projects-dialogue .speaker{left:24px;top:-14px;font-size:15px;padding:6px 20px}
  .projects-board{padding:35px 20px 26px;border-width:11px;border-radius:20px}
  .board-title{top:-26px;font-size:20px;padding:7px 29px 8px}
  .project-notes{grid-template-columns:1fr;gap:25px;max-width:340px;margin:0 auto}
  .project-note,.project-note-featured{min-height:210px;padding:24px 24px 26px}
  .note-art{height:76px;min-height:76px;margin-bottom:16px}
  .note-description{max-width:30ch;font-size:16px}
  .projects-content{width:calc(100% + 8px);margin-left:-4px;margin-right:-4px}
  .projects-layout[data-enhanced=true][data-project-view=story] .projects-content{margin-top:10px}
  .project-story{padding:22px 24px 31px;font-size:17px;border-radius:7px 8px 6px 9px}
  .project-story header{margin-top:18px;padding-bottom:23px;margin-bottom:28px}
  .project-story h2{font-size:36px}
  .project-story h3{font-size:22px}
  .project-story .project-lead{font-size:21px}
  .project-story+.project-story{margin-top:35px}
  .project-section+.project-section{margin-top:32px}
}
@media(min-width:500px) and (max-width:600px){
  .projects-board{padding-left:18px;padding-right:18px}
  .project-notes{grid-template-columns:repeat(2,minmax(0,1fr));max-width:none;gap:22px 16px}
  .project-note,.project-note-featured{padding-left:16px;padding-right:16px}
  .note-name,.note-taleme .note-name{font-size:30px}
  .note-mimber .note-name,.note-blogs .note-name{font-size:28px}
  .note-taleme .note-description,.note-exameny .note-description,.note-mimber .note-description,.note-blogs .note-description,.note-description{font-size:15px}
}
@media(max-width:340px){
  .projects-page{--projects-header-height:62px}
  .projects-header{gap:5px;padding-left:max(14px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right));padding-top:calc(5px + env(safe-area-inset-top))}
  .projects-header .wordmark{width:102px;height:46px}
  .projects-back{font-size:12px;padding-left:5px;padding-right:5px}
  .projects-layout{padding-left:max(14px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right))}
  .projects-scene{height:190px}
  .projects-dialogue.dialogue{padding-left:22px;padding-right:22px}
  .projects-dialogue p{font-size:16px}
  .projects-board{padding-left:15px;padding-right:15px;border-width:9px}
  .project-note,.project-note-featured{padding-left:20px;padding-right:20px}
  .note-name,.note-taleme .note-name{font-size:34px}
  .note-mimber .note-name,.note-blogs .note-name{font-size:28px}
  .project-story{padding:19px 16px 28px;font-size:16px}
  .project-story h2{font-size:31px}
  .project-story h3{font-size:21px}
  .project-story .project-lead{font-size:19px}
}
@media(orientation:landscape) and (max-height:600px){
  .projects-page{--projects-header-height:54px}
  .projects-header{padding-top:calc(4px + env(safe-area-inset-top));padding-bottom:3px}
  .projects-header .wordmark{width:105px;height:46px}
  .projects-intro{display:grid;grid-template-columns:160px minmax(0,480px);gap:20px;max-width:700px;margin-bottom:34px}
  .projects-scene{height:205px}
  .projects-dialogue.dialogue{padding:25px 25px 24px}
  .projects-dialogue p{font-size:17px;line-height:1.5}
  .projects-dialogue .speaker{font-size:14px;top:-13px}
}
@media(prefers-reduced-motion:reduce){.projects-layout,.projects-layout *,.projects-layout *:before,.projects-layout *:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
body.less-motion .projects-layout,body.less-motion .projects-layout *,body.less-motion .projects-layout *:before,body.less-motion .projects-layout *:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
