/* ======================================
   BASE RESET & VARIABLES
====================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-black:  #0a0a0a;
  --color-dark:   #1a1a1a;
  --color-gray:   #6b6b6b;
  --color-light:  #f5f5f5;
  --color-white:  #ffffff;
  --color-accent: #333333;
  --font-sans:    'Noto Sans JP', sans-serif;
  --font-serif:   'Noto Serif JP', serif;
  --transition:   0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm:    0 2px 12px rgba(0,0,0,.08);
  --shadow-md:    0 8px 32px rgba(0,0,0,.12);
  --shadow-lg:    0 20px 60px rgba(0,0,0,.18);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  color: var(--color-dark);
  background: var(--color-white);
  line-height: 1.8;
  overflow-x: hidden;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }
a   { text-decoration: none; color: inherit; }
ul  { list-style: none; }

/* ======================================
   UTILITY
====================================== */
.section {
  padding: 100px 0;
}
.section__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
}
.section__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 600;
  letter-spacing: .08em;
  text-align: center;
  margin-bottom: 12px;
  position: relative;
}
.section__title::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--color-dark);
  margin: 16px auto 0;
}
.section__title--light { color: var(--color-white); }
.section__title--light::after { background: var(--color-white); }

.section__sub {
  text-align: center;
  color: var(--color-gray);
  font-size: .9rem;
  letter-spacing: .1em;
  margin-bottom: 60px;
}
.section__sub--light { color: rgba(255,255,255,.65); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  border: 2px solid transparent;
  font-family: var(--font-sans);
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .12em;
  cursor: pointer;
  transition: var(--transition);
}
.btn--white {
  background: var(--color-white);
  color: var(--color-dark);
  border-color: var(--color-white);
}
.btn--white:hover {
  background: transparent;
  color: var(--color-white);
}
.btn--full { width: 100%; justify-content: center; }

/* ======================================
   NAVIGATION
====================================== */
.nav {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition);
  padding: 0 40px;
}
.nav.scrolled {
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
}
.nav__inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: .15em;
  color: var(--color-white);
  transition: color var(--transition);
}
.nav.scrolled .nav__logo { color: var(--color-dark); }

.nav__links {
  display: flex;
  gap: 32px;
}
.nav__link {
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .1em;
  color: rgba(255,255,255,.85);
  transition: color var(--transition);
  position: relative;
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: currentColor;
  transition: width var(--transition);
}
.nav__link:hover::after,
.nav__link.active::after { width: 100%; }
.nav.scrolled .nav__link { color: var(--color-dark); }

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__hamburger span {
  display: block;
  width: 26px; height: 2px;
  background: var(--color-white);
  transition: var(--transition);
}
.nav.scrolled .nav__hamburger span { background: var(--color-dark); }

/* ======================================
   HERO
====================================== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  overflow: hidden;
}

/* Hero上ではナビ背景なし・テキスト白で常に表示 */
.nav {
  transition: background var(--transition), box-shadow var(--transition);
}
.hero__bg {
  position: absolute;
  inset: 0;
  background:
    url('../images/hero-bg.jpg')
    center/cover no-repeat;
  transform: scale(1.06);
  transition: transform 8s ease;
  will-change: transform;
}
.hero__bg.loaded { transform: scale(1); }

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,.55) 0%,
    rgba(0,0,0,.45) 60%,
    rgba(0,0,0,.65) 100%
  );
  z-index: 1;
}
.hero__content {
  position: relative;
  z-index: 2;
  text-align: left;
  color: var(--color-white);
  /* 左端から直接展開するため左パディングなし */
  padding: 0 0 160px 0;
  width: 100%;
}
.hero__sub {
  font-size: .8rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  margin-bottom: 24px;
  opacity: .8;
}
.hero__catch-glass {
  display: inline-block;
  margin-left: 0;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0 16px 16px 0;
  border-left: none;
  padding: 40px 64px 40px 60px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.hero__catch {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.8vw, 2.2rem);
  font-weight: 300;
  line-height: 2.0;
  letter-spacing: .18em;
  margin-bottom: 0;
}
.hero__catch-line {
  display: block;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp .8s forwards;
}
.hero__catch-line:nth-child(1) { animation-delay: .2s; }
.hero__catch-line:nth-child(2) { animation-delay: .5s; }
.hero__catch-line:nth-child(3) { animation-delay: .8s; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.hero__scroll {
  position: absolute;
  bottom: 36px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.7);
  font-size: .7rem;
  letter-spacing: .2em;
}
.hero__scroll-line {
  width: 1px;
  height: 50px;
  background: rgba(255,255,255,.4);
  position: relative;
  overflow: hidden;
}
.hero__scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  width: 100%; height: 100%;
  background: rgba(255,255,255,.9);
  animation: scrollLine 2s infinite;
}
@keyframes scrollLine {
  to { top: 200%; }
}

/* ======================================
   PROFILE
====================================== */
.profile { background: var(--color-white); }

.profile__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: center;
}
.profile__img-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.profile__img-frame {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}
.profile__img-frame img {
  transition: transform .6s ease;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.profile__img-frame:hover img { transform: scale(1.04); }

.profile__img-deco {
  display: none;
}
.profile__name {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--color-dark);
  margin-bottom: 8px;
  line-height: 1.3;
}
.profile__name-kana {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-gray);
  letter-spacing: .08em;
}
.profile__location {
  font-size: .85rem;
  color: var(--color-gray);
  letter-spacing: .1em;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.profile__bio {
  font-size: 1rem;
  line-height: 2;
  color: var(--color-dark);
  margin-bottom: 32px;
}
.profile__skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.profile__skill-tag {
  padding: 6px 16px;
  border: 1px solid var(--color-dark);
  font-size: .8rem;
  letter-spacing: .08em;
  color: var(--color-dark);
  transition: var(--transition);
}
.profile__skill-tag:hover {
  background: var(--color-dark);
  color: var(--color-white);
}

/* ======================================
   HOBBY
====================================== */
.hobby { background: var(--color-light); }

.hobby__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.hobby__item {
  position: relative;
  aspect-ratio: 1/1;
  overflow: hidden;
  cursor: pointer;
}
.hobby__item img {
  transition: transform .5s ease;
}
.hobby__item:hover img { transform: scale(1.08); }

.hobby__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .35s ease;
}
.hobby__item:hover .hobby__overlay { opacity: 1; }
.hobby__overlay span {
  color: var(--color-white);
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
}

/* ======================================
   WORKS
====================================== */
.works { background: var(--color-white); }

.works__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.works__card {
  border: 1px solid #e0e0e0;
  padding: 36px 32px 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.works__card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 0;
  background: var(--color-dark);
  transition: height .4s ease;
}
.works__card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.works__card:hover::before { height: 100%; }

.works__card-top {
  margin-bottom: 12px;
}
.works__category {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--color-gray);
}
.works__card-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--color-dark);
  line-height: 1.5;
}
.works__card-desc {
  font-size: .9rem;
  color: #555;
  line-height: 1.9;
  margin-bottom: 20px;
}
.works__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.works__tags li {
  padding: 4px 12px;
  background: var(--color-light);
  font-size: .75rem;
  letter-spacing: .06em;
  color: var(--color-dark);
  border-radius: 2px;
}
.works__date {
  font-size: .8rem;
  color: var(--color-gray);
  letter-spacing: .05em;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ======================================
   CONTACT
====================================== */
.contact {
  background: var(--color-dark);
  color: var(--color-white);
}
.contact__inner {
  max-width: 680px;
}
.contact__form {
  margin-top: 0;
}
.form__group {
  margin-bottom: 28px;
}
.form__label {
  display: block;
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .1em;
  color: rgba(255,255,255,.85);
  margin-bottom: 10px;
}
.form__required {
  color: #ff6b6b;
  margin-left: 4px;
}
.form__input,
.form__textarea {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.2);
  color: var(--color-white);
  font-family: var(--font-sans);
  font-size: .95rem;
  outline: none;
  transition: border-color var(--transition), background var(--transition);
  resize: none;
  border-radius: 0;
  appearance: none;
}
.form__input::placeholder,
.form__textarea::placeholder { color: rgba(255,255,255,.3); }
.form__input:focus,
.form__textarea:focus {
  border-color: rgba(255,255,255,.6);
  background: rgba(255,255,255,.1);
}
.form__input.error,
.form__textarea.error {
  border-color: #ff6b6b;
}
.form__error {
  display: block;
  font-size: .8rem;
  color: #ff6b6b;
  margin-top: 6px;
  min-height: 18px;
}
.form__submit { margin-top: 12px; }
.contact .btn--white {
  font-size: .9rem;
  letter-spacing: .15em;
}
.form__success {
  display: none;
  text-align: center;
  padding: 32px;
  color: var(--color-white);
}
.form__success i {
  font-size: 2.5rem;
  color: #6fcf97;
  margin-bottom: 16px;
  display: block;
}
.form__success p { font-size: .95rem; line-height: 1.8; }

/* ======================================
   FOOTER
====================================== */
.footer {
  background: var(--color-black);
  padding: 28px 40px;
  text-align: center;
}
.footer__copy {
  font-size: .78rem;
  color: rgba(255,255,255,.4);
  letter-spacing: .1em;
}

/* ======================================
   SCROLL REVEAL ANIMATION
====================================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ======================================
   RESPONSIVE — TABLET (≤900px)
====================================== */
@media (max-width: 900px) {
  .profile__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .profile__img-wrap {
    max-width: 380px;
    margin: 0 auto;
  }
  .works__grid {
    grid-template-columns: 1fr;
  }
  .nav { padding: 0 24px; }
  .section__inner { padding: 0 24px; }
}

/* ======================================
   RESPONSIVE — MOBILE (≤640px)
====================================== */
@media (max-width: 640px) {
  .section { padding: 70px 0; }

  /* Nav hamburger */
  .nav__hamburger { display: flex; }
  .nav__links {
    position: fixed;
    top: 70px; right: 0;
    width: 240px;
    height: calc(100vh - 70px);
    background: rgba(10,10,10,.97);
    flex-direction: column;
    gap: 0;
    padding: 24px 0;
    transform: translateX(100%);
    transition: transform var(--transition);
  }
  .nav__links.open { transform: translateX(0); }
  .nav__link {
    display: block;
    padding: 14px 32px;
    font-size: 1rem;
    color: rgba(255,255,255,.85) !important;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .nav__link::after { display: none; }

  /* Hero */
  .hero__catch { font-size: 1.7rem; }
  /* キャッチコピーを50px分さらに上へ */
  .hero__content { padding: 0 0 180px 0; }
  /* グラスモーフィズム：スマホはパディングを小さく */
  .hero__catch-glass {
    padding: 24px 32px 24px 28px;
  }

  /* Profile */
  .profile__grid { gap: 32px; }
  .profile__img-deco { display: none; }

  /* Hobby — 2 columns on mobile */
  .hobby__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  /* 9th item centred on mobile */
  .hobby__item:nth-child(9) {
    grid-column: 1 / -1;
    aspect-ratio: 2/1;
  }

  /* Works */
  .works__grid { grid-template-columns: 1fr; gap: 20px; }
  .works__card { padding: 28px 20px 22px; }

  /* Contact */
  .footer { padding: 24px 20px; }
}
