:root {
  color-scheme: light dark;
  --bg: #f5f5f7;
  --bg-2: #ececf1;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --line: rgba(15, 23, 42, 0.08);
  --text: #0f172a;
  --muted: rgba(15, 23, 42, 0.66);
  --faint: rgba(15, 23, 42, 0.42);
  --accent: #0a84ff;
  --accent-2: #64d2ff;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  --radius-xl: 36px;
  --radius-lg: 28px;
  --radius-md: 22px;
  --max: 1240px;
}

html[data-theme="dark"] {
  --bg: #060913;
  --bg-2: #0a0f1c;
  --surface: rgba(10, 15, 26, 0.72);
  --surface-strong: rgba(12, 18, 32, 0.92);
  --line: rgba(255, 255, 255, 0.1);
  --text: rgba(245, 248, 255, 0.96);
  --muted: rgba(224, 231, 255, 0.7);
  --faint: rgba(224, 231, 255, 0.46);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 10%, rgba(10, 132, 255, 0.12), transparent 28%),
    radial-gradient(circle at 80% 0%, rgba(100, 210, 255, 0.08), transparent 24%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 300ms ease, color 300ms ease;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
}

.ambient,
.starfield {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.ambient {
  filter: blur(28px);
  opacity: 0.75;
}

.ambient-a {
  background: radial-gradient(circle at 16% 18%, rgba(10, 132, 255, 0.16), transparent 32%);
}

.ambient-b {
  background: radial-gradient(circle at 88% 14%, rgba(100, 210, 255, 0.12), transparent 28%);
}

.starfield {
  opacity: 0.2;
}

html[data-theme="dark"] .starfield {
  opacity: 0.45;
}

.star-dot {
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.28);
  animation: floatUp linear infinite, twinkle 4s ease-in-out infinite;
}

.topbar {
  position: sticky;
  top: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  margin-top: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
}

.brand {
  display: grid;
  gap: 2px;
}

.brand-name {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-sub,
.nav {
  color: var(--muted);
  font-size: 0.92rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.nav a,
.button {
  transition: transform 180ms ease, opacity 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.nav a:hover,
.button:hover {
  transform: translateY(-1px);
}

.hero,
.section,
.footer {
  padding-top: 88px;
}

.hero {
  min-height: calc(100vh - 120px);
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: center;
  gap: 36px;
  padding-top: 56px;
}

.eyebrow,
.section-head p,
.card-kicker {
  margin: 0 0 10px;
  color: var(--faint);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(4.2rem, 10vw, 7.8rem);
  line-height: 0.92;
  letter-spacing: -0.07em;
}

.hero-lead {
  margin: 14px 0 10px;
  font-size: clamp(1.16rem, 1.9vw, 1.55rem);
  color: var(--muted);
}

.slogan {
  margin: 0 0 18px;
  font-size: clamp(1.18rem, 2vw, 1.8rem);
  color: var(--text);
}

.hero-text {
  max-width: 60ch;
  margin: 0 0 26px;
  color: var(--muted);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
}

.button-primary {
  color: white;
  background: linear-gradient(135deg, #0a84ff, #64d2ff);
  box-shadow: 0 14px 28px rgba(10, 132, 255, 0.22);
}

.button-secondary {
  background: var(--surface);
  border-color: var(--line);
}

.button-ghost {
  background: transparent;
  border-color: var(--line);
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-chips span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(127, 127, 127, 0.08);
  border: 1px solid var(--line);
  color: var(--muted);
}

.hero-visual {
  position: relative;
  min-height: 720px;
}

.poster {
  margin: 0;
  position: absolute;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--surface-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.poster img,
.gallery-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-main {
  inset: 0 0 120px 0;
}

.poster-back {
  right: 18px;
  bottom: 0;
  width: min(58%, 470px);
  aspect-ratio: 1984 / 1274;
  transform: rotate(5deg);
}

.poster-main,
.gallery-shot {
  aspect-ratio: 1984 / 1274;
}

.hero-card {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 2;
  width: min(78%, 340px);
  padding: 18px 20px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.hero-card h2,
.section-head h2,
.card h3,
.qsl-note h3,
.qr-panel h3 {
  margin: 0 0 6px;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.hero-card p,
.card p,
.qsl-note p,
.qr-panel p {
  margin: 0;
  color: var(--muted);
}

.email-line {
  margin: 0;
  font-size: clamp(0.95rem, 1.05vw, 1.06rem);
  line-height: 1.35;
}

.email-line a,
.qr-panel h3 a {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.email-card {
  display: block;
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(127, 127, 127, 0.08);
  border: 1px solid var(--line);
  width: 100%;
}

.profile-grid .email-card,
.contact-grid .email-card {
  grid-column: span 2;
}

.section-head {
  display: grid;
  gap: 4px;
  margin-bottom: 24px;
}

.section-head h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.section-head span {
  color: var(--faint);
}

.grid {
  display: grid;
  gap: 16px;
}

.profile-grid,
.station-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.qsl-note,
.qr-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.card {
  padding: 22px;
  min-height: 154px;
}

.card-wide {
  grid-column: span 2;
}

.gallery-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.gallery-shot {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--surface-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.qsl-note {
  margin-top: 18px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
}

.contact-grid {
  display: grid;
  gap: 16px;
}

.timeline-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.exchange-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.qr-panel {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  align-items: center;
  padding: 20px;
}

.qr-box {
  width: 180px;
  height: 180px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  border-radius: 22px;
  background: rgba(127, 127, 127, 0.08);
  border: 1px solid var(--line);
}

.qr-box span {
  border-radius: 5px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.08));
}

html[data-theme="dark"] .qr-box span {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.14));
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 28px;
  padding-bottom: 42px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin-top: 24px;
}

.footer strong {
  color: var(--text);
}

.footer-brand {
  display: grid;
  gap: 4px;
}

.footer-links {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(127, 127, 127, 0.06);
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  margin: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.card,
.poster,
.gallery-shot,
.qsl-note,
.qr-panel {
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.card:hover,
.poster:hover,
.gallery-shot:hover,
.qsl-note:hover,
.qr-panel:hover {
  transform: translateY(-3px);
  border-color: rgba(10, 132, 255, 0.22);
}

@keyframes floatUp {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-18px);
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.95;
  }
}

@media (max-width: 1080px) {
  .hero,
  .gallery-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual {
    min-height: 640px;
  }

  .profile-grid,
  .station-grid,
  .timeline-grid,
  .exchange-grid,
  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-wide {
    grid-column: span 2;
  }
}

@media (max-width: 760px) {
  .topbar {
    top: 10px;
    border-radius: 26px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav {
    width: 100%;
    justify-content: center;
  }

  .hero,
  .section,
  .footer {
    padding-top: 68px;
  }

  .hero-visual {
    min-height: 520px;
  }

  .poster-main {
    inset: 0;
  }

  .poster-back {
    position: relative;
    right: auto;
    bottom: auto;
    width: 76%;
    margin: 16px 0 0 auto;
    transform: none;
  }

  .hero-card {
    position: relative;
    left: auto;
    bottom: auto;
    width: 100%;
    margin-top: 14px;
  }

  .profile-grid,
  .station-grid,
  .timeline-grid,
  .exchange-grid,
  .contact-grid,
  .card-wide,
  .qr-panel {
    grid-template-columns: 1fr;
  }

  .profile-grid .email-card,
  .contact-grid .email-card {
    grid-column: auto;
  }

  .card-wide {
    grid-column: auto;
  }

  .qsl-note,
  .footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .email-line {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
