/* 指定フォント */
.name h1,.message{
  font-family: "Montserrat", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}
.firstname{
  font-size: 4em;
  letter-spacing: 0.12em;
  opacity: 0.9;
}
.lastname{
  font-size: 3.3em;
  letter-spacing: 0.2em;
  margin-left: 30px;
  font-weight: 500;
  opacity: 0.8;
  line-height: 0.9;
}

.portfolio{
  font-family: "Righteous", sans-serif;
  font-weight: 400;
  font-style: normal;
}

/* 見出し */
h2{
  font-family: "Cabin Sketch", sans-serif;
  font-weight: 700;
  font-style: normal;
  font-size: 2.3rem;
  letter-spacing: 0.1em;
  color: #000b21;

  margin-bottom: 80px;
}
@media screen and (max-width: 768px){
  h2{
    margin-bottom: 30px;
  }
}

/* ---------- FV ---------- */
.fv{
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 1;

  background-image: url("../images/top/FV-image.jpg");
  background-size: cover;
  background-position: center;

  padding: 0;
}
.portfolio{
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.9rem;
  color: #2F3E4E;
  letter-spacing: 0.05em;
  opacity: 0.4;
}
.fv-text{
  position: absolute;
  top: 25%;
  left: 15%;
}
.name{
  color: #0D2249;
}
.name h1 {
  display: inline-block;
  text-shadow:
    0 4px 8px rgba(0, 0, 0, 0.25),
    0 12px 24px rgba(0, 0, 0, 0.2),
    0 30px 60px rgba(0, 0, 0, 0.18);
  transform: translateY(-2px);
}
.typing{
  padding-left: 50%;
  color: #2F3E4E;

  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  width: 0;

  animation: typing 2.5s steps(27, end) forwards;
  animation-delay: 2s;
}
@keyframes typing {
  from { width: 0; }
  to   { width: 100%; }
}

.firstname,
.lastname{
  display: block;
}

@media screen and (max-width: 768px){
  .fv{
    background-image: url("../images/top/fv-sp-long2.jpg");
    background-size: cover;
    background-position: center top;
    height: 90vh;
  }
  .firstname{
    font-size: 2.3em;
  }
  .lastname{
    font-size: 2em;
    margin-top: 20px;
  }
  .scroll{
    display: none;
  }
}

/* ---------- スクロールダウン ---------- */
.scroll-down {
  position: absolute;
  bottom: 40px;
  right: 25%;
  transform: translateX(-50%);
  text-align: center;
  font-family: serif;
  color: #4e4f69;
  font-size: 18px;
  text-decoration: none;

  opacity: 0.7;
  transition: opacity 0.8s;
  font-family: "Righteous", sans-serif;
  /* letter-spacing: 0.01em; */
}

.scroll-down:hover {
  opacity: 1;
}


.wavy-text span {
  position: relative;
  display: inline-block;
  animation: wave 2s infinite;
  animation-delay: calc(0.1s * var(--i));
}

.wavy-text_arrow {
  position: absolute;
  top: 30px;
  left: 50%;
  width: 10px;
  height: 10px;
  border-left: 1px solid #2F3E4E;
  border-bottom: 1px solid #2F3E4E;
  transform: translate(-50%) rotate(-45deg);
  animation: floatArrow 2s infinite;
  display: block;
}

@keyframes wave {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}
@keyframes floatArrow {
  0%,100% {
    transform: translate(-50%, -50%) rotate(-45deg);
  }
  50% {
    transform: translate(-50%, -40%) rotate(-45deg);
  }
}




/* Rの動き */
.fv-r {
  display: inline-block;
}

@keyframes jump {
  0%   { transform: translateY(0) scaleY(1); }

  /* 1回目（ゆったり） */
  20%  { transform: translateY(4px) scaleY(0.9); }
  40%  { transform: translateY(-22px) scaleY(1.1); }
  60%  { transform: translateY(0) scaleY(1); }

  /* 2回目（素早く小さめ） */
  63%  { transform: translateY(3px) scaleY(0.95); }
  82%  { transform: translateY(-14px) scaleY(1.05); }
  92%  { transform: translateY(0) scaleY(1); }

  100% { transform: translateY(0); }
}

@keyframes shake {
  0% {
    transform: rotate(0deg) translateX(0);
    color: #0D2249;
  }

  30% {
    transform: rotate(4deg) translateX(2px);
    color: #5a4a72; /* 少し紫寄り */
  }

  60% {
    transform: rotate(-3deg) translateX(-1px);
    color: #b7849b; /* くすみ淡ピンク */
  }

  80% {
    transform: rotate(2deg);
    color: #7a5b86; /* 戻り途中 */
  }

  100% {
    transform: rotate(0deg);
    color: #0D2249;
  }
}

.fv-r.active {
  animation:
    jump 1s cubic-bezier(.34,1.56,.64,1),
    shake 1s ease 1s;
}


/* FV以外のセクションに適用 */
.top section:not(.fv) {
  width: 75%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 0;
  box-sizing: border-box;
  position: relative;
}
@media screen and (max-width: 768px){
  .top section:not(.fv){
    padding: 40px 0;
  }
}

/* ---------- 背景 ---------- */
.bg-area{
  background-image: url("../images/top/FV-Bg-image.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;

  position: relative;
}

/* ---------- ABOUT ---------- */
.about{
  position: relative;
}
.about-content{
  display: flex;
  align-items: flex-start;
  gap: 60px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.about-text{
  flex: 1 1 50%;
  min-width: 280px;
  font-size: 1.1em;

  /* 左からフェードイン */
  opacity: 0;
  transform: translateX(-40px); /* 左から来る */
  transition: 
    opacity 2.5s ease,
    transform 2.2s cubic-bezier(0.19, 1, 0.22, 1);

  letter-spacing: 3px;
  line-height: 1.3;
}
.about-text.show {
  opacity: 1;
  transform: translateX(0);
}


.about-right{
  flex: 1 1 40%;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}
/* 画像をふんわり出す */
.about-right img{
  opacity: 0;
  transform: scale(0.9);
  filter: blur(6px);
  transition: 
    opacity 3s ease,
    transform 3s cubic-bezier(0.22, 1, 0.36, 1),
    filter 3s ease;
  transition-delay: 0.3s;
  border-radius: 35px;
  width: 250px;
}
.about-right img.active{
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

@media screen and (max-width: 768px){
  .name p{
    margin-top: 40px;
    text-align: center;
    padding: 0;
  }
  .about-right img{
    width: 150px;
  }
}

/* ABOUT ボタン */
.about-btn{
  display: inline-block;
  margin-top: 10px;

  padding: 14px 40px;
  border: 1px solid #a2b2ca;
  border-radius: 30px;

  color: #697993;
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.05em;

  background-color: transparent;

  transition: 
    border-color 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.3s ease;

       backdrop-filter: blur(6px);
}
/* hover */
.about-btn:hover{
  border-color: #4b5e72;
  color: #2F3E4E;

  background-color: rgba(162, 178, 202, 0.12);

  box-shadow: 
    0 6px 16px rgba(105, 121, 147, 0.35),
    0 2px 6px rgba(0, 0, 0, 0.15), 
    inset 0 0 10px rgba(255, 255, 255, 0.25);

  transform: translateY(-3px);
}
@media screen and (max-width: 768px){
  .about-btn{
    padding: 16px 42px;
    font-size: 1rem;

    background-color: rgba(255, 255, 255, 0.08);

    box-shadow:
      0 4px 10px rgba(0,0,0,0.08),
      inset 0 1px 2px rgba(255,255,255,0.4);
  }
  .about-btn:active{
  transform: scale(0.97);
  box-shadow:
    0 2px 6px rgba(0,0,0,0.12);
}

}

/* ---------- works ---------- */
/* works説明文+猫(topページのみ) */
.item{
  animation: float 3s ease-in-out infinite;
}
.icon-box{
  position: relative;
  display: inline-block;
}
.tooltip{
  position: absolute;
  bottom: 140%; /* 上に出す */
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: 0.3s ease;

  background: #E0D0D4;
  border: 1px solid rgba(0,0,0,0.05);
  font-size: 0.8rem;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;

  pointer-events: none;
  animation: float 3.5s ease-in-out infinite;
}

.icon-box:hover .tooltip,
.icon-box:hover .tooltip-img{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.tooltip-img{
  position: absolute;
  top: 140%;          /* アイコンの下に配置 */
  left: 50%;
  transform: translateX(-50%) translateY(6px);

  opacity: 0;
  transition: 0.3s ease, transform 0.3s ease;
  transition-delay: 0.1s;
  pointer-events: none;
  filter: drop-shadow(4px 8px 12px rgba(0, 0, 0, 0.18));
}
/* 歩く猫だけ小さく */
.tooltip-img.cat-walk {
  width: 100px;
}

/* ホバー時に出る各画像設定 */
.tooltip-img.cat-walk,.tooltip-img.cat-sit{
  transform: translateX(-50%) translateY(6px) scale(0.9);
}
/* 歩く猫 */
.icon-box:hover .tooltip-img.cat-walk{
  transform: translateX(-50%) translateY(0) scale(0.9);
}
/* 座る猫 */
.icon-box:hover .tooltip-img.cat-sit{
  transform: translateX(-50%) translateY(0) scale(0.9);
}

@keyframes float {
  0% {
    transform: translateX(-50%) translateY(0px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.18);
  }
  50% {
    transform: translateX(-50%) translateY(-8px);
    box-shadow: 0 30px 50px rgba(0,0,0,0.12);
  }
  100% {
    transform: translateX(-50%) translateY(0px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
  }
}
/* 雲だけ動かす */
.cloud{
  animation: float-soft 3.5s ease-in-out infinite;
  animation-delay: 0.4s;
}
@keyframes float-soft {
  0%,100% {
    transform: translateX(-50%) translateY(0px);
  }
  50% {
    transform: translateX(-50%) translateY(-6px);
  }
}

@media screen and (max-width: 768px){
  .works-list{
    padding: 15px;
    margin-bottom: -50px;
  }
}

/* ---------- skills ---------- */
.skills{
  max-width: 1100px;
  margin: 0 auto;
}
.skills-main{
  display: flex;
  gap: 90px;
  align-items: flex-start;
}
.coding, .design{
  flex: 1;
}
.other{
  margin-top: 80px;
  max-width: 800px;
}
.skills-main img{
  display: block;
  max-width: 200px;
  width: 100%;
  margin: 25px auto;
}
.skills h3{
  font-size: 1.5em;
}
.skills p{
  letter-spacing: 3px;
  line-height: 1.3;
}

/* skillsフェードイン */
.fade-skill{
  opacity: 0;
  transform: translateY(10px);
  filter: blur(6px);

  transition: 1.5s cubic-bezier(0.25, 1, 0.5, 1);
}
.fade-skill.show{
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* 順番に出す */
.delay-1{
  transition-delay: 0.3s;
}
.delay-2{
  transition-delay: 0.9s;
}
.delay-3{
  transition-delay: 1.5s;
}

@media screen and (max-width: 768px){
  .skills-main{
  display: block;
  }
  .skills-main img{
  max-width: 150px;
  }
  .design,.other{
  margin-top: 30px;
}
}

/* ---------- contact ---------- */
.contact{
  padding: 120px 0;
  position: relative;
}
.contact-info{
  margin-top: 180px;
  text-align: center;
}
.contact h2{
  margin-bottom: 0;
}
.contact-mail{
  margin-top: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px; }
.mail-row{
  display: flex;
  align-items: center;
  gap: 24px;
}
.mail-img{
  display: block;
  margin: -100px;
  max-width: 500px;
  width: 100%;
}
.contact-mail a{
  font-size: 1.8em;
  color: #1D1F45;
  text-decoration: none;
  letter-spacing: 0.05em;
  margin-top: 110px;
}
.contact-info{
  margin-top: 60px;
  font-size: 1.6em;
}
.contact-cat{
  position: absolute;
  right: 20%;
  top: 55%;
  width: 100px;
  height: auto;
}

@media (max-width: 768px){
  .contact-mail{
    margin-top: 120px;
  }
  .contact-mail img{
    width: 220px;
  }
  .mail-row img{
    width: 60px;
    top: 46%;
    right: 5%;
  }
  .contact-mail a {
    font-size: 1.4em;
  }
}

/* 問い合わせボタン */
.contact-btn {
  display: inline-block;
  padding: 16px 48px;
  margin-top: 100px;
  background-color: #6f7f99; /* 青 */
  color: #fff;
  font-size: 1.6rem;
  letter-spacing: 0.1em;
  text-decoration: none;
  border-radius: 12px;
  transition: 
    background-color 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.contact-btn:hover {
  background-color: #C993A8; /* ピンク */
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

@media screen and (max-width: 768px){
  .contact-btn{
    padding: 10px 24px;
    font-size: 1.2rem;
    border-radius: 999px;
    letter-spacing: 0.05em;
    transform: translateY(-15px); /* 上に移動 */
    margin-top: 30px;
  }
}


/* ---------- footer ---------- */
footer{
  position: relative;
  height: 470px;          /* ← 見せたい高さ */
  overflow: hidden;       /* ← 下を切る */
  text-align: center;
  margin-top: -55px;
  padding-top: 55px;
}
.earth{
  width: 100%;
  height: auto;
  display: block;
  animation: spin 60s linear infinite;
}
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
footer .message{
  position: absolute;
  top: 70%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1rem;
  color: #1D1F45;
  letter-spacing: 0.05em;
}
small{
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7em;
}

@media screen and (max-width: 768px){
  footer{
    overflow: hidden;
    height: 200px;
  }
  footer .message{
    font-size: 0.6em;
  }
  .about-text,.coding p,.design p,.other p{
    font-size: 0.7em;
  }
}
