@charset "utf-8";

/* ========== Three.js Canvas ========== */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ========== フェードイン ========== */
.fade-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== サウンド確認ポップアップ ========== */
.sound-popup {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 23, 26, 0.85);
  animation: popupFadeIn 0.5s ease;
}

.sound-popup.closing {
  animation: popupFadeOut 0.4s ease forwards;
}

@keyframes popupFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes popupFadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

.sound-popup-inner {
  text-align: center;
  max-width: 320px;
  padding: 0 24px;
}

.sound-popup-text {
  font-size: 12px;
  line-height: 1.8;
  opacity: 0.7;
  margin: 0 0 32px;
}

.sound-popup-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.sound-popup-btn {
  background: transparent;
  border: 1px solid rgba(184, 185, 186, 0.3);
  color: var(--white);
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 10px 28px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.sound-popup-btn:hover {
  background: rgba(184, 185, 186, 0.08);
  border-color: rgba(184, 185, 186, 0.5);
}

.sound-popup-btn--mute {
  opacity: 0.45;
}

.sound-popup-btn--mute:hover {
  opacity: 0.7;
}

/* ========== サウンドボタン ========== */
.sound-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  background: transparent;
  border: 1px solid rgba(184, 185, 186, 0.2);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--white);
  opacity: 0.4;
  transition: opacity 0.3s ease, border-color 0.3s ease;
}

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

.sound-btn.active {
  opacity: 0.6;
  border-color: rgba(184, 185, 186, 0.4);
}

/* ========== PC ========== */
@media screen and (min-width: 769px) {

  .container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 10vw;
    box-sizing: border-box;
  }

  header {
    max-width: 480px;
  }

  header h2 {
    font-size: 14px;
    margin: 0 0 16px;
  }

  header h1 {
    font-size: 14px;
    margin: 0 0 8px;
  }

  header .role {
    margin: 0 0 48px;
    opacity: 0.6;
  }

  header .skills {
    margin: 0 0 48px;
  }

  header dl {
    margin: 0 0 20px;
  }

  header dt {
    margin: 0 0 4px;
    opacity: 0.5;
  }

  header dd {
    letter-spacing: 0;
    line-height: 1.6;
  }

  header .copy-email {
    cursor: pointer;
    color: var(--white);
    text-decoration: underline;
    letter-spacing: 0;
  }

  header .copy-email:hover {
    text-decoration: none;
  }

  header .copy-notification {
    position: fixed;
    background: var(--black);
    color: var(--white);
    padding: 4px 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 9999;
    letter-spacing: 0;
  }

  header .copy-notification.show {
    opacity: 1;
    pointer-events: auto;
  }

  footer {
    position: fixed;
    bottom: 48px;
    left: 10vw;
    z-index: 1;
  }

  footer p {
    letter-spacing: 0;
    opacity: 0.4;
  }
}

/* ========== SP ========== */
@media screen and (max-width: 768px) {

  .container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 24px;
    box-sizing: border-box;
  }

  h1, h2, h3, h4, h5, p, div, ul, ol, dl {
    font-size: 11px;
  }

  header h2 {
    font-size: 13px;
    margin: 0 0 12px;
  }

  header h1 {
    font-size: 13px;
    margin: 0 0 4px;
  }

  header .role {
    margin: 0 0 36px;
    opacity: 0.6;
  }

  header .skills {
    margin: 0 0 36px;
  }

  header dl {
    margin: 0 0 16px;
  }

  header dt {
    margin: 0 0 2px;
    opacity: 0.5;
  }

  header dd {
    letter-spacing: 0;
    line-height: 1.6;
  }

  header br {
    display: none;
  }

  header .copy-email {
    cursor: pointer;
    color: var(--white);
    text-decoration: underline;
    letter-spacing: 0;
  }

  header .copy-email:hover {
    text-decoration: none;
  }

  header .copy-notification {
    position: fixed;
    background: var(--black);
    color: var(--white);
    padding: 4px 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 9999;
    letter-spacing: 0;
  }

  header .copy-notification.show {
    opacity: 1;
    pointer-events: auto;
  }

  footer {
    margin: 64px 0 0;
  }

  footer p {
    letter-spacing: 0;
    opacity: 0.4;
  }

  .sound-btn {
    bottom: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
  }
}
