@charset "UTF-8";
:root {
  --color-black: #333333;
  --color-white: #ffffff;
  --color-main: #849aa0; /* 25% */
  --color-base: #d7d5c6; /* 70% */
  --color-accent: #d7ad89; /* 5% */

  --font: "IBM Plex Serif", serif;

  @media (min-width: 760px) {
    --is-sm: true;
  }

  @media (min-width: 1080px) {
    --is-md: true;
  }
}

.sp-none {
  display: none !important;
}

@container style(--is-sm) {
  .sp-none {
    display: block !important;
  }

  .pc-none {
    display: none !important;
  }
}

html,
body {
  font-family: var(--font);
  color: var(--color-black);
  background-color: var(--color-base);
}

html {
  height: 100svh;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
}

header {
  display: flex;
  position: sticky;
  top: 0;
  padding: calc(0.25rem + 10px) 1.5rem;
  align-items: self-end;
  justify-content: space-between;
  z-index: 10;

  @container style(--is-md) {
    padding: 0.5rem 3rem;
  }
}

a {
  text-decoration: none;
  color: var(--color-black);
}

h1 {
  font-size: 1.25rem;

  @container style(--is-sm) {
    font-size: 2.5rem;
  }
}

h2 {
  font-size: 2rem;
  margin: 0;
  padding-bottom: 1rem;

  @container style(--is-sm) {
    font-size: 2.5rem;
  }
}

/* ナビゲーション */
nav ul {
  display: flex;
  gap: 1.5rem;
}

nav ul li a {
  transition: all 0.2s;
}

nav ul li a:hover {
  color: var(--color-main);
  transition: all 0.2s;
}

/* スマホ用ナビゲーション */
@media screen and (max-width: 760px) {
  .menu-btn {
    display: none;
  }

  .menu-btn:checked ~ .menu {
    left: 0;
    opacity: 1;
  }

  nav {
    display: block;
    position: fixed;
    top: -3rem;
    right: 0;
    height: 0;
    width: 100%;
    background: var(--color-main);
    overflow-x: hidden;
    overflow-y: auto;
    transition: all 0.5s;
    z-index: 3;
    opacity: 0;
  }

  .menu-btn:checked ~ nav {
    top: 0;
    opacity: 1;
    height: 100%;
  }

  nav ul {
    display: block;
    padding: 5rem 3rem;
  }

  nav ul li {
    position: relative;
    margin: 0;
    padding: 0.5rem;
  }

  nav ul li a {
    color: var(--color-white);
    font-size: 1.25rem;
    transition-duration: 0.2s;
  }

  nav ul li a:hover {
    color: var(--color-accent);
  }

  /* ハンバーガーメニュー */
  .toggle_btn {
    display: block;
    position: fixed;
    top: 1.75rem;
    right: 1.5rem;
    width: 30px;
    height: 30px;
    transition: all 0.5s;
    cursor: pointer;
    z-index: 5;
  }

  .toggle_btn span {
    display: block;
    position: absolute;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--color-black);
    border-radius: 2px;
    transition: all 0.5s;
  }

  .toggle_btn span:nth-child(1) {
    top: 4px;
  }

  .toggle_btn span:nth-child(2) {
    top: 14px;
  }

  .toggle_btn span:nth-child(3) {
    bottom: 4px;
  }

  .menu-btn:checked ~ .toggle_btn span {
    background-color: var(--color-white);
  }

  .menu-btn:checked ~ .toggle_btn span:nth-child(1) {
    transform: translateY(10px) rotate(-315deg);
  }

  .menu-btn:checked ~ .toggle_btn span:nth-child(2) {
    opacity: 0;
  }

  .menu-btn:checked ~ .toggle_btn span:nth-child(3) {
    transform: translateY(-10px) rotate(315deg);
  }
}

.section {
  margin: 5rem 0;
  padding: 3rem 0;
}

.content-area {
  padding: 0 1.5rem;
  max-width: 1366px;
  margin: 0 auto;
  position: relative;

  @container style(--is-md) {
    padding: 0 7rem;
  }
}

/* heroセクション */
.hero {
  display: flex;
  height: 75vh;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transform: translateY(-3rem);

  @container style(--is-md) {
    height: 90vh;
  }
}

.hero h1 {
  transform: translateY(-2rem);
  color: var(--color-main);
}

.hero__arrow {
  display: inline-block;
  width: 24px;
  height: 24px;
  margin: 0 10px;
  border-bottom: 2px solid var(--color-main);
  border-right: 2px solid var(--color-main);
  border-radius: 2px;
  transform: rotate(45deg);
}

.hero__arrow-wrapper {
  animation: 3s ease-in-out float infinite;
}

@keyframes float {
  0% {
    transform: translateY(0rem);
  }
  50% {
    transform: translateY(2rem);
  }
  100% {
    transform: translateY(0rem);
  }
}

/* aboutセクション */
.about__item {
  @container style(--is-sm) {
    display: grid;
    align-items: center;
    grid-template-columns: 1fr 1fr;
  }
}

.about__item-image {
  display: grid;
  grid-template: 1.25rem auto / 1.25rem auto;
  grid-area: 1 / 1 / 1 / 1;
}

.about__item-image img {
  grid-area: 1 / 1 / 1 / 1;
  width: calc(100vw - 4.25rem);
  border-radius: 2px;

  @container style(--is-sm) {
    width: 22rem;
  }
}

.about__item-image--shadow {
  grid-area: 2 / 2 / 2 / 2;
  width: calc(100vw - 4.25rem);
  height: calc(100vw - 4.25rem);
  background-color: var(--color-main);
  border-radius: 2px;

  @container style(--is-sm) {
    width: 22rem;
    height: 22rem;
  }
}

.about__item-text {
  margin: 2rem 0;
}

.about__item-text--main {
  font-size: 1.75rem;
  margin: 0;
  border-bottom: 1px solid var(--color-black);

  @container style(--is-sm) {
    font-size: 2.5rem;
  }
}

.about__item-text--detail {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.about__item-text--detail p {
  font-size: 1rem;
}

.about__item-text--icon img {
  margin: 0 0.1rem;
  width: 1.25rem;

  @container style(--is-sm) {
    width: 1.5rem;
  }
}

/* workセクション */
.work {
  background-color: var(--color-accent);
}

.work h2 {
  text-align: right;
}

.work__item {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 2rem;
}

.work__item-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.work__item-card--text {
  margin: 0.25rem 0;
}

.work__item-card--skill--wrapper {
  display: flex;
  gap: 0.5rem;
}

.work__item-card--skill {
  background-color: var(--color-main);
  border-radius: 2px;
}

a.work__item-card--skill p {
  border-bottom: 1px solid var(--color-white);
}

a.work__item-card--skill p:hover {
  color: var(--color-black);
  border-bottom: 1px solid var(--color-black);
  transition: all 0.2s;
}

.work__item-card--skill p {
  margin: 0.25rem 0.75rem;
  color: var(--color-white);
}

/* skillセクション */
.skill__chart-wrapper {
  font-size: 1rem;
}

.skill__chart-title {
  font-size: 1.25rem;
  padding-top: 1rem;
  color: var(--color-main);
}

.skill__chart-wrapper > div {
  display: flex;
  align-items: center;
  margin-bottom: 0.25rem;
}

.skill__chart-wrapper dt {
  width: 9.5rem;
  min-width: 3.25rem;
  color: var(--color-black);
}

.skill__chart-wrapper dt br {
  display: block;
  content: "";
  margin: -6px 0;
}

.skill__chart-wrapper dd {
  width: 100%;
  margin: 0;
}

.skill__chart-bar {
  display: inline-block;
  padding-right: 1rem;
  border-radius: 2px;
  background-color: var(--color-accent);
  color: var(--color-white);
  line-height: 2.5rem;
  text-align: right;
  white-space: nowrap;
}

.skill__chart-animate {
  animation: bar-chart 1.2s ease;
}

@keyframes bar-chart {
  from {
    width: 0;
  }
}

/* contactセクション */
.contact {
  margin-bottom: 0;
  padding-bottom: 3rem;
  background-color: var(--color-main);
  text-align: center;
}

.contact h2 {
  color: var(--color-white);
}

.contact__text {
  font-family: var(--font-mincho);
  color: var(--color-white);
  margin-bottom: 3rem;
  letter-spacing: 1px;
}

.contact__button {
  background-color: var(--color-base);
  padding: 1.5rem 2rem;
  border-radius: 2px;
  transition: all 0.4s;
}

.contact__button:hover {
  color: var(--color-white);
  background-color: var(--color-accent);
  transition: all 0.4s;
}

/* footer */
footer {
  background-color: var(--color-main);
}

.copy-light {
  text-align: center;
  color: var(--color-white);
  padding: 1.5rem;
  margin: 0;
  font-size: 0.75rem;
}

/* フェードインアニメーション */
.scroll-up {
  transition: 0.5s ease-in-out;
  transform: translateY(30px);
  opacity: 0;
}
.scroll-up.on {
  transform: translateY(0);
  opacity: 1;
}
