:root {
  --bg: #f7f7f5;
  --text: #111111;
  --muted: #666666;
  --line: #d9d9d9;
  --card: rgba(255, 255, 255, 0.72);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Yu Gothic UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
  /* background:
    linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08)),
    url("images/bg.png"); */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;

  color: var(--text);
  min-height: 100vh;
  line-height: 1.7;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.bg {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08)),
    url("images/bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -1;
}

.container {
  width: 100%;
  max-width: 760px;

  margin-left: 32vw;
}

.card {
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 46px 32px;
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

h1 {
  font-family: "Inter", sans-serif;
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.divider {
  width: 150px;
  height: 1px;
  background: var(--line);
  margin: 0 0 32px;
}

.intro {
  max-width: 560px;
  font-size: 1rem;
  margin-bottom: 40px;
  color: #222222;
}

/* profile */
.profile-header {
  position: relative;
  padding-right: 150px;
}

.name-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar {
  position: absolute;
  right: 50px;
  top: 50%;
  transform: translateY(-50%);
  width: 195px;
  height: 195px;
  border-radius: 50%;
  background-image: url("images/avatar.png");
  background-size: cover;
  background-position: center;
  border: 1px solid #ccc;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* links */
.links {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
}

.link-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.link-item {
  animation: slideFadeIn 0.7s ease forwards;
  opacity: 0;
  transform: translateX(24px);
}

.link-item:nth-child(1) {
  animation-delay: 0.15s;
}

.link-item:nth-child(2) {
  animation-delay: 0.25s;
}

.link-item:nth-child(3) {
  animation-delay: 0.35s;
}

.link-item:nth-child(4) {
  animation-delay: 0.45s;
}

@keyframes slideFadeIn {
  from {
    opacity: 0;
    transform: translateX(24px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.link-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.icon {
  width: 22px;
  text-align: center;
  font-size: 1rem;
  color: #222;
  flex-shrink: 0;
}

.icon-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  opacity: 0.85;
}

/*
.icon-img.vrchat {
  width: 22px;
  height: 22px;

  background-image: url("images/vrchat_logo_tmp.png");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}
*/

.link-item:hover {
  background: rgba(255, 255, 255, 0.78);
  border-color: #aaaaaa;
}

.link-text {
  min-width: 0;
}

.link-label {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: #222;
}

.note-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 14px;
  align-items: start;
}

.link-id {
  font-size: 0.88rem;
  color: #3a3a3a;
  white-space: nowrap;
}

.link-desc {
  font-size: 0.88rem;
  color: #3a3a3a;
  line-height: 1.6;
}

.arrow {
  font-size: 0.9rem;
  color: var(--muted);
  flex-shrink: 0;
  margin-left: 16px;
  opacity: 0.75;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.link-item:hover .arrow {
  transform: translate(3px, -3px);
  opacity: 1;
}

footer {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--muted);
  user-select: none;
}

/* cursor */
#trail-canvas {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
}

/* mobile */
@media (max-width: 760px) {
  .container {
    margin-left: 0;
    max-width: 100%;
  }

  .card {
    width: 100%;
    padding: 42px 22px;
    border-radius: 22px;
  }

  body {
    justify-content: center;
    padding: 16px;
  }

  .profile-header {
    padding-right: 0;
  }

  .avatar {
    position: static;
    transform: none;
    width: 180px;
    height: 180px;
    margin: 16px auto 24px;
    margin-top: 20px;
  }

  .link-item {
    align-items: flex-start;
    gap: 12px;
  }

  .note-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* tablet / iPad */
@media (max-width: 1024px) {
  .container {
    margin-left: 0;
    width: 100%;
    max-width: 720px;
  }

  .card {
    width: 100%;
  }

  body {
    justify-content: center;
    padding: 24px;
  }
}

#loading {
  position: fixed;
  inset: 0;
  background: #f7f7f5;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  transition: opacity 1.3s ease;
}

.loading-text {
  font-family: "Inter", sans-serif;
  color: 111;
  font-size: 2rem;
  letter-spacing: 0.16em;
}

.loading-text span {
  display: inline-block;
  animation: waveText 1.2s ease-in-out infinite;
}

.loading-text span:nth-child(1) { animation-delay: 0s; }
.loading-text span:nth-child(2) { animation-delay: 0.08s; }
.loading-text span:nth-child(3) { animation-delay: 0.16s; }
.loading-text span:nth-child(4) { animation-delay: 0.24s; }
.loading-text span:nth-child(5) { animation-delay: 0.32s; }
.loading-text span:nth-child(6) { animation-delay: 0.40s; }
.loading-text span:nth-child(7) { animation-delay: 0.48s; }
.loading-text span:nth-child(8) { animation-delay: 0.56s; }
.loading-text span:nth-child(9) { animation-delay: 0.64s; }
.loading-text span:nth-child(10) { animation-delay: 0.72s; }

@keyframes waveText {
  0%, 100% {
    transform: translateY(0px);
    opacity: 0.35;
  }

  50% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

#loading.fade-out {
  opacity: 0;
  pointer-events: none;
}