/* Content-only layouts. The existing carousel and Overview frame are unchanged. */
.page-layout {
  --glass-fill:rgba(255,255,255,.28); --glass-edge:rgba(255,255,255,.55);
  --glass-shadow:rgba(30,60,45,.12); --glass-blur:18px;
  --glass-hover-fill:rgba(255,255,255,.06); --glass-opaque:rgba(226,239,231,.85);
  --glass-scrim:rgba(226,239,231,.72);
  --page-gap:clamp(12px,2svh,24px); --page-heading:clamp(32px,4.1vw,58px);
}
[data-theme=evening] .page-layout {
  --glass-fill:rgba(255,235,215,.16); --glass-edge:rgba(255,225,200,.35);
  --glass-shadow:rgba(60,30,20,.25); --glass-hover-fill:rgba(255,235,215,.06);
  --glass-opaque:rgba(255,235,215,.85); --glass-scrim:rgba(255,235,215,.76);
}
[data-theme=night] .page-layout {
  --glass-fill:rgba(20,40,45,.42); --glass-edge:rgba(255,255,255,.16);
  --glass-shadow:rgba(0,0,0,.35); --glass-hover-fill:rgba(20,40,45,.06);
  --glass-opaque:rgba(20,40,45,.85); --glass-scrim:rgba(20,40,45,.48);
}
/* A local tint protects contrast over both bright and dark photo details. */
#main .page-layout .glass {
  position:relative; isolation:isolate; color:var(--reading-ink);
  background:linear-gradient(var(--glass-scrim),var(--glass-scrim)),var(--glass-fill)!important;
  border:1px solid var(--glass-edge)!important; border-radius:20px;
  backdrop-filter:blur(var(--glass-blur)) saturate(150%);
  -webkit-backdrop-filter:blur(var(--glass-blur)) saturate(150%);
  box-shadow:0 10px 30px var(--glass-shadow),inset 0 1px 0 rgba(255,255,255,.35);
  transition:transform 180ms ease,opacity 180ms ease;
}
#main .page-layout .glass::after {
  content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;border-radius:inherit;
  background:var(--glass-hover-fill);border:1px solid var(--glass-edge);opacity:0;
  transition:opacity 180ms ease;
}
@media(hover:hover){
  #main .page-layout :is(a,button).glass:hover {transform:translateY(-3px)}
  #main .page-layout :is(a,button).glass:hover::after {opacity:1}
}
#main .page-layout :is(a,button).glass:active {transform:translateY(-3px)}
#main .page-layout :is(a,button).glass:active::after {opacity:1}
#main .page-layout .glass .glass {
  background:rgba(255,255,255,.08)!important;backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:none;
}
/* Each detail owns its overflow; the document itself never scrolls in ring mode. */
.rm-main #main {bottom:calc(58px + env(safe-area-inset-bottom,0px))}
.rm-main #main>.page-layout {padding:0;overflow:hidden!important;min-height:0;height:100%;display:block}
.page-layout .page-body {
  width:100%;height:100%;min-height:0;overflow-x:hidden;overflow-y:auto;
  overscroll-behavior:contain;touch-action:pan-y;scrollbar-width:none;
  padding:clamp(8px,1.5svh,20px) clamp(20px,6vw,110px) 20px;
}
.page-layout .page-body::-webkit-scrollbar {display:none}
.page-layout .page-body:focus-visible {outline:1px solid var(--accent);outline-offset:-4px}
.rm-main #main>.page-layout::after {
  content:"";position:absolute;bottom:0;left:0;right:0;height:30px;pointer-events:none;z-index:5;
  background:linear-gradient(transparent,color-mix(in srgb,var(--haze-tint) 85%,transparent));
  opacity:0;transition:opacity 180ms ease;
}
.rm-main #main>.page-layout.has-more-below::after {opacity:1}
#main .page-layout .section-content,#main .page-layout .intro-layout {max-width:1160px;width:100%;margin:0 auto;min-width:0}
#main .page-layout :is(.section-heading,.about-column,.project-card,.milestone-panel,.milestone,.connect-panel,.connect-message,.about-composition) {
  background:none!important;border-radius:0;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
}
#main .page-layout .section-heading {display:block;border:0;padding:0;margin:0 0 var(--page-gap);width:100%}
#main .page-layout .section-heading h2,#main .page-layout .connect-panel h2 {font-size:var(--page-heading);line-height:1.08;letter-spacing:-.04em}
#main .page-layout .eyebrow {font-size:15px;line-height:1.35;letter-spacing:.08em;margin-bottom:8px}
#main .page-layout :is(p,li,a,button,figcaption,.micro,.tag-list span,.earned,.signature,.page-footer) {font-size:max(15px,1em)}
#main .page-layout p:not(.eyebrow) {font-size:clamp(15px,1.15vw,17px);line-height:1.45}
#main .page-layout :is(a,button) {min-height:44px}
#main .page-layout :is(.button,.project-link,.social-links a,#copy-email) {display:inline-flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px;min-height:44px}
#main .page-layout .section-heading.split>p {display:block;font-size:15px;margin:12px 0 0;max-width:none}
#main .page-layout .section-heading.split>p br {display:none}
#main .page-layout .section-heading.split>p br::after {content:" "}
#main .page-layout .chapter-footer {display:none}
/* 01 — one centered identity, with the existing serif family. */
#main .layout-intro .page-body {display:flex;align-items:safe center}
#main .layout-intro .intro-layout {display:block;text-align:center}
#main .layout-intro .hero-copy {width:100%;max-width:780px;margin:auto;padding:0}
#main .layout-intro .hero-kicker,#main .layout-intro .hero-actions,#main .layout-intro .hero-foot {display:flex;justify-content:center;align-items:center;flex-wrap:wrap}
#main .layout-intro .hero-kicker {margin:0 0 clamp(10px,2svh,24px);font-size:15px}
#main .layout-intro .hero-kicker svg {width:28px;height:28px}
#main .layout-intro h1 {font-family:Georgia,'Times New Roman',serif;margin:0 0 clamp(12px,2svh,24px)}
#main .layout-intro .identity-reveal {text-align:center;height:clamp(92px,18svh,158px);font-family:inherit}
#main .layout-intro .identity-handle {font:italic 400 clamp(66px,10vw,124px)/1 Georgia,'Times New Roman',serif}
#main .layout-intro .identity-name {font-size:clamp(38px,5.5vw,70px)}
#main .layout-intro .hero-role {text-align:center;margin:0;font-size:clamp(18px,1.7vw,24px)}
#main .layout-intro .hero-role span {font-size:16px}
#main .layout-intro .hero-description {margin:clamp(10px,2svh,22px) auto 0;max-width:48ch}
#main .layout-intro .hero-actions {margin-top:clamp(12px,2.5svh,28px);gap:12px}
#main .layout-intro .hero-actions .button {width:auto;min-height:44px;font-size:15px}
#main .layout-intro .hero-foot {margin-top:clamp(12px,2svh,24px);font-size:15px;letter-spacing:.03em;gap:8px}
/* 02 — statement followed by three plain editorial columns. */
#main .layout-about .about-composition {display:block}
#main .layout-about .section-heading h2 {border-left:2px solid var(--accent);padding-left:20px}
#main .layout-about .about-columns {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(22px,3vw,48px)}
#main .layout-about .about-column {min-width:0;padding:0;border:0}
#main .layout-about .column-label {font-size:20px;line-height:1.2;margin:0 0 18px;color:var(--accent)}
#main .layout-about .about-column>h3:not(.column-label) {font-size:clamp(22px,2vw,28px);line-height:1.2;margin:0 0 16px}
#main .layout-about .about-column p:not(.eyebrow) {margin:0 0 16px}
#main .layout-about .signature {font-size:22px;margin-top:20px;padding:0}
#main .layout-about .focus-copy {padding:0;margin-top:22px}
#main .layout-about .focus-copy h3 {font-size:clamp(22px,2vw,28px);line-height:1.2;margin:0 0 14px}
#main .layout-about .inline-skills {font-size:15px;line-height:1.5;gap:3px 0}
#main .layout-about .inline-skills li {font-size:15px}
#main .layout-about .inline-skills li::after {padding-inline:6px}
#main .layout-about .philosophy {margin:24px 0 0;padding:0 0 0 18px;border-left:1px solid var(--accent)}
#main .layout-about .philosophy blockquote {font-size:clamp(25px,2.5vw,34px);line-height:1.22;margin:0 0 14px}
/* 03 — a numbered colonnade, no artwork or card surfaces. */
#main .layout-projects .project-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0}
#main .layout-projects .project-column {display:flex;flex-direction:column;min-width:0;padding:0 clamp(16px,2.5vw,36px);border:0}
#main .layout-projects .project-column:first-child {padding-left:0}
#main .layout-projects .project-column:last-child {padding-right:0}
#main .layout-projects .project-column+.project-column {border-left:1px solid var(--border)}
#main .layout-projects .project-number {font:italic clamp(32px,4vw,52px)/1 Georgia,serif;color:var(--accent);margin:0 0 18px}
#main .layout-projects .project-body {padding:0;display:flex;flex-direction:column;flex:1;min-width:0}
#main .layout-projects .tag-list {display:flex;flex-wrap:wrap;gap:4px 8px;margin:0 0 14px}
#main .layout-projects .tag-list span {font-size:15px;padding:0;border:0;background:none}
#main .layout-projects .project-body h3 {font-size:clamp(24px,2.3vw,34px);line-height:1.12;margin:0 0 16px}
#main .layout-projects .project-body p {margin:0 0 16px;line-height:1.45}
#main .layout-projects .project-link {margin-top:auto;align-self:flex-start;font-size:15px;width:auto}
#main .layout-projects .project-captions {display:flex;flex-direction:column;gap:4px;font-size:15px;line-height:1.3;margin-top:16px;color:var(--reading-muted)}
#main .layout-projects .section-end-link {margin:16px 0 0;display:inline-flex;align-items:center;gap:16px;font-size:15px}
/* 04 — three rows on one connected timeline. */
#main .layout-achievements .milestone-panel {display:block;padding:0}
#main .layout-achievements .milestone {position:relative;display:grid;grid-template-columns:24px 1fr auto;gap:20px;align-items:center;padding:clamp(12px,2svh,24px) 0;border:0}
#main .layout-achievements .milestone+.milestone {border-top:1px solid var(--border)}
#main .layout-achievements .milestone-number {display:none}
#main .layout-achievements .badge-seal {width:16px;height:16px;min-height:0;border:1px solid var(--accent);border-radius:50%;background:var(--accent-soft);color:var(--accent);font-size:0;box-shadow:0 0 0 5px color-mix(in srgb,var(--accent) 12%,transparent)}
#main .layout-achievements .milestone h3 {font-size:clamp(20px,2.5vw,30px);line-height:1.18;margin:0 0 6px}
#main .layout-achievements .milestone .eyebrow {font-size:15px;margin:0;letter-spacing:.04em}
#main .layout-achievements .milestone p:not(.eyebrow) {margin:2px 0 0;font-size:15px}
#main .layout-achievements .earned {font-size:15px;padding:0;border:0;background:none;white-space:nowrap}
#main .layout-achievements .closing-note {margin-top:16px;font-size:17px}
/* 05 — at most three live posts; one or two stay centered. */
#main .layout-notes .medium-grid {display:flex;justify-content:center;gap:18px;overflow:visible;scroll-snap-type:none;touch-action:pan-y}
#main .layout-notes .medium-card {flex:0 1 calc((100% - 36px)/3);min-width:0;display:flex;flex-direction:column;overflow:hidden}
#main .layout-notes .medium-cover {width:100%;aspect-ratio:16/9;max-height:clamp(90px,18svh,180px);border:0;flex:none;overflow:hidden}
#main .layout-notes .medium-cover img {width:100%;height:100%;object-fit:cover;transform:none!important;transition:none}
#main .layout-notes .medium-body {padding:16px;display:flex;flex-direction:column;gap:8px;min-width:0;background:none}
#main .layout-notes .medium-body h3 {font-size:clamp(18px,1.7vw,25px);line-height:1.2;order:0;-webkit-line-clamp:2;margin:0}
#main .layout-notes .medium-meta {order:1;font-size:15px;line-height:1.2;margin:0}
#main .layout-notes .medium-meta time {font-size:15px}
#main .layout-notes .medium-body p {order:2;font-size:15px;line-height:1.35;margin:0;-webkit-line-clamp:2}
#main .layout-notes .medium-topics,#main .layout-notes .medium-footer {display:none}
#main .layout-notes .notes-status {font-size:15px;line-height:1.2;margin:0 0 10px}
#main .layout-notes .notes-outro {display:flex;justify-content:space-between;align-items:center;flex-direction:row;border:0;padding:0;margin:16px 0 0;gap:12px}
#main .layout-notes .notes-outro p {display:block;font-size:17px}
#main .layout-notes .notes-outro .button {font-size:15px;width:auto}
#main .layout-notes .skeleton {animation:none}
#main .layout-notes .skeleton .medium-body {min-height:0}
#main .layout-notes .skeleton::after {animation:none;transform:none}
/* 06 — a large address opposite a vertical social directory. */
#main .layout-connect .connect-panel {display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,.7fr);gap:clamp(30px,6vw,90px);text-align:left;padding:0}
#main .layout-connect .connect-message {min-width:0}
#main .layout-connect .connect-star {display:none}
#main .layout-connect .connect-message>p:not(.eyebrow) {margin:18px 0}
#main .layout-connect .email-line {display:flex;flex-wrap:wrap;justify-content:flex-start;gap:12px;margin-top:22px}
#main .layout-connect .email-line>span {font:italic clamp(18px,2.2vw,30px)/1.3 Georgia,serif;overflow-wrap:anywhere}
#main .layout-connect #copy-email {font-size:15px}
#main .layout-connect .social-links {display:flex;flex-direction:column;justify-content:center;gap:12px;border:0;border-left:1px solid var(--border);padding:0 0 0 clamp(24px,3vw,44px);margin:0}
#main .layout-connect .social-links a {width:100%;min-height:48px;font-size:17px;text-decoration:none}
#main .layout-connect .page-footer {display:flex;flex-wrap:wrap;gap:8px 24px;font-size:15px;line-height:1.3;margin-top:clamp(20px,4svh,40px);padding:0}
#main .layout-connect .page-footer>span:nth-child(2) {font-size:15px;letter-spacing:.04em}
/* Only entry motion; no persistent transformed ancestor around glass. */
@keyframes layout-enter {from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.rm-main:not(.rm-overview) #main>.page-layout.rm-current .page-body {animation:layout-enter 360ms ease-out}
@media(max-width:767px) {
  .page-layout {--glass-blur:12px;--page-heading:clamp(30px,8.4vw,40px);--page-gap:14px}
  .page-layout .page-body {padding:8px 20px 16px}
  #main .page-layout .glass {box-shadow:0 10px 30px var(--glass-shadow)}
  #main .page-layout .section-heading {margin-bottom:14px}
  #main .page-layout .section-heading.split>p {margin-top:8px}
  #main .page-layout .eyebrow {font-size:15px;letter-spacing:.025em;margin-bottom:6px}
  #main .layout-intro .hero-kicker {font-size:15px;line-height:1.2;gap:8px;margin-bottom:10px}
  #main .layout-intro .hero-kicker svg {width:22px;height:22px}
  #main .layout-intro .identity-reveal {height:clamp(84px,15svh,125px)}
  #main .layout-intro .hero-actions {display:grid;grid-template-columns:1fr 1fr;gap:12px}
  #main .layout-intro .hero-actions .button {padding:10px;gap:6px;font-size:15px;width:100%}
  #main .layout-intro .hero-actions svg {width:18px;height:18px}
  #main .layout-intro .hero-foot {font-size:15px;line-height:1.25}
  #main .layout-about .about-columns {grid-template-columns:1fr;gap:24px}
  #main .layout-about .column-label {font-size:19px;margin-bottom:12px}
  #main .layout-about .section-heading h2 {padding-left:14px}
  #main .layout-about .about-column>h3:not(.column-label) {font-size:23px}
  #main .layout-about .focus-copy {margin-top:16px}
  #main .layout-about .philosophy {margin-top:16px}
  #main .layout-about .philosophy blockquote br {display:none}
  #main .layout-about .philosophy blockquote br::after {content:" "}
  #main .layout-projects .project-grid {grid-template-columns:1fr;gap:16px}
  #main .layout-projects .project-column,#main .layout-projects .project-column:first-child,#main .layout-projects .project-column:last-child {padding:0 0 16px;border:0;border-bottom:1px solid var(--border);display:grid;grid-template-columns:44px 1fr;gap:8px 12px}
  #main .layout-projects .project-number {font-size:25px;margin:0}
  #main .layout-projects .project-body h3 {font-size:24px;margin-bottom:8px}
  #main .layout-projects .project-body h3 br {display:none}
  #main .layout-projects .project-body h3 br::after {content:" "}
  #main .layout-projects .tag-list {margin-bottom:8px}
  #main .layout-projects .project-body p {margin-bottom:8px}
  #main .layout-projects .project-captions {grid-column:2;margin:0}
  #main .layout-achievements .milestone {grid-template-columns:16px 1fr auto;gap:12px;padding:16px 0}
  #main .layout-achievements .milestone h3 {font-size:20px}
  #main .layout-achievements .earned {font-size:15px;grid-column:auto;justify-self:end}
  #main .layout-achievements .badge-seal {width:12px;height:12px}
  #main .layout-notes .section-heading {margin-bottom:8px}
  #main .layout-notes .section-heading.split>p {font-size:15px;line-height:1.2;margin-top:6px}
  /* Live loading feedback remains accessible without consuming phone height. */
  #main .layout-notes .notes-status {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;margin:0;padding:0}
  #main .layout-notes .medium-grid {display:flex;flex-direction:column;gap:8px;align-items:center}
  #main .layout-notes .medium-card {flex:none;display:grid;grid-template-columns:clamp(64px,20vw,86px) minmax(0,1fr);width:100%;max-width:520px;min-height:96px}
  #main .layout-notes .medium-cover {width:100%;height:100%;max-height:none;aspect-ratio:auto;min-height:96px;border:0}
  #main .layout-notes .medium-body {padding:8px 10px;gap:4px}
  #main .layout-notes .medium-empty {display:block}
  #main .layout-notes .medium-body h3 {font-size:16px;line-height:1.15;-webkit-line-clamp:2;letter-spacing:-.02em}
  #main .layout-notes .medium-meta,#main .layout-notes .medium-meta time {font-size:15px;line-height:1.1}
  #main .layout-notes .medium-body p {font-size:15px;line-height:1.2;-webkit-line-clamp:1}
  #main .layout-notes .notes-outro {margin-top:8px;gap:6px;align-items:center;flex-direction:row;flex-wrap:wrap}
  #main .layout-notes .notes-outro p {font-size:15px;line-height:1.2}
  #main .layout-notes .notes-outro .button {padding:8px 12px;width:auto}
  #main .layout-connect .connect-panel {grid-template-columns:1fr;gap:20px}
  #main .layout-connect .connect-message>p:not(.eyebrow) {margin:12px 0}
  #main .layout-connect .email-line {margin-top:12px;gap:8px}
  #main .layout-connect .email-line>span {font-size:clamp(18px,5.1vw,22px)}
  #main .layout-connect .social-links {padding:0;border-left:0;border-top:1px solid var(--border);padding-top:16px;gap:8px}
  #main .layout-connect .social-links a {min-height:44px;font-size:16px;padding:8px 14px}
  #main .layout-connect .page-footer {font-size:15px;margin-top:16px;gap:8px}
}
@media(max-width:767px) and (max-height:700px) {
  #main .layout-notes .section-heading h2 {font-size:30px;line-height:1.05}
  #main .layout-notes .section-heading .eyebrow {margin-bottom:4px}
  #main .layout-notes .section-heading.split>p {margin-top:4px}
  #main .layout-notes .medium-grid {gap:6px}
  #main .layout-notes .notes-outro {gap:4px}
}
@media(prefers-reduced-transparency:reduce) {
  #main .page-layout .glass {background:var(--glass-opaque)!important;backdrop-filter:none;-webkit-backdrop-filter:none}
}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
  #main .page-layout .glass {background:var(--glass-opaque)!important}
}
@media(prefers-reduced-motion:reduce) {
  #main .page-layout .page-body,#main .page-layout .glass,#main .page-layout .glass::after,#main .page-layout::after {animation:none!important;transition:none!important}
  #main .page-layout :is(a,button).glass:is(:hover,:active) {transform:none}
}
/* Without the carousel enhancement, retain readable ordinary document flow. */
html:not(.rm-main) .page-layout {min-height:100svh;height:auto}
html:not(.rm-main) .page-layout .page-body {height:auto;overflow:visible}
