/* ---------- Fonts ----------
   Both typefaces are licensed and are NOT in this repo. Put the files in /fonts/ and the
   @font-face blocks pick them up; until then the site uses open fallbacks.

   Diatype (ABC Dinamo)  -> body, index, all pages
     fonts/ABCDiatypeVariable.woff2, fonts/ABCDiatypeVariable-Italic.woff2
     fonts/ABCDiatypeExtended-BlackItalic.woff2  (red banner)
   Gridular (Cargo Type) -> the name "Yui Kondo" in the header
     fonts/Gridular-Regular.woff2   (add Gridular-Bold.woff2 if you have it)               */
@font-face{font-family:"ABC Diatype Variable";src:url(../fonts/ABCDiatypeVariable.woff2) format("woff2");font-weight:100 900;font-display:swap}
@font-face{font-family:"ABC Diatype Variable";src:url(../fonts/ABCDiatypeVariable-Italic.woff2) format("woff2");font-weight:100 900;font-style:italic;font-display:swap}
@font-face{font-family:"ABC Diatype Extended";src:url(../fonts/ABCDiatypeExtended-BlackItalic.woff2) format("woff2");font-weight:900;font-style:italic;font-display:swap}
@font-face{font-family:"Gridular";src:url(../fonts/Gridular-Regular.woff2) format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:"Gridular";src:url(../fonts/Gridular-Bold.woff2) format("woff2");font-weight:700;font-display:swap}

:root{
  --fg:#000;
  --bg:#fff;
  --red:#0006a3;   /* accent: deep blue (the sea and the profile photo are tinted toward it) */
  --rule:1px solid var(--fg);
  --muted:#777;
  --pad:12px;
  --body: "ABC Diatype Variable","Geist","Inter Tight",Helvetica,Arial,sans-serif;
  --display: "ABC Diatype Extended","Archivo",Helvetica,Arial,sans-serif;
  --name: "Gridular", var(--body);   /* falls back to the body face if Gridular is absent */
  --fs: clamp(16px, 1.15vw + 9px, 21px);
}
*{box-sizing:border-box}
html{background:var(--bg);color:var(--fg)}
body{
  margin:0;
  font-family:var(--body);
  font-size:var(--fs);
  line-height:1.15;
  letter-spacing:-0.004em;
  font-weight:545;
  font-variation-settings:"wght" 545;
  -webkit-font-smoothing:antialiased;
  min-height:100vh;min-height:100svh;display:flex;flex-direction:column;
}
/* footer always at the bottom of the window, even on short pages */
.site-footer{margin-top:auto !important}
a{color:inherit;text-decoration:none}
p{margin:0 0 1em}
h2,h3{font-weight:545;font-size:inherit;margin:0}
code{font-family:ui-monospace,Menlo,monospace;font-size:.9em}
.muted{color:var(--muted)}
.indent{text-indent:3em}

/* ---------- Header ---------- */
.site-header{
  /* same 4-column grid as the footer: the nav starts at 50% + pad, the line where the About sea ends */
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));column-gap:calc(var(--pad) * 2);align-items:baseline;
  padding:var(--pad) var(--pad) 6px;border-bottom:var(--rule);
  position:sticky;top:0;background:var(--bg);z-index:10;
}
.site-name{font-family:var(--name);font-weight:400;font-variation-settings:normal;letter-spacing:.01em;font-size:1.12em}
/* "Week N" labels share the name's pixel face */
.wk{font-family:var(--name);font-weight:400;font-variation-settings:normal;letter-spacing:.01em}
.row .wk{font-size:1.1em}
.card .wk{font-size:1.05em;margin-right:.5em}
.site-name{grid-column:1 / 3}
/* nav starts on the 50% line and may run into column 4; the right-hand items share that cell, pinned right */
.site-nav{display:flex;gap:1.25em;justify-content:flex-start;grid-column:3 / 5;grid-row:1}
.site-nav a{white-space:nowrap}
.site-header .site-right{grid-column:4;grid-row:1;justify-self:end}
.site-about{text-align:right}
.box{display:inline-block;width:.75em;height:.75em;border:1.5px solid currentColor;margin-right:.35em;vertical-align:-0.05em}
.site-nav a.active .box{background:currentColor}
.site-header a:hover{color:var(--red)}

/* ---------- Banner (marquee) ----------
   Speed is constant (~110 px/s, set by JS as --mq-dur). The headline sits still for a
   beat on load, then drifts. The width axis breathes slowly (variable fonts only), and
   a wide gap after the question mark keeps each phrase reading as one question. */
.banner{
  margin:var(--pad);background:var(--red);color:#fff;
  font-family:var(--display);font-style:italic;font-weight:900;
  font-stretch:125%;
  line-height:.92;letter-spacing:-0.02em;
  padding:.06em 0 .1em;overflow:hidden;white-space:nowrap;
  font-size:clamp(28px, 8.7vw, 172px);
  --mq-dur:30s;
}
.marquee{
  display:flex;width:max-content;will-change:transform;
  animation:marquee var(--mq-dur) linear 1.4s infinite, breathe 9s ease-in-out infinite;
}
.marquee-group{display:flex;flex:none;align-items:baseline}
.mq-item{display:block;padding-right:.9em}
@keyframes marquee{from{transform:translateX(0)}to{transform:translateX(-50%)}}
@keyframes breathe{
  0%,100%{font-variation-settings:"wdth" 125,"wght" 900}
  50%{font-variation-settings:"wdth" 112,"wght" 860}
}
@media (prefers-reduced-motion:reduce){.marquee{animation:none}}
/* ---------- the blackout (hold the banner) ---------- */
.banner{cursor:pointer;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;transition:filter .2s}
.banner.holding{animation:dimming 1.5s linear forwards}
@keyframes dimming{0%{filter:brightness(1)}70%{filter:brightness(.9)}85%{filter:brightness(.55)}90%{filter:brightness(1)}100%{filter:brightness(.25)}}
.blackout{position:fixed;inset:0;z-index:1000;cursor:none;pointer-events:none;animation:flicker .5s steps(1,end) forwards}
html.lights-out body{cursor:none}
html.lights-out a,html.lights-out button{pointer-events:none}
html.lights-out .bo-key,html.lights-out .bo-key *{pointer-events:auto}
@keyframes flicker{0%{opacity:0}20%{opacity:.85}30%{opacity:.2}45%{opacity:.9}55%{opacity:.5}70%{opacity:.97}100%{opacity:.985}}
.blackout.off{animation:none;opacity:0;transition:opacity .35s}
/* the torch: a soft hole in the dark that lets a little of the page through */
.blackout::before{content:"";position:absolute;inset:0;background:#131313;
  -webkit-mask:radial-gradient(circle var(--r,200px) at var(--mx,-999px) var(--my,-999px),rgba(0,0,0,.72) 0,rgba(0,0,0,.8) 45%,#000 100%);
          mask:radial-gradient(circle var(--r,200px) at var(--mx,-999px) var(--my,-999px),rgba(0,0,0,.72) 0,rgba(0,0,0,.8) 45%,#000 100%)}
.bo-torch{position:absolute;left:var(--mx,-999px);top:var(--my,-999px);width:8px;height:8px;margin:-4px 0 0 -4px;border-radius:50%;background:#58cd86;box-shadow:0 0 0 2px #131313;pointer-events:none}
/* the keyhole, bottom-left, only visible inside the torch */
.bo-key{position:relative;z-index:1001;margin-top:.9em;display:flex;align-items:center;gap:14px;opacity:0;transition:opacity .15s}
.bo-key.fixed{position:fixed;left:18px;bottom:18px;margin:0}
.bo-key.lit{opacity:1}
.bo-key.gone{opacity:0;transition:opacity .4s}
.keyhole{width:22px;height:31px;fill:#58cd86;cursor:none;transition:transform .25s;outline:none}
.bo-key.open .keyhole{transform:scale(1.25)}
.bo-form{display:none}
.bo-key.open .bo-form{display:block}
.bo-form input{width:190px;padding:6px 0;background:none;border:0;border-bottom:1px solid #58cd86;color:#58cd86;outline:none;
  font:inherit;font-size:.95em;letter-spacing:.15em;caret-color:#58cd86;cursor:none}
.bo-form input::placeholder{color:#3a3a3a;letter-spacing:.3em}
.bo-form.no{animation:shake .35s}
@keyframes shake{20%{transform:translateX(-6px)}40%{transform:translateX(6px)}60%{transform:translateX(-4px)}80%{transform:translateX(4px)}}
/* the title, after the right password */
.bo-splash{position:absolute;inset:0;display:grid;place-items:center;background:#131313;opacity:0;pointer-events:none;transition:opacity .5s}
.bo-splash.show{opacity:1}
.bo-splash h1{font-family:var(--name);font-weight:400;font-variation-settings:normal;font-size:clamp(26px,4.6vw,64px);line-height:1.1;text-align:center;
  text-transform:lowercase;letter-spacing:.01em;color:#58cd86;transform:translateY(10px);opacity:0;max-width:80vw;margin:0;transition:transform .7s .2s,opacity .7s .2s}
.bo-splash.show h1{transform:translateY(0);opacity:1}
html.lights-out{scrollbar-width:none}
html.lights-out::-webkit-scrollbar{display:none}
@media (hover:none){.blackout{cursor:auto}.keyhole{width:28px;height:40px;cursor:auto}.bo-form input{cursor:auto}}


/* ---------- Index table ---------- */
.index{margin:0 var(--pad) 4rem}
.year{padding:.45em var(--pad) .45em 160px;border-bottom:var(--rule);font-size:1.2em}
.grid-page .year{border-top:0}
.row{
  /* two halves with a 2×pad gap: column 2 starts at 50% + pad, under the nav (same grid as header/footer) */
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:calc(var(--pad) * 2);align-items:baseline;
  padding:.35em 0;border-bottom:var(--rule);position:relative;
}
.row .c2{grid-column:2;grid-row:1;padding-right:4.5em}
.row .c3{grid-column:2;grid-row:1;justify-self:end}   /* shares the cell with c2, so baselines line up */
.row:hover{color:var(--red)}
.c3{text-align:right;justify-self:end}
.table .row{padding:.35em 0}

/* ---------- Grid ---------- */
.grid-page{margin:0 var(--pad) 4rem}
.grid{
  display:grid;grid-template-columns:repeat(4,1fr);gap:10px;padding-top:var(--pad);
}
.card img{width:100%;aspect-ratio:1/1;object-fit:cover;background:#eee;display:block}
.card .caption{margin:.35em 0 1.5em;font-size:.72em}
.card:hover{color:var(--red)}

/* ---------- Text pages ---------- */
.about,.project{margin:0 var(--pad) 4rem}
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:2em;padding:var(--pad) 0}
.project .two-col h3{margin-top:1em}
.project .two-col h3:first-child{margin-top:0}
.project-head{padding:var(--pad) 0;border-bottom:var(--rule)}
.project-head .meta{display:flex;gap:2em;color:var(--muted);margin-bottom:.4em}
.project-head h2{font-size:2.2em;line-height:1;letter-spacing:-0.02em;margin:0 0 .35em}
.lede{margin:0}
figure{margin:0}
.hero{margin:var(--pad) 0}
.hero img{width:100%;aspect-ratio:16/8;object-fit:cover;background:#eee;display:block}
figcaption{font-size:.72em;color:var(--muted);margin-top:.35em}
.gallery{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;padding:var(--pad) 0}
.gallery img{width:100%;aspect-ratio:4/3;object-fit:cover;background:#eee;display:block}
.files{border-top:var(--rule);padding-top:var(--pad)}
.files h3{margin-bottom:.4em}
.pager{display:flex;justify-content:space-between;padding:2rem 0 0;border-top:var(--rule);margin-top:2rem}
.pager a:hover{color:var(--red)}

/* ---------- Footer ---------- */
/* 4 equal columns; the column gap is 2×pad so column 3 starts exactly at 50% + pad —
   the same line as the right half of the About page (sea | text) and the third card column. */
.site-footer{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));column-gap:calc(var(--pad) * 2);align-items:baseline;
  margin:0 var(--pad);padding:var(--pad) 0 calc(var(--pad) * 1.5);
}
.site-footer .col-wide{grid-column:1 / 3}
.site-footer .col-top{text-align:right}
@media (max-width:600px){.site-footer{grid-template-columns:1fr 1fr auto}.site-footer .col-wide{grid-column:auto}}
.to-top{display:inline-block;padding:0 .1em}
.site-footer a:hover{color:var(--red)}

/* ---------- Mobile ---------- */
@media (max-width:820px){
  .site-header{grid-template-columns:1fr auto}
  .site-name{grid-column:1}
  .site-header .site-right{grid-column:2;grid-row:1}
  .site-nav{grid-column:1/-1;grid-row:2;justify-content:flex-start;padding-top:.3em}
  .year{padding-left:var(--pad)}
  .row{grid-template-columns:1fr auto}
  .row .c3{grid-column:2}
  .row .c2{display:none}
  .grid{grid-template-columns:repeat(2,1fr)}
  .two-col,.gallery{grid-template-columns:1fr}
  .banner{white-space:normal;line-height:.95}
}

/* ---------- Project page: sidebar + content ---------- */
.project-head h2 .wk{white-space:nowrap;font-family:var(--body);font-variation-settings:"wght" 545;letter-spacing:-0.02em}
/* About: reading column on the left (capped measure) */
.about .two-col{grid-template-columns:minmax(0,34em) 1fr;gap:3em}
.about-main p:last-child{margin-bottom:0}
.about-side{position:relative}
.about-side p{font-size:.85em;margin:0 0 .3em;align-self:stretch}
@media (max-width:820px){
  .about .two-col{grid-template-columns:1fr}
  .slot-preview{display:none}
}
.about a{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.12em}
.about a:hover{color:var(--red)}
.project-head h2 .slash{color:var(--muted)}
.project-head h2 a{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.12em}
.project-head h2 a:hover{color:var(--red)}
.project-head .meta a{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.12em}
.project-head .meta a:hover{color:var(--red)}
.project-body{display:grid;grid-template-columns:220px 1fr;gap:2.5em;padding:var(--pad) 0;border-top:var(--rule)}
.toc-inner{position:sticky;top:calc(var(--fs) * 2.6);padding-top:.2em}
.toc-label{color:var(--muted);font-size:.72em;margin:0 0 .8em}
.toc ul{list-style:none;margin:0;padding:0;font-size:.85em}
.toc li{margin:0 0 .45em}
.toc li.lvl3{padding-left:1.1em;color:var(--muted)}
.toc li.lvl3 a.active{color:#fff}
.toc a{display:inline-block;padding:.08em .4em .12em;margin-left:-.4em;transition:color .15s}
.toc a.active{background:var(--red);color:#fff}
.toc a:hover{color:var(--red)}
.toc a.active:hover{color:#fff}
.content{max-width:52em;min-width:0}
html{scroll-behavior:smooth}
.content h2,.content h3{scroll-margin-top:calc(var(--fs) * 3.2)}
.content h2{font-size:1.45em;line-height:1.05;letter-spacing:-0.015em;margin:2.2em 0 .6em;padding-top:.6em;border-top:var(--rule)}
.content h2:first-child{margin-top:0;border-top:0;padding-top:0}
.content h3{margin:1.6em 0 .4em;color:var(--muted)}
.content img{max-width:100%;max-height:80vh;object-fit:cover;display:block;margin:1em 0;background:#eee}
.content p+img,.content p img{margin-top:.2em}
.content ul,.content ol{padding-left:1.4em}
.content li{margin-bottom:.3em}
.content a{color:var(--red);text-decoration:none}
.content a:hover{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.12em}
.content a.is-hover{color:var(--red)}
.content pre{background:#f4f4f4;padding:.9em 1em;overflow:auto;font-size:.82em;line-height:1.4;border:1px solid #e3e3e3}
.content code{font-size:.9em}

/* Figures: image + caption; .cols puts several side by side (Daniel Wenzel style) */
.content figure{margin:1.4em 0}
.content figure img{margin:0;width:100%}
.content figcaption{font-size:.78em;color:var(--muted);margin-top:.45em;line-height:1.35}
.content .cols{display:grid;grid-template-columns:repeat(auto-fit,minmax(14em,1fr));gap:1.5em;margin:1.4em 0;align-items:start}
.content .cols figure{margin:0}
.content .cols figure img{max-height:none;aspect-ratio:4/3;object-fit:cover}
.content .cols.tall figure img{aspect-ratio:3/4}
.content .cols.natural figure img{aspect-ratio:auto}
.content .cols.four{grid-template-columns:repeat(4,1fr)}
.content .cols.narrow{max-width:28em}
/* natural rows: every image the same height, nothing cropped (JS sets each figure's flex-grow to its aspect ratio) */
.content .cols.natural{display:flex;align-items:flex-start;gap:1.5em}
.content .cols.natural figure{flex:1 1 0;min-width:0}
@media (max-width:700px){.content .cols.natural{flex-direction:column}.content .cols.natural figure{width:100%}}
@media (max-width:700px){.content .cols{grid-template-columns:1fr}}

/* Embedded interactive page with a source toggle */
.content .embed{margin:1.6em 0;border:1px solid #e3e3e3}
.content .embed-bar{display:flex;justify-content:space-between;align-items:baseline;gap:1em;padding:.5em .9em;font-size:.82em;background:#f4f4f4;border-bottom:1px solid #e3e3e3}
.content .embed-title{color:var(--muted)}
.content .embed iframe{display:block;width:100%;height:520px;border:0;background:#fff}
.content .embed.video iframe{aspect-ratio:16/9;height:auto;background:#000}
.content details.src{font-size:.82em}
.content details.src summary{cursor:pointer;padding:.5em .9em;background:#f4f4f4;color:var(--muted);list-style:none;user-select:none}
.content details.src summary::before{content:"▸\00a0";display:inline-block}
.content details.src[open] summary::before{content:"▾\00a0"}
.content details.src summary::-webkit-details-marker{display:none}
.content details.src summary:hover{color:var(--red)}
.content details.src summary a{color:inherit}
.content details.src pre{margin:0;max-height:70vh;border-top:1px solid #e3e3e3;border-width:1px 0 0}
.content details.src.standalone{margin:1em 0;border:1px solid #e3e3e3}
.content details.src.standalone pre{border-width:1px 0 0}
.content .muted{color:var(--muted);font-weight:400}
@media (max-width:700px){.content .embed iframe{height:70vh}}
.content pre code{font-size:inherit}
.content blockquote{margin:1.2em 0;padding-left:1.2em;border-left:2px solid var(--red);font-style:italic}
.content blockquote p{margin:0}
.content table{border-collapse:collapse;width:100%;margin:1em 0;font-size:.9em}
.content th,.content td{text-align:left;padding:.35em .5em .35em 0;border-bottom:var(--rule);vertical-align:top}
.content th{font-weight:545;color:var(--muted)}
.content hr{border:0;border-top:var(--rule);margin:2em 0}
.status-done{color:var(--muted)}
.row.todo .c1,.row.todo .c2,.row.todo .c3{color:#b5b5b5}   /* weeks without a page yet */
.row.todo:hover .c1,.row.todo:hover .c2,.row.todo:hover .c3{color:var(--red)}
@media (max-width:820px){
  .project-body{grid-template-columns:1fr;gap:1em}
  .toc-inner{position:static}
  .toc ul{display:flex;flex-wrap:wrap;gap:.2em .9em}
  .toc li{margin:0}.toc li.lvl3{display:none}
  .toc a{margin-left:0}
  .project-head h2{font-size:1.6em}
  .project-head .meta{flex-wrap:wrap;gap:.4em 1.2em;font-size:.85em}
  .project-head .meta span{white-space:nowrap}
  .project-head .meta .recit{white-space:normal;flex-basis:100%}
}

/* ---------- Link motion (About page only): the linked word stretches sideways (ビヨーン) ----------
   Content links on week pages are plain red, no motion. */
.about a{
  transition:letter-spacing .35s ease, font-variation-settings .35s ease, color .2s;
}
.about a.is-hover{
  color:var(--red);letter-spacing:.16em;font-variation-settings:"wght" 680;
  transition:letter-spacing .7s cubic-bezier(.34,1.56,.64,1), font-variation-settings .7s cubic-bezier(.34,1.56,.64,1), color .2s;
}
@media (prefers-reduced-motion:reduce){.about a,.about a.is-hover{transition:color .2s;letter-spacing:inherit;font-variation-settings:inherit}}

/* ---------- Hover preview image ---------- */
.link-preview{
  position:fixed;left:0;top:0;width:200px;height:auto;
  pointer-events:none;z-index:50;opacity:0;visibility:hidden;
  transition:opacity .15s ease;will-change:transform;
}
.link-preview.show{opacity:1;visibility:visible}
/* About page: preview fills the right column, pinned to the right edge under "About" */
/* About page: preview sits in the right column, hugging the text column, level with the hovered line */
.slot-preview{position:absolute;left:0;top:0;width:min(100%,400px);height:auto;display:block;opacity:0;transition:opacity .2s ease}
.slot-preview.show{opacity:1}
@media (hover:none){.link-preview{display:none}}

/* ---------- Project cover: photo + dark veil + repeated white title, label bottom-left ---------- */
.cover{
  position:relative;overflow:hidden;background:#000;color:#fff;
  /* full-bleed: break out of the page gutters and fill the screen below the sticky header */
  margin:0 calc(-1 * var(--pad));
  height:calc(100svh - (var(--fs) * 2.6));min-height:360px;
}
.cover-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;filter:brightness(.55)}
.cover.no-img{background:var(--red)}
.cover-title{
  position:absolute;left:0;right:0;top:0;bottom:calc(var(--fs) * 2.6);
  padding:.02em calc(var(--pad) + .04em) 0 var(--pad);overflow:hidden;
  font-family:var(--display);font-style:italic;font-weight:900;
  font-stretch:125%;font-variation-settings:"wdth" 125,"wght" 900;
  font-size:clamp(34px, 6.2vw, 120px);line-height:.98;letter-spacing:-0.02em;
}
.cover-title span{display:block}
.cover-title{display:flex;flex-direction:column;justify-content:center;text-align:center}
.cover-label{
  position:absolute;left:var(--pad);bottom:var(--pad);
  font-size:inherit;font-weight:545;letter-spacing:-0.004em;color:#fff;
}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.project .lede{padding:var(--pad) 0 0}
@media (max-width:820px){
  .cover{height:calc(100svh - (var(--fs) * 4))}
  .cover-title span{white-space:normal}
}

/* ---------- Cover pages: header hidden until you scroll past the cover ---------- */
.has-cover .site-header{position:fixed;left:0;right:0;top:0;transform:translateY(-100%);transition:transform .35s cubic-bezier(.2,.7,.2,1)}
.has-cover .site-header.shown{transform:none}
.has-cover .cover{margin-top:0}
.has-cover .project{margin-top:0}

/* Bottom strip on the cover: black band, white type, continuous scroll */
.cover-strip{
  position:absolute;left:0;right:0;bottom:0;height:calc(var(--fs) * 2);
  background:#fff;color:#000;overflow:hidden;display:flex;align-items:center;
  font-size:.9em;letter-spacing:.01em;text-transform:uppercase;
}
.strip-track{display:flex;width:max-content;animation:strip var(--strip-dur,40s) linear infinite;will-change:transform}
.strip-group{display:flex;flex:none}
.strip-item{display:inline-flex;align-items:baseline;white-space:nowrap;padding:0 2.2em 0 0}
.strip-item .sep{padding:0 .6em;opacity:.6}
.strip-item a{text-decoration:none}
.strip-item a:hover{color:var(--red)}
.cover-strip:hover .strip-track{animation-play-state:paused}
@keyframes strip{from{transform:translateX(0)}to{transform:translateX(-50%)}}
.cover-label{bottom:calc(var(--fs) * 2 + var(--pad))}
.cover-title{bottom:calc(var(--fs) * 4.4)}
@media (prefers-reduced-motion:reduce){.strip-track{animation:none}}

/* YouTube lite embed: poster + play button, player loads on click */
.content .yt{position:relative;display:block;width:100%;aspect-ratio:16/9;padding:0;border:0;background:#000;cursor:pointer;overflow:hidden}
.content .yt img{width:100%;height:100%;object-fit:cover;display:block;margin:0;max-height:none}
.content .yt-play{position:absolute;left:50%;top:50%;width:68px;height:48px;transform:translate(-50%,-50%);background:rgba(0,0,0,.7);border-radius:12px;transition:background .15s}
.content .yt-play::after{content:"";position:absolute;left:50%;top:50%;transform:translate(-40%,-50%);border-style:solid;border-width:10px 0 10px 18px;border-color:transparent transparent transparent #fff}
.content .yt:hover .yt-play{background:var(--red)}
/* vertical (9:16) videos such as YouTube Shorts: a phone-shaped player instead of a letterboxed 16:9 one */
.content .embed.video.vertical{max-width:360px;margin-left:auto;margin-right:auto}
.content .embed.video.vertical iframe,.content .embed.video.vertical .yt{aspect-ratio:9/16}

/* ---------- Dark mode: black and green, like the vault. Toggle in the header; choice kept in localStorage. ---------- */
.site-right{display:flex;justify-content:flex-end;align-items:center;gap:.9em}
.theme-toggle{font-size:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer;line-height:0;display:inline-flex}
.theme-toggle svg{width:1.05em;height:1.05em}
.theme-toggle:hover{color:var(--red)}
.theme-toggle .i-sun{display:none}
html[data-theme="dark"] .theme-toggle .i-sun{display:block}
html[data-theme="dark"] .theme-toggle .i-moon{display:none}
/* dark: white body text on deep blue; yellow is the accent (links, hovers, banner, header, footer) */
html[data-theme="dark"]{--fg:#f4f4f4;--bg:#0000a6;--red:#eaea76;--muted:#a9a9d4;--rule:1px solid rgba(255,255,255,.35);color-scheme:dark}
html[data-theme="dark"] .site-header,html[data-theme="dark"] .site-footer{color:#eaea76;border-color:#eaea76}
html[data-theme="dark"] .site-header a:hover,html[data-theme="dark"] .site-footer a:hover{color:#fffcc4}
html[data-theme="dark"] .about a{color:var(--red)}
html[data-theme="dark"] body{background:var(--bg);color:var(--fg)}
html[data-theme="dark"] .banner{background:#eaea76;color:#0000a6}
html[data-theme="dark"] .toc a.active,html[data-theme="dark"] .toc a.active:hover,html[data-theme="dark"] .toc li.lvl3 a.active{color:#0000a6}
html[data-theme="dark"] .card img,html[data-theme="dark"] .hero img,html[data-theme="dark"] .gallery img,html[data-theme="dark"] .content img{background:#14149a}
html[data-theme="dark"] .content pre,html[data-theme="dark"] .content .embed-bar,html[data-theme="dark"] .content details.src summary{background:#14149a}
html[data-theme="dark"] .content pre,html[data-theme="dark"] .content .embed,html[data-theme="dark"] .content .embed-bar,html[data-theme="dark"] .content details.src pre,html[data-theme="dark"] .content details.src.standalone{border-color:#3a3ab8}
html[data-theme="dark"] .row.todo .c1,html[data-theme="dark"] .row.todo .c2,html[data-theme="dark"] .row.todo .c3{color:#6f6fa8}
html[data-theme="dark"] .cover-strip{background:#0000a6;color:#eaea76}
html[data-theme="dark"] .sea::after,html[data-theme="dark"] .about-photo::after{background:#0006a3}
html[data-theme="dark"] .about-photo img{background:#14149a}

/* About: side card (photo, cities, poem) */
.about .two-col{grid-template-columns:4fr 1fr;gap:0}
.about .about-main{max-width:34em;position:relative}
.about-card{padding-left:0}
.about-card img{display:block;width:100%;height:auto;margin-bottom:1em}
.about-card .about-cities,.about-card .about-poem{border-top:var(--rule);padding:.8em 0 1em;margin:0;font-size:1.05em;line-height:1.25}
.about-card .about-cities{list-style:none}
.about-card .about-poem{font-family:"Hiragino Mincho ProN","Yu Mincho","Noto Serif JP",serif;font-size:.95em;line-height:1.5;white-space:nowrap;border-top:0}
@media (max-width:820px){.about .two-col{grid-template-columns:1fr}.about-card{padding-left:0;max-width:320px;margin-top:2em}}

/* ---------- Research projects (ported from yuikondo.cargo.site) ---------- */
.proj-intro{margin:0 0 2.2em}
.content .proj-intro+h2{margin-top:0}
.proj-title{font-size:2.2em;line-height:1;letter-spacing:-0.02em;font-weight:545;margin:0 0 .3em}
.proj-sub{font-size:1.1em;margin:0 0 .6em}
.proj-venue{color:var(--muted);font-size:.85em;margin:0 0 .8em}
.tags{display:flex;flex-wrap:wrap;gap:.35em}
.tag{font-size:.72em;border:1px solid currentColor;padding:.12em .5em .16em;border-radius:1em}
.content video{width:100%;display:block;background:#000;margin:1em 0}
.content figure video{margin:0}
.content a.button{display:inline-block;background:var(--red);color:#fff;padding:.45em .9em;margin:.4em 0 1em}
.content a.button:hover{text-decoration:none;filter:brightness(.9)}
.projects-index{margin-bottom:1.5rem}
.proj-row .c2{color:var(--muted)}
.proj-row:hover .c2{color:inherit}
/* project cards: title (caption size) > venue · year (muted) > description (smallest, muted) */
.card .caption:has(+ .card-desc){margin-bottom:0}
.card-venue{display:block;color:var(--muted);margin-top:.2em;line-height:1.3}
.card-desc{font-size:.66em;line-height:1.4;margin:.45em 0 1.8em;color:var(--muted)}
.card:hover .card-venue,.card:hover .card-desc{color:inherit}

/* ---------- About: the sea (left half) + text panel (right half) ---------- */
.about.about-sea{margin:0;display:grid;grid-template-columns:1fr 1fr;flex:1;align-items:start}
.sea{position:sticky;top:calc(var(--fs) * 2.4);height:calc(100vh - var(--fs) * 2.4);background:#0a1f6e;overflow:hidden}
.sea canvas{display:block;width:100%;height:100%}
.about-panel{padding:0 var(--pad) 4rem;min-width:0}   /* photo sits pad below the header, pad from the sea: same as the left edge everywhere */
.grid{column-gap:calc(var(--pad) * 2)}
.about-name{font-family:"Hiragino Mincho ProN","Yu Mincho","Noto Serif JP",Times,"Times New Roman",serif;font-weight:700;
  font-size:clamp(56px,7.4vw,140px);line-height:.92;letter-spacing:.02em;margin:0 0 .3em;font-variation-settings:normal}
.about-links{text-align:right;margin:0;padding-bottom:var(--pad);border-bottom:var(--rule);line-height:1.25}
.about-links a{color:var(--red);text-decoration:none}
.about-cols{display:grid;grid-template-columns:minmax(6.5em,22%) 1fr;column-gap:calc(var(--pad) * 2);padding-top:var(--pad)}   /* same gutter as the site grid */
.about-aside > *{margin:0;padding:.7em 0;border-bottom:var(--rule);font-size:.88em;line-height:1.25}
.about-aside > :first-child{padding-top:0}
.about-photo img{display:block;width:100%;height:auto}
.about-aside .about-cities{list-style:none}
.about-aside .about-poem{font-family:"Hiragino Mincho ProN","Yu Mincho","Noto Serif JP",serif;line-height:1.5;white-space:normal}
.about-text p{margin:0 0 1em}
@media (max-width:820px){
  .about.about-sea{grid-template-columns:1fr}
  .sea{position:relative;top:0;height:42vh}
}
@media (max-width:480px){.about-cols{grid-template-columns:1fr;row-gap:calc(var(--pad) * 2)}.about-aside{max-width:14em}}
/* photo top = cap height of the first text line; the photo's bottom rule follows the same rhythm as the others */
.about-text > :first-child,.about-aside > :not(.about-photo){text-box-trim:trim-start;text-box-edge:cap alphabetic}
.about-aside > .about-photo{padding:0 0 .7em}
.about-aside > :not(.about-photo){padding-top:.9em}
/* tint the sea and the profile photo toward the accent blue (mix-blend 'color' keeps their light and texture) */
.sea{isolation:isolate}
.sea::after,.about-photo::after{content:"";position:absolute;inset:0;background:var(--red);mix-blend-mode:color;opacity:.45;pointer-events:none}
.about-photo{position:relative}
.about-photo::after{bottom:.7em}
