
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;900&display=swap');

/* Base palette and type. --gold is the historical name of the red accent. */
:root{--bg:#eee5d4;--ink:#191714;--muted:#675e52;--gold:#b5271e;--line:#b9ac96;--body-size:15px;--heading-size:32px;--subheading-size:22px}
*{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:90px}
body{position:relative;isolation:isolate;margin:0;background:var(--bg);color:var(--ink);font:var(--body-size)/1.75 'Noto Sans JP','Noto Sans',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}
a{color:inherit;text-decoration:none}
button{font:inherit;cursor:pointer}
a:focus-visible,button:focus-visible,summary:focus-visible,input:focus-visible{outline:2px solid var(--gold);outline-offset:6px}
body>main,body>footer{width:100%;max-width:1120px;margin-inline:auto}
.brand{color:var(--ink);font-weight:900;font-size:22px;letter-spacing:.08em}
.text-link{display:inline-block;padding:5px 0;border-bottom:1px solid var(--gold);font-size:13px}
.text-link:hover{color:var(--gold)}

/* Masthead, introduction, and favorites. */
.hero{position:relative;display:grid;grid-template-columns:1fr;align-items:center;max-width:1440px;margin:auto;padding:18px 3% 0}
.hero-copy{display:flex;flex-direction:column;align-items:stretch;gap:0;width:100%;padding-top:0;z-index:1}
.hero-copy h1{flex:none;margin:6px 0 16px;color:var(--ink);font-size:clamp(56px,8.5vw,120px);font-weight:900;line-height:1.15;letter-spacing:-.06em;white-space:nowrap}
.hero-copy h1 span{color:var(--gold)}
.intro-block{grid-column:1/-1;margin-top:8px}
.intro-block h2{margin:0;padding:0 0 8px;border-bottom:3px solid var(--ink)}
.intro-block .intro{margin:0;padding:12px 0}
.favorite{display:flex;align-items:center;grid-column:1/-1;gap:16px;min-height:52px;margin-top:0;padding:12px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.favorite p{flex:1;min-width:0;margin:0}
.favorite p a{text-decoration:underline;text-underline-offset:4px}
.favorite-prefix{color:var(--gold);font-weight:700;margin-right:.35em}
.favorite button{border:0;background:transparent;color:var(--gold);font-size:12px;white-space:nowrap}

/* Chapters and expandable profiles. */
.section{max-width:1440px;margin:auto;padding:32px 3% 0}
.section-head{display:flex;align-items:baseline;gap:20px;padding-bottom:8px;border-bottom:3px solid var(--ink)}
.section h2,.intro-block h2{display:flex;align-items:center;gap:12px;font-size:var(--heading-size);font-weight:900;line-height:1.35;letter-spacing:.04em;color:var(--gold)}
.section h2{margin:0}
summary h3,.section>h3,.contact h3{color:var(--ink);font-size:var(--subheading-size);font-weight:700;line-height:1.5;letter-spacing:normal}
.section>h3,.contact h3{margin:12px 0 8px}
.geared-heading{display:flex;align-items:center;gap:10px}
.profiles{margin-left:0}
.profiles details{border-bottom:1px solid var(--line)}
summary{display:flex;align-items:center;gap:10px;padding:12px 0;list-style:none;cursor:pointer}
summary::-webkit-details-marker{display:none}
summary h3{margin:0;padding-left:0}
summary .plus{margin-left:auto;color:var(--gold);font-size:26px;font-weight:400}
details[open] .plus{transform:rotate(45deg)}
.profile-body{max-width:100%;padding:0 20px 14px 32px}
.profile-body strong{color:inherit}
.section-intro{margin:12px 0}
.intro-block .intro,.section-intro,.profile-body,.contact article p,.contact article li p,.favorite p{color:var(--ink);font-size:var(--body-size);line-height:1.75}
.profile-body ul,.contact article .community-list{margin:6px 0;padding-left:18px;list-style-type:disc}
.contact article .community-list ul{margin:6px 0;padding-left:14px;list-style-type:disc}
.profile-body li,.contact article .community-list li{margin:6px 0;color:var(--ink);font-size:var(--body-size);line-height:1.75}
.contact article .community-list li p{margin:0;font:inherit;color:inherit}

/* Selected writing. */
.articles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.article{display:flex;flex-direction:column;align-items:stretch;gap:0;min-width:0;padding:0;border:1px solid var(--line);overflow:hidden}
.article img{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;background:#e3d8c3;border-bottom:1px solid var(--line)}
.article img[hidden]{display:none}
.article-body{padding:10px 12px 12px}
.article time{display:block;margin-bottom:4px;color:var(--muted);font-size:11px;white-space:nowrap}
.article strong{display:block;font-size:16px;font-weight:700;line-height:1.55;overflow-wrap:anywhere}
.article:hover{color:var(--gold);border-color:var(--gold)}

/* Communities and contact cards. */
.contact-grid{display:grid;grid-template-columns:1fr 1fr;gap:28px 0;align-items:stretch}
.contact article{padding-top:0}
.contact-grid>article:first-child{padding-right:24px}
.contact-grid>article+article{padding-left:24px;border-left:1px solid var(--line)}
.contact article p{max-width:none;margin:8px 0}
.contact article ul{margin:8px 0;padding-left:20px}
iframe{display:block;width:100%;max-width:480px;margin-top:10px;border:0;background:var(--bg)}
.contact-links{margin-top:24px;padding-top:12px;border-top:1px solid var(--line)}
.discord-invite{display:flex;align-items:center;gap:14px;max-width:480px;margin-top:14px;padding:14px;border:1px solid var(--ink);border-radius:12px;background:var(--bg);color:var(--ink);transition:background .15s,border-color .15s}
.discord-invite img{flex:none;width:56px;height:56px;border-radius:12px;object-fit:cover;background:#e3d8c3}
.discord-invite-copy{display:flex;flex-direction:column;gap:2px;min-width:0}
.discord-invite-label{color:var(--muted);font-size:11px}
.discord-invite-copy strong{color:var(--ink);font-size:18px;line-height:1.5}
.discord-invite-arrow{margin-left:auto;color:var(--gold);font-size:22px}
.discord-invite:hover{background:#b5271e08;border-color:var(--gold)}
.linktree-mark{display:grid;place-items:center;flex:none;width:56px;height:56px;border-radius:12px;background:#e3d8c3;color:var(--gold);font-size:28px}
.twitter-invite{background:var(--ink);color:var(--bg)}
.twitter-invite .discord-invite-copy strong,.twitter-invite .discord-invite-label,.twitter-invite .discord-invite-arrow{color:var(--bg)}
.twitter-invite .linktree-mark{background:transparent;color:var(--bg)}
.twitter-invite:hover{background:#302c27;border-color:#302c27}
footer{display:flex;align-items:center;gap:20px;margin-top:32px;padding:16px 3%;border-top:1px solid var(--line)}
footer>a:last-child{margin-left:auto;color:var(--muted);font-size:11px}

/* Controls stay at the top of the document, not the viewport. */
.top-actions{position:absolute;top:12px;right:16px;z-index:10;display:flex;align-items:stretch;gap:8px;font:11px/1.5 'Noto Sans JP',system-ui,sans-serif}
.animation-controls{display:flex;align-items:center;gap:12px;padding:5px 8px;border:1px solid var(--line);border-radius:4px;background:var(--bg);color:var(--muted);font:inherit}
.animation-speed{display:flex;align-items:center;gap:6px;white-space:nowrap}
.animation-speed input{width:88px;accent-color:var(--gold);cursor:pointer}
.animation-speed output{min-width:3em;text-align:right;font-variant-numeric:tabular-nums}
.animation-toggle{position:static;padding:3px 0 3px 10px;border:0;border-left:1px solid var(--line);border-radius:0;background:transparent;color:var(--muted);font:11px/1.5 'Noto Sans JP',system-ui,sans-serif;white-space:nowrap}
.animation-toggle:hover{color:var(--ink);border-color:var(--ink)}
.contact-top-button{display:inline-flex;align-items:center;justify-content:center;padding:8px 10px;border:1px solid var(--line);border-radius:4px;background:var(--bg);color:var(--muted);font:inherit;white-space:nowrap}
.contact-top-button:hover{color:var(--ink)}

/* Scene: one source, the conveyor and pickup, and the portrait. */
.hero-scene{position:relative;display:block;grid-column:1/-1;isolation:isolate;overflow:hidden;aspect-ratio:900/540;width:min(100%,960px,max(360px,calc((100svh - 300px)*1.666667)));margin:0 auto;justify-self:center}
.hero-scene .machine{position:absolute;inset:0;bottom:auto;width:100%;max-width:none;margin:0;background:none;transform:none;z-index:2;pointer-events:none}
.hero-scene .machine svg{display:block;width:100%;height:auto;max-height:none;overflow:visible}
.hero-scene .scene-portrait{position:absolute;right:1%;bottom:15%;z-index:0;display:block;width:50%;height:auto;max-width:none;margin:0;pointer-events:none}
.gear-tone-gold{--gear-fill:#191714;--gear-line:#d8bc94}
.gear-tone-red{--gear-fill:#b5271e;--gear-line:#191714}
.gear-tone-paper{--gear-fill:#f3ecdf;--gear-line:#191714}
.gear-outline{fill:var(--gear-fill);stroke:var(--gear-line);stroke-width:1.6}
.gear-core{fill:none;stroke:var(--gear-line);stroke-width:1}
.gear-hub{fill:var(--gear-fill);stroke:var(--gear-line);stroke-width:1.2}
.gear-dot{fill:var(--gear-line)}
.gear-tone-gold .gear-core{stroke:#eee4d6}
.source-detail-ring{fill:none;stroke:#d8bc94;stroke-width:.8}
.source-detail-ticks{fill:none;stroke:#d8bc94;stroke-width:1.1}
.source-ring-1{fill:#eee4d6;stroke:#d8bc94;stroke-width:2}
.source-ring-2{stroke:#191714;stroke-width:1.2}
.source-tie{fill:#191714;stroke:#191714;stroke-width:.6;stroke-linejoin:round}
.abstract-drive-belt{fill:none;stroke:var(--ink);stroke-width:2;stroke-dasharray:3 15;stroke-linecap:round}
.main-conveyor-belt{fill:none;stroke:var(--gold);stroke-width:14}
.main-conveyor-marks{fill:none;stroke:var(--bg);stroke-width:1.5;stroke-dasharray:3 20}
.conveyor-box{stroke:var(--ink);stroke-width:1.4}
.paper-box{fill:#f3ecdf}
.box-seam{fill:none;stroke:var(--ink);stroke-width:1.4}
.pickup-rod{stroke:var(--ink);stroke-width:4;stroke-linecap:round}
.pickup-rocker{stroke:var(--ink);stroke-width:3;stroke-linecap:round}
.pickup-arm{fill:none;stroke:var(--gold);stroke-width:5;stroke-linejoin:round}
.pickup-joint{fill:var(--bg);stroke:var(--ink);stroke-width:1.5}
.pickup-claw{fill:none;stroke:var(--ink);stroke-width:2;stroke-linejoin:round}
.pickup-mount-base{fill:var(--bg);stroke:var(--ink);stroke-width:2}
.pickup-ground{fill:none;stroke:var(--ink);stroke-width:3}
.pickup-ground-hatch{fill:none;stroke:var(--ink);stroke-width:1.5}
.pickup-fixed-bearing{fill:var(--bg);stroke:var(--ink);stroke-width:2.5}

/* Lightweight heading gears. */
.profile-gear{flex:none;width:23px;height:23px;overflow:visible;transform-origin:center;animation:profile-gear-turn var(--profile-gear-duration,14s) linear infinite;animation-play-state:paused}
.profile-gear.is-visible{animation-play-state:running}
.profile-gear-outline{fill:var(--bg);stroke:var(--ink);stroke-width:3}
.profile-gear-ring{fill:none;stroke:var(--ink);stroke-width:2}
.profile-gear-center{fill:var(--gold)}
html[data-animations-paused="true"] .profile-gear,html.document-inactive .profile-gear{animation-play-state:paused}
@keyframes profile-gear-turn{to{transform:rotate(360deg)}}

/* Responsive adjustments. */
@media(max-width:850px){
  .favorite{flex-wrap:wrap}
  .section{padding-top:28px}
  .contact-grid{row-gap:20px}
  .hero-scene .scene-portrait{right:0}
}
@media(max-width:560px){
  :root{--body-size:14px;--heading-size:28px}
  .brand{font-size:19px}
  .hero{padding:14px 4% 0}
  .hero-copy{padding-top:40px}
  .hero-copy h1{margin:0 0 12px;font-size:clamp(54px,15vw,80px)}
  .favorite{flex-wrap:nowrap}
  .section{padding:24px 4% 0}
  .section-head{display:block}
  .profile-body{padding-left:12px;padding-right:0}
  .articles{gap:10px}
  .article-body{padding:8px}
  .article strong{font-size:13px}
  .article time{font-size:10px}
  .contact-grid{grid-template-columns:1fr;row-gap:18px}
  .contact-grid>article:first-child{padding-right:0}
  .contact-grid>article+article{padding-top:18px;padding-left:0;border-left:0;border-top:1px solid var(--line)}
  .discord-invite{gap:12px;padding:12px}
  .discord-invite-copy strong{font-size:16px}
  footer{flex-wrap:wrap;margin-top:24px;padding:14px 4%}
  footer>a:last-child{width:100%}
  .top-actions{top:6px;right:8px;gap:5px;font-size:10px}
  .animation-controls{gap:6px;padding:4px 6px}
  .animation-speed input{width:64px}
  .animation-toggle{font-size:10px}
  .contact-top-button{padding:7px 8px}
  .hero-scene{aspect-ratio:900/600;width:100%;margin-inline:0}
  .hero-scene .machine{top:auto;bottom:0}
  .hero-scene .scene-portrait{right:-3%;bottom:16%;width:56%}
}
@media(max-width:360px){.articles{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
