/* Portfolio top page */

html,
body {
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  background: #f7f7f3;
  color: #202525;
  font-family: "Noto Sans JP", sans-serif;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 2000;
  padding: 9px 13px;
  background: #202525;
  color: #fff;
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.home-shell {
  width: min(calc(100% - 48px), 1180px);
  padding: 82px 0 0;
}

.home-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  background: rgba(247, 247, 243, 0.94);
  backdrop-filter: blur(12px);
}

.home-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  width: min(calc(100% - 48px), 1180px);
  margin: 0 auto;
  padding: 16px 0 14px;
}

.site-title {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.site-title strong {
  color: #202525;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.site-title small {
  color: #6a7372;
  font-size: 0.68rem;
}

.home-nav {
  display: flex;
  align-items: center;
  gap: 29px;
}

.home-nav a {
  color: #485251;
  font-size: 0.76rem;
  font-weight: 500;
  text-underline-offset: 5px;
}

.home-nav a:hover,
.home-nav a:focus-visible {
  color: #166b69;
  text-decoration: underline;
}

.menu-toggle { display: none; }

.hero,
.content-section { scroll-margin-top: 94px; }

.hero {
  position: relative;
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px;
  align-items: start;
  padding: 38px 0 57px;
  isolation: isolate;
}

.hero::before {
  position: absolute;
  inset: 0 auto 0 50%;
  z-index: -1;
  width: 100vw;
  background: #e5edeb;
  content: "";
  transform: translateX(-50%);
}

.hero h1 {
  max-width: 960px;
  margin: 0;
  color: #171b1b;
  font-size: clamp(1.55rem, 1.95vw, 1.75rem);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.025em;
}

.hero h1 span {
  color: #166b69;
  font-size: 0.82em;
  letter-spacing: -0.02em;
}

.hero-body {
  max-width: 710px;
  margin-top: 1px;
}

.hero-body p {
  margin: 0;
  color: #4e5857;
  font-size: 0.96rem;
  line-height: 1.92;
}

.hero-body .hero-lead {
  margin-bottom: 12px;
  color: #202525;
  font-size: 1.05rem;
  font-weight: 600;
}

.hero-body p + p { margin-top: 5px; }

.hero-body .hero-experience {
  margin-top: 14px;
  color: #27302f;
  font-weight: 600;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 31px;
  margin-top: 22px;
}

.primary-link {
  display: inline-block;
  padding: 13px 21px 14px;
  background: #166b69;
  color: #fff;
  font-size: 0.84rem;
  font-weight: 500;
}

.primary-link:hover,
.primary-link:focus-visible { background: #115553; }

.plain-link {
  color: #205f5d;
  font-size: 0.84rem;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.plain-link:hover,
.plain-link:focus-visible { color: #0d4644; }

.content-section {
  position: relative;
  z-index: 0;
}

.section-heading {
  display: block;
  max-width: 760px;
}

.section-heading h2,
.about-heading h2 {
  margin: 0;
  color: #1b2020;
  font-size: clamp(1.2rem, 1.5vw, 1.35rem);
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: -0.02em;
}

.section-heading > p {
  max-width: 720px;
  margin: 9px 0 0;
  color: #586261;
  font-size: 0.85rem;
  line-height: 1.8;
}

.services-section { padding: 40px 0 54px; }

.services-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 80px;
  margin-top: 40px;
}

.service-item h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: #1d2222;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.5;
}

.service-item h3 i,
.skills-list h3 i {
  flex: 0 0 auto;
  color: #166b69;
  font-size: 1.2em;
  font-weight: 400;
  line-height: 1;
}

.service-item > p {
  max-width: 470px;
  margin: 13px 0 0;
  color: #596261;
  font-size: 0.88rem;
  line-height: 1.84;
}

.service-item h4 {
  margin: 22px 0 0;
  color: #29302f;
  font-size: 0.76rem;
  font-weight: 600;
}

.service-item ul {
  display: grid;
  gap: 6px;
  margin: 11px 0 0;
  padding-left: 1.15rem;
}

.service-item li {
  color: #515b5a;
  font-size: 0.82rem;
  line-height: 1.68;
}

.small-project-section {
  padding: 36px 0 44px;
  isolation: isolate;
}

.small-project-section::before {
  position: absolute;
  inset: 0 auto 0 50%;
  z-index: -1;
  width: 100vw;
  background: #ecefea;
  content: "";
  transform: translateX(-50%);
}

.small-project-section .section-heading > p { margin-top: 12px; }

.example-list {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 28px;
  margin-top: 31px;
}

.example-list h3 {
  margin: 1px 0 0;
  font-size: 1rem;
  font-weight: 600;
}

.example-list ul {
  columns: 2;
  column-gap: 56px;
  margin: 0;
  padding-left: 1.15rem;
}

.example-list li {
  margin: 0 0 10px;
  break-inside: avoid;
  color: #44504f;
  font-size: 0.84rem;
  line-height: 1.7;
}

.works-section { padding: 45px 0 58px; }

.works-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 34px;
  margin-top: 39px;
}

.work-item {
  display: block;
  min-width: 0;
}

.work-item + .work-item { margin-top: 0; }

.work-image {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e5e8e3;
}

.work-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: opacity 160ms ease;
}

.work-image:hover img,
.work-image:focus-visible img { opacity: 0.88; }

.work-copy {
  max-width: 440px;
  margin-top: 17px;
}

.work-scope {
  margin: 0 0 10px;
  color: #166b69;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.6;
}

.work-copy h3 {
  margin: 0;
  color: #1c2121;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.46;
  letter-spacing: -0.02em;
}

.work-copy > p:not(.work-scope) {
  margin: 14px 0 20px;
  color: #56605f;
  font-size: 0.88rem;
  line-height: 1.86;
}

.skills-section {
  padding: 36px 0 44px;
  isolation: isolate;
}

.skills-section::before {
  position: absolute;
  inset: 0 auto 0 50%;
  z-index: -1;
  width: 100vw;
  background: #f0f1ed;
  content: "";
  transform: translateX(-50%);
}

.skills-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 34px;
  margin-top: 34px;
}

.skills-list h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #1d2222;
  font-size: 1rem;
  font-weight: 600;
}

.skills-list p {
  max-width: 470px;
  margin: 12px 0 0;
  color: #525d5c;
  font-size: 0.84rem;
  line-height: 1.82;
}

.tool-summary {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin-top: 34px;
}

.tool-summary h3 {
  margin: 5px 0 0;
  color: #1d2222;
  font-size: 0.9rem;
  font-weight: 600;
}

.tool-groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px;
}

.tool-group h4 {
  margin: 0 0 10px;
  color: #52605e;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.5;
}

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

.tool-list li {
  padding: 5px 9px 6px;
  background: #dfe5e0;
  color: #35403f;
  font-size: 0.74rem;
  line-height: 1.35;
}

.about-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px;
  padding: 44px 0 52px;
}

.about-copy { padding-top: 8px; }

.about-copy p {
  max-width: 500px;
  margin: 0;
  color: #4f5a59;
  font-size: 0.9rem;
  line-height: 1.94;
}

.about-copy p + p { margin-top: 18px; }

.request-section {
  padding: 40px 0 48px;
  color: #fff;
  isolation: isolate;
}

.request-section::before {
  position: absolute;
  inset: 0 auto 0 50%;
  z-index: -1;
  width: 100vw;
  background: #24302f;
  content: "";
  transform: translateX(-50%);
}

.request-section .section-heading h2 { color: #fff; }

.request-section .section-heading > p {
  color: rgba(255, 255, 255, 0.73);
}

.request-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px;
  margin-top: 31px;
}

.request-body ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.15rem;
}

.request-body li {
  color: rgba(255, 255, 255, 0.87);
  font-size: 0.86rem;
  line-height: 1.72;
}

.request-info h3 {
  margin: 0;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
}

.request-info p {
  max-width: 440px;
  margin: 15px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
  line-height: 1.8;
}

.home-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 25px 0 28px;
}

.home-footer strong {
  color: #37403f;
  font-size: 0.76rem;
  font-weight: 600;
}

.home-footer small {
  color: #77807f;
  font-size: 0.65rem;
}

a:focus-visible {
  outline: 2px solid #16807d;
  outline-offset: 4px;
}

@media (max-width: 900px) {
  .hero h1 { font-size: 1.6rem; }
  .services-list { gap: 48px 52px; }

  .works-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 58px 32px;
  }

  .skills-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 42px 58px;
  }

  .tool-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 30px;
  }
}

@media (max-width: 720px) {
  body.menu-open { overflow: hidden; }

  .home-shell {
    width: min(calc(100% - 32px), 1180px);
    padding-top: 0;
  }

  .home-header {
    position: static;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    backdrop-filter: none;
  }

  .home-header-inner {
    width: min(calc(100% - 32px), 1180px);
    padding: 12px 0 10px;
  }

  .site-title small { display: none; }

  .menu-toggle {
    position: relative;
    z-index: 1201;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 0 !important;
    background: transparent;
    color: #202525;
    cursor: pointer;
  }

  .menu-toggle-line {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  body.menu-open .menu-toggle {
    position: fixed;
    top: 10px;
    right: 12px;
  }

  body.menu-open .menu-toggle-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.menu-open .menu-toggle-line:nth-child(2) { opacity: 0; }
  body.menu-open .menu-toggle-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .home-nav {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 27px;
    width: 100vw;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    padding: 72px 24px 48px;
    background: #f7f7f3;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 180ms ease, visibility 180ms ease;
  }

  body.menu-open .home-nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .home-nav a {
    color: #202525;
    font-size: 1.35rem;
    font-weight: 600;
  }

  .hero,
  .content-section { scroll-margin-top: 16px; }

  .hero {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 35px 0 48px;
  }

  .hero-left { display: contents; }
  .hero h1 { order: 1; }
  .hero-body { order: 2; }
  .hero-links { order: 3; }

  .hero h1 {
    font-size: 1.5rem;
    line-height: 1.45;
  }

  .hero-body { margin-top: 22px; }

  .section-heading,
  .example-list,
  .about-section,
  .request-body {
    grid-template-columns: 1fr;
  }

  .section-heading { gap: 17px; }
  .section-heading > p { margin-top: 8px; }
  .services-section { padding: 38px 0 48px; }
  .services-list { margin-top: 34px; }
  .small-project-section { padding: 38px 0 44px; }
  .example-list { gap: 22px; margin-top: 29px; }
  .works-section { padding: 42px 0 52px; }
  .works-list { margin-top: 34px; }
  .work-copy { max-width: 590px; }
  .skills-section { padding: 38px 0 45px; }
  .about-section { gap: 25px; padding: 42px 0 48px; }
  .about-copy { padding-top: 0; }
  .tool-summary {
    grid-template-columns: 1fr;
    gap: 13px;
    margin-top: 30px;
  }

  .tool-summary h3 { margin-top: 0; }
  .request-section { padding: 40px 0 48px; }
  .request-body { gap: 30px; margin-top: 29px; }
}

@media (max-width: 560px) {
  .site-title strong { font-size: 0.76rem; }

  .hero { padding: 32px 0 44px; }

  .hero h1 {
    font-size: 1.45rem;
    line-height: 1.46;
    letter-spacing: -0.025em;
  }

  .hero h1 span {
    display: inline-block;
    margin-top: 2px;
    font-size: 0.82em;
    line-height: 1.48;
  }

  .hero-body { margin-top: 20px; }
  .hero-body p { font-size: 0.89rem; line-height: 1.84; }
  .hero-body .hero-lead { font-size: 0.97rem; }
  .hero-links { align-items: flex-start; flex-direction: column; gap: 18px; margin-top: 20px; }
  .section-heading h2,
  .about-heading h2 { font-size: 1.25rem; }
  .services-list,
  .works-list,
  .skills-list { grid-template-columns: 1fr; }
  .services-list { gap: 43px; }
  .service-item h4 { margin-top: 20px; }
  .example-list ul { columns: 1; }
  .works-list { gap: 62px; }
  .work-copy { margin-top: 18px; }
  .work-copy > p:not(.work-scope) { margin-top: 13px; }
  .skills-list { gap: 37px; margin-top: 41px; }
  .home-footer { align-items: flex-start; flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
