:root {
  --paper: #f7f6f2;
  --white: #fff;
  --ink: #2c2c2b;
  --muted: #716f69;
  --line: rgba(28, 19, 1, 0.14);
  --soft: #eeece6;
  --content: 1248px;
  --side: clamp(24px, 6.666vw, 96px);
  --serif: "YuMincho", "Yu Mincho", "Hiragino Mincho ProN", "Hiragino Mincho Pro", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Yu Gothic", YuGothic, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.02em;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

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

p,
h1,
h2,
h3,
h4,
figure,
blockquote {
  margin-top: 0;
}

p:last-child {
  margin-bottom: 0;
}

.skip-link {
  position: absolute;
  z-index: 100;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
}

.skip-link:focus-visible {
  position: fixed;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  margin: 0;
  padding: 10px 16px;
  overflow: visible;
  clip: auto;
  clip-path: none;
  color: var(--white);
  background: var(--ink);
}

.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 18px;
  background: var(--white);
  border-bottom: 1px solid rgba(28, 19, 1, 0.06);
  font-family: var(--sans);
  font-size: 13px;
}

.topbar a {
  text-decoration: none;
}

.topbar__brand {
  font-weight: 600;
}

.topbar__contact {
  color: var(--muted);
}

.cover {
  position: relative;
  height: max(270px, 30vh);
  min-height: 270px;
  max-height: 390px;
  overflow: hidden;
  background-image: url("../images/yata-hiroki-profile.jpeg");
  background-position: center 39%;
  background-size: cover;
}

.cover::before {
  position: absolute;
  inset: 0;
  content: "";
  background: inherit;
  filter: grayscale(1) brightness(1.25) contrast(0.74) blur(9px);
}

.cover__veil {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.4);
}

.page-shell {
  width: min(calc(100% - (var(--side) * 2)), var(--content));
  margin: 0 auto;
}

.page-title {
  padding: 39px 0 21px;
  border-bottom: 1px solid var(--line);
  font-size: 40px;
  line-height: 1.2;
  font-weight: 700;
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(260px, 312px) minmax(0, 1fr);
  gap: 46px;
  align-items: start;
  padding: 52px 0 82px;
}

.profile-hero__portrait {
  margin: 0;
  overflow: hidden;
  background: var(--soft);
  aspect-ratio: 2 / 3;
}

.profile-hero__portrait img {
  width: 100%;
  height: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  filter: grayscale(1) contrast(0.92);
}

.profile-hero__body {
  min-width: 0;
  max-width: 780px;
}

.eyebrow,
.section-kicker,
.chapter-heading__number,
.page-index__label {
  margin-bottom: 14px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow {
  overflow-wrap: anywhere;
}

.profile-hero h1 {
  margin-bottom: 4px;
  font-size: clamp(38px, 3.2vw, 52px);
  line-height: 1.25;
  letter-spacing: 0.08em;
}

.roman-name {
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
  letter-spacing: 0.08em;
}

.hero-lead {
  margin-bottom: 25px;
  font-size: clamp(25px, 2.35vw, 34px);
  line-height: 1.55;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.profile-role {
  margin-bottom: 29px;
  padding: 13px 0 13px 18px;
  border-left: 2px solid var(--ink);
  line-height: 1.65;
}

.page-index {
  display: flex;
  align-items: center;
  gap: 44px;
  padding: 26px 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.page-index__label {
  flex: 0 0 auto;
  margin: 0;
}

.page-index ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-index a {
  display: block;
  padding: 6px 0;
  text-decoration-color: var(--line);
  text-underline-offset: 5px;
}

.page-index a span {
  margin-right: 10px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
}

.chapter {
  padding-top: 128px;
}

.chapter-heading {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 46px;
  align-items: end;
  min-height: 142px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.chapter-heading__number {
  margin-bottom: 10px;
}

.chapter-heading h2 {
  margin-bottom: 0;
  font-size: clamp(32px, 3.5vw, 50px);
  line-height: 1.42;
  letter-spacing: 0.035em;
  font-weight: 600;
}

.grid-two {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr);
  gap: 72px;
}

.chapter-lead,
.future-intro {
  padding: 64px 0 58px;
}

.display-quote {
  margin: 0;
  font-size: clamp(25px, 2.25vw, 34px);
  line-height: 1.65;
  font-weight: 600;
}

.system-map {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  min-height: 410px;
  margin: 10px 0 90px;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
  border-radius: 10px;
}

.system-map__center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 52px;
  border-right: 1px solid rgba(255, 255, 255, 0.24);
  text-align: center;
}

.system-map__center span {
  font-size: 14px;
}

.system-map__center strong {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.5;
  font-weight: 500;
}

.system-map__items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.system-map__items li {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 205px;
  padding: 28px 34px;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.system-map__items li:nth-child(even) {
  border-right: 0;
}

.system-map__items li:nth-child(n + 3) {
  border-bottom: 0;
}

.system-map__items span,
.service-card > span {
  color: rgba(255, 255, 255, 0.58);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.system-map__items strong {
  margin: 8px 0 3px;
  font-size: 20px;
  font-weight: 500;
}

.system-map__items small {
  color: rgba(255, 255, 255, 0.67);
  font-size: 12px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 112px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.metric {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 212px;
  padding: 31px 28px 26px;
  border-right: 1px solid var(--line);
}

.metric:last-child {
  border-right: 0;
}

.metric__value {
  font-size: clamp(38px, 4vw, 58px);
  line-height: 1;
  letter-spacing: -0.02em;
}

.metric__value small {
  margin-left: 4px;
  font-size: 14px;
}

.metric p {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.service-block h3,
.contact-panel h3,
.profile-summary h3 {
  margin-bottom: 36px;
  font-size: clamp(27px, 2.75vw, 40px);
  line-height: 1.55;
  font-weight: 500;
}

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

.service-card {
  min-height: 250px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.service-card > span {
  color: var(--muted);
}

.service-card h4 {
  margin: 55px 0 15px;
  font-size: 20px;
  line-height: 1.55;
}

.service-card p {
  color: #575650;
  font-size: 14px;
  line-height: 1.8;
}

/* Keep each card's label, heading, and explanation as one visual group. */
.profile-page .service-card {
  min-height: 205px;
}

.profile-page .service-card h4 {
  margin: 20px 0 14px;
}

.profile-page .service-card p {
  font-size: 16px;
  line-height: 1.75;
}

.related-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.related-links a {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 150px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  transition: border-color 180ms ease, transform 180ms ease;
}

.related-links a:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.related-links span {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.related-links strong {
  margin-top: auto;
  font-size: 18px;
  font-weight: 500;
}

.related-links i {
  position: absolute;
  right: 24px;
  bottom: 22px;
  font-style: normal;
}

.story-statement {
  margin: 64px 0 84px;
  padding: 70px clamp(28px, 7vw, 92px);
  background: var(--ink);
  color: var(--white);
  border-radius: 10px;
  text-align: center;
}

.story-statement p {
  margin: 0;
  font-size: clamp(25px, 3.1vw, 44px);
  line-height: 1.85;
}

.timeline {
  border-top: 1px solid var(--line);
}

.timeline-item {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 46px;
  padding: 52px 0 58px;
  border-bottom: 1px solid var(--line);
}

.timeline-item__meta span {
  display: block;
  margin-bottom: 16px;
  color: #827f76;
  font-size: 48px;
  line-height: 1;
}

.timeline-item__meta p {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.timeline-item__body {
  max-width: 780px;
}

.timeline-item__body h3 {
  margin-bottom: 22px;
  font-size: clamp(23px, 2.2vw, 31px);
  line-height: 1.55;
  font-weight: 500;
}

.timeline-item__body strong {
  background: linear-gradient(transparent 68%, #dedbd1 68%);
}

.principle-card {
  display: grid;
  grid-template-columns: 0.5fr 1fr 1fr;
  gap: 42px;
  align-items: center;
  margin-top: 86px;
  padding: 54px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.principle-card .section-kicker {
  align-self: start;
}

.principle-card__lead {
  font-size: clamp(26px, 2.6vw, 37px);
  line-height: 1.65;
  font-weight: 600;
}

.future-intro {
  padding-bottom: 70px;
}

.possibility-list {
  border-top: 1px solid var(--line);
}

.possibility-list p {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 28px;
  margin: 0;
  padding: 24px 4px;
  border-bottom: 1px solid var(--line);
  font-size: clamp(19px, 2vw, 27px);
}

.possibility-list p::before {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  content: "";
  background: var(--ink);
  border-radius: 50%;
}

.possibility-list strong {
  margin-left: auto;
  font-weight: 500;
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 72px;
  align-items: center;
  margin-top: 0;
  padding: clamp(38px, 5.7vw, 82px);
  background: var(--ink);
  color: var(--white);
  border-radius: 10px;
}

.contact-panel .section-kicker {
  color: rgba(255, 255, 255, 0.58);
}

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

.jp-phrase {
  display: inline-block;
  white-space: nowrap;
}

.contact-panel__message {
  margin: 30px 0;
  padding-top: 27px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 54px;
  margin-top: 6px;
  padding: 13px 22px;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--white);
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease;
}

.primary-button:hover {
  background: transparent;
  color: var(--white);
}

.primary-button:focus-visible,
.related-links a:focus-visible,
.topbar a:focus-visible,
.page-index a:focus-visible,
.text-link:focus-visible,
.rail-index a:focus-visible {
  outline: 3px solid #9f9b8f;
  outline-offset: 4px;
}

.contact-note {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.64);
  font-family: var(--sans);
  font-size: 11px;
}

.contact-panel__qr {
  margin: 0;
  padding: 14px;
  background: var(--white);
  color: var(--ink);
  border-radius: 7px;
}

.contact-panel__qr figcaption {
  padding-top: 9px;
  font-family: var(--sans);
  font-size: 10px;
  text-align: center;
}

.profile-summary {
  padding: 110px 0 128px;
}

.profile-summary__grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: 70px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

.profile-summary h3 span {
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
  letter-spacing: 0.08em;
}

.text-link {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--sans);
  font-size: 13px;
  text-underline-offset: 5px;
}

.rail-index {
  position: fixed;
  z-index: 20;
  top: 50%;
  right: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: translateY(-50%);
}

.rail-index a {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 34px;
  height: 7px;
}

.rail-index span {
  display: block;
  width: 14px;
  height: 2px;
  background: #bbb8b0;
  transition: width 180ms ease, background 180ms ease;
}

.rail-index a.is-active span,
.rail-index a:hover span {
  width: 30px;
  background: var(--ink);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 90px;
  padding: 24px var(--side);
  background: var(--white);
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  text-underline-offset: 4px;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}

@media (max-width: 960px) {
  :root {
    --side: 42px;
  }

  .profile-hero,
  .chapter-heading,
  .timeline-item {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 34px;
  }

  .grid-two {
    gap: 44px;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric:nth-child(2) {
    border-right: 0;
  }

  .metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .principle-card {
    grid-template-columns: 0.45fr 1fr;
  }

  .principle-card > p:last-child {
    grid-column: 2;
  }

  .contact-panel {
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 42px;
  }

  .rail-index {
    display: none;
  }
}

@media (max-width: 720px) {
  :root {
    --side: 22px;
  }

  body {
    font-size: 16px;
    line-height: 1.8;
  }

  .cover {
    height: 220px;
    min-height: 220px;
    background-position: center 35%;
  }

  .page-title {
    padding: 30px 0 18px;
    font-size: 34px;
  }

  .profile-hero,
  .chapter-heading,
  .timeline-item,
  .grid-two,
  .system-map,
  .principle-card,
  .profile-summary__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-hero {
    gap: 32px;
    padding: 36px 0 56px;
  }

  .profile-hero__portrait {
    width: min(82vw, 350px);
  }

  .profile-hero__body {
    width: 100%;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .profile-hero h1 {
    font-size: 38px;
  }

  .hero-lead {
    font-size: 25px;
  }

  .page-index {
    align-items: flex-start;
    gap: 22px;
    padding: 22px;
  }

  .page-index ol {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .chapter {
    padding-top: 92px;
  }

  .chapter-heading {
    gap: 14px;
    min-height: 0;
    padding-bottom: 24px;
  }

  .chapter-heading h2 {
    font-size: 32px;
    line-height: 1.5;
  }

  .chapter-lead,
  .future-intro {
    gap: 34px;
    padding: 42px 0 44px;
  }

  .display-quote {
    font-size: 25px;
  }

  .system-map {
    margin: 0 0 70px;
  }

  .system-map__center {
    min-height: 220px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  }

  .system-map__items li {
    min-height: 170px;
    padding: 24px 20px;
  }

  .metrics {
    margin-bottom: 82px;
  }

  .metric {
    min-height: 180px;
    padding: 25px 18px;
  }

  .card-grid,
  .related-links {
    grid-template-columns: 1fr;
  }

  .service-card {
    min-height: 225px;
  }

  .profile-page .service-card {
    min-height: 0;
  }

  .profile-page .service-card h4 {
    margin-top: 18px;
  }

  .story-statement {
    margin: 44px 0 58px;
    padding: 48px 24px;
  }

  .story-statement p {
    font-size: 24px;
    line-height: 1.9;
  }

  .timeline-item {
    gap: 10px;
    padding: 42px 0 47px;
  }

  .timeline-item__meta {
    display: flex;
    align-items: baseline;
    gap: 18px;
  }

  .timeline-item__meta span {
    margin: 0;
    font-size: 37px;
  }

  .principle-card {
    gap: 21px;
    margin-top: 62px;
    padding: 34px 26px;
  }

  .principle-card > p:last-child {
    grid-column: auto;
  }

  .possibility-list p {
    display: grid;
    grid-template-columns: 10px 1fr;
    gap: 14px;
    padding: 22px 2px;
    font-size: 20px;
  }

  .possibility-list p::before {
    margin-top: 11px;
  }

  .possibility-list strong {
    grid-column: 2;
    margin: -12px 0 0;
  }

  .contact-panel {
    grid-template-columns: 1fr;
    gap: 36px;
    margin-top: 0;
    padding: 36px 24px;
  }

  .contact-panel h3 {
    font-size: 24px;
    line-height: 1.7;
  }

  .primary-button {
    width: 100%;
  }

  .contact-panel__qr {
    width: min(100%, 220px);
    margin: 0 auto;
  }

  .profile-summary {
    padding: 82px 0 96px;
  }

  .profile-summary__grid {
    gap: 18px;
  }
}

@media (max-width: 420px) {
  .topbar {
    padding: 0 14px;
  }

  .page-index {
    display: block;
  }

  .page-index__label {
    margin-bottom: 12px;
  }

  .system-map__items {
    grid-template-columns: 1fr;
  }

  .system-map__items li,
  .system-map__items li:nth-child(even),
  .system-map__items li:nth-child(n + 3) {
    min-height: 132px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  .system-map__items li:last-child {
    border-bottom: 0;
  }

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

  .metric,
  .metric:nth-child(2) {
    min-height: 150px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metric:last-child {
    border-bottom: 0;
  }

  .metric__value {
    font-size: 45px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .site-footer__links {
    gap: 8px 18px;
  }
}

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

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