/* ==========================================================
   Kaya Nakajima — portfolio
   Motion is progressive: the page stays usable without JS.
========================================================== */
:root {
  --paper: #f4f2ed;
  --paper-light: #fbfaf7;
  --ink: #171715;
  --muted: #6e6c67;
  --line: rgba(23, 23, 21, .16);
  --dark: #161616;
  --white: #f8f7f3;
  --serif: "Cormorant Garamond", "Noto Serif JP", serif;
  --jp: "Noto Serif JP", serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.76, 0, .24, 1);
  --page-x: clamp(20px, 4.5vw, 72px);
  --radius: clamp(14px, 1.7vw, 26px);
  --scroll-progress: 0;
  --hero-scale: 1;
  --hero-opacity: 1;
  --hero-blur: 0px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
  overflow-x: clip;
}

body {
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
button, dialog { font: inherit; }
img { display: block; max-width: 100%; }
em { font-weight: 300; }

:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 5px;
}

::selection { background: var(--ink); color: var(--paper); }

.skip-link {
  position: fixed;
  inset: 12px auto auto 12px;
  z-index: 999;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--white);
  transform: translateY(-160%);
  transition: transform .25s ease;
}

.skip-link:focus { transform: none; }

.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: 2px;
  color: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: currentColor;
  transform: scaleX(var(--scroll-progress));
  transform-origin: left;
  will-change: transform;
}

.eyebrow,
.hero-note,
.hero-title p,
.hero-scroll,
.dock,
.work-meta > p,
.about-detail-heading .eyebrow,
.career-period,
.tags,
.footer {
  font-size: .68rem;
  font-style: normal;
  font-weight: 400;
  letter-spacing: .16em;
  line-height: 1.5;
  text-transform: uppercase;
}

.display {
  font-size: clamp(3.4rem, 7.8vw, 8.4rem);
  font-weight: 300;
  letter-spacing: -.045em;
  /* 0.98em is the point where Cormorant's descenders (Kaya's y) meet the next
     line's ascenders (Nakajima's k/j); 1 keeps a hair of clearance. */
  line-height: 1;
}

/* ---------- reveal ---------- */
.js .reveal {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(42px);
  transition:
    opacity .9s var(--ease-out) var(--stagger, 0s),
    filter .9s var(--ease-out) var(--stagger, 0s),
    transform 1.1s var(--ease-out) var(--stagger, 0s);
}

.js .reveal.is-visible {
  opacity: 1;
  filter: none;
  transform: none;
}

/* ==========================================================
   Hero
========================================================== */
.hero {
  --mx: 0;
  --my: 0;
  position: fixed;
  inset: 0;
  z-index: 0;
  min-height: 100svh;
  background:
    linear-gradient(rgba(23, 23, 21, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 23, 21, .045) 1px, transparent 1px),
    var(--paper);
  background-size: 4.8vw 4.8vw;
  overflow: hidden;
  transform: scale(var(--hero-scale));
  transform-origin: center 40%;
  opacity: var(--hero-opacity);
  filter: blur(var(--hero-blur));
  will-change: transform, opacity, filter;
}

.hero-glow {
  position: absolute;
  left: 50%;
  top: 48%;
  width: min(76vw, 1050px);
  aspect-ratio: 1.2;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .94), rgba(255, 255, 255, 0) 68%);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.hero-note {
  position: absolute;
  top: clamp(24px, 4vw, 54px);
  z-index: 5;
  animation: fade-up 1s var(--ease-out) .25s both;
}

.hero-note--left { left: var(--page-x); }
.hero-note--right { right: var(--page-x); text-align: right; }

.hero-title {
  position: absolute;
  left: 50%;
  top: 49%;
  z-index: 4;
  width: min(91vw, 1150px);
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.hero-title h1 {
  font-size: clamp(4.6rem, 12.5vw, 12rem);
  font-weight: 300;
  letter-spacing: -.07em;
  line-height: 1;
}

/* Each line is its own reveal mask; the padding leaves room inside the mask
   for serif and italic overhangs (K's serif, y's and j's descenders), and the
   negative margins pull the masks back together so the two lines keep a 1em
   baseline rhythm — tight, but clear of Kaya's descender. */
.hero-line {
  display: block;
  overflow: hidden;
  padding: .06em .2em .24em;
}

.hero-line + .hero-line { margin-top: -.3em; }

.hero-line > span {
  display: block;
  animation: title-in 1.35s var(--ease-out) .08s both;
}

/* The surname is twice as long, so at an identical font-size the tighter
   tracking makes it read bigger and denser than the given name. 5% down
   balances the two lines optically; the metrics themselves already match. */
.hero-line--italic {
  margin-bottom: -.08em;
  font-size: .95em;
  font-style: italic;
}

.hero-line--italic > span { animation-delay: .18s; }

.hero-title p {
  margin-top: clamp(20px, 3vw, 38px);
  color: var(--muted);
  animation: fade-up 1s var(--ease-out) .55s both;
}

.hero-gallery { position: absolute; inset: 0; z-index: 2; }

.hero-card {
  position: absolute;
  width: clamp(145px, 18vw, 280px);
  margin: 0;
  transform: translate3d(var(--card-x, 0), var(--card-y, 0), 0) rotate(var(--rotation, 0deg));
  will-change: transform;
}

.hero-card--01 { left: 5vw; top: 16vh; --rotation: -5deg; }
.hero-card--02 { right: 6vw; top: 12vh; --rotation: 5deg; }
.hero-card--03 { left: 11vw; bottom: 11vh; --rotation: 4deg; }
.hero-card--04 { right: 12vw; bottom: 10vh; --rotation: -4deg; }
.hero-card--05 { left: 41vw; bottom: 2vh; --rotation: 2deg; width: clamp(120px, 14vw, 220px); }

.hero-card-inner {
  display: block;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(23, 23, 21, .15);
  border-radius: 3px;
  box-shadow: 0 26px 65px rgba(35, 32, 26, .17);
  clip-path: inset(100% 0 0 0);
  overflow: hidden;
  animation:
    card-reveal 1.1s var(--ease-out) var(--delay) forwards,
    card-float 7s ease-in-out calc(var(--delay) + 1.1s) infinite alternate;
}

.hero-card img { width: 100%; height: 100%; object-fit: cover; }

.hero-scroll {
  position: absolute;
  right: var(--page-x);
  bottom: clamp(88px, 10vh, 124px);
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 14px;
  animation: fade-up 1s var(--ease-out) .8s both;
}

.hero-scroll i {
  position: relative;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: background .45s var(--ease-out), color .45s var(--ease-out);
}

.hero-scroll i::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 14px;
  width: 1px;
  height: 16px;
  background: currentColor;
  transform-origin: top;
  animation: scroll-line 1.8s var(--ease-in-out) infinite;
}

.hero-scroll:hover i { background: var(--ink); color: var(--paper); }
.hero-spacer { height: 100svh; }

@keyframes title-in {
  from { opacity: 0; filter: blur(12px); transform: translateY(120%) rotate(2deg); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
}

@keyframes card-reveal {
  from { opacity: 0; filter: blur(8px); clip-path: inset(100% 0 0 0); transform: translateY(40px) scale(.94); }
  to { opacity: 1; filter: none; clip-path: inset(0); transform: none; }
}

@keyframes card-float { to { transform: translateY(-10px); } }

@keyframes scroll-line {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- floating dock ---------- */
.dock {
  position: fixed;
  inset: auto 0 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 0 var(--page-x) 22px;
  color: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
}

.dock a, .dock-label { pointer-events: auto; }

.dock-status,
.dock-links { display: flex; align-items: center; }

.dock-status { gap: 10px; white-space: nowrap; }
.dock-status span { opacity: .58; }
.dock-status i { width: 30px; height: 1px; background: currentColor; }
.dock-status strong { font-weight: 400; }

.dock-links { gap: clamp(15px, 2.5vw, 36px); }
.dock-links a { position: relative; padding-block: 8px; }
.dock-links a::after {
  content: "";
  position: absolute;
  inset: auto 0 4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--ease-out);
}
.dock-links a:hover::after { transform: scaleX(1); transform-origin: left; }

.dock-label {
  padding: 9px 20px;
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 99px;
}

/* ==========================================================
   Sheet / Works
========================================================== */
.sheet {
  position: relative;
  z-index: 2;
  background: var(--paper-light);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -30px 90px rgba(32, 30, 25, .24);
  overflow: clip;
}

.section { position: relative; padding-inline: var(--page-x); }

.works {
  position: relative;
  padding-block: clamp(90px, 13vw, 180px);
  isolation: isolate;
}

.works::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  background: var(--paper-light);
  opacity: var(--works-wash, 0);
  pointer-events: none;
  will-change: opacity;
}

.works-layout {
  display: grid;
  grid-template-columns: minmax(260px, .72fr) minmax(0, 1.28fr);
  gap: clamp(42px, 7vw, 120px);
  align-items: start;
}

.works-heading {
  position: sticky;
  top: 0;
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-block: 70px;
}

.works-heading .eyebrow { margin-bottom: 28px; color: var(--muted); }
.works-all {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-top: 38px;
  padding: 13px 22px;
  border: 1px solid var(--ink);
  border-radius: 99px;
  font-size: .68rem;
  font-style: normal;
  font-weight: 400;
  letter-spacing: .16em;
  line-height: 1.5;
  text-transform: uppercase;
  transition: background .4s var(--ease-out), color .4s var(--ease-out);
}

.works-all span { transition: transform .4s var(--ease-out); }
.works-all:hover { background: var(--ink); color: var(--paper); }
.works-all:hover span { transform: translateX(5px); }

.works-list { display: grid; gap: clamp(80px, 12vw, 170px); }

.work-card { display: block; }

.work-visual {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #e9e7e1;
  border-radius: 3px;
  overflow: hidden;
  isolation: isolate;
}

.work-visual::after {
  content: "View";
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 50%;
  background: rgba(248, 247, 243, .92);
  font-size: .65rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: 0;
  transform: translate(-50%, -42%) scale(.85);
  transition: opacity .45s var(--ease-out), transform .6s var(--ease-out);
  z-index: 2;
}

.work-visual img {
  width: 100%;
  height: 112%;
  object-fit: cover;
  transform: translateY(var(--image-y, -5%)) scale(1.025);
  transition: filter .7s var(--ease-out), transform .9s var(--ease-out);
  will-change: transform;
}

.work-card:hover .work-visual img { filter: brightness(.82); transform: translateY(var(--image-y, -5%)) scale(1.06); }
.work-card:hover .work-visual::after { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.work-meta {
  position: relative;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
  padding-top: 18px;
}

.work-meta > p:first-child { display: flex; flex-direction: column; color: var(--muted); }

/* top page: title, year and "01 / 04" counter share one line */
.works-list .work-meta { grid-template-columns: minmax(0, 1fr) auto auto; }
.works-list .work-meta > p { color: var(--muted); text-align: right; }

.work-year {
  margin-left: clamp(8px, 1vw, 16px);
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(.85rem, 1.2vw, 1.15rem);
  font-style: italic;
  font-weight: 400;
  letter-spacing: .05em;
}

/* progress dots: built by JS, horizontal under the slider on small
   screens, vertical beside the photo on the pinned desktop layout */
.works-dots {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 28px;
}

.works-dots span {
  width: 7px;
  height: 7px;
  border: 1px solid var(--muted);
  border-radius: 50%;
  transition: background .35s ease, border-color .35s ease, transform .35s ease;
}

.works-dots span.is-active {
  background: var(--ink);
  border-color: var(--ink);
  transform: scale(1.25);
}
.work-meta h2,
.work-meta h3 { font-size: clamp(1.65rem, 3vw, 2.8rem); font-weight: 300; line-height: 1; }
.work-meta > p:nth-of-type(2) { color: var(--muted); text-align: right; }
.work-meta i {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: .9rem;
  font-style: normal;
  transition: background .4s var(--ease-out), color .4s var(--ease-out), transform .4s var(--ease-out);
}

.work-card:hover .work-meta i { background: var(--ink); color: var(--white); transform: rotate(45deg); }

/* ==========================================================
   About
========================================================== */
.about {
  min-height: 100svh;
  padding-block: clamp(110px, 14vw, 210px);
  background: var(--paper);
  border-radius: 0;
  box-shadow: 0 -28px 80px rgba(32, 30, 25, .11);
  clip-path: inset(var(--about-clip, 0%) 0 0);
  transform: translateY(var(--about-lift, 0));
  transform-origin: center top;
  overflow: clip;
  will-change: clip-path, transform;
}

.about-pin {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr);
  gap: clamp(44px, 9vw, 150px);
  align-items: start;
}

.about-watermark {
  position: absolute;
  right: -.04em;
  top: -.26em;
  color: rgba(23, 23, 21, .035);
  font-size: clamp(8rem, 25vw, 27rem);
  font-weight: 400;
  letter-spacing: -.08em;
  line-height: 1;
  pointer-events: none;
  transform: translateY(var(--about-watermark-y, 0));
  will-change: transform;
}

.about-head, .about-content { position: relative; z-index: 1; }

.about-head .eyebrow { margin-bottom: 30px; color: var(--muted); }
.about-head .display { font-size: clamp(3.3rem, 6.2vw, 6.8rem); }

.about-content {
  display: grid;
  gap: clamp(56px, 8vw, 100px);
  padding-block: clamp(40px, 8vw, 110px) 70px;
}

.about-copy { max-width: 620px; }
.about-copy p {
  margin-top: 18px;
  color: var(--muted);
  font-family: var(--jp);
  font-size: clamp(.85rem, 1vw, .95rem);
  line-height: 2.1;
}

.about-copy .about-lead {
  margin: 0 0 34px;
  color: var(--ink);
  font-size: clamp(1.2rem, 2vw, 1.75rem);
  line-height: 1.8;
}

.about-detail-heading {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-block: 18px;
  border-bottom: 1px solid var(--line);
}

.about-detail-heading .eyebrow { color: var(--muted); }
.about-detail-heading h3 {
  font-family: var(--jp);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: .1em;
}

.career-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.career-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 4px clamp(26px, 4vw, 56px);
  align-items: start;
  padding-block: 28px;
  border-bottom: 1px dotted var(--line);
}

.career-item:last-child { border-bottom: none; }

.career-period {
  font-family: var(--jp);
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  grid-row: 1 / span 2;
  padding-top: .35em;
  color: var(--muted);
  letter-spacing: .08em;
  white-space: nowrap;
}

.career-role h4 {
  font-family: var(--jp);
  font-size: .98rem;
  font-weight: 400;
  letter-spacing: .02em;
  line-height: 1.7;
}

.career-role p {
  display: inline-block;
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--jp);
  font-size: .78rem;
  letter-spacing: .03em;
  line-height: 1.7;
}

.career-scope {
  margin: 10px 0 0;
  padding: 0;
  color: var(--muted);
  font-family: var(--jp);
  font-size: .85rem;
  letter-spacing: .02em;
  line-height: 2;
  list-style: none;
}

.tool-list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0;
  padding: 22px 0 0;
  list-style: none;
}

.tool-list img {
  width: clamp(40px, 4vw, 48px);
  height: auto;
}

.tool-names {
  margin-top: 12px;
  color: var(--muted);
  font-size: .75rem;
  letter-spacing: .05em;
  line-height: 1.7;
}

/* the "スキル" heading matches the 使用ツール heading typography */
.tools-block #skills-title {
  margin-top: 34px;
  padding-block: 18px;
  border-bottom: 1px solid var(--line);
  font-family: var(--jp);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: .1em;
}

.tool-list li { line-height: 0; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 99px;
  transition: background .35s ease, color .35s ease;
}

.tags li:hover { background: var(--ink); color: var(--paper); }

/* ----------------------------------------------------------
   Pinned panels (Works / About), desktop only:
   the section spans several screens of scroll, the inner frame
   sticks at one screen tall, and the right-hand blocks crossfade
   one at a time as scrolling progresses.
---------------------------------------------------------- */
@media (min-width: 981px) {
  .js .works,
  .js .about {
    min-height: 0;
    padding-block: 0;
  }

  /* scroll length: roughly 0.85 screen per step */
  .js .works { height: 440svh; }
  .js .about { height: 340svh; }

  .js .works-layout,
  .js .about-pin {
    position: sticky;
    top: 0;
    height: 100svh;
    align-items: center;
    padding-block: 70px;
  }

  .js .works-heading {
    position: static;
    min-height: 0;
    padding: 0;
  }

  .js .works-layout .works-list,
  .js .about-pin .about-content {
    position: relative;
    align-self: stretch;
    display: block;
    padding: 0;
  }

  .js .works-list > .reveal,
  .js .about-content > .reveal {
    position: absolute;
    inset-inline: 0;
    top: 50%;
    opacity: 0;
    visibility: hidden;
    filter: blur(10px);
    transform: translateY(calc(-50% + 34px));
    transition:
      opacity .6s var(--ease-out),
      filter .6s var(--ease-out),
      transform .8s var(--ease-out),
      visibility 0s .6s;
  }

  .js .works-list > .reveal.is-current,
  .js .about-content > .reveal.is-current {
    opacity: 1;
    visibility: visible;
    filter: none;
    transform: translateY(-50%);
    transition:
      opacity .6s var(--ease-out) .15s,
      filter .6s var(--ease-out) .15s,
      transform .8s var(--ease-out) .15s,
      visibility 0s .15s;
  }

  /* keep a whole card (image + meta) inside one screen, one size down,
     hugging right so the dot lane sits just outside the photo */
  .js .works-list > .work-card {
    width: min(100% - 120px, calc((100svh - 380px) * 4 / 3));
    margin-inline: auto 48px;
  }

  /* dots sit in the reserved lane to the right of the photo */
  .js .works-layout .works-dots {
    position: absolute;
    right: 16px;
    top: 50%;
    flex-direction: column;
    gap: 11px;
    margin: 0;
    transform: translateY(-50%);
  }
}

/* ==========================================================
   Contact
========================================================== */
.contact {
  min-height: 100svh;
  padding-block: clamp(100px, 13vw, 180px) 110px;
  background: var(--dark);
  color: var(--white);
  border-radius: 0;
}

.contact .eyebrow { margin-bottom: 32px; color: rgba(255, 255, 255, .55); }

.contact-title {
  max-width: 1200px;
  font-size: clamp(3.9rem, 9vw, 9.5rem);
  font-weight: 300;
  letter-spacing: -.055em;
  line-height: .88;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 360px));
  gap: clamp(30px, 6vw, 100px);
  margin-top: clamp(55px, 7vw, 90px);
  color: rgba(255, 255, 255, .58);
  font-family: var(--jp);
  font-size: .82rem;
  line-height: 2;
}

.mail-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: clamp(70px, 10vw, 140px);
  padding-block: 24px;
  border-block: 1px solid rgba(255, 255, 255, .24);
  font-size: clamp(1.5rem, 4.2vw, 4.5rem);
  font-style: italic;
  letter-spacing: -.025em;
  line-height: 1;
}

.mail-link span { transition: opacity .35s ease, transform .6s var(--ease-out); }
.mail-link i { font-style: normal; transition: transform .55s var(--ease-out); }
.mail-link:hover span { opacity: .58; transform: translateX(8px); }
.mail-link:hover i { transform: rotate(45deg); }

/* ---------- document downloads ---------- */
.doc-links { margin-top: clamp(46px, 6vw, 68px); }

.doc-links-label {
  color: rgba(255, 255, 255, .55);
  font-size: .68rem;
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.doc-download-all {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding: 20px 26px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 99px;
  background: var(--white);
  color: var(--ink);
  transition: background .35s ease, border-color .35s ease, color .35s ease;
}

.doc-download-all span {
  font-family: var(--jp);
  font-size: .92rem;
  letter-spacing: .02em;
  line-height: 1.6;
}

.doc-download-all em {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: .78rem;
  font-style: italic;
  letter-spacing: .03em;
}

.doc-download-all i {
  display: grid;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-style: normal;
  transition: transform .4s var(--ease-out);
}

.doc-download-all:hover { background: transparent; border-color: rgba(255, 255, 255, .8); color: var(--white); }
.doc-download-all:hover em { color: rgba(255, 255, 255, .65); }
.doc-download-all:hover i { border-color: rgba(255, 255, 255, .5); transform: translateY(3px); }

.doc-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.doc-links-row a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 99px;
  color: rgba(255, 255, 255, .75);
  font-size: .78rem;
  letter-spacing: .03em;
  transition: background .35s ease, border-color .35s ease, color .35s ease;
}

.doc-links-row a span { transition: transform .4s var(--ease-out); }
.doc-links-row a:hover { background: var(--white); border-color: var(--white); color: var(--ink); }
.doc-links-row a:hover span { transform: translateY(2px); }

.footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(18px, 3vw, 46px);
  margin-top: clamp(80px, 12vw, 150px);
  color: rgba(255, 255, 255, .55);
}

.footer img { width: 42px; height: auto; opacity: .8; }
.footer a { transition: color .3s ease; }
.footer a:hover { color: var(--white); }

/* ==========================================================
   Works index / detail pages
========================================================== */
.detail-page { background: var(--paper-light); }

.sheet-plain {
  position: relative;
  min-height: 100svh;
  background: var(--paper-light);
}

.detail-top {
  position: sticky;
  inset: 0 0 auto;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px var(--page-x);
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 247, .88);
  backdrop-filter: blur(14px);
}

.detail-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: .86rem;
  letter-spacing: .08em;
}

.detail-brand .crest { width: 36px; height: auto; }

.detail-back,
.guide,
.work-tags,
.individual_client,
.detail-next a {
  font-size: .68rem;
  font-style: normal;
  font-weight: 400;
  letter-spacing: .14em;
  line-height: 1.5;
  text-transform: uppercase;
}

.detail-back,
.guide { color: var(--muted); }

.detail-back {
  position: relative;
  padding-block: 7px;
}

.detail-back::after {
  content: "";
  position: absolute;
  inset: auto 0 2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .4s var(--ease-out);
}

.detail-back:hover::after { transform: scaleX(1); transform-origin: left; }

.work-detail {
  width: min(100%, 1240px);
  margin-inline: auto;
  padding: clamp(55px, 8vw, 110px) var(--page-x) clamp(90px, 12vw, 160px);
}

.guide {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(50px, 8vw, 95px);
}

.guide a { transition: color .3s ease; }
.guide a:hover { color: var(--ink); }

.individual_title-wrap { margin-bottom: clamp(35px, 5vw, 64px); }

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.work-tags .tag {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
}

.individual_title {
  font-size: clamp(2.9rem, 4.8vw, 5.2rem);
  font-weight: 300;
  letter-spacing: -.05em;
  line-height: .9;
}

/* detail pages: smaller headline on every width, largest on desktop */
.work-detail:not(.works-index) .individual_title {
  font-size: clamp(1.9rem, 4.5vw, 4.4rem);
  line-height: 1.05;
}

/* the works index keeps a larger, but slightly reduced, display size */
@media (min-width: 981px) {
  .works-index .individual_title { font-size: clamp(3.2rem, 6.6vw, 7rem); }
  .work-info h2 { font-size: 1.3rem; letter-spacing: .12em; }

  /* detail pages: title block and main visual sit side by side */
  .work-detail:not(.works-index) {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 0 clamp(36px, 5vw, 70px);
    align-items: center;
  }

  .work-detail:not(.works-index) > .guide,
  .work-detail:not(.works-index) > .work-info { grid-column: 1 / -1; }

  .work-detail:not(.works-index) .individual_title-wrap { margin-bottom: 0; }
}

.individual_client { margin-top: 20px; color: var(--muted); }

.individual_main-img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 2px;
}

.work-info {
  margin-top: clamp(45px, 7vw, 80px);
}

.work-info h2 {
  margin-top: clamp(32px, 4.5vw, 50px);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: .68rem;
  font-weight: 400;
  letter-spacing: .16em;
  line-height: 1.5;
  text-transform: uppercase;
}

.work-info h2:first-child { margin-top: 0; }

.work-info > p,
.work-info > div:not(.grid-wrap) {
  padding-block: 14px 0;
  font-family: var(--jp);
  font-size: .86rem;
  line-height: 2.05;
}

.work-info > div:not(.grid-wrap) p + p { margin-top: 14px; }
.work-info .approach-copy p + p { margin-top: 20px; }

.work-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-size: 1rem;
  font-style: italic;
  letter-spacing: .02em;
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
  transition: border-color .3s ease, opacity .3s ease;
}

.work-link i { font-style: normal; transition: transform .4s var(--ease-out); }
.work-link:hover { border-color: var(--ink); }
.work-link:hover i { transform: translate(2px, -2px); }

.grid-wrap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-block: clamp(26px, 4vw, 44px) 0;
}

.work-image {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: zoom-in;
  transition: filter .5s var(--ease-out), transform .6s var(--ease-out);
}

.work-image:hover { filter: brightness(.88); transform: translateY(-5px); }

.detail-next {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: min(100%, 1240px);
  margin-inline: auto;
  padding: 0 var(--page-x) clamp(90px, 10vw, 140px);
}

.detail-next a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: 99px;
  transition: background .35s ease, border-color .35s ease, color .35s ease;
}

.detail-next a:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.all-works-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(75px, 10vw, 130px) clamp(22px, 4vw, 60px);
}

/* ---------- dialog ---------- */
.lightbox {
  width: min(92vw, 1500px);
  max-width: none;
  max-height: 92vh;
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  overflow: visible;
}

.lightbox[open] { animation: dialog-in .55s var(--ease-out) both; }
.lightbox::backdrop { background: rgba(12, 12, 12, .92); backdrop-filter: blur(12px); }
.lightbox figure { display: grid; justify-items: center; gap: 12px; }
.lightbox img { max-width: 92vw; max-height: 82vh; width: auto; border-radius: 2px; }
.lightbox figcaption { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.lightbox-close {
  display: block;
  margin: 0 0 12px auto;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

@keyframes dialog-in { from { opacity: 0; transform: translateY(18px) scale(.98); } }

/* ---------- mouse follower ---------- */
.mouse-follower { display: none; }

@media (pointer: fine) and (hover: hover) {
  .mouse-follower {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 200;
    display: block;
    width: 38px;
    pointer-events: none;
    opacity: 0;
    transform: translate3d(-80px, -80px, 0);
    filter: invert(1);
    mix-blend-mode: difference;
    transition: opacity .25s ease;
    will-change: transform;
  }
  .mouse-follower.is-active { opacity: .78; }
  .mouse-follower img { width: 100%; height: auto; }
}

/* ==========================================================
   Responsive
========================================================== */
@media (max-width: 980px) {
  .hero-card { width: clamp(120px, 21vw, 210px); }
  .hero-card--01 { left: 4vw; }
  .hero-card--02 { right: 4vw; }
  .hero-card--03 { left: 6vw; }
  .hero-card--04 { right: 7vw; }

  .works-layout, .about-pin { grid-template-columns: 1fr; }
  .works-heading { position: relative; min-height: auto; padding: 0 0 75px; }
  .works-heading .display { font-size: clamp(4.5rem, 13vw, 7rem); }
  .works-all { margin-top: 28px; }
  /* top page: works become a horizontal snap slider below desktop */
  .works-list {
    display: flex;
    gap: 18px;
    margin-inline: calc(var(--page-x) * -1);
    padding-inline: var(--page-x);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .works-list::-webkit-scrollbar { display: none; }

  .works-list > .work-card {
    flex: 0 0 min(84%, 440px);
    scroll-snap-align: center;
  }

  .work-meta { grid-template-columns: 44px 1fr auto; }
  .work-meta > p:nth-of-type(2) { display: none; }
  .works-list .work-meta > p { display: none; }
  .works-list .work-meta { grid-template-columns: minmax(0, 1fr) auto; }
  .work-meta h2,
  .work-meta h3 { font-size: clamp(1.5rem, 4vw, 2.2rem); }
  /* the horizontal slider forces overflow-y to clip (paired with
     overflow-x: auto), so give descenders (g, y, p…) a little headroom */
  .works-list .work-meta { padding-bottom: 6px; }

  .about-head { padding: 0 0 60px; }
  .about-content { padding-block: 0; }
  .about-head .display { max-width: 700px; }

  /* below desktop: the "download all" button matches the individual pills' size */
  .doc-download-all { gap: 14px; padding: 11px 18px; }
  .doc-download-all span { font-size: .78rem; line-height: 1.5; }
  .doc-download-all em { margin-top: 2px; font-size: .68rem; }
  .doc-download-all i { width: 28px; height: 28px; font-size: .78rem; }
}

@media (max-width: 720px) {
  :root { --page-x: 20px; }

  .hero { background-size: 12vw 12vw; }
  .hero-note--right, .hero-card--05 { display: none; }
  .hero-note { top: 22px; }
  .hero-title { top: 47%; width: 100%; }
  .hero-title h1 { font-size: clamp(4.4rem, 22vw, 7rem); }
  .hero-title p { font-size: .59rem; }
  .hero-card { width: clamp(112px, 35vw, 160px); }
  .hero-card--01 { left: -4vw; top: 19vh; }
  .hero-card--02 { right: -5vw; top: 16vh; }
  .hero-card--03 { left: 4vw; bottom: 13vh; }
  .hero-card--04 { right: 6vw; bottom: 13vh; }
  .hero-scroll { right: 20px; bottom: 84px; }
  .hero-scroll span { display: none; }

  /* readable menu on mobile: frosted bar instead of blend mode */
  .dock {
    justify-content: center;
    padding: 14px var(--page-x) calc(16px + env(safe-area-inset-bottom, 0px));
    color: var(--ink);
    mix-blend-mode: normal;
    background: rgba(251, 250, 247, .82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow:
      0 -2px 8px rgba(35, 32, 26, .05),
      0 -10px 28px rgba(35, 32, 26, .07);
  }
  .dock-status, .dock-label { display: none; }
  .dock-links { width: 100%; justify-content: space-between; gap: 10px; font-size: .61rem; }

  .works { padding-block: 90px 120px; }
  .work-meta { grid-template-columns: 42px 1fr auto; }
  .work-meta h2,
  .work-meta h3 { font-size: 1.85rem; }
  .work-visual::after { display: none; }

  .about { padding-block: 100px 120px; }
  .about-watermark { top: 0; }
  .about-head .display { font-size: clamp(3.5rem, 16vw, 5.4rem); }
  .career-item { grid-template-columns: 1fr; gap: 6px; }
  .career-period { grid-row: auto; padding-top: 0; white-space: normal; }

  .contact { padding-block: 100px 90px; }
  .contact-title { font-size: clamp(3.5rem, 15vw, 6rem); }
  .contact-grid { grid-template-columns: 1fr; }
  .mail-link { font-size: clamp(1.35rem, 6.5vw, 2rem); }
  .doc-links-row { flex-direction: column; align-items: flex-start; }
  .doc-links-row a { width: 100%; justify-content: space-between; }
  .footer { grid-template-columns: auto 1fr; }
  .footer a { grid-column: span 1; }

  .detail-top { padding-block: 16px; }
  .detail-brand span { display: none; }
  .individual_title { font-size: clamp(3.2rem, 17vw, 5.4rem); }
  .grid-wrap,
  .all-works-grid { grid-template-columns: 1fr; }
  .detail-next { flex-direction: column; align-items: stretch; }
  .detail-next a { justify-content: center; }
}

@media (max-width: 390px) {
  .hero-card--03, .hero-card--04 { display: none; }
}

/* Motion and data-saving preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .hero { transform: none; opacity: 1; filter: none; }
  .js .reveal { opacity: 1; filter: none; transform: none; }
  .work-visual img { height: 100%; transform: none; }
  .works::after { opacity: 0; }
  .about { clip-path: none; transform: none; }
  .about-watermark { transform: none; }
}

@media (prefers-reduced-data: reduce) {
  .hero-card--03, .hero-card--04, .hero-card--05 { display: none; }
}
