@charset "UTF-8";

/* ------------------------------背景------------------------------ */
.back {
  min-height: 100vh;
  width: 100%;
  background-color: #9dd2e5;
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  text-align: center;
  color: #000000;
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.back-img {
  background-image: url(../img/noon/noon_background.webp);
}

/* ------------------------------夜背景------------------------------ */
.night .back {
  background-image: url(../img/night/night_background.webp);
  background-color: #0b1d2a;
  color: #ffffff;
}

.night .cloud {
  display: none;
}

/* ------------------------------雲------------------------------ */
.sky {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: var(--cluds);
  opacity: 0.7;
}

.cloud-layer,
.star-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cloud-layer { 
  z-index: var(--cluds);
 }

.star-layer {
  z-index: var(--stars);
  display: none; 
}

.night .star-layer {
  display: block; 
}


.cloud {
  position: absolute;
  top: 0;
  left: -300px;
  animation-name: cloud-move;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform;
}

@keyframes cloud-move {
  from {
    transform: translateX(-310px);
  }
  to {
    transform: translateX(200vw);
  }
}


/* ------------------------------星------------------------------ */
/* 共通 */
.star {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
}

/* 小さい固定星 */
.star-small {
  width: 2px;
  height: 2px;
  background: white;
  opacity: 0.6;
}

.star-twinkle {
  width: 3px;
  height: 3px;
  background: white;
  border-radius: 50%;
  animation: twinkle 2s infinite alternate ease-in-out;
}

@keyframes twinkle {
  from {
    opacity: 0.2;
    transform: scale(0.7);
  }
  to {
    opacity: 1;
    transform: scale(1.6);
  }
}

.shooting-star {
  position: absolute;
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, white, transparent);
  transform: rotate(45deg);
  animation: shoot 1s linear forwards;
  filter: drop-shadow(0 0 6px white);
}

@keyframes shoot {
  from {
    transform: translate(0, 0) rotate(45deg);
    opacity: 1;
  }
  to {
    transform: translate(400px, 400px) rotate(45deg);
    opacity: 0;
  }
}

.star-layer {
  opacity: 0;
  transition: opacity .6s ease;
}

.night .star-layer {
  opacity: 1;
}

/* ------------------------------テキスト配置------------------------------ */
main {
  display: block;
  padding-top: var(--header-height);
}

section {
  min-height: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start; 
  padding: 6rem 0 4rem;    
}

.text-wrap {
  background-color: rgba(255,255,255,0.25);
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.5;
  max-width: 34em;
  padding: 1.5rem 2rem;
  margin: 0 auto;
  z-index: var(--z-main);
}

.night .text-wrap {
  background-color: rgba(0,0,0,0.25);
}

h2 {
  font-size: 2.2rem;
  font-family: var(--font-body);
  border-bottom: 1px solid #000000;
  margin-bottom: 0.5rem;
  color: #000000;
}

.night h2 {
  border-bottom: 1px solid #ffffff;
}

p {
  font-size: 1.4rem;
  font-family: var(--font-body);
  margin-bottom: 1rem;
  padding-left: 1rem;
  color: #000000;
}

.li-text {
  font-size: 1.4rem;
  font-family: var(--font-body);
  color: #000000;
}

.a-text {
  color: #000000;
}

.night h2,
.night p,
.night .li-text,
.night .li-text,
.night button {
  color: #ffffff;
}

#open {
  font-size: 1.5rem;
  border: 2px solid #000000;
  border-radius: 30%;
  margin-top: 2rem;
  font-family: var(--font-body);
}

.night  #open {
  border: 2px solid #ffffff;
}

#close {
  font-size: 1.5rem;
  border: 2px solid #000000;
  border-radius: 30%;
  margin-top: 0.5rem;
  font-family: var(--font-body);
}

.night  #close {
  border: 2px solid #ffffff;
}

#work-github a {
  font-size: 1.5rem;
  color: #000000;
  font-family: var(--font-body);
}

.night #work-github a {
  color: #ffffff;
}

/* ------------------------------ポップアップ------------------------------ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: var(--slide-menu);
}

.hidden {
  display: none;
}

.modal-content {
  background-color: rgba(255,255,255,0.95);
  padding: 30px;
  border-radius: 10px;

  width: min(90%, 600px);

  max-height: 80vh;      /* ★ 画面内に収める */
  overflow-y: auto;      /* ★ スクロール許可 */

  -webkit-overflow-scrolling: touch; /* スマホ用なめらかスクロール */
}

.night .modal-content {
  background-color: rgba(0,0,0,0.9);
}

/* ------------------------------PC画面------------------------------ */
@media (min-width: 800px) {
  main {
    height: 100vh;
  }
}