/* ======================================
   SENBA's Homepage
   平成レトロ × Vaporwave Style
   ====================================== */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=DotGothic16&family=Press+Start+2P&family=Zen+Maru+Gothic:wght@400;700&display=swap');

/* --- CSS Variables --- */
:root {
  --color-bg: #1a0a2e;
  --color-bg-deep: #0d0521;
  --color-pink: #ff6ec7;
  --color-pink-light: #ffb3e6;
  --color-cyan: #00fff9;
  --color-cyan-dim: #00b8b4;
  --color-purple: #bf5fff;
  --color-purple-deep: #6a0dad;
  --color-yellow: #ffe566;
  --color-card-bg: rgba(30, 10, 60, 0.7);
  --color-card-border: rgba(191, 95, 255, 0.4);
  --color-text: #e8d5f5;
  --color-text-dim: #b8a0cc;
  --font-pixel: 'Press Start 2P', 'DotGothic16', monospace;
  --font-body: 'Zen Maru Gothic', 'DotGothic16', sans-serif;
  --font-dot: 'DotGothic16', monospace;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.7;
}

/* --- Background Effects --- */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(rgba(191, 95, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(191, 95, 255, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.08) 0px,
    rgba(0, 0, 0, 0.08) 1px,
    transparent 1px,
    transparent 3px
  );
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(
    ellipse at 50% 0%,
    rgba(191, 95, 255, 0.15) 0%,
    rgba(255, 110, 199, 0.05) 40%,
    transparent 70%
  );
  pointer-events: none;
}

/* --- Banner Clock --- */
.banner-clock {
  position: absolute;
  top: 8px;
  right: 0;
}

.banner-gif {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  height: 40px
}

/* --- Container --- */
.container {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

/* --- Marquee --- */
.marquee-wrap {
  overflow: hidden;
  background: linear-gradient(90deg, var(--color-purple-deep), rgba(106, 13, 173, 0.3));
  border-bottom: 2px solid var(--color-pink);
  padding: 6px 0;
}

.marquee {
  display: flex;
  white-space: nowrap;
  animation: marquee-scroll 18s linear infinite;
  font-family: var(--font-dot);
  font-size: 0.8rem;
  color: var(--color-cyan);
  text-shadow: 0 0 8px rgba(0, 255, 249, 0.6);
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* --- Header --- */
header {
  text-align: center;
  padding-top: 8px;
}

.title-block {
  position: relative;
  padding: 32px 0 16px;
}

.title-deco {
  display: block;
  font-size: 0.75rem;
  color: var(--color-pink-light);
  letter-spacing: 0.15em;
  animation: twinkle 2s ease-in-out infinite alternate;
}

@keyframes twinkle {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

h1 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.title-main {
  font-family: var(--font-pixel);
  font-size: clamp(1.2rem, 5vw, 1.8rem);
  line-height: 1.6;
  background: linear-gradient(
    180deg,
    var(--color-cyan) 0%,
    var(--color-pink) 50%,
    var(--color-yellow) 100%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px rgba(255, 110, 199, 0.5));
  letter-spacing: 0.05em;
}

.subtitle {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  color: var(--color-cyan);
  letter-spacing: 0.5em;
  margin-top: 12px;
  text-shadow: 0 0 10px rgba(0, 255, 249, 0.5);
}

.header-decoration {
  margin-top: 8px;
}

.hr-gif {
  max-width: 100%;
  height: 16px;
  image-rendering: pixelated;
  opacity: 0.6;
}

/* --- Profile Card --- */
.profile-nav {
  margin: 24px 0;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  border-radius: 12px;
  padding: 16px 20px;
  backdrop-filter: blur(8px);
  box-shadow:
    0 0 15px rgba(191, 95, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.avatar-frame {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-pink), var(--color-purple), var(--color-cyan));
  padding: 3px;
  box-shadow: 0 0 12px rgba(255, 110, 199, 0.4);
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--color-bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  overflow: hidden;
}

.avatar-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.handle {
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  color: var(--color-pink);
  text-shadow: 0 0 8px rgba(255, 110, 199, 0.5);
}

.bio {
  font-size: 0.85rem;
  color: var(--color-text-dim);
  margin-top: 4px;
  line-height: 1.6;
}

/* --- Link Sections --- */
.link-section {
  margin-bottom: 28px;
}

.section-title {
  font-family: var(--font-dot);
  font-size: 0.9rem;
  color: var(--color-cyan);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 0 8px rgba(0, 255, 249, 0.4);
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--color-cyan-dim), transparent);
}

.section-icon {
  font-size: 1rem;
}

/* --- Link List --- */
.link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* --- Link Card --- */
.link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--color-text);
  transition: all 0.25s ease;
  backdrop-filter: blur(6px);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  position: relative;
  overflow: hidden;
}

.link-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 110, 199, 0.08),
    rgba(0, 255, 249, 0.05)
  );
  opacity: 0;
  transition: opacity 0.25s ease;
}

.link-card:hover,
.link-card:focus-visible {
  border-color: var(--color-pink);
  transform: translateY(-2px);
  box-shadow:
    0 4px 20px rgba(255, 110, 199, 0.25),
    0 0 30px rgba(191, 95, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.link-card:hover::before,
.link-card:focus-visible::before {
  opacity: 1;
}

.link-card:active {
  transform: translateY(0);
}

.link-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
}

.link-icon img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.link-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.link-name {
  font-family: var(--font-dot);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
}

.link-card:hover .link-name {
  color: var(--color-pink-light);
}

.link-desc {
  font-size: 0.75rem;
  color: var(--color-text-dim);
}

.link-arrow {
  flex-shrink: 0;
  font-size: 0.6rem;
  color: var(--color-purple);
  transition: transform 0.25s ease, color 0.25s ease;
}

.link-card:hover .link-arrow {
  transform: translateX(4px);
  color: var(--color-pink);
}

/* --- Footer --- */
footer {
  margin-top: 48px;
  text-align: center;
  padding: 24px 0;
  border-top: 1px solid rgba(191, 95, 255, 0.2);
}

.footer-deco {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  color: var(--color-purple);
  letter-spacing: 0.3em;
  margin-bottom: 8px;
}

.copyright {
  font-size: 0.7rem;
  color: var(--color-text-dim);
}

.footer-stars {
  font-size: 0.7rem;
  color: var(--color-pink-light);
  margin-top: 8px;
  animation: twinkle 2s ease-in-out infinite alternate;
}

/* --- Responsive --- */
@media (max-width: 480px) {
  .container {
    padding: 0 10px 32px;
  }

  .title-main {
    font-size: 1.1rem;
  }

  .profile-card {
    padding: 12px 14px;
    gap: 12px;
  }

  .avatar-frame {
    width: 52px;
    height: 52px;
  }

  .avatar-placeholder {
    font-size: 1.4rem;
  }

  .link-card {
    padding: 12px 14px;
    gap: 10px;
  }

  .link-icon {
    font-size: 1.2rem;
    width: 30px;
  }

  .link-name {
    font-size: 0.85rem;
  }
}

@media (min-width: 768px) {
  .container {
    padding: 0 24px 64px;
  }

  .title-block {
    padding: 48px 0 24px;
  }

  .profile-card {
    padding: 20px 28px;
  }
}

/* --- Accessibility: reduce motion --- */
@media (prefers-reduced-motion: reduce) {
  .marquee {
    animation: none;
  }

  .title-deco,
  .footer-stars {
    animation: none;
  }

  .link-card {
    transition: none;
  }

  .link-card:hover {
    transform: none;
  }

  .link-arrow {
    transition: none;
  }
}
