/*
Theme Name: Masuta Portfolio
Theme URI: https://example.com/
Author: Masuta Shouta
Author URI: https://example.com/
Description: Masuta Shouta のポートフォリオ用オリジナルテーマ。モノトーンのミニマルデザイン、レスポンシブ対応、円形リビールアニメーション付き。
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: masuta-portfolio
*/

/* ============================================
   TARO TANAKA Portfolio — Monotone
   ============================================ */

:root {
  --bg-dark: #0d0d0d;
  --bg-light: #ffffff;
  --text-white: #fafafa;
  --text-dark: #111111;
  --text-gray: #999999;
  --text-gray-2: #9e9e9e;
  --text-gray-3: #a6a6a6;
  --border: #e5e5e5;
  --border-dark: #333333;
  --nav-h: 135px; /* ロゴ54px + 上下パディング40px + 下線1px */
  --nav-h-sp: 73px; /* ロゴ40px + 上下パディング16px + 下線1px */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
}

body.theme-dark {
  background: var(--bg-dark);
  color: var(--text-white);
}

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

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

ul {
  list-style: none;
}

/* ============ Nav ============ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 40px 60px;
  background: var(--bg-light);
  border-bottom: 1px solid var(--border);
}

.theme-dark .nav {
  background: var(--bg-dark);
  border-bottom: none;
}

/* ホームはヘッダーを透過して写真が切れないようにする */
.page-home .nav {
  background: transparent;
  border-bottom: none;
}

.nav__logo {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-dark);
}

.nav__logo--img {
  display: block;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  overflow: hidden;
}

.nav__logo--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ダークテーマのページでは線画ロゴを白に反転して見えるようにする */
.theme-dark .nav__logo--img img {
  filter: invert(1);
}

.theme-dark .nav__logo {
  color: #ffffff;
}

.nav__menu {
  display: flex;
  gap: 36px;
  align-items: center;
}

.nav__link {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-gray-2);
  padding-bottom: 5px;
  border-bottom: 1.5px solid transparent;
  transition: color 0.25s;
}

.nav__link:hover {
  color: var(--text-dark);
}

.theme-dark .nav__link:hover {
  color: #ffffff;
}

.nav__link.is-active {
  color: var(--text-dark);
  border-bottom-color: var(--text-dark);
}

.theme-dark .nav__link.is-active {
  color: #ffffff;
  border-bottom-color: #ffffff;
}

/* Hamburger (SP) */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 22px;
  position: relative;
  z-index: 110;
}

.nav__toggle span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--text-dark);
  transition:
    transform 0.5s cubic-bezier(0.83, 0, 0.17, 1),
    opacity 0.3s cubic-bezier(0.83, 0, 0.17, 1),
    top 0.5s cubic-bezier(0.83, 0, 0.17, 1);
}

.theme-dark .nav__toggle span {
  background: #ffffff;
}

.nav__toggle span:nth-child(1) { top: 0; }
.nav__toggle span:nth-child(2) { top: 10px; }
.nav__toggle span:nth-child(3) { top: 20px; }

.nav__toggle.is-open span:nth-child(1) { top: 10px; transform: rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { top: 10px; transform: rotate(-45deg); }

/* ============ Page transition (circle reveal) ============ */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--bg-dark);
  pointer-events: none;
  clip-path: circle(0px at 50% 50%);
  visibility: hidden;
}

.page-transition.is-animating {
  visibility: visible;
  transition: clip-path 0.5s cubic-bezier(0.83, 0, 0.17, 1);
}

@media (prefers-reduced-motion: reduce) {
  .page-transition {
    display: none;
  }
}

/* ============ Page layout ============ */
.page {
  padding-top: var(--nav-h);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 80px;
}

/* Section heading (WORKS / ABOUT / SKILLS / CONTACT) */
.page-head {
  text-align: center;
  padding: 68px 0 0;
}

.page-head__title {
  font-size: 48px;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
}

.page-head__sub {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-gray);
  letter-spacing: 0.08em;
}

/* ============ TOP (Hero) ============ */
/* ホームはスクロールさせない（余白なしの1画面固定） */
.page-home {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.hero {
  height: 100vh;
  height: 100svh;
  position: relative;
  overflow: hidden;
  background: var(--bg-light);
}

.hero__photo {
  position: absolute;
  bottom: 0;
  left: 56.5%;
  transform: translateX(-50%);
  width: min(68.75vw, 990px);
}

.hero__photo img {
  width: 100%;
  height: auto;
}

.hero__name {
  position: absolute;
  left: 9vw;
  bottom: 9%;
  font-family: "Playfair Display", "Noto Sans JP", serif;
  font-size: clamp(44px, 5.83vw, 84px);
  font-weight: 700;
  color: #121212;
  white-space: nowrap;
  isolation: isolate;
}

/* オフセット影（text-shadowは環境によって描画が乱れるため疑似要素で再現） */
.hero__name::before {
  content: attr(data-text);
  position: absolute;
  left: 3px;
  top: 3px;
  color: rgba(0, 0, 0, 0.15);
  z-index: -1;
  white-space: nowrap;
}


/* ============ WORKS list ============ */
.works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 60px 40px;
  padding: 72px 0 120px;
}

.work-card {
  border: 1px solid var(--border);
  background: #fff;
  transition: box-shadow 0.3s, transform 0.3s;
}

.work-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.work-card__thumb {
  height: 300px;
  overflow: hidden;
  position: relative;
}

.work-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* placeholder gradients */
.thumb--shop {
  background: linear-gradient(135deg, #2b2b2b 0%, #4a4a4a 100%);
}

.thumb--corporate {
  background: linear-gradient(135deg, #7a7a7a 0%, #b5b5b5 100%);
}

.thumb--keirin {
  background: linear-gradient(135deg, #1d1d1d 0%, #2e2e2e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.work-card__body {
  padding: 28px 26px 30px;
}

.work-card__title {
  font-size: 18px;
  font-weight: 700;
}

.work-card__desc {
  margin-top: 10px;
  font-size: 13px;
  color: #777;
}

.work-card__tech {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-gray-3);
}

/* ============ WORKS detail ============ */
.detail {
  padding-top: 32px;
  padding-bottom: 120px;
}

.detail__back {
  display: inline-block;
  font-size: 13px;
  color: #555;
  margin-bottom: 28px;
  transition: color 0.25s;
}

.detail__back:hover {
  color: var(--text-dark);
}

.detail__hero {
  max-width: 1040px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  background: #141414;
}

.detail__hero img,
.detail__hero svg {
  width: 100%;
  display: block;
}

.detail__inner {
  max-width: 1040px;
  margin: 0 auto;
}

.detail__title {
  margin-top: 56px;
  font-size: 28px;
  font-weight: 700;
}

.detail__lead {
  margin-top: 16px;
  font-size: 14px;
  color: #888;
}

.detail__section-title {
  margin-top: 48px;
  font-size: 14px;
  font-weight: 700;
}

.detail__text {
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.9;
  color: #444;
}

.detail__list {
  margin-top: 18px;
  font-size: 14px;
  line-height: 2;
  color: #444;
}

.chips {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  font-size: 13px;
  color: #333;
  border: 1px solid #d9d9d9;
  padding: 8px 16px;
  background: #fff;
}

.detail__actions {
  margin-top: 56px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 54px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: opacity 0.25s, background 0.25s, color 0.25s;
}

.btn--dark {
  background: var(--text-dark);
  color: #fff;
  width: 320px;
}

.btn--dark:hover {
  opacity: 0.8;
}

.btn--line {
  border: 1px solid var(--text-dark);
  color: var(--text-dark);
  width: 280px;
  background: #fff;
}

.btn--line:hover {
  background: var(--text-dark);
  color: #fff;
}

/* ============ ABOUT ============ */
.about {
  padding-top: 72px;
  padding-bottom: 120px;
}

.about__profile {
  display: flex;
  gap: 60px;
  align-items: flex-start;
  max-width: 880px;
  margin: 0 auto;
}

.about__photo {
  flex-shrink: 0;
  width: 260px;
  height: 320px;
  background: linear-gradient(135deg, #9c9c9c 0%, #5c5c5c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.about__info {
  padding-top: 10px;
}

.about__name {
  font-size: 24px;
  font-weight: 700;
}

.about__role {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-gray);
  letter-spacing: 0.04em;
}

.about__text {
  margin-top: 32px;
  font-size: 14px;
  line-height: 2;
  color: #444;
}

.about__block {
  max-width: 880px;
  margin: 72px auto 0;
}

.about__block-title {
  font-size: 16px;
  font-weight: 700;
}

.about__history {
  margin-top: 24px;
  font-size: 14px;
  line-height: 2.2;
  color: #444;
}

.about__likes {
  margin-top: 24px;
  display: flex;
  gap: 16px;
}

.like-icon {
  width: 56px;
  height: 56px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: #fafafa;
}

/* ============ SKILLS ============ */
.skills {
  padding-top: 72px;
  padding-bottom: 120px;
  max-width: 880px;
  margin: 0 auto;
}

.skills__group + .skills__group {
  margin-top: 48px;
}

.skills__group-title {
  font-size: 16px;
  font-weight: 700;
}

/* ============ CONTACT ============ */
.contact {
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  flex-direction: column;
}

.contact .page-head__title {
  color: var(--text-white);
}

.contact__list {
  margin: 96px auto 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.contact__row {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #dddddd;
  font-size: 16px;
  letter-spacing: 0.03em;
  transition: color 0.25s;
}

.contact__row:hover {
  color: #ffffff;
}

.contact__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #2a2a2a;
  color: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.contact__footer {
  margin-top: auto;
  padding: 60px 0 80px;
  text-align: center;
  font-size: 12px;
  color: var(--text-gray-3);
  letter-spacing: 0.08em;
}

/* ============================================
   Responsive (SP <= 768px)
   ============================================ */
@media (max-width: 768px) {
  .nav {
    padding: 16px 20px;
  }

  .nav__logo {
    font-size: 13px;
  }

  .nav__toggle {
    display: block;
  }

  .nav__menu {
    position: fixed;
    inset: 0;
    background: var(--bg-light);
    flex-direction: column;
    justify-content: center;
    gap: 40px;
    /* ハンバーガーの位置から円形に広がる（clip-path circle reveal） */
    clip-path: circle(0px at var(--reveal-x, calc(100% - 34px)) var(--reveal-y, 28px));
    visibility: hidden;
    transition:
      clip-path 0.5s cubic-bezier(0.83, 0, 0.17, 1),
      visibility 0s linear 0.5s;
  }

  .theme-dark .nav__menu {
    background: var(--bg-dark);
  }

  .nav__menu.is-open {
    clip-path: circle(var(--reveal-r, 150vmax) at var(--reveal-x, calc(100% - 34px)) var(--reveal-y, 28px));
    visibility: visible;
    transition: clip-path 0.5s cubic-bezier(0.83, 0, 0.17, 1);
  }

  @media (prefers-reduced-motion: reduce) {
    .nav__menu,
    .nav__menu.is-open {
      transition: none;
    }
  }

  .nav__link {
    font-size: 14px;
    letter-spacing: 0.2em;
  }

  .page {
    padding-top: var(--nav-h-sp);
  }

  .container {
    padding: 0 20px;
  }

  .page-head {
    padding-top: 36px;
  }

  .page-head__title {
    font-size: 29px;
  }

  .page-head__sub {
    margin-top: 10px;
    font-size: 11px;
  }

  /* Hero */
  .hero__photo {
    top: var(--nav-h-sp);
    bottom: auto;
    left: 50%;
    width: min(86vw, 360px);
  }

  .hero__name {
    left: 8vw;
    bottom: auto;
    top: 43%;
    font-size: clamp(28px, 8.7vw, 40px);
  }

  .nav__logo--img {
    width: 40px;
    height: 40px;
  }

  /* Works: card rows */
  .works-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 40px 0 80px;
  }

  .work-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
  }

  .work-card:hover {
    transform: none;
  }

  .work-card__thumb {
    width: 110px;
    height: 70px;
    flex-shrink: 0;
  }

  .thumb--keirin svg {
    width: 60px;
  }

  .work-card__body {
    padding: 0;
    min-width: 0;
  }

  .work-card__title {
    font-size: 15px;
  }

  .work-card__desc {
    margin-top: 6px;
    font-size: 12px;
  }

  .work-card__tech {
    margin-top: 4px;
    font-size: 11px;
  }

  /* Detail */
  .detail {
    padding-top: 20px;
    padding-bottom: 80px;
  }

  .detail__back {
    font-size: 12px;
    margin-bottom: 20px;
  }

  .detail__hero {
    border-radius: 10px;
  }

  .detail__title {
    margin-top: 28px;
    font-size: 20px;
  }

  .detail__lead {
    margin-top: 10px;
    font-size: 13px;
  }

  .detail__section-title {
    margin-top: 36px;
    font-size: 13px;
  }

  .detail__text,
  .detail__list {
    margin-top: 14px;
    font-size: 13px;
  }

  .chip {
    font-size: 12px;
    padding: 7px 13px;
  }

  .detail__actions {
    margin-top: 40px;
    flex-direction: column;
    gap: 14px;
  }

  .btn--dark,
  .btn--line {
    width: 100%;
    height: 44px;
    font-size: 13px;
  }

  /* About */
  .about {
    padding-top: 40px;
    padding-bottom: 80px;
  }

  .about__profile {
    gap: 20px;
  }

  .about__photo {
    width: 110px;
    height: 140px;
  }

  .about__info {
    padding-top: 4px;
  }

  .about__name {
    font-size: 18px;
  }

  .about__role {
    margin-top: 8px;
    font-size: 11px;
  }

  .about__text {
    margin-top: 24px;
    font-size: 13px;
  }

  .about__block {
    margin-top: 48px;
  }

  .about__block-title {
    font-size: 14px;
  }

  .about__history {
    margin-top: 16px;
    font-size: 13px;
  }

  .about__likes {
    margin-top: 16px;
  }

  .like-icon {
    width: 40px;
    height: 40px;
    font-size: 17px;
  }

  /* Skills */
  .skills {
    padding-top: 44px;
    padding-bottom: 80px;
  }

  .skills__group + .skills__group {
    margin-top: 36px;
  }

  .skills__group-title {
    font-size: 14px;
  }

  /* Contact */
  .contact {
    min-height: calc(100vh - var(--nav-h-sp));
    min-height: calc(100svh - var(--nav-h-sp));
  }

  .contact__list {
    margin-top: 72px;
    gap: 30px;
  }

  .contact__row {
    font-size: 14px;
    gap: 18px;
  }

  .contact__icon {
    width: 40px;
    height: 40px;
    font-size: 13px;
  }
}
