/* Light mode for the Writing section — the same palette, toggle and saved
   choice (localStorage "theme") as the main site, so the theme follows a
   reader from the portfolio into the articles and back.
   Loaded after each page's own <style>, so these overrides win. */

body.light{
  --bg:      #f5f1e8;
  --bg-1:    #ffffff;
  --ink:     #201d18;
  --ink-2:   #6b6459;
  --ink-3:   #9c9284;
  --gold:    #96723f;
  --gold-hi: #7a5a30;
  --line:    rgba(32,29,24,.09);
  --line-2:  rgba(32,29,24,.16);
}
body{transition:background .25s ease,color .25s ease}
body.light nav{background:rgba(245,241,232,.85)}
body.light ::selection{background:rgba(150,114,63,.22);color:var(--gold-hi)}
/* the checked EN/日本語 pill: dark text on the deeper light-mode gold is hard to read */
body.light #lang-en:checked ~ nav label[for="lang-en"],
body.light #lang-ja:checked ~ nav label[for="lang-ja"]{color:#fff}

.nav-right{display:flex;align-items:center;gap:1.4rem}
@media(max-width:500px){.nav-right{gap:.7rem}}

.theme-toggle{background:none;border:1px solid var(--line-2);border-radius:50%;width:26px;height:26px;
  display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--ink-2);
  transition:color .2s,border-color .2s;flex-shrink:0;padding:0}
.theme-toggle:hover{color:var(--gold);border-color:var(--gold)}
.theme-toggle svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.8}
.theme-toggle .icon-sun{display:none}
body.light .theme-toggle .icon-moon{display:none}
body.light .theme-toggle .icon-sun{display:block}
