/* =========================================================
   NAKAMICHI SAORI — Portfolio
   ========================================================= */

:root {
  --dark: #1D1F1E;
  --dark-2: #262928;
  --light: #F2F1ED;
  --light-2: #E7E5DF;
  --white: #FFFFFF;
  --ink: #101211;
  --on-dark-mute: rgba(255, 255, 255, .56);
  --on-light-mute: rgba(16, 18, 17, .58);
  --line-dark: rgba(255, 255, 255, .16);
  --line-light: rgba(16, 18, 17, .14);

  --font-display: "Poppins", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;
  --font-body: "Inter", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;

  --pad: clamp(20px, 4.5vw, 68px);
  --maxw: 1600px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --dur: .8s;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--dark);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.8;
  font-feature-settings: "palt" 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { list-style: none; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--white); color: var(--dark); }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.band { padding-block: clamp(74px, 7.6vw, 126px); }
.band--hero { padding-block: 0; }
.band--dark { background: var(--dark); color: var(--white); }
.band--light { background: var(--light); color: var(--ink); }

/* ---------- Type ---------- */
.d1, .d2, .d3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.9;
  word-break: auto-phrase;
}
.d1 { font-size: clamp(2.9rem, 11.5vw, 12rem); }
.d2 { font-size: clamp(2.1rem, 6.4vw, 6.2rem); line-height: 0.94; }
.d3 { font-size: clamp(1.5rem, 3vw, 2.9rem); line-height: 1.02; letter-spacing: -0.028em; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 11px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
}
.band--dark .eyebrow { color: var(--on-dark-mute); }
.band--light .eyebrow { color: var(--on-light-mute); }
.note { font-style: italic; font-size: 13px; }
.band--dark .note { color: var(--on-dark-mute); }
.band--light .note { color: var(--on-light-mute); }

.txt { font-size: clamp(14px, 1.05vw, 16px); line-height: 1.95; max-width: 62ch; }
.band--dark .txt { color: rgba(255,255,255,.78); }
.band--light .txt { color: rgba(16,18,17,.76); }
.txt + .txt { margin-top: 1.3em; }
.txt b, .txt strong { font-weight: 600; }
.band--dark .txt b { color: var(--white); }
.band--light .txt b { color: var(--ink); }

/* section header */
.sec-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 28px;
  padding-bottom: clamp(16px, 1.8vw, 24px);
  border-bottom: 1px solid var(--line-light);
  margin-bottom: clamp(38px, 4.4vw, 72px);
}
.band--dark .sec-head { border-bottom-color: var(--line-dark); }
.sec-head .eyebrow { grid-column: 1; grid-row: 1; }
.sec-head .grow { grid-column: 1; grid-row: 2; }
.sec-head .note,
.sec-head .dots { grid-column: 2; grid-row: 2; align-self: end; justify-self: end; text-align: right; padding-bottom: .4em; }

/* dot motif */
.dots { display: inline-flex; gap: 8px; align-items: center; vertical-align: middle; }
.dot { width: 13px; height: 13px; border-radius: 50%; display: block; }
.band--dark .dot { background: rgba(255,255,255,.28); }
.band--dark .dot.is-fill { background: var(--white); }
.band--light .dot { background: rgba(16,18,17,.22); }
.band--light .dot.is-fill { background: var(--ink); }

/* ---------- Header ---------- */
.progress {
  position: fixed; inset: 0 auto auto 0; height: 2px; width: 100%;
  transform: scaleX(0); transform-origin: 0 50%;
  background: var(--white); z-index: 100; mix-blend-mode: difference;
}
.site-head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  mix-blend-mode: difference; color: #fff;
}
.site-head__in { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 68px; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: .01em; }
.nav { display: flex; gap: clamp(16px, 2.4vw, 40px); }
.nav a { font-size: 12.5px; font-weight: 500; position: relative; padding-block: 6px; opacity: .78; transition: opacity .35s var(--ease); }
.nav a::before {
  content: ""; position: absolute; left: -12px; top: 50%; width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; transform: translateY(-50%) scale(0); transition: transform .4s var(--ease);
}
.nav a:hover, .nav a.is-active { opacity: 1; }
.nav a.is-active::before { transform: translateY(-50%) scale(1); }
.nav-toggle { display: none; font-size: 12.5px; font-weight: 500; }

/* ---------- Hero ---------- */
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding-block: clamp(120px, 17vh, 170px) clamp(58px, 9vh, 104px); }
.hero__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; }
.hero__name { margin-top: clamp(18px, 3vh, 40px); }
.hero__name .l { display: block; overflow: hidden; }
.hero__name .l span { display: block; }
.hero__foot {
  margin-top: clamp(30px, 5vh, 66px);
  padding-top: clamp(20px, 3vh, 34px);
  border-top: 1px solid var(--line-dark);
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 60px);
  align-items: start;
}
.hero__role { font-size: clamp(15px, 1.5vw, 20px); font-weight: 500; line-height: 1.6; }
.hero__role span { display: block; color: var(--on-dark-mute); font-weight: 400; font-size: .82em; margin-top: 8px; }
.hero__stack { display: flex; flex-wrap: wrap; gap: 8px; align-content: start; }
.chip {
  border: 1px solid var(--line-dark); border-radius: 100px;
  padding: 5px 13px; font-size: 11.5px; letter-spacing: .02em;
  color: rgba(255,255,255,.82);
}
.band--light .chip { border-color: var(--line-light); color: rgba(16,18,17,.72); }

/* ---------- Works grid ---------- */
.works { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(52px, 6vw, 104px) clamp(22px, 3.2vw, 52px); }
.work { display: block; }
.work--wide { grid-column: 1 / -1; }
.work__shot {
  position: relative; overflow: hidden;
  background: var(--light-2);
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line-light);
}
.band--dark .work__shot { border-color: var(--line-dark); background: var(--dark-2); }
.work--wide .work__shot { aspect-ratio: 21 / 9; }
.work__shot img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%;
  transition: transform 1.1s var(--ease), filter .6s var(--ease);
}
.work:hover .work__shot img { transform: scale(1.035); }
.work__badge {
  position: absolute; left: 0; top: 0;
  font-family: var(--font-display); font-weight: 700; font-size: 12px; letter-spacing: .04em;
  background: var(--ink); color: var(--light); padding: 6px 12px;
}
.work__go {
  position: absolute; right: 14px; bottom: 14px;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--ink); color: var(--light);
  display: grid; place-items: center; font-size: 15px;
  transform: translateY(8px); opacity: 0;
  transition: transform .5s var(--ease), opacity .5s var(--ease);
}
.work:hover .work__go { transform: none; opacity: 1; }
.work__meta { display: flex; flex-wrap: wrap; gap: 7px 20px; align-items: baseline; padding-top: 20px; }
.work__name { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.05rem, 1.65vw, 1.6rem); letter-spacing: -0.02em; line-height: 1.15; }
.work__kind { font-size: 13px; }
.band--light .work__kind { color: var(--on-light-mute); }
.band--dark .work__kind { color: var(--on-dark-mute); }
.work__url { margin-left: auto; font-size: 11.5px; letter-spacing: .03em; opacity: .5; white-space: nowrap; }
.work__did { margin-top: 11px; font-size: 13.5px; line-height: 1.8; }
.band--light .work__did { color: rgba(16,18,17,.74); }
.band--dark .work__did { color: rgba(255,255,255,.74); }
.work__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 15px; }
.t {
  font-size: 10.5px; letter-spacing: .04em; padding: 3px 9px; border-radius: 3px;
  background: rgba(16,18,17,.06); color: rgba(16,18,17,.66);
}
.band--dark .t { background: rgba(255,255,255,.09); color: rgba(255,255,255,.7); }

/* ---------- Project (large case) ---------- */
.projects { display: grid; gap: clamp(44px, 5vw, 84px); }
.project {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(20px, 3vw, 56px);
  padding-top: clamp(40px, 4.6vw, 76px);
  border-top: 1px solid var(--line-dark);
}
.projects > .project:first-child { border-top: 0; padding-top: 0; }
.jobs > .job:first-child { padding-top: 0; }
.jobs { border-top: 0; }
.conf { border-top: 0; }
.project__n { font-family: var(--font-display); font-weight: 700; font-size: 12px; letter-spacing: .06em; color: var(--on-dark-mute); }
.project__t { margin-top: 12px; }
.project__when { margin-top: 14px; font-size: 12.5px; color: var(--on-dark-mute); letter-spacing: .03em; }
.project__shot { margin-top: 20px; border: 1px solid var(--line-dark); aspect-ratio: 16/10; overflow: hidden; background: var(--dark-2); }
.project__shot img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%; }
.facts { margin-top: 20px; }
.fact { display: grid; grid-template-columns: 92px minmax(0,1fr); gap: 14px; padding-block: 9px; border-top: 1px solid var(--line-dark); font-size: 13px; }
.fact dt { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-mute); padding-top: 4px; }
.fact dd { color: rgba(255,255,255,.82); }
.blist { margin-top: 16px; display: grid; gap: 6px; }
.blist li { position: relative; padding-left: 18px; font-size: 13.5px; color: rgba(255,255,255,.76); line-height: 1.75; }
.blist li::before { content: ""; position: absolute; left: 0; top: .8em; width: 8px; height: 1px; background: rgba(255,255,255,.5); }
.band--light .blist li { color: rgba(16,18,17,.74); }
.band--light .blist li::before { background: rgba(16,18,17,.45); }

/* ---------- Confidential list ---------- */
.conf { border-top: 1px solid var(--line-light); }
.conf__row {
  display: grid; grid-template-columns: 74px minmax(0, 2.6fr) minmax(0, 1.7fr) 92px;
  gap: clamp(10px, 2vw, 28px); align-items: center;
  padding-block: clamp(16px, 1.9vw, 26px);
  border-bottom: 1px solid var(--line-light);
  position: relative;
}
.conf__row::before {
  content: ""; position: absolute; inset: 0 calc(var(--pad) * -.4);
  background: rgba(16,18,17,.045); opacity: 0; transition: opacity .45s var(--ease);
}
.conf__row:hover::before { opacity: 1; }
.conf__y { font-size: 11.5px; letter-spacing: .06em; color: var(--on-light-mute); position: relative; }
.conf__t { font-family: var(--font-display); font-weight: 600; font-size: clamp(.95rem, 1.35vw, 1.28rem); letter-spacing: -0.015em; line-height: 1.25; position: relative; }
.conf__d { font-size: 12.5px; color: var(--on-light-mute); position: relative; line-height: 1.6; }
.conf__k { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--on-light-mute); text-align: right; position: relative; white-space: nowrap; }

/* ---------- Skills ---------- */
.skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1px; background: var(--line-light); border: 1px solid var(--line-light); }
.skill { background: var(--light); padding: clamp(24px, 2.7vw, 38px); }
.skill__n { font-size: 11px; letter-spacing: .1em; color: var(--on-light-mute); }
.skill__t { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.05rem, 1.5vw, 1.35rem); letter-spacing: -0.02em; margin-top: 10px; line-height: 1.2; }
.skill__d { margin-top: 10px; font-size: 13px; color: var(--on-light-mute); line-height: 1.8; }

/* ---------- Career ---------- */
.jobs { border-top: 1px solid var(--line-dark); }
.job { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: clamp(16px, 2.6vw, 52px); padding-block: clamp(30px, 3.6vw, 54px); border-bottom: 1px solid var(--line-dark); }
.job__when { font-size: 12.5px; letter-spacing: .04em; color: var(--on-dark-mute); }
.job__role { display: block; margin-top: 8px; color: var(--white); font-weight: 500; }
.job__d { margin-top: 12px; }

/* ---------- Buttons ---------- */
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  border-radius: 100px; padding: 11px 22px; font-size: 13px; font-weight: 500;
  border: 1px solid currentColor; position: relative; overflow: hidden; isolation: isolate;
  transition: color .45s var(--ease);
}
.btn::before { content: ""; position: absolute; inset: 0; background: currentColor; z-index: -1; transform: translateY(101%); transition: transform .5s var(--ease); }
.band--dark .btn:hover { color: var(--dark); }
.band--light .btn:hover { color: var(--light); }
.btn:hover::before { transform: none; }
.btn span { position: relative; }

/* ---------- Footer ---------- */
.site-foot { background: var(--dark); color: var(--white); border-top: 1px solid var(--line-dark); padding-block: 26px; }
.site-foot__in { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; font-size: 12px; color: var(--on-dark-mute); }

/* ---------- Reveal ---------- */
.rv { opacity: 0; transform: translateY(26px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.rv.in { opacity: 1; transform: none; }
.rv[data-d="1"] { transition-delay: .07s; }
.rv[data-d="2"] { transition-delay: .14s; }
.rv[data-d="3"] { transition-delay: .21s; }
.rv[data-d="4"] { transition-delay: .28s; }

.line-rv > span { display: block; transform: translateY(102%); transition: transform 1.05s var(--ease); }
.line-rv.in > span { transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .works { grid-template-columns: 1fr; }
  .work--wide .work__shot { aspect-ratio: 16/10; }
  .project { grid-template-columns: 1fr; }
  .conf__row { grid-template-columns: 62px minmax(0,1fr) 78px; }
  .conf__d { display: none; }
  .job { grid-template-columns: 1fr; }
  .hero__foot { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav { display: none; }
  .nav.open {
    display: flex; flex-direction: column; gap: 16px;
    position: fixed; inset: 68px 0 auto 0; padding: 22px var(--pad) 30px;
    background: var(--dark); color: var(--white);
  }
  .nav-toggle { display: block; }
  .site-head.menu-open { mix-blend-mode: normal; background: var(--dark); }
  .conf__k { display: none; }
  .conf__row { grid-template-columns: 58px minmax(0,1fr); }
  .work__url { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .rv { opacity: 1; transform: none; }
  .line-rv > span { transform: none; }
}
