:root {
  --main-color: #DDAB76;
  --text-color: #333333;
  --bg-color: #fffaf5;
}

html{
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans JP", sans-serif;
  color: var(--text-color);
  background-color: #ffffff;
  line-height: 1.6;
}

img{
  display: block;
}

.l-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 24px;
}

.p-intro {
  position: relative;
  margin-bottom: 56px;
  padding: 36px 32px;
  border: 1px solid #f0dcc5;
  border-radius: 22px;
  background: linear-gradient(135deg, #fff8f1 0%, #ffffff 45%, #fffaf5 100%);
  box-shadow: 0 14px 30px rgba(34, 34, 34, 0.08);
  overflow: hidden;
}

.p-intro::before {
  content: "";
  position: absolute;
  top: -48px;
  right: -40px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(221, 171, 118, 0.28) 0%, rgba(221, 171, 118, 0) 70%);
}

.p-intro::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, #ddab76 0%, #f0ccaa 45%, #ddab76 100%);
}

.p-intro h1 {
  position: relative;
  margin-bottom: 10px;
  padding-left: 16px;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
  color: #2f2f2f;
}

.p-intro h1::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.22em;
  width: 6px;
  height: 1.1em;
  border-radius: 999px;
  background-color: var(--main-color);
}

.p-intro p {
  max-width: 760px;
  font-size: 1rem;
  color: #5a5148;
  line-height: 1.9;
}

.p-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 56px;
}

.p-nav-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid #ead2b5;
  background-color: #ffffff;
  box-shadow: 0 6px 14px rgba(34, 34, 34, 0.06);
  font-size: 0.92rem;
  font-weight: 700;
  color: #9a6f44;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}

.p-nav-item:hover {
  transform: translateY(-3px);
  border-color: var(--main-color);
  background-color: #fff7ee;
  box-shadow: 0 10px 20px rgba(34, 34, 34, 0.1);
  color: #855e36;
}

.p-nav-item:focus-visible {
  outline: 2px solid rgba(221, 171, 118, 0.45);
  outline-offset: 2px;
}

.p-nav-item--coding {
  border-color: #ead2b5;
  background-color: #fffaf3;
  color: #9a6f44;
}

.p-nav-item--coding:hover {
  border-color: #ddab76;
  background-color: #fff3e5;
  color: #855e36;
}

.p-nav-item--coding:focus-visible {
  outline-color: rgba(221, 171, 118, 0.45);
}

.p-nav-item--webapp {
  border-color: #cfe0ff;
  background-color: #f3f7ff;
  color: #486fc4;
}

.p-nav-item--webapp:hover {
  border-color: #5d84d8;
  background-color: #eaf1ff;
  color: #345cae;
}

.p-nav-item--webapp:focus-visible {
  outline-color: rgba(93, 132, 216, 0.45);
}

.p-nav-item--game {
  border-color: #d9cff2;
  background-color: #f8f5ff;
  color: #6a52b7;
}

.p-nav-item--game:hover {
  border-color: #7a63c8;
  background-color: #f0eaff;
  color: #5741a4;
}

.p-nav-item--game:focus-visible {
  outline-color: rgba(122, 99, 200, 0.45);
}

.p-sec h2 {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding: 10px 20px 10px 16px;
  border-radius: 999px;
  border: 1px solid #efd9c1;
  background: linear-gradient(135deg, #fffaf4 0%, #ffffff 100%);
  box-shadow: 0 8px 18px rgba(34, 34, 34, 0.06);
  font-size: clamp(1.2rem, 1.9vw, 1.7rem);
  font-weight: 700;
  color: var(--main-color);
  letter-spacing: 0.06em;
  line-height: 1.2;
}

.p-sec h2::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: currentColor;
  box-shadow: 0 0 0 6px rgba(221, 171, 118, 0.18);
}


.p-sec + .p-sec {
  margin-top: 72px;
}

.p-sec-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;  
  gap: 32px;
}

.p-sec-item {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 calc((100% - 72px) / 4);
  max-width: 250px;
  text-decoration: none;
  color: inherit;
  border: 1px solid #f2deca;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fffaf4 100%);
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(34, 34, 34, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.p-sec-item::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #ddab76 0%, #f3d3b1 100%);
  z-index: 2;
}

.p-sec-item:hover {
  transform: translateY(-8px);
  border-color: var(--main-color);
  box-shadow: 0 18px 34px rgba(34, 34, 34, 0.14);
}

.p-sec-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.p-sec-item:hover img {
  transform: scale(1.06);
}

.p-sec-item h3 {
  margin: 16px 16px 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #2f2f2f;
  line-height: 1.45;
}

.p-sec-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 16px 16px;
  padding-top: 2px;
}

.p-sec-tags span {
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid #e8caa7;
  background-color: #fff7ee;
  font-size: 0.72rem;
  font-weight: 700;
  color: #b78857;
  letter-spacing: 0.02em;
}

.p-sec--webapp h2 {
  color: #5d84d8;
  border-color: #d8e3fb;
  background: linear-gradient(135deg, #f3f7ff 0%, #ffffff 100%);
}

.p-sec--webapp .p-sec-item::before {
  background: linear-gradient(90deg, #5d84d8 0%, #9ab7f5 100%);
}

.p-sec--webapp .p-sec-item:hover {
  border-color: #5d84d8;
}

.p-sec--webapp .p-sec-tags span {
  border-color: #b8ccf5;
  background-color: #f3f7ff;
  color: #486fc4;
}

.p-sec--game h2 {
  color: #7a63c8;
  border-color: #e4dcf8;
  background: linear-gradient(135deg, #f8f5ff 0%, #ffffff 100%);
}

.p-sec--game .p-sec-item::before {
  background: linear-gradient(90deg, #7a63c8 0%, #b29eea 100%);
}

.p-sec--game .p-sec-item:hover {
  border-color: #7a63c8;
}

.p-sec--game .p-sec-tags span {
  border-color: #d4c9f4;
  background-color: #f8f5ff;
  color: #6a52b7;
}

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

.p-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  z-index: 999;
}

.p-modal.is-open {
  display: flex;
}

.p-modal__overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(24, 24, 24, 0.55);
}

.p-modal__content {
  position: relative;
  width: min(680px, 100%);
  max-height: min(88vh, 860px);
  overflow-y: auto;
  border-radius: 18px;
  border: 1px solid #eed8be;
  background: linear-gradient(180deg, #ffffff 0%, #fffaf4 100%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
  padding: 24px;
  z-index: 1;
}

.p-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #e6c9a9;
  background-color: #fff7ee;
  color: #9a6f44;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.p-modal__close-icon {
  width: 20px;
  height: 20px;
  background-image: url(../img/icon-close.svg);
  background-size: contain;
  background-repeat: no-repeat;
}
.p-modal__thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.35s ease;
}

.p-modal__thumb-link {
  display: block;
  overflow: hidden;
  border-radius: 12px;
}

.p-modal__thumb-link:hover .p-modal__thumb {
  transform: scale(1.05);
}

.p-modal__content h3 {
  margin-top: 16px;
  margin-bottom: 10px;
  padding-right: 36px;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.45;
}

.p-sec__period {
  margin-bottom: 10px;
  color: #8b6a47;
  font-size: 0.9rem;
  font-weight: 700;
}

.p-sec__comment {
  margin-bottom: 14px;
  color: #4d4640;
  font-size: 0.92rem;
  line-height: 1.8;
  white-space: pre-line;
}

.p-sec__responsibilities-title {
  margin-bottom: 8px;
  color: #8b6a47;
  font-size: 0.88rem;
  font-weight: 700;
}

.p-sec__responsibilities {
  margin: 0 0 14px;
  padding-left: 0;
  list-style: none;
}

.p-sec__responsibilities li {
  position: relative;
  margin-bottom: 6px;
  padding: 6px 10px 6px 22px;
  border-radius: 8px;
  background: #f7f2ec;
  font-size: 0.9rem;
  line-height: 1.7;
  color: #4d4640;
}

.p-sec__responsibilities li::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 10px;
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #8b6a47;
  transform: translateY(-50%);
}

.p-sec__url {
  margin-bottom: 14px;
  font-size: 0.88rem;
  color: #5a5148;
}

.p-sec__url-link {
  color: #8a6138;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}

.p-sec-tags--modal {
  margin: 0;
}

@media (max-width: 900px) {
  .p-sec-item {
    flex: 1 1 calc((100% - 24px) / 2);
    min-width: 260px;
  }
}

@media (max-width: 640px) {
  .l-container {
    padding: 48px 16px;
  }

  .p-intro {
    margin-bottom: 44px;
    padding: 28px 20px;
  }

  .p-intro h1 {
    padding-left: 12px;
    font-size: clamp(1.45rem, 6vw, 1.95rem);
  }

  .p-intro p {
    font-size: 0.93rem;
  }

  .p-nav {
    gap: 10px;
    margin-bottom: 44px;
  }

  .p-nav-item {
    width: 100%;
    padding: 10px 14px;
  }

  .p-sec-wrap {
    gap: 18px;
  }

  .p-sec-item {
    flex-basis: 100%;
    min-width: 0;
  }

  .p-modal__content {
    padding: 18px;
  }

  .p-modal__content h3 {
    font-size: 1.05rem;
  }
}
