:root {
  --bg: #050505;
  --bg-soft: #0d0d0d;
  --panel: rgba(12, 12, 12, 0.82);
  --panel-strong: rgba(18, 18, 18, 0.92);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f3f3f3;
  --muted: #bdbdbd;
  --muted-2: #878787;
  --red: #c40000;
  --red-bright: #ff2a2a;
  --red-deep: #5f0000;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.38);
  --radius: 22px;
  --radius-sm: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background:
    radial-gradient(circle at 50% 15%, rgba(140, 0, 0, 0.08), transparent 28%),
    radial-gradient(circle at 50% 100%, rgba(90, 0, 0, 0.08), transparent 34%),
    linear-gradient(180deg, #050505 0%, #070707 45%, #040404 100%);
  color: var(--text);
  overflow-x: hidden;
  position: relative;
  z-index: 0;
}

/* atmospheric layers */
#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.smoke-system {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.overlay-noise {
  position: fixed;
  inset: 0;
  background:
    url("https://grainy-gradients.vercel.app/noise.svg"),
    linear-gradient(rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.03));
  opacity: 0.14;
  pointer-events: none;
  z-index: 2;
}

/* content sits above atmosphere */
header,
.hero,
.main-grid,
.archive-feature,
.submit,
footer {
  position: relative;
  z-index: 3;
}

/* header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 28px 36px;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(4px);
}

.logo {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 0.95;
  color: var(--red-bright);
  text-shadow: 0 0 18px rgba(255, 42, 42, 0.16);
}

.logo span {
  display: inline-block;
  margin-top: 8px;
  color: #ffffff;
  font-size: 14px;
  letter-spacing: 0.35em;
  font-weight: 600;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

nav a {
  text-decoration: none;
  color: #d0d0d0;
  font-size: 0.96rem;
  letter-spacing: 0.06em;
  transition: color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

nav a:hover {
  color: #fff;
  transform: translateY(-1px);
}

/* hero */
.hero {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.15fr);
  align-items: stretch;
  gap: 42px;
  padding: 72px 36px 44px;
}

.hero-left,
.hero-right,
.latest,
.series,
.mostread,
.archive-big,
.archive-card,
.submit {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0)),
    var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

.hero-left {
  padding: 34px 30px;
  border-radius: var(--radius);
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.label {
  display: inline-flex;
  align-self: flex-start;
  margin-bottom: 18px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 42, 42, 0.18);
  border-radius: 999px;
  background: rgba(100, 0, 0, 0.16);
  color: #ffd6d6;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.94;
  letter-spacing: 0.03em;
}

.hero p {
  margin: 0;
  max-width: 42ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.hero-right {
  border-radius: 30px;
  min-height: 420px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 35%, rgba(120, 0, 0, 0.22), transparent 18%),
    radial-gradient(circle at 52% 52%, rgba(255, 255, 255, 0.045), transparent 20%),
    linear-gradient(180deg, #121212, #090909);
}

.hero-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 26px;
}

.hero-right::before,
.hero-right::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-right::before {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 40%),
    linear-gradient(180deg, transparent 60%, rgba(255, 42, 42, 0.05) 100%);
}

.hero-right::after {
  inset: 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* buttons */
button,
.section-btn {
  appearance: none;
  border: 1px solid rgba(255, 42, 42, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 42, 42, 0.12), rgba(110, 0, 0, 0.22)),
    rgba(18, 18, 18, 0.88);
  color: #fff;
  padding: 13px 20px;
  border-radius: 999px;
  font-size: 0.92rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.hero button {
  margin-top: 24px;
  align-self: flex-start;
}

button:hover,
.section-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(160, 0, 0, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 42, 42, 0.18), rgba(140, 0, 0, 0.26)),
    rgba(22, 22, 22, 0.96);
}

/* main grid */
.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr) minmax(240px, 1fr);
  gap: 28px;
  padding: 18px 36px 64px;
}

.latest,
.series,
.mostread {
  border-radius: var(--radius);
  padding: 26px 22px;
  min-width: 0;
}

.latest h2,
.series h2,
.mostread h2,
.archive-feature h2,
.submit h2 {
  margin: 0 0 18px;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.story-card,
.series-card,
.archive-big,
.archive-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--border);
  background:
    var(--story-bg, radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.03), transparent 20%)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0)),
    rgba(17, 17, 17, 0.94);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.story-card::before,
.series-card::before,
.archive-big::before,
.archive-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.1) 36%, rgba(0, 0, 0, 0.15)),
    linear-gradient(180deg, transparent 55%, rgba(255, 42, 42, 0.14) 100%);
  pointer-events: none;
}

.story-card {
  display: flex;
  align-items: end;
  height: 108px;
  margin-bottom: 16px;
  padding: 14px;
}

.story-card h3,
.series-card h3 {
  position: relative;
  z-index: 2;
  margin: 0;
  color: #fff;
  font-size: 1rem;
  line-height: 1.2;
  max-width: 18ch;
}

.series-card {
  display: flex;
  align-items: end;
  height: 340px;
  padding: 14px;
}

.series-slider {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  width: 100%;
  margin: 0 auto;
}

.series-track {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 100%;
  transition: transform 380ms ease;
}

.series-slider .series-card {
  flex: 0 0 100%;
  margin: 0;
  min-height: 340px;
  height: 340px;
}

.series-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(8, 8, 8, 0.72);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: grid;
  place-items: center;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.series-btn:hover {
  transform: translateY(-50%) scale(1.03);
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(130, 0, 0, 0.3);
}

.series-prev {
  left: 6px;
}

.series-next {
  right: 6px;
}

.series-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding-top: 6px;
  margin-top: 12px;
}

.series-dot {
  width: 9px;
  height: 9px;
  border: none;
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.series-dot.is-active {
  background: #ff2a2a;
  transform: scale(1.15);
}

.mostread ul {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.mostread li {
  padding: 12px 0;
  color: #d6d6d6;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

/* archive */
.archive-feature {
  padding: 18px 36px 70px;
}

.archive-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 26px;
}

.archive-big {
  min-height: 310px;
  border-radius: 24px;
  display: flex;
  align-items: end;
  padding: 18px;
}

.archive-side {
  display: grid;
  gap: 18px;
}

.archive-card {
  min-height: 146px;
  display: flex;
  align-items: end;
  padding: 14px;
}

.archive-big h3,
.archive-card h3 {
  position: relative;
  z-index: 2;
  margin: 0;
  color: #fff;
  line-height: 1.2;
}

.archive-big h3 {
  font-size: 1.6rem;
  max-width: 18ch;
}

.archive-card h3 {
  font-size: 1rem;
  max-width: 16ch;
}

/* submit */
.submit {
  margin: 0 36px 56px;
  padding: 60px 24px;
  text-align: center;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 0%, rgba(130, 0, 0, 0.16), transparent 40%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    var(--panel-strong);
}

.submit p {
  margin: 0 0 22px;
  color: var(--muted);
}

/* footer */
footer {
  padding: 12px 36px 56px;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-top: 28px;
}

footer h3 {
  margin: 0 0 14px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

footer p {
  margin: 0 0 10px;
  color: var(--muted);
}

.copyright {
  margin-top: 36px;
  text-align: center;
  color: var(--muted-2);
  font-size: 0.92rem;
}

/* hover */
.story-card:hover,
.series-card:hover,
.archive-card:hover,
.archive-big:hover {
  transform: translateY(-4px) scale(1.015);
  border-color: var(--border-strong);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34), 0 0 24px rgba(120, 0, 0, 0.08);
}

/* smoke system */
.smoke-layer {
  position: absolute;
  inset: -12%;
}

.smoke-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.03), transparent 24%),
    radial-gradient(circle at 50% 50%, rgba(80, 0, 0, 0.1), transparent 42%),
    radial-gradient(circle at 50% 50%, transparent 50%, rgba(0, 0, 0, 0.42) 100%);
  opacity: 0.65;
}

.smoke-system::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -8%;
  height: 42vh;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 18% 100%, rgba(255, 255, 255, 0.08), transparent 46%),
    radial-gradient(ellipse at 50% 100%, rgba(180, 180, 180, 0.08), transparent 44%),
    radial-gradient(ellipse at 82% 100%, rgba(120, 0, 0, 0.08), transparent 46%);
  filter: blur(72px);
  opacity: 0.5;
}

.smoke-plume {
  position: absolute;
  border-radius: 50%;
  transform-origin: center;
  will-change: transform, opacity;
  background:
    radial-gradient(circle at 30% 30%,
      rgba(255, 255, 255, 0.12) 0%,
      rgba(220, 220, 220, 0.09) 16%,
      rgba(160, 160, 160, 0.07) 30%,
      rgba(95, 95, 95, 0.05) 46%,
      rgba(75, 18, 18, 0.045) 58%,
      rgba(18, 0, 0, 0.04) 70%,
      rgba(0, 0, 0, 0) 84%);
  box-shadow:
    0 0 90px rgba(255, 255, 255, 0.018),
    0 0 160px rgba(120, 0, 0, 0.02);
}

.smoke-back .smoke-plume {
  opacity: 0.08;
  filter: blur(110px);
}

.smoke-mid .smoke-plume {
  opacity: 0.14;
  filter: blur(88px);
}

.smoke-front .smoke-plume {
  opacity: 0.16;
  filter: blur(68px);
}

/* plume positions */
.plume-1 {
  width: 720px;
  height: 520px;
  left: -10%;
  top: 2%;
  animation: smokeDriftA 38s ease-in-out infinite alternate;
}

.plume-2 {
  width: 820px;
  height: 580px;
  right: -16%;
  top: -4%;
  animation: smokeDriftB 46s ease-in-out infinite alternate;
  animation-delay: -12s;
}

.plume-3 {
  width: 760px;
  height: 560px;
  left: 16%;
  bottom: -18%;
  animation: smokeDriftC 42s ease-in-out infinite alternate;
  animation-delay: -18s;
}

.plume-4 {
  width: 620px;
  height: 460px;
  left: -8%;
  top: 28%;
  animation: smokeDriftD 30s ease-in-out infinite alternate;
  animation-delay: -6s;
}

.plume-5 {
  width: 680px;
  height: 500px;
  right: 6%;
  top: 18%;
  animation: smokeDriftE 34s ease-in-out infinite alternate;
  animation-delay: -14s;
}

.plume-6 {
  width: 520px;
  height: 400px;
  left: 22%;
  top: 6%;
  animation: smokeDriftF 27s ease-in-out infinite alternate;
  animation-delay: -10s;
}

.plume-7 {
  width: 740px;
  height: 520px;
  right: -10%;
  bottom: -10%;
  animation: smokeDriftA 36s ease-in-out infinite alternate;
  animation-delay: -22s;
}

.plume-8 {
  width: 420px;
  height: 320px;
  left: 8%;
  bottom: 0%;
  animation: smokeDriftB 24s ease-in-out infinite alternate;
  animation-delay: -5s;
}

.plume-9 {
  width: 460px;
  height: 340px;
  right: 18%;
  bottom: 8%;
  animation: smokeDriftC 22s ease-in-out infinite alternate;
  animation-delay: -11s;
}

.plume-10 {
  width: 500px;
  height: 360px;
  left: 38%;
  top: 36%;
  animation: smokeDriftE 26s ease-in-out infinite alternate;
  animation-delay: -16s;
}

/* section haze */
.hero::before,
.archive-feature::before,
.submit::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 16% 28%, rgba(255, 255, 255, 0.03), transparent 18%),
    radial-gradient(circle at 78% 40%, rgba(110, 0, 0, 0.08), transparent 26%),
    radial-gradient(circle at 48% 86%, rgba(255, 255, 255, 0.025), transparent 18%);
  opacity: 0.55;
}

/* smoke motion */
@keyframes smokeDriftA {
  0% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); opacity: 0.09; }
  25% { transform: translate3d(30px, -20px, 0) scale(1.05) rotate(4deg); opacity: 0.13; }
  50% { transform: translate3d(-18px, -55px, 0) scale(1.1) rotate(-3deg); opacity: 0.11; }
  75% { transform: translate3d(24px, -82px, 0) scale(1.14) rotate(5deg); opacity: 0.13; }
  100% { transform: translate3d(-12px, -110px, 0) scale(1.18) rotate(-2deg); opacity: 0.09; }
}

@keyframes smokeDriftB {
  0% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); opacity: 0.09; }
  20% { transform: translate3d(-28px, -18px, 0) scale(1.04) rotate(-4deg); opacity: 0.14; }
  50% { transform: translate3d(20px, -46px, 0) scale(1.08) rotate(3deg); opacity: 0.11; }
  80% { transform: translate3d(-34px, -76px, 0) scale(1.13) rotate(-5deg); opacity: 0.15; }
  100% { transform: translate3d(18px, -104px, 0) scale(1.16) rotate(2deg); opacity: 0.09; }
}

@keyframes smokeDriftC {
  0% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); opacity: 0.08; }
  30% { transform: translate3d(18px, -24px, 0) scale(1.06) rotate(3deg); opacity: 0.12; }
  60% { transform: translate3d(-26px, -58px, 0) scale(1.11) rotate(-4deg); opacity: 0.15; }
  100% { transform: translate3d(14px, -96px, 0) scale(1.18) rotate(4deg); opacity: 0.08; }
}

@keyframes smokeDriftD {
  0% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); opacity: 0.11; }
  35% { transform: translate3d(25px, -12px, 0) scale(1.05) rotate(2deg); opacity: 0.17; }
  65% { transform: translate3d(-16px, -44px, 0) scale(1.1) rotate(-3deg); opacity: 0.13; }
  100% { transform: translate3d(18px, -70px, 0) scale(1.15) rotate(3deg); opacity: 0.1; }
}

@keyframes smokeDriftE {
  0% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); opacity: 0.11; }
  25% { transform: translate3d(-14px, -20px, 0) scale(1.04) rotate(-2deg); opacity: 0.16; }
  50% { transform: translate3d(26px, -36px, 0) scale(1.08) rotate(4deg); opacity: 0.13; }
  75% { transform: translate3d(-20px, -62px, 0) scale(1.12) rotate(-3deg); opacity: 0.17; }
  100% { transform: translate3d(10px, -82px, 0) scale(1.16) rotate(2deg); opacity: 0.11; }
}

@keyframes smokeDriftF {
  0% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); opacity: 0.1; }
  40% { transform: translate3d(16px, -18px, 0) scale(1.06) rotate(2deg); opacity: 0.14; }
  70% { transform: translate3d(-12px, -42px, 0) scale(1.1) rotate(-2deg); opacity: 0.11; }
  100% { transform: translate3d(8px, -68px, 0) scale(1.14) rotate(1deg); opacity: 0.09; }
}

/* responsive */
@media (max-width: 1080px) {
  .main-grid {
    grid-template-columns: 1fr 1fr;
  }

  .mostread {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .header,
  .hero,
  .main-grid,
  .archive-feature,
  footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-right {
    min-height: 300px;
  }

  .archive-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .submit {
    margin-left: 20px;
    margin-right: 20px;
  }
}

@media (max-width: 640px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  nav {
    gap: 14px;
  }

  .main-grid {
    grid-template-columns: 1fr;
  }

  .hero-left,
  .latest,
  .series,
  .mostread {
    padding: 20px 18px;
  }

  .story-card {
    height: 90px;
  }

  .archive-big {
    min-height: 240px;
  }
}

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

  .smoke-plume {
    animation: none !important;
    opacity: 0.08 !important;
  }

  .story-card,
  .series-card,
  .archive-card,
  .archive-big,
  button,
  .section-btn,
  nav a {
    transition: none !important;
  }
}
