.about-certificates{--cert-ink:#292721;--cert-muted:#655f54;--cert-paper:#f8f6f1;background:#efede7;color:var(--cert-ink);padding:88px 0 64px;scroll-margin-top:110px}
.cert-heading{max-width:1240px;margin:0 auto 45px;text-align:center}
.cert-heading h2{font:400 clamp(42px,4.7vw,72px)/1.05 var(--serif);letter-spacing:-.035em;margin:0}
.cert-heading h2 em{font-weight:400}
.cert-book{max-width:1240px;margin:auto;background:var(--cert-paper);border:1px solid #d9d2c5;box-shadow:0 26px 42px -28px #51493666,0 4px 0 -1px #e7e1d6,0 8px 0 -3px #d3ccbf;perspective:2400px}
.cert-pages{position:relative;isolation:isolate;touch-action:pan-y pinch-zoom;perspective:2400px}
.cert-spread{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);min-height:590px;border-bottom:1px solid #ded8cc;background:var(--cert-paper)}
.cert-book.is-ready .cert-spread{border-bottom:0}
.cert-copy{display:flex;flex-direction:column;justify-content:center;align-items:start;padding:60px clamp(32px,5vw,80px);background:linear-gradient(90deg,#f8f6f1 93%,#e7e2d9 100%);min-width:0}
.cert-copy h3{font:400 clamp(34px,3.4vw,51px)/1.08 var(--serif);letter-spacing:-.025em;margin:0 0 24px;max-width:420px;overflow-wrap:break-word}
.cert-copy>p{font-size:15px;line-height:1.8;color:var(--cert-muted);margin:0;max-width:360px}
.cert-copy dl{margin:34px 0 0;border-top:1px solid #dbd4c7;padding-top:22px;width:100%;max-width:360px}
.cert-copy dt{font-size:10px;line-height:1.5;letter-spacing:.1em;text-transform:uppercase;color:var(--cert-muted);margin-bottom:8px}
.cert-copy dd{font-size:13px;line-height:1.7;margin:0;overflow-wrap:anywhere}
.cert-paper{display:flex;align-items:center;justify-content:center;padding:32px 38px;background:linear-gradient(90deg,#ddd7cc 0,#f0ece5 2%,#f3f0ea 9%,#f3f0ea 100%);min-width:0;min-height:590px;text-decoration:none;cursor:zoom-in}
.cert-paper>img{display:block;width:100%;height:526px;max-width:100%;object-fit:contain;filter:drop-shadow(0 7px 9px #574d3b22)}
.cert-navigation{display:flex;gap:22px;align-items:center;justify-content:center;margin-top:30px}
.cert-counter{min-width:44px;text-align:center;font:13px/1 var(--sans);letter-spacing:.12em;color:var(--cert-muted)}
.cert-navigation button{display:grid;place-items:center;width:48px;height:48px;border:0;background:none;cursor:pointer;color:var(--cert-ink);transition:opacity .2s,transform .2s}
.cert-navigation button:hover:not(:disabled){transform:scale(1.12)}
.cert-navigation button:disabled{opacity:.22;cursor:default}
.cert-navigation svg,.cert-close svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.3}
.cert-sr{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.about-certificates button:focus-visible,.about-certificates a:focus-visible{outline:2px solid #786037;outline-offset:3px}
.cert-turn-base,.cert-turn-leaf{position:absolute;top:0;height:100%;pointer-events:none}
.cert-turn-base{z-index:2;width:50%}
.cert-turn-leaf{z-index:3;width:50%;transform-style:preserve-3d;will-change:transform}
.cert-turn-face{position:absolute;inset:0;backface-visibility:hidden;-webkit-backface-visibility:hidden;overflow:hidden;background:var(--cert-paper)}
.cert-turn-face.is-back{transform:rotateY(180deg)}
.cert-turn-face:after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,#44372422,transparent 25%,transparent 75%,#44372414)}
.cert-turn-face>.cert-copy,.cert-turn-face>.cert-paper,.cert-turn-base>.cert-copy,.cert-turn-base>.cert-paper{height:100%;min-height:0}
.cert-book.is-turning .cert-paper{pointer-events:none}
.cert-dialog{width:calc(100vw - 32px);max-width:1400px;height:calc(100dvh - 24px);max-height:none;margin:auto;padding:52px 18px 18px;border:0;background:transparent;overflow:hidden;color:white}
.cert-dialog[open]{display:flex;flex-direction:column}
.cert-dialog::backdrop{background:#161613e8;backdrop-filter:blur(5px)}
.cert-dialog .cert-close{position:absolute;top:0;right:0;display:grid;place-items:center;width:44px;height:44px;background:none;color:white;border:0;border-radius:0;cursor:pointer;z-index:5}
.cert-dialog .cert-close:hover{background:#ffffff12;color:white}
.cert-dialog-canvas{flex:1;min-height:0;overflow:auto;text-align:center;overscroll-behavior:contain}
.cert-full-button{display:block;width:100%;height:100%;margin:0 auto;padding:0;border:0;background:none;cursor:zoom-in;color:inherit}
.cert-full-button img{display:block;width:100%;height:100%;max-width:none;object-fit:contain;margin:auto}
.cert-dialog-canvas.is-zoomed{text-align:left}
.cert-dialog-canvas.is-zoomed .cert-full-button{height:auto;width:var(--cert-zoom-width,1400px);max-width:none;cursor:zoom-out}
.cert-dialog-canvas.is-zoomed img{height:auto;width:100%}
html.cert-viewer-open{overflow:hidden}
@media(max-width:1000px){.cert-spread{min-height:500px}.cert-copy{padding:36px 30px}.cert-copy h3{font-size:36px}.cert-paper{min-height:500px;padding:25px}.cert-paper>img{height:450px}}
@media(max-width:700px){.about-certificates{padding:54px 0 32px}.cert-heading{margin-bottom:30px}.cert-heading h2{font-size:42px;line-height:1.05}.cert-heading h2 em{display:block}.cert-pages{overflow:hidden}.cert-spread{display:flex;flex-direction:column;min-height:0}.cert-copy{order:2;padding:30px 25px 32px;background:var(--cert-paper);min-height:250px}.cert-copy h3{font-size:33px;margin:0 0 16px}.cert-copy>p{font-size:14px;line-height:1.7}.cert-copy dl{margin-top:22px;padding-top:17px}.cert-copy dt{font-size:9px}.cert-copy dd{font-size:12px}.cert-paper{order:1;min-height:0;height:402px;padding:24px;background:#e9e3d9;border-bottom:1px solid #d7cebd}.cert-paper>img{height:354px}.cert-navigation{margin-top:20px;gap:19px}.cert-turn-leaf{width:100%}.cert-turn-face>.cert-spread{height:100%}.cert-turn-face>.cert-spread>.cert-copy{flex:1}.cert-dialog{width:100vw;height:100dvh;max-width:none;padding:52px 12px 12px}.cert-dialog .cert-close{top:5px;right:5px}}
@media(prefers-reduced-motion:reduce){.cert-navigation button{transition:none}}

/* Give the project heading breathing room below the certificate book. */
.about-certificates + .about-simple-projects{padding-top:clamp(56px,6vw,88px)}
