/* ============================================================
   Mitsuaki Fujiwara — Portfolio
   Monochrome. Fraunces + Shippori Mincho display,
   Hanken Grotesk + Zen Kaku Gothic New for labels/body.
   Three layout directions: editorial / atlas / plate
   ============================================================ */

:root{
  --bg:#0b0b0c;
  --fg:#e9e7e3;
  --fg-soft:rgba(233,231,227,0.74);
  --fg-dim:rgba(233,231,227,0.46);
  --fg-faint:rgba(233,231,227,0.28);
  --line:rgba(233,231,227,0.12);
  --line-soft:rgba(233,231,227,0.07);

  /* accent — Bone Gold (subtle warm, applied to small elements only) */
  --accent:#D8C9A8;
  --accent-soft:rgba(216,201,168,0.66);
  --accent-line:rgba(216,201,168,0.5);

  --font-display:'Cormorant Garamond',serif;
  --font-display-jp:'Shippori Mincho',serif;
  --font-label:'Noto Serif JP',serif;
  --font-label-jp:'Noto Serif JP',serif;
  --font-body-jp:'Noto Serif JP',serif;

  --track-label:0.26em;          /* wide tracking for small sans labels */
  --maxw:1320px;
  --gut:clamp(1.4rem,5vw,4.5rem); /* page gutter */
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;}
body{
  margin:0;background:var(--bg);color:var(--fg);
  font-family:var(--font-label);font-weight:300;
  font-size:16px;line-height:1.7;letter-spacing:0.01em;
  overflow-x:hidden;
}
body.lang-jp-on{font-family:var(--font-label-jp);}
img{display:block;max-width:100%;}
a{color:inherit;text-decoration:none;}
button{font-family:inherit;cursor:pointer;}

/* ---- language visibility ---- */
/* keep .en / .jp free of other display rules so these win the cascade */
.jp{display:none;}
body.lang-jp-on .en{display:none;}
body.lang-jp-on .jp{display:revert;}

/* ---- small tracked label ---- */
.label{
  font-family:var(--font-label);
  font-size:0.66rem;font-weight:500;
  letter-spacing:var(--track-label);text-transform:uppercase;
  color:var(--accent-soft);
}
body.lang-jp-on .label{font-family:var(--font-label-jp);letter-spacing:0.18em;font-weight:500;}

/* ========================= HEADER ========================= */
.site-header{
  position:fixed;top:0;left:0;right:0;z-index:60;
  display:flex;align-items:center;justify-content:flex-end;
  padding:1.5rem var(--gut);
  transition:transform .5s cubic-bezier(.16,1,.3,1),opacity .4s ease;
  pointer-events:none;
}
.site-header::before{
  content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:linear-gradient(to bottom,rgba(11,11,12,0.78),rgba(11,11,12,0));
  opacity:0;transition:opacity .4s ease;
}
.site-header.scrim::before{opacity:1;}
.site-header.hide{transform:translateY(-105%);}
.site-header > *{pointer-events:auto;}

.wordmark{
  font-family:var(--font-display);font-weight:400;font-style:normal;
  font-size:1.04rem;letter-spacing:0.04em;color:var(--fg);
  white-space:nowrap;
}
.wordmark .jp{font-family:var(--font-display-jp);letter-spacing:0.1em;}

.nav{display:flex;align-items:center;gap:clamp(1.4rem,2.4vw,2.6rem);}
.nav a{
  font-family:var(--font-label);font-size:0.68rem;font-weight:500;
  letter-spacing:var(--track-label);text-transform:uppercase;color:var(--fg-soft);
  position:relative;padding:0.2rem 0;transition:color .3s ease;
}
body.lang-jp-on .nav a{font-family:var(--font-label-jp);letter-spacing:0.16em;}
.nav a::after{
  content:"";position:absolute;left:0;bottom:-2px;height:1px;width:0;
  background:var(--accent);transition:width .35s cubic-bezier(.16,1,.3,1);
}
.nav a:hover{color:var(--fg);}
.nav a:hover::after{width:100%;}

.lang{display:flex;align-items:center;gap:0.55rem;margin-left:0.4rem;}
.lang button{
  background:none;border:none;padding:0.1rem 0.1rem;
  font-family:var(--font-label);font-size:0.62rem;font-weight:600;
  letter-spacing:0.18em;color:var(--fg-faint);transition:color .25s ease;
}
.lang button.active{color:var(--accent);}
.lang .sep{color:var(--fg-faint);font-size:0.62rem;}

.nav-toggle{display:none;}

/* ========================= MAIN ========================= */
main{display:block;}

.section{padding-block:clamp(5rem,11vh,9rem);}
.section-inner{max-width:var(--maxw);margin-inline:auto;padding-inline:var(--gut);}
.rule{height:1px;background:var(--line);width:100%;}

/* ---- generic section heading ---- */
.sec-eyebrow{margin-bottom:clamp(2rem,5vh,3.4rem);}

/* ========================= HERO — full-bleed, work first ========================= */
.hero{
  position:relative;min-height:100svh;display:block;padding:0;overflow:hidden;
}
/* swappable representative work (#heroImage) covers the screen */
.hero-bg{
  position:absolute;inset:0;width:100%;height:100%;object-fit:cover;
  filter:grayscale(1);display:block;background:#000;
}
/* gradient scrim so the corner text and header stay legible */
.hero::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(to bottom,
    rgba(11,11,12,0.46) 0%,rgba(11,11,12,0) 20%,
    rgba(11,11,12,0) 52%,rgba(11,11,12,0.72) 100%);
}
.hero-overlay{
  position:absolute;left:var(--gut);bottom:clamp(2.6rem,8vh,5.2rem);z-index:2;
  display:flex;flex-direction:column;gap:0.85rem;
}
.hero-name-min{
  font-family:var(--font-display);font-style:normal;font-weight:400;
  font-size:clamp(2rem,3.6vw,3rem);letter-spacing:0.01em;color:var(--fg);line-height:1.04;
  white-space:nowrap;
}
.hero-name-min .jp{font-family:var(--font-display-jp);font-weight:500;letter-spacing:0.06em;}
/* visible-language span gets a box so its entrance transform/clip-path applies */
.hero-name-min .en{display:inline-block;}
body.lang-jp-on .hero-name-min .jp{display:inline-block;}
.hero-role{
  font-family:var(--font-label);font-size:clamp(0.7rem,1vw,0.84rem);font-weight:500;
  letter-spacing:0.3em;text-transform:uppercase;color:var(--accent-soft);white-space:nowrap;
}

/* ---- one-time hero entrance: focus-pull on the name, tracking settle on the role ---- */
@media (prefers-reduced-motion:no-preference){
  .hero-bg{animation:heroBgIn 2.6s cubic-bezier(.16,1,.3,1) both;}
  /* WIPE (default): name unfurls left→right as one piece (EN only) */
  html:not([data-name-reveal="letters"]) .hero-name-min .en{animation:heroNameIn 3s cubic-bezier(.16,1,.3,1) 0.6s both;}
  /* LETTERS: each glyph rises in turn — EN only (--i set per char in site.js) */
  [data-name-reveal="letters"] .hero-name-min .en .ch{
    display:inline-block;
    animation:heroChIn 0.95s cubic-bezier(.16,1,.3,1) both;
    animation-delay:calc(0.55s + var(--i,0) * 0.05s);
  }
  /* JP name: always a calm whole-word fade — too few glyphs to stagger well */
  .hero-name-min .jp{animation:heroJpIn 1.6s cubic-bezier(.16,1,.3,1) 0.6s both;}
  .hero-role{animation:heroRoleIn 2s cubic-bezier(.16,1,.3,1) 2s both;}
  .scroll-cue{animation:heroCueIn 1.4s ease 3.2s both;}
}
/* keyframes define only `from` — the end state is each element's own base style */
@keyframes heroBgIn{from{opacity:0;transform:scale(1.035);}}
@keyframes heroNameIn{
  from{opacity:0;clip-path:inset(0 100% 0 0);transform:translateX(-6px);}
  to{opacity:1;clip-path:inset(0 -2% 0 0);transform:translateX(0);}
}
@keyframes heroChIn{from{opacity:0;transform:translateY(0.55em);filter:blur(4px);}}
@keyframes heroJpIn{from{opacity:0;transform:translateY(10px);filter:blur(6px);}}
@keyframes heroRoleIn{from{opacity:0;letter-spacing:0.5em;}}
@keyframes heroCueIn{from{opacity:0;}}
body.lang-jp-on .hero-role{font-family:var(--font-label-jp);letter-spacing:0.14em;}

.scroll-cue{
  position:absolute;right:var(--gut);left:auto;bottom:clamp(2.6rem,8vh,5.2rem);z-index:2;
  display:flex;flex-direction:row;align-items:center;gap:0.9rem;color:var(--fg-soft);
}
.scroll-cue .line{width:54px;height:1px;background:linear-gradient(90deg,transparent,var(--fg-soft));}
.scroll-cue .label{letter-spacing:0.4em;font-size:0.54rem;}

/* ========================= WORK ========================= */
/* HOME — the hero is a standalone full screen; Projects opens as a distinct
   chapter after a generous stretch of dark space (preserves the hero's afterglow) */
.hero + #projects{padding-top:clamp(9rem,24vh,17rem);}
.work-head{
  display:flex;justify-content:space-between;align-items:baseline;
  gap:2rem;flex-wrap:wrap;margin-bottom:clamp(3rem,7vh,5rem);
}
/* two-column project: work + supporting text, alternating sides */
.project{
  margin-top:0;
  display:grid;
  grid-template-columns:minmax(0,1.04fr) minmax(0,0.96fr);
  grid-template-areas:
    "kicker kicker"
    "visual body";
  column-gap:clamp(2rem,4.5vw,5.5rem);
  row-gap:clamp(1.2rem,3vh,2rem);
  align-items:start;
}
.project + .project{margin-top:clamp(5rem,12vh,9.5rem);}
.project-index{grid-area:kicker;}
.project-visual{grid-area:visual;min-width:0;align-self:start;}
.project-body{grid-area:body;min-width:0;max-width:600px;display:flex;flex-direction:column;}
/* alternate: photo-right swaps the columns on desktop */
.project.photo-right{
  grid-template-areas:
    "kicker kicker"
    "body visual";
}

.project-index{
  font-family:var(--font-display);font-style:italic;font-weight:300;
  font-size:0.95rem;color:var(--fg-dim);margin:0 0 0.2rem;letter-spacing:0.02em;
}
.project-title{
  font-family:var(--font-display);font-weight:300;font-style:italic;
  font-size:clamp(2rem,3.6vw,3.6rem);line-height:1.0;letter-spacing:-0.01em;
  margin:0;color:var(--fg);
}
.project-meta{
  display:flex;flex-wrap:wrap;gap:0.9rem 1.5rem;align-items:center;
  margin-top:clamp(1.6rem,3.4vh,2.4rem);
}
.project-meta .m{
  font-family:var(--font-label);font-size:0.66rem;font-weight:500;
  letter-spacing:0.2em;text-transform:uppercase;color:var(--fg-dim);
  display:inline-flex;align-items:center;gap:0.9rem;
}
body.lang-jp-on .project-meta .m{font-family:var(--font-label-jp);letter-spacing:0.1em;}
.project-meta .m::after{content:"";width:4px;height:4px;border-radius:50%;background:var(--accent-line);}
.project-meta .m:last-child::after{display:none;}

/* artist statement */
.statement{
  max-width:600px;margin-top:clamp(1.6rem,3.2vh,2.4rem);
}
.statement p{
  font-family:var(--font-display);font-weight:300;
  font-size:clamp(1.02rem,1.45vw,1.24rem);line-height:1.92;color:var(--fg-soft);
  margin:0 0 1.5em;letter-spacing:0.005em;text-wrap:pretty;
}
body.lang-jp-on .statement p{
  font-family:var(--font-body-jp);font-weight:400;line-height:2.2;
  font-size:clamp(0.98rem,1.3vw,1.12rem);color:var(--fg-soft);letter-spacing:0.02em;
}

/* photo column */
.plates{
  display:flex;flex-direction:column;align-items:center;
  gap:clamp(3.4rem,8vh,7rem);
  margin-top:clamp(4rem,9vh,7rem);
}
.plate{width:100%;display:flex;flex-direction:column;align-items:center;}
.plate figure{margin:0;width:100%;display:flex;flex-direction:column;align-items:center;}
.plate-img{
  position:relative;overflow:hidden;cursor:pointer;background:#000;
  transition:transform .9s cubic-bezier(.16,1,.3,1);
}
.plate-img img{width:100%;height:auto;display:block;}
.plate.is-landscape .plate-img{width:min(94vw,1140px);}
.plate.is-portrait .plate-img{width:min(72vw,680px);}
.plate-img::after{
  content:"View";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  background:rgba(0,0,0,0);color:var(--fg);opacity:0;
  font-family:var(--font-label);font-size:0.6rem;letter-spacing:0.4em;text-transform:uppercase;
  transition:opacity .5s ease,background .5s ease;pointer-events:none;
}
.plate-img:hover::after{opacity:1;background:rgba(0,0,0,0.22);}
:root[data-frame="1"] .plate-img{box-shadow:0 0 0 1px var(--line);}

figcaption{
  width:min(94vw,1140px);max-width:100%;
  display:flex;justify-content:space-between;align-items:baseline;gap:1rem;
  margin-top:1.1rem;
}
.plate.is-portrait figcaption{width:min(72vw,680px);}
.fig-num{font-family:var(--font-display);font-style:italic;font-size:0.92rem;color:var(--accent-soft);}
.fig-name{
  font-family:var(--font-label);font-size:0.58rem;font-weight:500;
  letter-spacing:0.28em;text-transform:uppercase;color:var(--fg-faint);
}

/* ========================= ABOUT ========================= */
.about-grid{
  display:grid;grid-template-columns:1fr minmax(220px,300px);
  gap:clamp(2.5rem,6vw,5rem);align-items:start;
}
.about-body{max-width:58ch;}
.about-body .label{display:block;margin-bottom:1.6rem;}
.about-name{
  font-family:var(--font-display);font-weight:300;font-style:italic;
  font-size:clamp(1.8rem,3.4vw,2.8rem);line-height:1.05;margin:0 0 1.6rem;color:var(--fg);
}
.about-name .jp{font-family:var(--font-display-jp);font-style:normal;font-weight:500;}
.about-text{
  font-size:0.94rem;line-height:1.95;color:var(--fg-soft);font-weight:300;letter-spacing:0.012em;
  text-wrap:pretty;
}
body.lang-jp-on .about-text{font-family:var(--font-label-jp);line-height:2.1;font-size:0.92rem;}
.about-photo{position:relative;}
.about-photo img{width:100%;height:auto;filter:grayscale(1);box-shadow:0 0 0 1px var(--line);}
.about-photo .cap{margin-top:0.85rem;color:var(--fg-faint);font-size:0.56rem;letter-spacing:0.24em;text-transform:uppercase;}

/* ========================= CONTACT ========================= */
.contact-inner{display:flex;flex-direction:column;}
.contact-lead{
  font-family:inherit;font-weight:300;
  font-size:0.96rem;line-height:1.7;color:var(--fg-soft);letter-spacing:0.012em;
  max-width:62ch;margin:1.6rem 0 3rem;text-wrap:pretty;
}
body.lang-jp-on .contact-lead{font-family:var(--font-label-jp);font-weight:400;line-height:1.95;max-width:none;white-space:nowrap;}
@media (max-width:560px){ body.lang-jp-on .contact-lead{white-space:normal;} }
.contact-links{display:flex;flex-direction:column;gap:1.8rem;}
.contact-link{
  display:inline-flex;flex-direction:column;gap:0.5rem;width:fit-content;
}
.contact-link .k{
  font-family:var(--font-label);font-size:0.58rem;font-weight:600;letter-spacing:0.26em;
  text-transform:uppercase;color:var(--fg-faint);
}
body.lang-jp-on .contact-link .k{font-family:var(--font-label-jp);letter-spacing:0.14em;}
.contact-link .v{
  font-family:var(--font-display);font-style:normal;font-weight:300;
  font-size:1.06rem;color:var(--fg-soft);letter-spacing:0.01em;
  padding-bottom:0.18rem;border-bottom:1px solid transparent;
  transition:border-color .4s ease,color .3s ease;width:fit-content;
}
.contact-link:hover .v{color:var(--fg);border-color:var(--accent-line);}

/* ========================= FOOTER ========================= */
.site-footer{
  padding:clamp(3rem,7vh,5rem) var(--gut);border-top:1px solid var(--line);
  display:flex;justify-content:space-between;align-items:flex-end;gap:1.5rem;flex-wrap:wrap;
}
.footer-mark{font-family:var(--font-display);font-style:italic;font-size:1.05rem;color:var(--fg-soft);}
.footer-mark .jp{font-family:var(--font-display-jp);font-style:normal;}
.footer-copy{font-size:0.6rem;letter-spacing:0.2em;text-transform:uppercase;color:var(--fg-faint);}

/* ========================= LIGHTBOX ========================= */
.viewer{
  position:fixed;inset:0;z-index:200;background:#000;
  display:flex;align-items:center;justify-content:center;
  opacity:0;visibility:hidden;transition:opacity .45s ease,visibility .45s;
}
.viewer.open{opacity:1;visibility:visible;}
.viewer img{max-width:92vw;max-height:82vh;width:auto;height:auto;object-fit:contain;}
.viewer-close{
  position:fixed;top:1.6rem;right:var(--gut);z-index:210;background:none;border:none;
  color:var(--fg-dim);font-family:var(--font-label);font-size:0.6rem;letter-spacing:0.3em;
  text-transform:uppercase;transition:color .25s ease;
}
.viewer-close:hover{color:var(--fg);}
.viewer-nav{
  position:fixed;bottom:1.8rem;left:50%;transform:translateX(-50%);z-index:210;
  display:flex;align-items:center;gap:2.4rem;
}
.viewer-nav button{
  background:none;border:none;color:var(--fg-faint);font-family:var(--font-label);
  font-size:0.58rem;letter-spacing:0.28em;text-transform:uppercase;transition:color .25s ease;
}
.viewer-nav button:hover{color:var(--fg);}
.viewer-meta{display:flex;align-items:baseline;gap:1rem;}
.viewer-name{
  font-family:var(--font-label);font-size:0.6rem;font-weight:500;letter-spacing:0.24em;
  text-transform:uppercase;color:var(--fg-soft);
}
.viewer-count{font-family:var(--font-display);font-style:italic;color:var(--fg-dim);font-size:0.92rem;}
/* single-image project: hide prev/next, keep name + count */
.viewer.single .viewer-nav button{display:none;}

/* ========================= REVEAL (subtle) ========================= */
.reveal{opacity:0;transform:translateY(22px);transition:opacity 1.1s ease,transform 1.1s cubic-bezier(.16,1,.3,1);}
.reveal.in{opacity:1;transform:none;}
@media (prefers-reduced-motion:reduce){
  .reveal{opacity:1;transform:none;transition:none;}
  html{scroll-behavior:auto;}
}

/* =====================================================================
   DIRECTION: ATLAS  — fixed left rail, content beside it
   ===================================================================== */
[data-direction="atlas"] .site-header{
  flex-direction:column;align-items:flex-start;justify-content:flex-start;
  top:0;left:0;bottom:0;right:auto;width:clamp(220px,22vw,300px);
  padding:2.4rem 2rem;gap:2.2rem;border-right:1px solid var(--line);
  background:var(--bg);transform:none !important;
}
[data-direction="atlas"] .site-header::before{display:none;}
[data-direction="atlas"] .site-header .nav{flex-direction:column;align-items:flex-start;gap:1.1rem;margin-top:0.4rem;}
[data-direction="atlas"] .site-header .wordmark{font-size:1.3rem;line-height:1.2;white-space:normal;max-width:9ch;}
[data-direction="atlas"] .rail-foot{margin-top:auto;display:flex;flex-direction:column;gap:1.2rem;}
[data-direction="atlas"] .lang{margin-left:0;}
[data-direction="atlas"] main{margin-left:clamp(220px,22vw,300px);}
[data-direction="atlas"] .hero{min-height:100svh;}
[data-direction="atlas"] .hero-name{font-size:clamp(2.4rem,4.4vw,4.2rem);}
[data-direction="atlas"] .site-footer{margin-left:clamp(220px,22vw,300px);}
/* rail foot only shows in atlas */
.rail-foot{display:none;}

/* =====================================================================
   DIRECTION: PLATE — centered museum axis
   ===================================================================== */
[data-direction="plate"] .site-header{
  flex-direction:column;align-items:center;gap:1rem;padding-top:1.8rem;
}
[data-direction="plate"] .site-header .nav{order:2;}
[data-direction="plate"] .site-header .lang{position:absolute;top:1.7rem;right:var(--gut);margin:0;}
[data-direction="plate"] .site-header.hide{transform:translateY(-115%);}

[data-direction="plate"] .hero-overlay{left:50%;transform:translateX(-50%);align-items:center;text-align:center;}
[data-direction="plate"] .scroll-cue{left:50%;right:auto;transform:translateX(-50%);}

[data-direction="plate"] .work-head{flex-direction:column;align-items:center;text-align:center;}
[data-direction="plate"] .project,
[data-direction="plate"] .project.photo-right{grid-template-columns:1fr;grid-template-areas:"kicker" "visual" "body";justify-items:center;}
[data-direction="plate"] .project .project-body{align-items:center;text-align:center;max-width:600px;}
[data-direction="plate"] .project{text-align:center;}
[data-direction="plate"] .project-meta{justify-content:center;}
[data-direction="plate"] .statement{margin-left:auto;margin-right:auto;text-align:center;max-width:54ch;}
[data-direction="plate"] figcaption{justify-content:center;gap:1.6rem;}

[data-direction="plate"] .about-grid{
  grid-template-columns:1fr;justify-items:center;text-align:center;max-width:640px;margin-inline:auto;
}
[data-direction="plate"] .about-photo{order:-1;width:min(60vw,260px);margin-bottom:2.4rem;}
[data-direction="plate"] .about-body{max-width:56ch;}
[data-direction="plate"] .about-body .label{text-align:center;}

[data-direction="plate"] .contact-inner{align-items:center;text-align:center;}
[data-direction="plate"] .contact-lead{margin-inline:auto;}
[data-direction="plate"] .contact-link{align-items:baseline;}
[data-direction="plate"] .site-footer{justify-content:center;text-align:center;flex-direction:column;align-items:center;gap:1rem;}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width:880px){
  :root{--track-label:0.2em;}
  .nav{display:none;}
  .nav-toggle{
    display:flex;flex-direction:column;gap:5px;background:none;border:none;padding:6px 0;
  }
  .nav-toggle span{display:block;width:24px;height:1px;background:var(--fg-soft);}

  /* atlas + plate collapse to a simple top bar on mobile */
  [data-direction="atlas"] .site-header,
  [data-direction="plate"] .site-header{
    flex-direction:row;align-items:center;justify-content:space-between;
    position:fixed;inset:auto 0 auto 0;top:0;width:auto;height:auto;
    border-right:none;padding:1.3rem var(--gut);gap:1rem;
  }
  [data-direction="atlas"] main,
  [data-direction="atlas"] .site-footer{margin-left:0;}
  [data-direction="atlas"] .site-header .wordmark{max-width:none;font-size:1.04rem;white-space:nowrap;}
  [data-direction="atlas"] .site-header .nav{flex-direction:row;}
  [data-direction="plate"] .site-header .lang,
  [data-direction="atlas"] .rail-foot{position:static;margin:0;}
  .rail-foot{display:none !important;}

  .plate.is-landscape .plate-img,
  .plate.is-portrait .plate-img{width:100%;}
  figcaption,.plate.is-portrait figcaption{width:100%;}
  .about-grid{grid-template-columns:1fr;gap:2.4rem;}
  .about-photo{width:min(70vw,260px);}

  /* full-bleed hero stays full-screen; show name, hide scroll cue */
  .hero{min-height:100svh;}
  .hero-overlay{left:var(--gut);bottom:clamp(2rem,7vh,3.4rem);}
  .scroll-cue{display:none;}
  [data-direction="plate"] .about-photo{width:min(70vw,240px);}
}

/* ---- mobile slide-in menu ---- */
.mobile-menu{
  position:fixed;inset:0;z-index:120;background:rgba(11,11,12,0.98);
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2.4rem;
  opacity:0;visibility:hidden;transition:opacity .4s ease,visibility .4s;
}
.mobile-menu.open{opacity:1;visibility:visible;}
.mobile-menu a{
  font-family:var(--font-label);font-size:1rem;letter-spacing:0.3em;text-transform:uppercase;color:var(--fg-soft);
}
body.lang-jp-on .mobile-menu a{font-family:var(--font-label-jp);letter-spacing:0.18em;}
.mobile-menu .lang{margin-top:1rem;}
.mobile-close{position:fixed;top:1.4rem;right:var(--gut);background:none;border:none;color:var(--fg-dim);font-size:1.4rem;line-height:1;}

/* =====================================================================
   MONOCHROME enforcement — all photographs render grayscale
   ===================================================================== */
.plate-img img{filter:grayscale(1);}
.viewer img{filter:grayscale(1);}
.viewer.color img{filter:none;}
/* Fleeting Bonds renders in colour */
.works-grid .plate-img img{filter:none;}

/* =====================================================================
   PROJECT 01 — Edge of Stability : editorial varied grid (largest footprint)
   ===================================================================== */
.edge-grid{display:flex;flex-direction:column;gap:clamp(2.6rem,6vh,5.5rem);margin-top:clamp(4rem,9vh,7rem);}
.edge-row{display:flex;gap:clamp(1rem,2vw,2.2rem);justify-content:center;align-items:flex-start;width:100%;}
.edge-row figure{margin:0;}
.edge-row.full figure{width:min(96vw,1280px);}
.edge-row.center figure{width:min(58vw,580px);}
.edge-row.pair figure{flex:1 1 0;min-width:0;}
.edge-row .plate-img{width:100%;}
[data-direction="atlas"] .edge-row.full figure{width:100%;}
@media(max-width:760px){
  .edge-row.pair{flex-direction:column;align-items:center;}
  .edge-row.full figure,.edge-row.center figure,.edge-row.pair figure{width:100%;}
}

/* =====================================================================
   PROJECT 02 — Fleeting Bonds : masonry grid
   ===================================================================== */
.works-grid{
  margin-top:clamp(3rem,7vh,5rem);
  column-count:3;column-gap:clamp(0.7rem,1.3vw,1.3rem);
}
.ph-fig{break-inside:avoid;margin:0 0 clamp(0.7rem,1.3vw,1.3rem);}
.ph-fig .plate-img{width:100%;}

/* statement draft tag */
.statement-narrow{max-width:52ch;}
.stmt-tag{display:block;margin-bottom:1.5rem;color:var(--fg-faint);}

/* ongoing status pill */
.project-status{
  font-family:var(--font-label);font-size:0.62rem;font-weight:600;
  letter-spacing:0.22em;text-transform:uppercase;color:var(--accent-soft);
}
body.lang-jp-on .project-status{font-family:var(--font-label-jp);letter-spacing:0.12em;}

/* =====================================================================
   PROJECT 03 — single plate (+ placeholder fallback)
   ===================================================================== */
.single-plate{margin-top:clamp(3rem,7vh,5rem);display:flex;flex-direction:column;align-items:center;}
.single-plate figure{margin:0;width:min(82vw,820px);display:flex;flex-direction:column;align-items:center;}
.single-plate.is-portrait figure{width:min(64vw,560px);}
.single-plate figcaption{width:100%;}
.ph{
  position:relative;width:100%;overflow:hidden;box-shadow:0 0 0 1px var(--line-soft);
  background:repeating-linear-gradient(135deg,rgba(233,231,227,0.03) 0 9px,rgba(233,231,227,0.055) 9px 18px),#121214;
  display:flex;align-items:flex-end;
}
.ph-atmos{aspect-ratio:3/2;align-items:center;justify-content:center;}
.ph-label{
  font-family:ui-monospace,Menlo,Consolas,monospace;font-size:0.58rem;
  letter-spacing:0.12em;text-transform:uppercase;color:var(--fg-faint);padding:0.8rem 0.9rem;
}

/* =====================================================================
   CV
   ===================================================================== */
.cv{max-width:900px;}
.cv > .label{display:block;margin-bottom:clamp(2rem,5vh,3rem);}
.cv-block + .cv-block{margin-top:clamp(2.4rem,5vh,3.6rem);}
.cv-cat{
  font-family:var(--font-display);font-style:italic;font-weight:300;
  font-size:clamp(1.3rem,2.4vw,1.9rem);color:var(--fg);margin:0 0 1rem;letter-spacing:-0.005em;
}
.cv-cat .jp{font-family:var(--font-display-jp);font-style:normal;font-weight:500;}
.cv-list{list-style:none;margin:0;padding:0;}
.cv-list li{
  display:grid;grid-template-columns:6.5rem 1fr;gap:1.4rem;
  padding:1rem 0;border-top:1px solid var(--line-soft);align-items:baseline;
}
.cv-year{font-family:var(--font-label);font-size:0.66rem;font-weight:500;letter-spacing:0.16em;color:var(--accent-soft);}
.cv-entry{font-size:0.95rem;line-height:1.55;color:var(--fg-soft);}
body.lang-jp-on .cv-entry{font-family:var(--font-label-jp);}
.cv-entry em{font-family:var(--font-display);font-style:italic;color:var(--fg-dim);}
.cv-ph .cv-entry{color:var(--fg-faint);font-style:italic;font-family:ui-monospace,Menlo,monospace;font-size:0.82rem;letter-spacing:0.02em;}

/* direction overrides for new sections */
[data-direction="plate"] .works-grid{column-count:2;max-width:780px;margin-left:auto;margin-right:auto;}
[data-direction="plate"] .stmt-tag{text-align:center;}
[data-direction="plate"] .cv{margin-inline:auto;}
[data-direction="plate"] .cv > .label,
[data-direction="plate"] .cv-cat{text-align:center;}
[data-direction="plate"] .single-plate.is-portrait figure{margin-inline:auto;}

@media(max-width:880px){
  .works-grid{column-count:2;}
  .cv-list li{grid-template-columns:4.5rem 1fr;gap:1rem;}
  .single-plate figure,.single-plate.is-portrait figure{width:100%;}
}
@media(max-width:520px){ .works-grid{column-count:1;} }

/* =====================================================================
   TOP-PAGE PROJECT ENTRY — representative cover + View Project
   ===================================================================== */
.project-cover{
  display:block;position:relative;overflow:hidden;background:transparent;
  margin:0;width:100%;cursor:pointer;
}
.project-cover img{
  display:block;width:100%;height:auto;
  object-fit:contain;filter:grayscale(1);
  transition:transform 1.3s cubic-bezier(.16,1,.3,1);
}
.project-cover:focus{outline:none;}
.project-cover:focus-visible{outline:1px solid var(--accent-line);outline-offset:5px;}
.project-cover.is-color img{filter:none;}
.project-cover:hover img{transform:scale(1.035);}
:root[data-frame="1"] .project-cover{box-shadow:0 0 0 1px var(--line);}
.project-cover .cover-cue{
  position:absolute;inset:auto 0 0 0;display:flex;justify-content:flex-end;align-items:center;gap:0.55rem;
  padding:2.6rem 1.3rem 1.2rem;
  background:linear-gradient(transparent,rgba(0,0,0,0.45));
  font-family:var(--font-label);font-size:0.6rem;font-weight:600;letter-spacing:0.26em;text-transform:uppercase;color:var(--fg);
  opacity:0;transform:translateY(6px);transition:opacity .45s ease,transform .45s ease;
}
body.lang-jp-on .project-cover .cover-cue{font-family:var(--font-label-jp);letter-spacing:0.14em;}
.project-cover:hover .cover-cue{opacity:1;transform:none;}
.project-cover .cover-cue .arr{color:var(--accent);}

.view-project{
  appearance:none;-webkit-appearance:none;background:none;border:none;cursor:pointer;
  display:inline-flex;align-items:center;gap:0.85rem;margin-top:clamp(1.8rem,4vh,2.6rem);
  font-family:var(--font-label);font-size:0.66rem;font-weight:600;letter-spacing:0.24em;text-transform:uppercase;color:var(--fg);
  border-bottom:1px solid var(--accent-line);padding:0 0 0.45rem;width:fit-content;text-align:left;
  transition:border-color .35s ease,gap .35s ease;
}
body.lang-jp-on .view-project{font-family:var(--font-label-jp);letter-spacing:0.14em;}
.view-project .arr{color:var(--accent);transition:transform .35s ease;}
.view-project:hover{border-color:var(--accent);gap:1.25rem;}
.view-project:focus{outline:none;}
.view-project:focus-visible{outline:none;border-color:var(--accent);}
.view-project:hover .arr{transform:translateX(5px);}
[data-direction="plate"] .view-project{margin-left:auto;margin-right:auto;}

/* =====================================================================
   PROJECT PAGE — dedicated series view
   ===================================================================== */
.proj-lead{padding-top:clamp(7rem,16vh,10rem);}
.proj-back{
  display:inline-flex;align-items:center;gap:0.55rem;margin-bottom:clamp(2rem,5vh,3rem);
  font-family:var(--font-label);font-size:0.62rem;font-weight:500;letter-spacing:0.24em;text-transform:uppercase;color:var(--fg-dim);
  transition:color .3s ease,gap .3s ease;
}
.proj-back .arr{color:var(--accent);}
.proj-back:hover{color:var(--fg);gap:0.9rem;}
body.lang-jp-on .proj-back{font-family:var(--font-label-jp);letter-spacing:0.14em;}
.proj-lead .project-title{font-size:clamp(2.6rem,7vw,5.6rem);}

/* large series gallery — read as a sequence */
.series{
  display:flex;flex-direction:column;align-items:center;
  gap:clamp(3.4rem,9vh,8rem);
  max-width:var(--maxw);margin:clamp(4rem,10vh,8rem) auto 0;padding-inline:var(--gut);
}
.series figure{margin:0;width:100%;max-width:min(1120px,92vw);display:flex;flex-direction:column;align-items:center;}
.series figure.is-portrait{max-width:min(720px,80vw);}
.series .plate-img{width:100%;cursor:pointer;}
.series .plate-img img{width:100%;height:auto;filter:grayscale(1);}
.series.is-color .plate-img img{filter:none;}
.series figcaption{width:100%;}

/* next / prev project navigation */
.proj-next{
  max-width:var(--maxw);margin:clamp(5rem,12vh,9rem) auto 0;padding:clamp(2.6rem,6vh,4rem) var(--gut) 0;
  border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:1.5rem;flex-wrap:wrap;
}
.proj-next a{display:flex;flex-direction:column;gap:0.5rem;max-width:48%;}
.proj-next a.to-right{align-items:flex-end;text-align:right;margin-left:auto;}
.proj-next .k{font-family:var(--font-label);font-size:0.58rem;font-weight:600;letter-spacing:0.24em;text-transform:uppercase;color:var(--fg-faint);}
body.lang-jp-on .proj-next .k{font-family:var(--font-label-jp);letter-spacing:0.14em;}
.proj-next .nm{font-family:var(--font-display);font-style:italic;font-weight:300;font-size:clamp(1.4rem,3vw,2.1rem);color:var(--fg-soft);transition:color .3s ease;}
.proj-next a:hover .nm{color:var(--fg);}

@media(max-width:880px){
  .series{gap:clamp(2.6rem,7vh,4.4rem);padding-inline:0;margin-top:clamp(3rem,8vh,5rem);}
  .series figure{max-width:100%;}
  .series figcaption{padding-inline:var(--gut);}
  .proj-next{padding-inline:var(--gut);}
}

/* projects collapse to single column — work first, then text */
@media(max-width:880px){
  .project,
  .project.photo-right{
    grid-template-columns:1fr;
    grid-template-areas:"kicker" "visual" "body";
    column-gap:0;row-gap:clamp(1.1rem,3vh,1.7rem);
  }
  .project-body{max-width:600px;}
}
