/* ============================================================
   Community Feed — Seismic's Limbo
   "Fault Line" design system — not generic glass slop
   ============================================================ */

/* ---- Page header ---- */
.page-head {
  max-width: 760px;
  margin: 104px auto 0;
  padding: 0 24px;
  text-align: center;
}
.page-head .section-tag {
  display: inline-block;
  font-family: var(--font-chumbi-title);
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  margin: 0 0 16px;
  padding: 6px 16px;
  border: 1px solid rgba(143,216,209,0.28);
  border-radius: 999px;
  background: rgba(143,216,209,0.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 0 22px rgba(143,216,209,0.12);
}
.page-head-title {
  font-family: var(--font-chumbi-title);
  font-weight: 400;
  font-size: clamp(38px, 7vw, 62px);
  line-height: 1.02;
  color: #f6fdfc;
  margin: 0;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 30px rgba(0,0,0,0.55), 0 0 60px rgba(143,216,209,0.10);
}
.page-head-sub {
  margin: 18px auto 0;
  max-width: 560px;
  color: #8b9b4;
  font-family: var(--font-chumbi-copy);
  font-size: 15.5px;
  line-height: 1.62;
}

/* ---- Feed column ---- */
.feed-wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 64px;
}
.feed-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
/* The Fault Line — a living seismic fracture down the spine */
.feed-timeline::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(143,216,209,0.30) 0px,
      rgba(143,216,209,0.30) 9px,
      transparent 9px,
      transparent 18px
    );
  box-shadow:
    0 0 9px rgba(143,216,209,0.35),
    0 0 22px rgba(143,216,209,0.12);
  border-radius: 2px;
  pointer-events: none;
  animation: faultPulse 4.2s ease-in-out infinite;
}
@keyframes faultPulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}

/* ---- Post card ---- */
.post {
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 16px;
  padding: 16px 14px 14px;
  border-radius: 18px;
  border: 1px solid rgba(143,216,209,0.03);
  background: linear-gradient(180deg, rgba(255,255,255,0.012), rgba(143,216,209,0.008));
  box-shadow: none;
  backdrop-filter: blur(11px) saturate(1.08);
  -webkit-backdrop-filter: blur(11px) saturate(1.08);
  overflow: hidden;
  transition: transform .3s var(--ease), background .3s ease, border-color .3s ease;
}
/* seismic station node — pulses on the fault line */
.post::after {
  content: "";
  position: absolute;
  left: 27px;
  top: 24px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #bdfff6, var(--accent) 70%);
  border: 2px solid #06191a;
  box-shadow: 0 0 0 3px rgba(143,216,209,0.4), 0 0 14px rgba(143,216,209,0.7);
  transform: translateX(-5px);
}
.post:hover {
  transform: translateY(-3px);
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(143,216,209,0.018));
  border-color: rgba(143,216,209,0.07);
}

.post-avatar-col {
  position: relative;
  z-index: 1;
}
.post-avatar {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  object-fit: cover;
  display: block;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 8px 22px rgba(0,0,0,0.45), 0 0 0 1px rgba(143,216,209,0.22);
}
.post-body { min-width: 0; }

.post-head {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.post-name {
  font-family: var(--font-chumbi-title);
  font-size: 16.5px;
  font-weight: 700;
  color: #eef9f6;
  letter-spacing: -0.005em;
}
.post-handle {
  font-family: var(--font-chumbi-copy);
  font-size: 13.5px;
  color: #7d8a86;
}
.post-dot { color: #5a6a64; }
.post-time {
  font-family: var(--font-chumbi-copy);
  font-size: 13px;
  color: #7d8a86;
}
/* "Magnitude" featured badge — a big quake, not a generic pill */
.post-badge {
  margin-left: auto;
  font-family: var(--font-chumbi-title);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffd9c4;
  background: linear-gradient(135deg, #ff6b3a, #ff3d2e);
  border: 1px solid rgba(255,120,80,0.5);
  border-radius: 8px;
  padding: 4px 11px;
  box-shadow: 0 4px 16px rgba(255,80,50,0.4), inset 0 1px 0 rgba(255,255,255,0.28);
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}

.post-text {
  margin: 11px 0 0;
  font-family: var(--font-chumbi-copy);
  font-size: 15px;
  line-height: 1.62;
  color: #c9d8d3;
  overflow-wrap: anywhere;
}

/* optional media */
.post-media {
  margin-top: 13px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid transparent;
  box-shadow: none;
}
.post-media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 380px;
  object-fit: cover;
}
.post-video {
  display: block;
  width: 100%;
  max-height: 380px;
  background: #000;
}

/* ---- engagement row ---- */
.post-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 15px;
  font-family: var(--font-chumbi-copy);
  font-size: 13px;
  color: #8d9d3;
}
.post-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .2s ease;
}
.post-stat svg { width: 16px; height: 16px; display: block; }
.post-stat:hover { color: #eef9f6; }
.post-stat.s-reply:hover { color: #8fd8d1; }
.post-stat.s-repost:hover { color: #6ee7a0; }
.post-stat.s-like:hover { color: #ff6b8e; }
.post-stat.s-view { margin-left: auto; color: #6a7a73; }

.post-view-x {
  margin-left: 4px;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px 9px 14px;
  font-family: var(--font-chumbi-title);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff4ee;
  background: linear-gradient(135deg, #ff7a3c 0%, #ff3d2e 55%, #d6284d 100%);
  border: 1px solid rgba(255,150,110,0.5);
  border-radius: 3px 13px 3px 13px;
  text-decoration: none;
  overflow: hidden;
  box-shadow: 0 6px 18px -6px rgba(255,80,50,0.55), inset 0 1px 0 rgba(255,255,255,0.32);
  transition: transform .2s var(--ease), box-shadow .25s ease, filter .2s ease;
}
.post-view-x svg { width: 15px; height: 15px; display: block; flex: none; }
.post-view-x::after {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.45), transparent);
  transform: skewX(-20deg);
  transition: left .55s ease;
}
.post-view-x:hover {
  transform: translateY(-2px) rotate(-1deg);
  filter: brightness(1.07);
  box-shadow: 0 14px 30px -6px rgba(255,80,50,0.7), inset 0 1px 0 rgba(255,255,255,0.32);
}
.post-view-x:hover::after { left: 120%; }
.post-view-x:active { transform: translateY(0) scale(0.95); }

/* ---- Numbered pager (transparent, no boxes) ---- */
.feed-pager-wrap {
  display: flex;
  justify-content: center;
  padding: 38px 0 64px;
}
.feed-pager {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.pg-btn {
  min-width: 22px;
  height: 28px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-chumbi-title);
  font-size: 15px;
  font-weight: 600;
  color: #8b9b94;
  background: transparent;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: color .2s ease, transform .18s var(--ease);
}
.pg-btn:hover:not(.disabled):not(.active) {
  color: var(--accent);
  transform: translateY(-2px);
}
.pg-btn.active {
  color: #fff;
  background: transparent;
  cursor: default;
  position: relative;
}
.pg-btn.active::after {
  content: "";
  position: absolute;
  left: 4px; right: 4px; bottom: -3px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), #7fe0d6);
  box-shadow: 0 0 10px rgba(143,216,209,0.6);
}
.pg-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.pg-ellipsis {
  color: #5a6a64;
  padding: 0 2px;
  font-size: 14px;
  user-select: none;
}

/* truncated text + read more */
.post-text.post-trunc { max-height: 4.6em; overflow: hidden; -webkit-line-clamp: 3; display: -webkit-box; -webkit-box-orient: vertical; }
.post-readmore {
  display: inline-block;
  margin: 8px 0 0;
  padding: 0;
  font-family: var(--font-chumbi-title);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  transition: color .2s ease, letter-spacing .2s ease;
}
.post-readmore:hover { color: #bdfff6; letter-spacing: 0.06em; }

/* ---- Detail modal ---- */
.post-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 64px 18px;
  background: rgba(3,8,9,0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .26s ease, visibility .26s ease;
  overflow-y: auto;
}
.post-modal.open { opacity: 1; visibility: visible; }
.modal-card {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: auto;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,0.85), inset 0 1px 0 rgba(255,255,255,0.06);
  padding: 26px 26px 22px;
  transform: translateY(18px) scale(0.98);
  transition: transform .28s var(--ease);
}
.post-modal.open .modal-card { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(143,216,209,0.24);
  background: rgba(143,216,209,0.06);
  color: #cfe9e6;
  font-size: 15px;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.modal-close:hover { background: rgba(143,216,209,0.16); border-color: var(--accent); transform: rotate(90deg); }
.modal-head { display: flex; align-items: center; gap: 13px; padding-right: 40px; }
.modal-avatar { width: 52px; height: 52px; border-radius: 15px; object-fit: cover; border: 1px solid rgba(255,255,255,0.14); box-shadow: 0 6px 18px rgba(0,0,0,0.4); }
.modal-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.modal-name { font-family: var(--font-chumbi-title); font-size: 16.5px; font-weight: 700; color: #eef9f6; }
.modal-handle { font-family: var(--font-chumbi-copy); font-size: 13px; color: #7d8a86; }
.modal-text {
  margin: 16px 0 0;
  font-family: var(--font-chumbi-copy);
  font-size: 15.5px;
  line-height: 1.66;
  color: #d2e0db;
  overflow-wrap: anywhere;
}
.modal-media { margin-top: 16px; border-radius: 15px; overflow: hidden; border: 1px solid rgba(143,216,209,0.16); }
.modal-media img, .modal-video { display: block; width: 100%; max-height: 460px; object-fit: cover; background: #000; }
.modal-actions {
  display: flex; align-items: center; gap: 22px;
  margin-top: 18px;
  font-family: var(--font-chumbi-copy);
  font-size: 13px;
  color: #8d9d3;
}


/* ---- scroll reveal ---- */
.post { opacity: 1; transform: translateY(0); }
@supports (animation-timeline: view()) {
  .post {
    animation: feedReveal linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 26%;
  }
  @keyframes feedReveal {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .page-head { margin-top: 96px; padding: 0 18px; }
  .page-head-title { font-size: clamp(32px, 9vw, 44px); }
  .page-head-sub { font-size: 14px; }
  .feed-wrap { padding: 28px 12px 52px; }
  .feed-timeline { gap: 16px; }
  .feed-timeline::before { left: 23px; }
  .post {
    grid-template-columns: 46px 1fr;
    gap: 13px;
    padding: 15px 15px 13px;
    border-radius: 17px;
  }
  .post::after { left: 23px; top: 21px; width: 10px; height: 10px; }
  .post-avatar { width: 46px; height: 46px; border-radius: 14px; }
  .post-name { font-size: 15.5px; }
  .post-text { font-size: 14px; }
  .post-actions { gap: 16px; flex-wrap: wrap; }
  .post-view-x { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .post, .post::after, .feed-timeline::before { animation: none !important; transition: none; }
}
