:root {
  --social-navy: #07192f;
  --social-ink: #06101d;
  --social-blue: #0c315e;
  --social-cyan: #53d7ff;
  --social-paper: #f3eee5;
  --social-coral: #ff6534;
  --social-white: #f7fbff;
  --social-muted: #9eb0c3;
  --social-line: rgba(255, 255, 255, 0.16);
  --social-paper-line: rgba(11, 29, 42, 0.14);
}

* { box-sizing: border-box; }

html {
  color-scheme: dark;
  background: var(--social-ink);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--social-ink);
  color: var(--social-white);
  font-family: Inter, "Noto Sans TC", system-ui, sans-serif;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 20;
  padding: 12px 16px;
  background: var(--social-white);
  color: var(--social-ink);
}

.skip-link:focus { top: 12px; }

.social-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px clamp(20px, 4vw, 64px);
  border-bottom: 1px solid var(--social-line);
  background: linear-gradient(180deg, rgba(2, 10, 20, .9), rgba(2, 10, 20, .45));
  backdrop-filter: blur(14px);
}

.social-brand,
.social-follow {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.social-brand {
  min-width: 0;
  gap: 10px;
}

.social-brand span,
.social-kicker {
  color: var(--social-cyan);
  font-size: .72rem;
  letter-spacing: .16em;
}

.social-brand b,
.social-brand span {
  white-space: nowrap;
}

.social-follow {
  border: 1px solid var(--social-line);
  border-radius: 999px;
  padding: 0 16px;
  white-space: nowrap;
}

.social-feed {
  min-height: 100svh;
  padding: clamp(112px, 13vw, 180px) clamp(20px, 6vw, 96px) clamp(64px, 9vw, 130px);
  background:
    radial-gradient(circle at 88% 8%, rgba(255, 101, 52, .2), transparent 28rem),
    linear-gradient(180deg, var(--social-ink), var(--social-navy) 44%, #0a1524);
}

.social-feed-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  width: min(1280px, 100%);
  margin: 0 auto;
}

.social-feed h1 {
  margin: 8px 0 0;
  font: 400 clamp(2.6rem, 6vw, 6rem)/1 Georgia, "Noto Serif TC", serif;
  letter-spacing: 0;
}

.social-status,
.social-empty {
  width: min(1280px, 100%);
  margin: 18px auto 0;
  color: var(--social-muted);
}

.social-rail {
  width: min(1280px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  grid-auto-flow: dense;
  gap: clamp(16px, 2vw, 26px);
  padding: 28px 0 0;
}

.social-card {
  min-height: 420px;
  display: grid;
  align-content: start;
  border: 1px solid var(--social-paper-line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--social-paper);
  color: var(--social-ink);
  text-decoration: none;
  box-shadow: 0 22px 60px rgba(2, 10, 20, .28);
}

.social-card:nth-child(6n + 1) {
  grid-column: span 2;
}

.social-card:nth-child(6n + 1) .social-card-media {
  aspect-ratio: 16 / 10;
}

.social-card:nth-child(6n + 4) {
  grid-row: span 2;
}

.social-card:nth-child(6n + 4) .social-card-media {
  aspect-ratio: 4 / 6;
}

.social-card-media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--social-blue);
}

.social-card-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .5s ease;
}

.social-card-copy {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.social-card-copy p {
  margin: 0;
  line-height: 1.62;
}

.social-card-type {
  color: var(--social-coral);
  font-size: .72rem;
  letter-spacing: .14em;
}

.social-card-link {
  color: var(--social-blue);
  font-size: .9rem;
}

.social-card:hover .social-card-media img {
  transform: scale(1.025);
}

.social-load-more {
  grid-column: 1 / -1;
  min-height: 52px;
  justify-self: center;
  border: 1px solid var(--social-line);
  border-radius: 999px;
  padding: 0 22px;
  background: rgba(255, 255, 255, .06);
  color: var(--social-white);
  font: inherit;
  cursor: pointer;
}

.social-empty a {
  color: var(--social-cyan);
}

.social-card-skeleton {
  pointer-events: none;
  background: rgba(255, 255, 255, .04);
}

.social-card-skeleton .social-card-media,
.social-skeleton-line {
  background: linear-gradient(100deg, rgba(83, 215, 255, .08) 25%, rgba(255, 255, 255, .13) 45%, rgba(83, 215, 255, .08) 65%);
  background-size: 220% 100%;
  animation: social-skeleton 1.4s ease-in-out infinite;
}

.social-skeleton-line {
  display: block;
  width: 100%;
  height: 12px;
  margin: 10px 0;
  border-radius: 999px;
}

.social-skeleton-short { width: 42%; }

@keyframes social-skeleton {
  to { background-position-x: -220%; }
}

:focus-visible {
  outline: 3px solid var(--social-cyan);
  outline-offset: 4px;
}

@media (max-width: 900px) {
  .social-feed-head {
    align-items: start;
    flex-direction: column;
  }

  .social-rail {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  }

  .social-card:nth-child(6n + 1),
  .social-card:nth-child(6n + 4) {
    grid-column: auto;
    grid-row: auto;
  }

  .social-card:nth-child(6n + 1) .social-card-media,
  .social-card:nth-child(6n + 4) .social-card-media {
    aspect-ratio: 4 / 5;
  }
}

@media (max-width: 760px) {
  .social-rail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .social-header {
    min-height: 64px;
  }

  .social-brand span {
    display: none;
  }

  .social-follow {
    padding-inline: 12px;
    font-size: .78rem;
  }

  .social-feed {
    padding: 112px 16px 72px;
  }

  .social-feed h1 {
    font-size: clamp(2.4rem, 12vw, 3.8rem);
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
