@charset "UTF-8";

:root {
  --color-text: #111;
  --color-muted: #565656;
  --color-line: #111;
  --color-bg: #fff;
  --content-width: 960px;
  --narrow-width: 760px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  line-height: 1.9;
  letter-spacing: 0.06em;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 430px;
  padding-top: 52px;
  overflow: hidden;
}

.hero__name {
  text-align: center;
}

.hero__roman {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: 0.56em;
}

.hero__jp {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.34em;
}

.hero__line {
  display: none;
}

.hero__content {
  margin-top: 98px;
  text-align: center;
}

.hero__content h1 {
  position: relative;
  display: inline-block;
  margin: 0;
  font-size: clamp(32px, 5vw, 46px);
  font-weight: 400;
  letter-spacing: 0.28em;
}

/* LINE_EDGE_FIX: 線を画面端まで伸ばす。位置指定はこの下の top/right/left のまま。 */
.hero__content h1::before,
.hero__content h1::after {
  content: "";
  position: absolute;
  width: 100vw;
  height: 2px;
  background: var(--color-line);
}

.hero__content h1::before {
  top: -62px;
  right: calc(100% + 34px);
}

.hero__content h1::after {
  top: calc(100% + 62px);
  left: calc(100% + 34px);
}

.hero__content p {
  margin: 118px 0 0;
  font-size: 17px;
  letter-spacing: 0.55em;
}

/* ===== Common ===== */
.section {
  width: min(var(--content-width), calc(100% - 48px));
  margin-inline: auto;
}

.section__title {
  margin: 0;
  font-size: clamp(31px, 5vw, 43px);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.12em;
}

.section__title--left {
  text-align: left;
}

.section__title--center {
  text-align: center;
}

/* ===== Profile ===== */
.profile {
  width: min(var(--narrow-width), calc(100% - 48px));
  padding-top: 96px;
}

.profile__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(56px, 8vw, 90px);
  margin-top: 44px;
}

.profile__side {
  display: grid;
  gap: 52px;
}

.profile__heading {
  position: relative;
  margin: 0 0 18px;
  padding-bottom: 8px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.profile__heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--color-line);
}

.profile__block p,
.profile__list {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.profile__block p {
  text-align: justify;
  text-align-last: left;
  text-justify: inter-ideograph;
}

.profile__list {
  padding-left: 1.1em;
}

/* ===== Works ===== */
.works {
  padding-top: 155px;
  padding-bottom: 124px;
}

.works__root {
  margin-top: 62px;
}

.work-category + .work-category {
  margin-top: 88px;
}

.work-category__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.work-category__title {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.12em;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 42px 74px;
}

.work-card {
  min-width: 0;
}

.work-card[hidden] {
  display: none;
}

.work-card__thumb {
  position: relative;
  aspect-ratio: 1.28 / 1;
  margin-bottom: 13px;
  overflow: hidden;
  background: #000;
}

.work-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-card__title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.work-card__text {
  margin: 0;
  color: var(--color-text);
  font-size: 10px;
  line-height: 1.75;
  letter-spacing: 0.05em;
}

.work-category__button-wrap {
  margin-top: 34px;
  text-align: center;
}

.more-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 158px;
  min-height: 42px;
  padding: 9px 24px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.more-button:hover,
.more-button:focus-visible {
  background: var(--color-text);
  color: var(--color-bg);
}

.more-button:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 4px;
}



.work-card__actions {
  margin-top: 12px;
}

.work-card__site-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 116px;
  min-height: 32px;
  padding: 7px 16px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  background: transparent;
  color: var(--color-text);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.08em;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.work-card__site-link:hover,
.work-card__site-link:focus-visible {
  background: var(--color-text);
  color: var(--color-bg);
}

.work-card__site-link:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 4px;
}

/* ===== Work Image Modal ===== */
.work-card__thumb-button {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.work-card__thumb-button:focus-visible {
  outline: 2px solid var(--color-line);
  outline-offset: 4px;
}

body.is-modal-open {
  overflow: hidden;
}

.image-modal[hidden] {
  display: none;
}

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.image-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.92);
}

.image-modal__body {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  padding: 72px 48px 48px;
}

.image-modal__close {
  position: fixed;
  top: 24px;
  right: 32px;
  z-index: 2;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--color-line);
  border-radius: 50%;
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.image-modal__close:hover,
.image-modal__close:focus-visible {
  background: var(--color-text);
  color: var(--color-bg);
}

.image-modal__scroll {
  width: 100%;
  height: 100%;
  overflow: auto;
  background: var(--color-bg);
}

.image-modal__image {
  display: block;
  width: min(720px, 76vw);
  height: auto;
  max-width: 100%;
  max-height: none;
  margin: 0 auto;
}

/* ===== Footer ===== */
.footer {
  padding: 0 24px 56px;
  text-align: center;
  color: var(--color-muted);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.footer p {
  margin: 0 0 12px;
}

.footer a {
  border-bottom: 1px solid currentColor;
}

/* ===== Responsive ===== */
@media (max-width: 820px) {
  .hero {
    min-height: 390px;
  }

  .hero__content h1::before,
  .hero__content h1::after {
    width: 100vw;
  }

  .hero__content h1::before {
    right: calc(100% + 24px);
  }

  .hero__content h1::after {
    left: calc(100% + 24px);
  }

  .profile__grid {
    grid-template-columns: 1fr;
    gap: 46px;
  }

  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 38px 36px;
  }
}

@media (max-width: 560px) {
  body {
    line-height: 1.8;
  }

  .section,
  .profile {
    width: min(100% - 34px, var(--content-width));
  }

  .hero {
    min-height: 340px;
    padding-top: 40px;
  }

  .hero__roman {
    font-size: 11px;
    letter-spacing: 0.38em;
  }

  .hero__jp {
    font-size: 14px;
    letter-spacing: 0.22em;
  }

  .hero__content {
    margin-top: 76px;
  }

  .hero__content h1 {
    letter-spacing: 0.16em;
  }

  .hero__content h1::before,
  .hero__content h1::after {
    width: 100vw;
  }

  .hero__content h1::before {
    top: -40px;
    right: calc(100% + 16px);
  }

  .hero__content h1::after {
    top: calc(100% + 40px);
    left: calc(100% + 16px);
  }

  .hero__content p {
    margin-top: 88px;
    font-size: 14px;
  }

  .profile {
    padding-top: 70px;
  }

  .works {
    padding-top: 104px;
    padding-bottom: 90px;
  }

  .works__root {
    margin-top: 46px;
  }

  .work-category + .work-category {
    margin-top: 68px;
  }

  .work-category__head {
    display: block;
  }

  .work-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .work-card__text {
    font-size: 11px;
  }
}


@media (max-width: 560px) {
  .image-modal__body {
    padding: 68px 24px 32px;
  }

  .image-modal__close {
    top: 18px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 24px;
  }
}

/* Works cards: reference layout. Other sections remain unchanged. */
.works.section {
  width: min(1024px, calc(100% - 48px));
}
.work-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}
.work-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 25px 25px 36px;
  border: 1px solid #4387b7;
  background: #fff;
}
.work-card[hidden] {
  display: none;
}
.work-card__title {
  order: 0;
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: .04em;
  overflow-wrap: anywhere;
}
.work-card__thumb {
  order: 1;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0;
  background: transparent;
}
.work-card__thumb img {
  object-fit: contain;
  object-position: center;
  transition: opacity .2s ease;
}
.work-card__thumb-button:hover img {
  opacity: .8;
}
.work-card__thumb-button:focus-visible {
  outline: 2px solid #236ea4;
  outline-offset: -2px;
}
.work-card__text {
  order: 2;
  margin: 14px 0 0;
  font-size: 11px;
  line-height: 1.8;
  color: #565656;
  overflow-wrap: anywhere;
}
.work-card__actions {
  order: 3;
  margin-top: 14px;
}
@media (max-width: 820px) {
  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
  .work-card {
    padding: 22px 22px 30px;
  }
}
@media (max-width: 560px) {
  .works.section {
    width: calc(100% - 34px);
  }
  .work-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .work-card {
    padding: 24px 24px 32px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .work-card__thumb img {
    transition: none;
  }
}

/* Shared work detail page */
.work-card__detail-link { display: block; height: 100%; }
.work-card__detail-link:hover img { opacity: .8; }
.work-card__detail-link:focus-visible { outline: 2px solid #236ea4; outline-offset: 6px; }
.detail-header { width: min(1024px, calc(100% - 48px)); margin: 0 auto; padding: 32px 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid #dedede; font-size: 13px; }
.detail-header a:first-child { letter-spacing: .18em; }
.work-detail { width: min(960px, calc(100% - 48px)); margin: 68px auto 100px; }
.detail-category { margin: 0 0 12px; font-size: 13px; color: #555; }
.detail-title { margin: 0 0 44px; font-size: clamp(24px, 4vw, 36px); font-weight: 400; line-height: 1.6; overflow-wrap: anywhere; }
.detail-image-frame { display: block; width: 100%; margin: 0; padding: 0; background: transparent; }
.detail-image { width: auto; max-width: 100%; height: auto; margin: 0 auto; }
.detail-description { margin: 40px 0 24px; font-size: 15px; line-height: 2.1; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-back { display: block; width: fit-content; margin: 64px auto 0; padding: 12px 28px; border: 1px solid #4387b7; font-size: 13px; }
.detail-back:hover { background: #f2f7fb; }
.work-detail a:focus-visible, .detail-header a:focus-visible { outline: 2px solid #236ea4; outline-offset: 4px; }
@media (max-width: 560px) {
  .detail-header, .work-detail { width: calc(100% - 34px); }
  .detail-header { padding: 24px 0; font-size: 11px; gap: 16px; }
  .work-detail { margin-top: 40px; margin-bottom: 70px; }
  .detail-title { margin-bottom: 28px; }
  .detail-description { margin-top: 28px; font-size: 13px; }
}

/* Plain URL above the work description */
.detail-url { margin: 36px 0 16px; font-size: 15px; line-height: 1.8; }
.detail-url__link { color: #236b95; overflow-wrap: anywhere; text-decoration: none; }
.detail-url__link:hover { text-decoration: underline; text-underline-offset: 4px; }
.detail-url + .detail-description { margin-top: 16px; }
@media (max-width: 560px) { .detail-url { font-size: 13px; margin-top: 28px; } }

/* Additional images below the description */
.detail-gallery { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; margin-top: 36px; }
.detail-gallery .detail-image { max-width: 100%; height: auto; }
@media (max-width: 560px) { .detail-gallery { gap: 24px; margin-top: 28px; } }

/* Profile: career and qualifications on the left, skills on the right. */
.profile__grid {
  row-gap: 52px;
  align-items: start;
}
.profile__side {
  display: contents;
}
.profile__grid > .profile__block {
  grid-column: 1;
  grid-row: 1;
}
.profile__side > .profile__block:first-child {
  grid-column: 1;
  grid-row: 2;
}
.profile__side > .profile__block:last-child {
  grid-column: 2;
  grid-row: 1 / 3;
}
@media (max-width: 820px) {
  .profile__grid {
    row-gap: 46px;
  }
  .profile__grid > .profile__block,
  .profile__side > .profile__block:first-child,
  .profile__side > .profile__block:last-child {
    grid-column: 1;
    grid-row: auto;
  }
}
