@font-face {
  font-family: "Portfolio Sans";
  src: url("./fonts/Jinter-Regular.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-024F, U+1E00-1EFF, U+2000-206F;
}

@font-face {
  font-family: "Portfolio Sans";
  src: url("./fonts/Jinter-SemiBold.otf") format("opentype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0000-024F, U+1E00-1EFF, U+2000-206F;
}

@font-face {
  font-family: "Portfolio Sans";
  src: url("./fonts/AP-OTF-AotoGothicStdN-Medium.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+3000-30FF, U+31F0-31FF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FF00-FFEF;
}

:root {
  color-scheme: light;
  --background: #e6e6e6;
  --ink: #111111;
  --muted: #9e9e9e;
  --type-body: 1rem;
  --type-heading: 1.5rem;
  --type-nav: var(--type-body);
  --header-height: 92px;
  --stroke: 1.4px;
  --print-duration: 720ms;
  --print-line-fade-duration: 840ms;
  font-family: "Portfolio Sans", Arial, "Hiragino Kaku Gothic ProN", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-weight: 400;
  overflow-x: hidden;
}

.site-footer {
  width: 100%;
  margin: 0;
  padding: 0 16px 20px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1;
  text-align: center;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

button {
  -webkit-tap-highlight-color: transparent;
}

a:focus,
button:focus,
a:focus-visible,
button:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  background: var(--background);
}

.brand {
  position: relative;
  display: inline-flex;
  width: 168px;
  color: var(--ink);
  align-items: center;
  animation: roll-in-left 820ms cubic-bezier(0.16, 1, 0.3, 1) 80ms both;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0;
}

.brand::after {
  position: absolute;
  inset: 0;
  background: currentColor;
  content: "";
  pointer-events: none;
  -webkit-mask: url("./joyamazakilogo.svg?v=20260921-2") center / contain no-repeat;
  mask: url("./joyamazakilogo.svg?v=20260921-2") center / contain no-repeat;
}

.header-actions,
.desktop-nav,
.language-switch {
  display: flex;
  align-items: center;
}

.header-actions {
  gap: 34px;
}

.desktop-nav {
  gap: 38px;
}

.desktop-nav a {
  animation: text-rise 560ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.desktop-nav a:nth-child(1) { animation-delay: 280ms; }
.desktop-nav a:nth-child(2) { animation-delay: 350ms; }
.desktop-nav a:nth-child(3) { animation-delay: 420ms; }
.desktop-nav a:nth-child(4) { animation-delay: 490ms; }

.desktop-nav a,
.mobile-menu a {
  position: relative;
  font-size: var(--type-nav);
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
}

.desktop-nav a::after {
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: var(--stroke);
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.desktop-nav a:hover::after,
.desktop-nav a:focus-visible::after,
.desktop-nav a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.language-switch {
  gap: 7px;
  white-space: nowrap;
  animation: roll-in-top 760ms cubic-bezier(0.16, 1, 0.3, 1) 160ms both;
}

.language-switch a {
  color: var(--ink);
  font-size: var(--type-nav);
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
  transition: color 180ms ease;
}

.language-switch a:not(.is-active) {
  color: var(--muted);
}

.language-switch span {
  font-size: var(--type-nav);
  font-weight: 400;
}

.menu-button,
.mobile-menu {
  display: none;
}

.works {
  display: grid;
  width: min(100%, 1800px);
  margin: 0 auto;
  padding: var(--header-height) 48px 96px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 72px clamp(40px, 4vw, 72px);
  align-items: start;
}

.work-card:nth-child(even) {
  margin-top: clamp(96px, 12vw, 220px);
}

.work-card {
  position: relative;
  width: 100%;
  margin: 0;
  overflow: hidden;
}

.work-card-link {
  display: block;
}

.work-card img {
  display: block;
  width: 100%;
  height: auto;
  transform-origin: center;
  transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.work-card:hover img {
  transform: scale(1.012);
}

.page-main {
  width: min(100%, 1800px);
  margin: 0 auto;
  padding: calc(var(--header-height) + 56px) 48px 112px;
}

.portfolio-page {
  width: 100%;
  margin: 0;
  min-height: 100vh;
  padding: var(--header-height) 0 96px;
}

.portfolio-pages {
  display: flex;
  width: min(72vw, calc(141.421vh - 181px), 1240px);
  margin: 0 auto;
  flex-direction: column;
  gap: 0;
}

.portfolio-status,
.pdf-fallback {
  margin: 0;
  font-size: var(--type-body);
  line-height: 1.5;
}

.pdf-fallback {
  padding: 16px 0;
}

.pdf-page {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: transparent;
  line-height: 0;
  scroll-margin-top: var(--header-height);
}

.pdf-page + .pdf-page {
  margin-top: -1px;
}

.pdf-page canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.pdf-page:last-child canvas {
  transform: scaleY(1.002);
  transform-origin: top;
}

.about-page {
  padding-top: var(--header-height);
}

.page-title,
.page-main p,
.page-main figure {
  margin: 0;
}

.page-title {
  margin-bottom: 40px;
  font-size: var(--type-heading);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.name-kern {
  display: inline-block;
  margin-right: 0.04em;
  letter-spacing: -0.04em;
}

.profile-layout {
  display: grid;
  align-items: start;
  max-width: 1320px;
  grid-template-columns: minmax(280px, 0.8fr) minmax(360px, 1.2fr);
  gap: clamp(56px, 7vw, 120px);
}

.profile-image img {
  display: block;
  width: 100%;
  height: auto;
}

.profile-image {
  position: relative;
  overflow: hidden;
}

.profile-copy {
  max-width: 680px;
}

.profile-copy .page-title {
  margin-bottom: 34px;
}

.profile-role,
.profile-history,
.contact-content p {
  font-size: var(--type-body);
  line-height: 1.65;
}

.profile-role {
  margin-bottom: 14px !important;
  line-height: 1.4;
}

.profile-history {
  display: grid;
  gap: 8px;
}

.profile-history p {
  display: grid;
  align-items: start;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.5rem;
}

.history-year {
  white-space: nowrap;
}

.education-school {
  display: inline;
}

.contact-page {
  min-height: 100vh;
  text-align: center;
}

.contact-content {
  max-width: 760px;
}

.contact-email {
  display: block;
  width: fit-content;
  margin: 48px auto 0;
  max-width: 100%;
  font-size: var(--type-heading);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
  text-decoration: none;
  transition: letter-spacing 320ms ease, transform 320ms ease;
}

.contact-email:hover,
.contact-email:focus-visible {
  letter-spacing: 0.025em;
  transform: translateY(-2px);
}

.js .work-card:not(.is-visible) img,
.js .profile-image:not(.is-visible) img {
  clip-path: inset(0 0 100% 0);
}

.js .work-card.is-visible img,
.js .profile-image.is-visible img {
  animation: print-reveal var(--print-duration) cubic-bezier(0.22, 0.75, 0.32, 1) var(--reveal-delay, 0ms) both;
}

.js .work-card::after,
.js .profile-image::after {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  left: 0;
  height: var(--stroke);
  background: var(--ink);
  content: "";
  opacity: 0;
  pointer-events: none;
}

.js .work-card.is-visible::after,
.js .profile-image.is-visible::after {
  animation:
    print-line-position var(--print-duration) cubic-bezier(0.22, 0.75, 0.32, 1) var(--reveal-delay, 0ms) both,
    print-line-opacity var(--print-line-fade-duration) ease-in-out var(--reveal-delay, 0ms) both;
}

.about-page .profile-copy {
  animation: text-wipe 680ms cubic-bezier(0.76, 0, 0.24, 1) 1580ms both;
}

.contact-email {
  animation: text-wipe 680ms cubic-bezier(0.76, 0, 0.24, 1) both;
}

.contact-email { animation-delay: 620ms; }

@keyframes roll-in-left {
  from { opacity: 0; transform: translateX(-90px) rotate(-14deg); }
  70% { opacity: 1; transform: translateX(7px) rotate(2deg); }
  to { opacity: 1; transform: translateX(0) rotate(0); }
}

@keyframes roll-in-top {
  from { opacity: 0; transform: translateY(-60px) rotate(10deg); }
  70% { opacity: 1; transform: translateY(5px) rotate(-2deg); }
  to { opacity: 1; transform: translateY(0) rotate(0); }
}

@keyframes roll-in-right {
  from { opacity: 0; transform: translateX(58px) rotate(30deg); }
  70% { opacity: 1; transform: translateX(-4px) rotate(-4deg); }
  to { opacity: 1; transform: translateX(0) rotate(0); }
}

@keyframes print-reveal {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes print-line-position {
  from { top: 0; }
  to { top: calc(100% - var(--stroke)); }
}

@keyframes print-line-opacity {
  0% { opacity: 0; }
  1% { opacity: 1; }
  85.714% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes text-rise {
  from { opacity: 0; transform: translateY(1.15em) rotate(2deg); }
  to { opacity: 1; transform: translateY(0) rotate(0); }
}

@keyframes text-wipe {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(0 0 0 0); }
}

[lang="ja"] .page-title,
[lang="ja"] .contact-email {
  letter-spacing: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --background: #111111;
    --ink: #e6e6e6;
    --muted: #777777;
  }
}

@media (max-width: 720px) {
  :root {
    --header-height: 62px;
  }

  .site-header {
    padding: 0 16px;
  }

  .brand {
    position: relative;
    z-index: 20;
    width: 120px;
  }

  .desktop-nav {
    display: none;
  }

  .header-actions {
    gap: 14px;
  }

  .language-switch {
    position: relative;
    z-index: 20;
    gap: 5px;
  }

  .menu-button {
    position: relative;
    z-index: 22;
    display: block;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    animation: roll-in-right 760ms cubic-bezier(0.16, 1, 0.3, 1) 240ms both;
  }

  .menu-button span {
    position: absolute;
    right: 4px;
    width: 16px;
    height: var(--stroke);
    background: var(--ink);
    transform-origin: center;
    transition: transform 220ms ease;
  }

  .menu-button span:first-child { top: 13.5px; }
  .menu-button span:last-child { top: 21.5px; }

  .menu-button[aria-expanded="true"] span:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  .menu-button[aria-expanded="true"] span:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }

  body.menu-open .brand,
  body.menu-open .language-switch {
    pointer-events: none;
  }

  .mobile-menu {
    position: fixed;
    z-index: 21;
    inset: 0;
    display: grid;
    visibility: hidden;
    padding: calc(var(--header-height) + 8px) 16px 36px;
    background: var(--background);
    clip-path: inset(0 0 100% 0);
    transition: clip-path 460ms cubic-bezier(0.76, 0, 0.24, 1), visibility 0s linear 460ms;
  }

  .mobile-menu[aria-hidden="false"] {
    visibility: visible;
    clip-path: inset(0 0 0 0);
    transition: clip-path 460ms cubic-bezier(0.76, 0, 0.24, 1);
  }

  .mobile-menu nav {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .mobile-menu a {
    font-size: var(--type-heading);
    font-weight: 400;
    letter-spacing: -0.025em;
    line-height: 1.15;
  }

  .education-school {
    display: block;
  }

  .works {
    display: flex;
    padding: var(--header-height) 16px 64px;
    flex-direction: column;
    gap: 40px;
  }

  .work-card:nth-child(even) {
    margin-top: 0;
  }

  .portfolio-page {
    padding: var(--header-height) 0 64px;
  }

  .portfolio-pages {
    width: 100%;
    margin: 0;
  }

  .page-main {
    padding: calc(var(--header-height) + 16px) 16px 72px;
  }

  .about-page {
    padding-top: var(--header-height);
  }

  .page-title {
    margin-bottom: 32px;
  }

  .contact-email {
    font-size: clamp(1.25rem, 6.4vw, 1.5rem);
    white-space: nowrap;
  }

  .profile-layout {
    display: block;
  }

  .profile-copy {
    margin-top: 36px;
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-delay: 0ms !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .js .work-card img,
  .js .profile-image img {
    clip-path: none !important;
  }

  .js .work-card::after,
  .js .profile-image::after {
    display: none;
  }
}
