/* Change only these three values to resize all site text. */
:root {
  --text-title: 1.25rem;
  --text-middle: 1rem;
  --text-body: 0.875rem;
}
html { font-size: 100%; }
*{box-sizing:border-box}
html{scroll-behavior:auto}
body{margin:0;background:#fff;color:#000;font:400 var(--text-body)/1.9 "Inter","Noto Sans JP","Hiragino Kaku Gothic ProN",sans-serif;letter-spacing:normal}
a{color:#000;text-decoration:none;transition:none;animation:none}
a:hover,a:active,a:visited{color:#000;text-decoration:none}
a:focus-visible{outline:2px solid #000;outline-offset:6px}
header{display:flex;justify-content:space-between;align-items:center;padding:28px 4vw;gap:28px}
.brand{font-size:var(--text-body);font-weight:400;letter-spacing:normal}
nav{display:flex;gap:44px;flex-wrap:wrap;font-size:var(--text-body);letter-spacing:normal}
.landing{min-height:100svh;display:grid;place-items:center;text-align:center;padding:32px}
.landing h1{font-size:var(--text-body);line-height:1.25;font-weight:400;letter-spacing:normal;margin:0 0 28px}
.landing nav{justify-content:center;gap:16px}
.wrap{max-width:1080px;margin:76px auto 110px;padding:0 48px}
h1,h2,h3{font-weight:400}
h1{font-size:var(--text-body);letter-spacing:normal;margin:0 0 42px}
.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:54px 36px}
.tile img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover}
.tile h2{font-size:var(--text-body);letter-spacing:normal;line-height:1.8;margin:16px 0 2px}
.meta{font-size:var(--text-body);letter-spacing:normal;color:#000}
.article{max-width:680px}
.article h1{font-size:var(--text-body);letter-spacing:normal;line-height:1.7;margin-bottom:10px;overflow-wrap:anywhere}
.article .meta{margin-bottom:40px}
.article img{display:block;width:100%;max-width:520px;height:auto;margin:0 auto 44px}
.article p{margin:0 0 28px;line-height:2}
.article .end{border-top:1px solid #eee;margin-top:64px;padding-top:26px;display:flex;justify-content:space-between;gap:24px}
.prose{max-width:680px}
.prose h2{margin-top:42px;font-size:var(--text-body)}
.prose p{margin-bottom:30px}
footer{border-top:1px solid #eee;margin:0 5vw;padding:24px 0;display:flex;justify-content:space-between;font-size:var(--text-body);gap:20px;letter-spacing:normal}
.empty{padding:70px 0 100px}
.note{font-size:var(--text-body);color:#000}
.trial{font-size:var(--text-body);color:#000;text-align:center;padding:8px 16px;background:#fff;border-bottom:1px solid #f2f2f2;font-family:system-ui,sans-serif}
.note-body figure{margin:38px 0}
.note-body figure img{max-width:min(100%,520px);width:auto;max-height:780px;margin:0 auto;height:auto}
.note-body figcaption{font-size:var(--text-body);color:#000;text-align:center;margin-top:10px}
.note-body a{overflow-wrap:anywhere;text-decoration:none}
.note-body h2{font-size:var(--text-body);margin:52px 0 24px}
.note-body h3{font-size:var(--text-body);margin:38px 0 18px}
.note-body blockquote{border-left:2px solid #ddd;margin:30px 0;padding-left:24px}
.note-body pre{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:680px){header{align-items:flex-start;flex-direction:column;padding:24px 5vw;gap:16px}nav{gap:24px}.wrap{margin-top:42px;padding:0 7vw}.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:32px 18px}.article h1{font-size:var(--text-body)}.article .end,footer{flex-wrap:wrap}.article img,.note-body figure img{max-width:94%}}
@media(max-width:390px){.grid{grid-template-columns:1fr}}
.article:not(.journal-article) h1{margin-bottom:36px}

/* Three type sizes: title / subheading / body */
body{font-size:var(--text-body);overflow-wrap:anywhere}
h1,.landing h1,.article h1{font-size:var(--text-title)}
.brand,h2,h3,h4,h5,h6,.prose h2,.note-body h2,.note-body h3{font-size:var(--text-middle)}
nav,.landing nav,.tile h2,.meta,.note,.trial,footer,.note-body figcaption,small,code{font-size:var(--text-body)}
.grid>*{min-width:0}
.article,.prose{min-width:0}
.note-body img{max-width:100%;height:auto}
.note-body table{width:100%;table-layout:fixed;border-collapse:collapse}
.note-body th,.note-body td{overflow-wrap:anywhere}
.note-body iframe{max-width:100%}
header nav a,.landing nav a{display:inline-flex;align-items:center;min-height:44px}
.article .end a,footer a{display:inline-flex;align-items:center;min-height:44px}
@media(max-width:680px){header{gap:8px}nav{column-gap:24px;row-gap:0}.wrap{margin-top:32px;margin-bottom:64px}.article h1{font-size:var(--text-title)}.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:30px 18px}.note-body blockquote{padding-left:14px}.landing nav{gap:0 18px}.article img,.note-body figure img{max-width:94%}}
@media(max-width:390px){.grid{grid-template-columns:1fr}}

.profile-photo{display:block;width:100%;max-width:20rem;height:auto;margin:1.5rem 0 2rem}

/* Compact, shared-width article layout */
.wrap{max-width:72rem;padding:0 2rem;margin-top:3rem;margin-bottom:4rem}
.article,.prose{max-width:62rem}
h1,.article h1,.landing h1{font-size:var(--text-title);margin-bottom:1.5rem}
.article:not(.journal-article) h1{margin-bottom:1.5rem}
.article img,.note-body figure img{width:100%;max-width:100%;max-height:none;height:auto;margin:0 auto}
.article>img{margin-bottom:1.5rem}
.article p{margin-bottom:1.25rem}
.article .end{margin-top:2.5rem;padding-top:1rem}
.photo-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;margin:1.5rem 0 2rem;align-items:start}
.photo-gallery>*{min-width:0;margin:0}
.photo-gallery img,.note-body .photo-gallery img{display:block;width:100%;max-width:100%;height:auto;margin:0}
.note-body .photo-gallery figure{margin:0}
.note-body figure{margin:1.5rem 0}
.note-body figcaption{margin-top:.5rem}
.grid{gap:2rem 1.5rem}
.profile-photo{max-width:100%;width:100%;margin:1.5rem 0 2rem}
@media(max-width:680px){.wrap{padding:0 1.25rem;margin-top:2rem}.photo-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}h1,.article h1,.landing h1{font-size:var(--text-title)}.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:1.5rem 1rem}.article img,.note-body figure img{max-width:100%}}
@media(max-width:390px){.grid{grid-template-columns:1fr}.photo-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Compact About portrait */
.prose .profile-photo{display:block;width:100%;max-width:20rem;height:auto;margin:1.5rem 0 2rem;}
