:root {
  --ink: #111111;
  --muted: #4d5560;
  --line: #a9cde8;
  --line-soft: #d7eafa;
  --paper: #ffffff;
  --wash: #f5fbff;
  --blue: #6fb0df;
  --blue-soft: #dff2ff;
  --coral: #ff9588;
  --shadow: 0 18px 60px rgba(44, 68, 84, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
  background:
    radial-gradient(circle at 20% 6%, rgba(111, 176, 223, 0.15), transparent 28%),
    radial-gradient(circle at 88% 20%, rgba(255, 149, 136, 0.14), transparent 24%),
    #f7f8f8;
}

a {
  color: inherit;
}

.page-frame {
  width: min(100%, 1580px);
  min-height: calc(100vh - 2px);
  margin: 0 auto;
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 102px;
  padding: 0 clamp(24px, 3vw, 48px);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 22px;
  text-decoration: none;
  white-space: nowrap;
}

.brand span {
  font-size: clamp(32px, 3vw, 42px);
  font-weight: 900;
  letter-spacing: 0;
}

.brand small {
  font-size: 17px;
  font-weight: 700;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 44px);
  font-weight: 800;
}

.nav a {
  position: relative;
  padding: 10px 0 14px;
  text-decoration: none;
}

.nav a[aria-current="page"]::after,
.nav a:hover::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 5px;
  border-radius: 999px;
  background: var(--blue);
  content: "";
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
}

main {
  padding: 0 clamp(24px, 3vw, 48px) 50px;
}

.hero {
  position: relative;
  min-height: 500px;
  padding: var(--hero-padding-top, 70px) clamp(10px, 2vw, 34px) 46px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.9) 46%, rgba(255, 255, 255, 0.18) 100%),
    var(--hero-bg, none);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

.hero-visual {
  position: absolute;
  z-index: 2;
  top: var(--hero-visual-top, 20px);
  right: var(--hero-visual-right, 8%);
  display: none;
  width: var(--hero-visual-width, 520px);
  max-width: none;
  pointer-events: none;
  object-fit: contain;
  object-position: center;
  clip-path: var(--hero-visual-clip, none);
  transform: var(--hero-visual-transform, none);
  transform-origin: center;
}

.hero-visual.has-image {
  display: block;
}

.hero-copy {
  position: relative;
  z-index: 4;
  width: min(100%, var(--hero-copy-width, 760px));
  max-width: var(--hero-copy-width, 760px);
  margin-left: var(--hero-copy-margin-left, min(8vw, 120px));
  margin-right: var(--hero-copy-margin-right, 0px);
}

.hero-title-wrap {
  position: relative;
  width: max-content;
  max-width: 100%;
}

.hero h1 {
  margin: 0;
  font-size: clamp(36px, 4.2vw, 58px);
  line-height: 1.38;
  letter-spacing: 0;
  white-space: pre-line;
}

.hero h1::after {
  display: block;
  width: min(100%, var(--hero-underline-width, 450px));
  height: 9px;
  margin-top: 14px;
  border-radius: 999px;
  background: var(--blue);
  opacity: 0.68;
  content: "";
}

.hero p {
  max-width: 680px;
  margin: 42px 0 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.9;
  white-space: pre-line;
}

.speech {
  position: absolute;
  top: calc(100% + var(--speech-line-offset-y, -96px));
  left: calc(min(100%, var(--hero-underline-width, 450px)) + var(--speech-line-gap, 8px));
  z-index: 3;
  display: grid;
  place-items: center;
  width: var(--speech-width, 190px);
  min-height: var(--speech-height, 150px);
  padding: 30px;
  background: white;
  clip-path: polygon(50% 0%,58% 10%,70% 5%,75% 17%,88% 17%,87% 31%,100% 38%,91% 50%,100% 62%,87% 69%,88% 83%,75% 83%,70% 95%,58% 90%,50% 100%,42% 90%,30% 95%,25% 83%,12% 83%,13% 69%,0% 62%,9% 50%,0% 38%,13% 31%,12% 17%,25% 17%,30% 5%,42% 10%);
  box-shadow: 12px 16px 0 rgba(111, 176, 223, 0.2);
  font-size: 26px;
  font-weight: 900;
  line-height: 1.45;
  isolation: isolate;
  text-align: center;
  white-space: pre-line;
  transform: rotate(-8deg);
  transform-origin: center;
}

.speech::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--ink);
  content: "";
}

.speech::after {
  position: absolute;
  inset: 5px;
  z-index: -1;
  background: white;
  clip-path: inherit;
  content: "";
}

.link-section {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: -22px 0 40px;
}

.link-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 18px;
  min-height: 142px;
  padding: 22px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(57, 93, 117, 0.07);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.link-card:hover,
.link-card:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 16px 34px rgba(57, 93, 117, 0.14);
  outline: none;
  transform: translateY(-2px);
}

.link-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-soft), #c9eafd);
}

.link-icon svg {
  width: 36px;
  height: 36px;
  stroke: var(--ink);
  stroke-width: 2;
  fill: none;
}

.link-thumb {
  display: block;
  width: 72px;
  height: 72px;
  border: 1px solid #c8d3dc;
  border-radius: 6px;
  overflow: hidden;
  background: white;
}

.link-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.link-card h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.link-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.external-mark {
  align-self: end;
  justify-self: end;
  font-size: 28px;
  line-height: 1;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(560px, 1.4fr);
  gap: 48px;
  align-items: start;
}

.section-heading {
  display: grid;
  grid-template-columns: 18px auto 1fr;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.section-heading span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--blue-soft);
}

.section-heading h2 {
  margin: 0;
  font-size: 22px;
}

.section-heading::after {
  display: block;
  height: 2px;
  border-top: 3px dotted var(--line);
  content: "";
}

.section-heading a {
  grid-column: 3;
  justify-self: end;
  color: #317aa9;
  font-weight: 800;
  text-decoration: none;
}

.profile-body {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  align-items: start;
}

.profile-body img {
  width: 160px;
  height: 180px;
  object-fit: contain;
  object-position: top center;
  transform: none;
}

.profile-body h3 {
  margin: 0 0 12px;
  font-size: 24px;
}

.profile-body p {
  margin: 0;
  font-weight: 700;
  line-height: 1.8;
  white-space: pre-line;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.tags span {
  padding: 5px 12px;
  border: 1px solid var(--blue);
  border-radius: 999px;
  color: #317aa9;
  font-size: 13px;
  font-weight: 800;
  background: white;
}

.work-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(128px, 1fr));
  gap: 16px;
}

.work-card {
  position: relative;
  text-align: center;
  text-decoration: none;
}

.work-thumb {
  height: 150px;
  border: 2px solid #9fa7af;
  border-radius: 6px;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, transparent, transparent 9px, rgba(0, 0, 0, 0.04) 10px),
    white;
}

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

.work-source {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  margin: 8px 0 0;
  padding: 2px 8px;
  border: 1px solid #9fa7af;
  border-radius: 999px;
  color: #317aa9;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  background: white;
}

.work-card h3 {
  margin: 8px 0 0;
  font-size: 16px;
}

.load-error {
  max-width: 760px;
  margin: 80px auto;
  padding: 28px;
  border: 2px solid var(--coral);
  border-radius: 8px;
  background: white;
  line-height: 1.8;
}

@media (max-width: 980px) {
  .site-header {
    min-height: 78px;
  }

  .menu-button {
    display: block;
  }

  .nav {
    position: absolute;
    top: 78px;
    right: 18px;
    left: 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
  }

  .nav.is-open {
    display: flex;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual.has-image {
    top: var(--hero-visual-tablet-top, 70px);
    right: var(--hero-visual-tablet-right, 2%);
    width: var(--hero-visual-tablet-width, 380px);
    clip-path: var(--hero-visual-tablet-clip, none);
    transform: var(--hero-visual-tablet-transform, none);
  }

  .hero-copy {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .speech {
    display: none;
  }

  .work-list {
    grid-template-columns: repeat(2, minmax(128px, 1fr));
  }
}

@media (max-width: 620px) {
  main {
    padding-inline: 16px;
  }

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

  .brand {
    gap: 12px;
  }

  .brand span {
    font-size: 30px;
  }

  .brand small {
    font-size: 14px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero-visual.has-image {
    top: var(--hero-visual-mobile-top, 36px);
    right: var(--hero-visual-mobile-right, 0px);
    width: var(--hero-visual-mobile-width, 300px);
    clip-path: var(--hero-visual-mobile-clip, inset(0 0 45% 0));
    transform: var(--hero-visual-mobile-transform, none);
  }

  .link-card {
    grid-template-columns: 58px 1fr 24px;
    min-height: 114px;
    padding: 16px;
  }

  .link-icon {
    width: 58px;
    height: 58px;
  }

  .profile-body {
    grid-template-columns: 120px 1fr;
  }

  .profile-body img {
    width: 120px;
  }
}

@media (max-width: 710px) {
  .brand small,
  .hero {
    display: none;
  }

  .link-section {
    margin-top: 22px;
  }
}
