/* =========================
   by-mig Portfolio
   ========================= */

img {
  -webkit-user-drag: none;
  user-select: none;
}

:root {
  --mint-50: #f5fbf9;
  --mint-100: #e6f5f1;
  --mint-200: #ccebe4;
  --mint-300: #a9d9cf;
  --mint-500: #72b7aa;
  --mint-600: #55998d;

  --ink: #25322f;
  --sub: #66736f;
  --line: #dce9e5;
  --white: #ffffff;

  --radius: 18px;
  --shadow: 0 12px 30px rgba(58, 91, 84, 0.08);
}


/* ---------- 基本 ---------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;

  font-family:
    "Helvetica Neue",
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    Meiryo,
    sans-serif;

  background: var(--mint-50);
  color: var(--ink);

  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

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


/* ---------- HEADER ---------- */

.site-header {
  width: 100%;
  min-height: 78px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 6vw;

  background: rgba(255, 255, 255, 0.92);

  border-bottom: 1px solid var(--line);

  position: sticky;
  top: 0;

  z-index: 100;

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.logo {
  font-family: Georgia, serif;

  font-size: 28px;
  font-style: italic;
  font-weight: 600;
}

.site-header nav {
  display: flex;
  gap: 32px;
}

.site-header nav a {
  font-size: 14px;

  color: var(--sub);

  transition: 0.2s;
}

.site-header nav a:hover {
  color: var(--mint-600);
}


/* ---------- HERO ---------- */

.hero {
  max-width: 1400px;
  min-height: 560px;

  margin: 0 auto;

  display: grid;

  grid-template-columns: 42% 58%;

  background:
    linear-gradient(
      135deg,
      #edf9f6 0%,
      #d9f0eb 100%
    );
}

.hero-text {
  padding: 80px 7vw;

  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-label {
  margin: 0 0 20px;

  color: var(--mint-600);

  font-size: 12px;
  font-weight: 700;

  letter-spacing: 0.16em;
}

.hero h1 {
  margin: 0 0 26px;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size: clamp(48px, 5vw, 76px);

  font-weight: 400;

  line-height: 1.05;

  letter-spacing: -0.03em;
}

.hero-description {
  margin: 0 0 32px;

  font-size: 16px;

  color: var(--sub);
}

.button {
  width: fit-content;

  display: inline-flex;
  align-items: center;

  padding: 13px 28px;

  border-radius: 999px;

  background: var(--mint-500);

  color: white;

  font-size: 14px;

  transition: 0.2s;
}

.button:hover {
  background: var(--mint-600);

  transform: translateY(-2px);
}


/* ---------- HERO IMAGE ---------- */

.hero-visual {
  min-height: 560px;
}

.hero-main-image {
  width: 100%;
  height: 100%;

  min-height: 560px;

  object-fit: cover;

  display: block;

  -webkit-mask-image:
    linear-gradient(
      to right,
      transparent 0%,
      rgba(0, 0, 0, 0.35) 6%,
      rgba(0, 0, 0, 0.75) 12%,
      #000 18%,
      #000 100%
    );

  mask-image:
    linear-gradient(
      to right,
      transparent 0%,
      rgba(0, 0, 0, 0.35) 6%,
      rgba(0, 0, 0, 0.75) 12%,
      #000 18%,
      #000 100%
    );
}


/* ---------- HERO 仮画像 ---------- */

.hero-placeholder {
  width: 100%;
  height: 100%;

  display: grid;

  place-items: center;

  color: rgba(37, 50, 47, 0.45);

  font-size: 14px;

  letter-spacing: 0.1em;

  background:
    radial-gradient(
      circle at 68% 35%,
      rgba(255, 255, 255, 0.85),
      transparent 28%
    ),
    linear-gradient(
      135deg,
      #b7ded5,
      #e7f5f1
    );
}


/* ---------- WORKS ---------- */

.works {
  max-width: 1280px;

  margin: 0 auto;

  padding: 90px 5vw 100px;
}

.section-heading {
  text-align: center;

  margin-bottom: 32px;
}

.section-label {
  margin: 0 0 4px;

  color: var(--mint-600);

  font-size: 11px;
  font-weight: 700;

  letter-spacing: 0.18em;
}

.section-heading h2,
.about h2 {
  margin: 0;

  font-family:
    Georgia,
    "Yu Mincho",
    serif;

  font-weight: 500;
}

.section-heading h2 {
  font-size: 30px;
}


/* ---------- FILTER ---------- */

.filter {
  display: flex;

  justify-content: center;

  gap: 10px;

  margin-bottom: 34px;
}

.filter button {
  padding: 9px 22px;

  border: 1px solid var(--line);
  border-radius: 999px;

  background: white;

  color: var(--sub);

  cursor: pointer;

  transition: 0.2s;
}

.filter button:hover,
.filter button.active {
  background: var(--mint-500);

  border-color: var(--mint-500);

  color: white;
}


/* ---------- WORK GRID ---------- */

.work-grid {
  display: grid;

  grid-template-columns:
    repeat(3, 1fr);

  gap: 24px;
}

.work-card {
  overflow: hidden;

  border: 1px solid var(--line);

  border-radius: var(--radius);

  background: white;

  box-shadow: var(--shadow);

  transition:
    transform 0.25s,
    box-shadow 0.25s;
}

.work-card:hover {
  transform: translateY(-5px);

  box-shadow:
    0 18px 38px rgba(58, 91, 84, 0.13);
}

.work-image {
  aspect-ratio: 4 / 3;

  overflow: hidden;
}

.work-image img {
  width: 100%;
  height: 100%;

  object-fit: cover;

  display: block;
}


/* ---------- WORK 仮画像 ---------- */

.placeholder {
  display: grid;

  place-items: center;

  background:
    linear-gradient(
      135deg,
      #d8eee9,
      #f4faf8
    );

  color: #78a79e;

  font-size: 13px;

  letter-spacing: 0.08em;
}


/* ---------- WORK INFO ---------- */

.work-info {
  padding: 17px 18px 20px;
}

.category {
  margin: 0 0 3px;

  color: var(--mint-600);

  font-size: 11px;

  text-transform: uppercase;

  letter-spacing: 0.08em;
}

.work-info h3 {
  margin: 0;

  font-size: 15px;

  font-weight: 500;
}


/* ---------- ABOUT ---------- */

.about {
  max-width: 1160px;

  margin: 0 auto 100px;

  padding: 48px 60px;

  display: grid;

  grid-template-columns:
    190px 1fr;

  align-items: center;

  gap: 46px;

  border-radius: 28px;

  background:
    linear-gradient(
      135deg,
      #dff3ee,
      #eff9f6
    );
}

.about-avatar {
  display: flex;

  justify-content: center;
}

.about-avatar-image {
  width: 155px;
  height: 155px;

  object-fit: cover;

  border-radius: 50%;

  display: block;

  border:
    4px solid rgba(255, 255, 255, 0.85);
}

.avatar-placeholder {
  width: 155px;
  height: 155px;

  display: grid;

  place-items: center;

  border-radius: 50%;

  background: #b9e2d9;

  color: #619a8f;
}

.about h2 {
  margin-bottom: 14px;

  font-size: 27px;
}

.about-text > p:last-child {
  max-width: 620px;

  margin: 0;

  color: var(--sub);

  font-size: 15px;
}


/* ---------- FOOTER ---------- */

footer {
  min-height: 110px;

  display: flex;

  justify-content: space-between;
  align-items: center;

  padding: 0 6vw;

  border-top:
    1px solid var(--line);

  background: white;

  color: var(--sub);
}

.footer-logo {
  font-family: Georgia, serif;

  font-size: 22px;

  font-style: italic;
}

footer p {
  margin: 0;

  font-size: 12px;
}


/* =========================
   LIGHTBOX
   ========================= */

.lightbox-trigger {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;

  inset: 0;

  z-index: 9999;

  display: none;

  align-items: center;
  justify-content: center;

  padding: 40px;

  background:
    rgba(20, 28, 26, 0.88);

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox.active {
  display: flex;
}

.lightbox-image {
  max-width: 90vw;
  max-height: 90vh;

  width: auto;
  height: auto;

  object-fit: contain;

  border-radius: 10px;

  box-shadow:
    0 22px 70px rgba(0, 0, 0, 0.38);
}


/* ---------- LIGHTBOX 閉じる ---------- */

.lightbox-close {
  position: absolute;

  top: 22px;
  right: 28px;

  width: 46px;
  height: 46px;

  display: grid;

  place-items: center;

  padding: 0;

  border:
    1px solid rgba(255, 255, 255, 0.20);

  border-radius: 50%;

  background:
    rgba(255, 255, 255, 0.08);

  color: rgba(255, 255, 255, 0.92);

  font-size: 30px;
  font-weight: 200;

  line-height: 1;

  cursor: pointer;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.14);

  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}

.lightbox-close:hover {
  background:
    rgba(255, 255, 255, 0.16);

  border-color:
    rgba(255, 255, 255, 0.40);

  transform: scale(1.06);
}


/* ---------- LIGHTBOX 左右ナビ：おしゃんてぃ版 ---------- */

.lightbox-nav {
  position: absolute;

  top: 50%;

  transform: translateY(-50%);

  width: 48px;
  height: 48px;

  padding: 0;

  border:
    1px solid rgba(255, 255, 255, 0.22);

  border-radius: 50%;

  background:
    rgba(255, 255, 255, 0.08);

  color: transparent;

  font-size: 0;

  cursor: pointer;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.14);

  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}


/* 中の細い矢印 */

.lightbox-nav::before {
  content: "";

  position: absolute;

  top: 50%;
  left: 50%;

  width: 10px;
  height: 10px;

  border-top:
    1.5px solid rgba(255, 255, 255, 0.92);

  border-right:
    1.5px solid rgba(255, 255, 255, 0.92);
}


/* 左 */

.lightbox-nav.prev {
  left: 28px;
}

.lightbox-nav.prev::before {
  transform:
    translate(-35%, -50%)
    rotate(-135deg);
}


/* 右 */

.lightbox-nav.next {
  right: 28px;
}

.lightbox-nav.next::before {
  transform:
    translate(-65%, -50%)
    rotate(45deg);
}


/* ホバー */

.lightbox-nav:hover {
  background:
    rgba(255, 255, 255, 0.17);

  border-color:
    rgba(255, 255, 255, 0.42);

  transform:
    translateY(-50%)
    scale(1.08);
}


/* ---------- LIGHTBOX中は背景スクロール禁止 ---------- */

body.lightbox-open {
  overflow: hidden;
}


/* =========================
   TABLET
   ========================= */

@media (max-width: 850px) {

  .site-header {
    padding: 0 22px;
  }

  .site-header nav {
    gap: 17px;
  }

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

  .hero-text {
    padding: 60px 28px;
  }

  .hero-visual {
    min-height: 330px;
  }

  .hero-main-image {
    min-height: 330px;
    height: 330px;
  }

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

  .about {
    margin-left: 20px;
    margin-right: 20px;

    padding: 40px 26px;

    grid-template-columns: 1fr;

    text-align: center;
  }

  .about-text > p:last-child {
    margin-left: auto;
    margin-right: auto;
  }

  .lightbox {
    padding: 30px 70px;
  }

  .lightbox-nav.prev {
    left: 14px;
  }

  .lightbox-nav.next {
    right: 14px;
  }
}


/* =========================
   MOBILE
   ========================= */

@media (max-width: 560px) {

  .site-header {
    min-height: 68px;
  }

  .logo {
    font-size: 23px;
  }

  .site-header nav a:first-child {
    display: none;
  }

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

  .works {
    padding-left: 20px;
    padding-right: 20px;
  }

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

  .filter {
    flex-wrap: wrap;
  }

  footer {
    padding: 30px 22px;
  }


  /* ---------- モバイルのライトボックス ---------- */

  .lightbox {
    padding:
      70px 50px 40px;
  }

  .lightbox-image {
    max-width: 100%;
    max-height: 82vh;
  }

  .lightbox-nav {
    width: 40px;
    height: 40px;
  }

  .lightbox-nav::before {
    width: 8px;
    height: 8px;
  }

  .lightbox-nav.prev {
    left: 6px;
  }

  .lightbox-nav.next {
    right: 6px;
  }

  .lightbox-close {
    top: 12px;
    right: 12px;

    width: 40px;
    height: 40px;

    font-size: 27px;
  }
}
