:root {
  --color-dribbble-pink: #ea4c89;
  --color-midnight-ink: #0d0c22;
  --color-deep-plum: #060318;
  --color-charcoal-plum: #3d3d4e;
  --color-smoke: #6e6d7a;
  --color-fog: #9e9ea7;
  --color-mist: #f3f3f6;
  --color-frost-border: #e2e8f2;
  --color-muted-plum: #524b63;
  --color-slate-edge: #3a3546;
  --color-paper: #ffffff;
  --font-mona-sans: "Mona Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --page-max-width: 1280px;
  --radius-cards: 8px;
  --radius-buttons: 8px;
  --radius-hero-feature: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-midnight-ink);
  font-family: var(--font-mona-sans);
  font-size: 14px;
  line-height: 1.38;
}

button,
input {
  font: inherit;
}

button,
a,
label {
  -webkit-tap-highlight-color: transparent;
}

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

img,
svg {
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-deep-plum);
}

.nav-shell {
  width: min(100%, var(--page-max-width));
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.nav-links,
.nav-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 9px;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-dribbble-pink);
  box-shadow: inset -5px 0 0 rgba(255, 255, 255, 0.28);
}

.nav-links {
  min-width: 0;
  gap: 8px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 500;
}

.nav-links a,
.nav-dropdown-button,
.nav-category-button,
.ghost-button {
  border-radius: var(--radius-buttons);
  transition: background 160ms ease, color 160ms ease;
}

.nav-links a {
  padding: 8px 0;
}

.nav-links a:hover,
.nav-dropdown-button:hover,
.nav-category-button:hover,
.ghost-button:hover {
  color: #fff;
}

.nav-category {
  position: relative;
}

.nav-category-button {
  min-height: 40px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
}

.nav-category-button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 160ms ease;
}

.nav-category:hover .nav-category-button,
.nav-category-button.is-active {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.nav-category:hover .nav-category-button svg {
  transform: rotate(180deg);
}

.nav-category-button:focus-visible,
.nav-submenu button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.72);
  outline-offset: 2px;
}

.nav-submenu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  z-index: 80;
  min-width: 148px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: #fff;
  color: var(--color-midnight-ink);
  padding: 6px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
  transform: translate(-50%, 8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.nav-category:hover .nav-submenu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.nav-submenu button {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  padding: 9px 12px;
  cursor: pointer;
  text-align: left;
  font-weight: 800;
  white-space: nowrap;
}

.nav-submenu button:hover,
.nav-submenu button.is-active {
  background: var(--color-mist);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-button {
  min-height: 40px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 700;
}

.nav-dropdown-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 160ms ease;
}

.nav-dropdown.is-open .nav-dropdown-button {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav-dropdown.is-open .nav-dropdown-button svg {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  z-index: 70;
  width: 292px;
  max-height: min(72vh, 620px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: #fff;
  color: var(--color-midnight-ink);
  padding: 8px;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
  transform: translate(-50%, 8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.nav-dropdown.is-open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.nav-dropdown-menu button {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  padding: 10px;
  display: grid;
  gap: 2px;
  cursor: pointer;
  text-align: left;
}

.nav-dropdown-menu button:hover,
.nav-dropdown-menu button.is-active {
  background: var(--color-mist);
}

.nav-dropdown-menu strong {
  font-size: 13px;
  line-height: 1.25;
}

.nav-dropdown-menu span {
  color: var(--color-smoke);
  font-size: 12px;
}

.nav-actions {
  gap: 8px;
}

.ghost-button,
.dark-button,
.outline-button,
.reset-button,
.site-footer button {
  min-height: 40px;
  border-radius: var(--radius-buttons);
  padding: 10px 18px;
  border: 0;
  cursor: pointer;
  font-weight: 600;
}

.ghost-button {
  background: transparent;
  color: #fff;
}

.dark-button {
  background: var(--color-midnight-ink);
  color: #fff;
}

main {
  overflow: hidden;
}

.hero-section,
.content-section,
.brief-section {
  width: min(100% - 48px, var(--page-max-width));
  margin: 0 auto;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.82fr);
  align-items: center;
  gap: 56px;
  padding: 48px 0 36px;
}

.hero-media {
  min-width: 0;
  display: flex;
  justify-content: center;
}

.hero-media .hero-clip {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-hero-feature);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.45);
  background: var(--color-midnight-ink);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--color-dribbble-pink);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-text {
  max-width: 560px;
  margin: 20px 0 28px;
  color: var(--color-smoke);
  font-size: 16px;
}

.search-form {
  display: flex;
  width: min(100%, 560px);
  height: 48px;
}

.search-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 12px 0 0 12px;
  background: var(--color-mist);
  color: var(--color-midnight-ink);
  padding: 0 16px;
  outline: 0;
}

.search-form input:focus {
  border-color: var(--color-frost-border);
}

.search-form button {
  width: 54px;
  border: 0;
  border-radius: 0 12px 12px 0;
  background: var(--color-dribbble-pink);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.search-form svg,
.cardnews-tools svg,
.carousel-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag-row span {
  font-weight: 800;
}

.tag-row a {
  border: 1px solid var(--color-frost-border);
  border-radius: 999px;
  padding: 7px 14px;
  color: var(--color-smoke);
  font-size: 13px;
  font-weight: 500;
  transition: color 160ms ease, border-color 160ms ease;
}

.tag-row a:hover {
  color: var(--color-midnight-ink);
  border-color: var(--color-midnight-ink);
}

.featured-article {
  border-radius: var(--radius-hero-feature);
  background: var(--color-midnight-ink);
  color: #fff;
  padding: 14px;
}

.featured-image {
  position: relative;
  min-height: 320px;
  border-radius: 12px;
  overflow: hidden;
  background:
    radial-gradient(circle at 32% 24%, rgba(234, 76, 137, 0.82), transparent 19%),
    radial-gradient(circle at 68% 34%, rgba(255, 255, 255, 0.88), transparent 9%),
    linear-gradient(135deg, #161434 0%, #34214f 40%, #ece6f0 100%);
}

.featured-image::before,
.featured-image::after {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  transform: rotate(-18deg);
}

.featured-image::after {
  inset: 26% 10%;
  border-color: rgba(234, 76, 137, 0.52);
  transform: rotate(22deg);
}

.featured-image span {
  position: absolute;
  left: 20px;
  bottom: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-midnight-ink);
  padding: 8px 14px;
  font-weight: 800;
}

.featured-meta {
  padding: 16px 4px 2px;
}

.featured-meta p,
.featured-meta h2 {
  margin: 0;
}

.featured-meta p,
.featured-meta span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.featured-meta h2 {
  margin: 6px 0 10px;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
}

.cardnews-section {
  position: relative;
  isolation: isolate;
  min-height: 720px;
  padding: 48px 24px 60px;
  color: #fff;
  background:
    radial-gradient(circle at 50% 42%, rgba(108, 80, 255, 0.22), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(234, 76, 137, 0.14), transparent 31%),
    linear-gradient(180deg, #03040b 0%, #080d17 55%, #03040b 100%);
}

.cardnews-section::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 38%;
  z-index: -1;
  background: linear-gradient(180deg, transparent, rgba(70, 90, 130, 0.16));
  transform: perspective(700px) rotateX(62deg);
  transform-origin: bottom;
}

.section-heading {
  width: min(100%, var(--page-max-width));
  margin: 0 auto 28px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.12;
  letter-spacing: 0;
}

.section-heading.inverse {
  align-items: center;
  text-align: center;
  flex-direction: column;
  gap: 10px;
}

.section-heading.inverse .eyebrow {
  position: relative;
  color: #f5bf78;
  margin-bottom: 0;
}

.section-heading.inverse h2 {
  max-width: min(100%, 940px);
  font-size: clamp(36px, 5vw, 58px);
  overflow-wrap: anywhere;
  text-shadow: 0 0 28px rgba(255, 255, 255, 0.18);
}

.cardnews-tools {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.feature-mode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.05);
}

.feature-mode button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 800;
}

.feature-mode button.active {
  background: #fff;
  color: var(--color-midnight-ink);
}

#card-upload {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-button,
.reset-button {
  min-height: 40px;
  border-radius: var(--radius-buttons);
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

.upload-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--color-midnight-ink);
}

.reset-button {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: transparent;
  color: #fff;
}

.read-post-link {
  min-height: 42px;
  border-radius: var(--radius-buttons);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-dribbble-pink);
  color: #fff;
  padding: 10px 18px;
  font-weight: 900;
}

.cover-picker {
  width: min(100%, 520px);
  min-height: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 2px;
}

.cover-option {
  flex: 0 0 42px;
  aspect-ratio: 4 / 5;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: transparent;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}

.cover-option.active {
  border-color: var(--color-dribbble-pink);
}

.cover-option img,
.cover-option .post-cover-visual {
  width: 100%;
  height: 100%;
}

.cover-option img {
  object-fit: cover;
}

.carousel-wrap {
  position: relative;
  width: min(100%, 1420px);
  min-height: 500px;
  margin: 6px auto 0;
  perspective: 1100px;
  touch-action: pan-y;
}

.carousel-wrap.dragging .story-card {
  transition-duration: 90ms;
}

.carousel-wrap.is-drop-target .carousel-stage {
  outline: 1px dashed rgba(255, 255, 255, 0.64);
  outline-offset: 8px;
}

.carousel-stage {
  position: relative;
  height: 460px;
  overflow: visible;
}

.story-card {
  --card-width: clamp(240px, 25vw, 360px);
  position: absolute;
  left: 50%;
  top: 24px;
  width: var(--card-width);
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  overflow: hidden;
  background: #111827;
  transform-style: preserve-3d;
  transform:
    translateX(calc(-50% + var(--x, 0px)))
    translateY(var(--y, 0px))
    rotateY(var(--rotate, 0deg))
    rotateZ(var(--tilt, 0deg))
    scale(var(--scale, 1));
  opacity: var(--opacity, 1);
  z-index: var(--z, 1);
  filter: blur(var(--blur, 0px));
  transition:
    transform 520ms cubic-bezier(0.2, 0.8, 0.18, 1),
    opacity 320ms ease,
    filter 320ms ease,
    box-shadow 320ms ease;
  pointer-events: auto;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.story-card.is-active {
  border-color: rgba(197, 220, 255, 0.96);
  box-shadow:
    0 0 0 1px rgba(134, 179, 255, 0.82),
    0 0 34px rgba(114, 97, 255, 0.58),
    0 28px 82px rgba(0, 0, 0, 0.58);
}

.story-card.is-hidden {
  pointer-events: none;
}

.story-card button {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.story-visual,
.story-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.story-image {
  object-fit: contain;
  background: #07101c;
}

video.story-image {
  object-fit: contain;
}

.story-visual {
  background:
    radial-gradient(circle at 34% 25%, var(--orb-a), transparent 22%),
    radial-gradient(circle at 70% 35%, var(--orb-b), transparent 18%),
    linear-gradient(145deg, var(--grad-a), var(--grad-b));
}

.story-visual::before {
  content: "";
  position: absolute;
  inset: 20% 22%;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  transform: rotate(var(--ring-rotate, -18deg));
}

.story-visual::after {
  content: "";
  position: absolute;
  inset: 52% 10% 12%;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.26));
  clip-path: polygon(48% 0, 60% 100%, 0 100%);
  opacity: 0.7;
}

.story-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04) 28%, rgba(0, 0, 0, 0.86) 100%);
  pointer-events: none;
}

.story-card.has-clean-image::after {
  background: none;
}

.story-count,
.story-save,
.story-copy {
  position: absolute;
  z-index: 2;
}

.story-count,
.story-save {
  top: 18px;
  border-radius: 999px;
  background: rgba(2, 6, 18, 0.68);
  color: #fff;
  backdrop-filter: blur(10px);
}

.story-count {
  left: 18px;
  padding: 7px 11px;
  font-size: clamp(15px, 1.35vw, 21px);
  font-weight: 800;
}

.story-save {
  right: 18px;
  width: clamp(34px, 3vw, 44px);
  height: clamp(34px, 3vw, 44px);
  display: grid;
  place-items: center;
  color: #ffd05a;
}

.story-save svg {
  width: clamp(19px, 1.8vw, 24px);
  height: clamp(19px, 1.8vw, 24px);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.story-copy {
  left: clamp(22px, 2.4vw, 34px);
  right: clamp(22px, 2.4vw, 34px);
  bottom: clamp(24px, 2.8vw, 40px);
}

.story-category {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: var(--color-dribbble-pink);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.story-category::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.story-copy h3,
.story-copy p {
  margin: 0;
}

.story-copy h3 {
  color: #fff;
  font-size: clamp(19px, 1.8vw, 27px);
  line-height: 1.12;
  letter-spacing: 0;
}

.story-copy p {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(13px, 1vw, 16px);
}

.story-reflection {
  position: absolute;
  left: 50%;
  top: clamp(390px, 34vw, 480px);
  width: var(--card-width);
  height: 105px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(114, 97, 255, 0.22), transparent);
  transform:
    translateX(calc(-50% + var(--x, 0px)))
    rotateX(70deg)
    scale(var(--scale, 1));
  opacity: calc(var(--opacity, 1) * 0.45);
  z-index: 0;
  filter: blur(7px);
  transition: transform 520ms cubic-bezier(0.2, 0.8, 0.18, 1), opacity 320ms ease;
  pointer-events: none;
}

.carousel-button {
  position: absolute;
  top: 46%;
  z-index: 30;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(7, 12, 24, 0.78);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.carousel-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.62);
  background: rgba(13, 12, 34, 0.92);
}

.carousel-button.prev {
  left: max(16px, calc(50% - 620px));
}

.carousel-button.next {
  right: max(16px, calc(50% - 620px));
}

.carousel-footer {
  position: relative;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -10px;
}

.progress-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 28px;
}

.progress-dots button {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: rgba(255, 255, 255, 0.24);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, width 180ms ease;
}

.progress-dots button.active {
  width: 24px;
  border-radius: 999px;
  background: #8b72ff;
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed var(--color-frost-border);
  border-radius: var(--radius-cards);
  padding: 28px;
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
  color: var(--color-smoke);
}

.empty-state p {
  max-width: 460px;
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.empty-state a {
  min-height: 38px;
  border-radius: var(--radius-buttons);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-midnight-ink);
  color: #fff;
  padding: 9px 14px;
  font-weight: 900;
}

.carousel-empty-state {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 10;
  width: min(100%, 440px);
  min-height: 220px;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.78);
  transform: translate(-50%, -50%);
  backdrop-filter: blur(12px);
}

.carousel-empty-state a {
  background: #fff;
  color: var(--color-midnight-ink);
}

.content-section {
  padding: 72px 0 48px;
}

.filter-tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  overflow-x: auto;
}

.filter-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--color-smoke);
  padding: 10px 13px;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}

.filter-tabs button.active {
  border-color: var(--color-midnight-ink);
  color: var(--color-midnight-ink);
}

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

.post-card {
  min-width: 0;
  border: 1px solid var(--color-frost-border);
  border-radius: var(--radius-cards);
  background: #fff;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.post-card:hover {
  transform: translateY(-2px);
  border-color: rgba(234, 76, 137, 0.32);
  box-shadow: 0 16px 36px rgba(13, 12, 34, 0.08);
}

.post-card.is-selected .post-thumb {
  outline: 0;
}

.post-select {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 12px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  grid-template-areas:
    "thumb meta"
    "thumb title"
    "thumb desc"
    "thumb more";
  column-gap: 14px;
  align-items: start;
  text-align: left;
}

.post-thumb {
  grid-area: thumb;
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-cards);
  overflow: hidden;
  background: var(--color-midnight-ink);
}

.post-thumb::before {
  content: none;
}

.post-thumb img,
.post-cover-visual {
  width: 100%;
  height: 100%;
}

.post-thumb img {
  object-fit: cover;
}

.post-format {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  border-radius: 999px;
  background: rgba(13, 12, 34, 0.74);
  color: #fff;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.post-cover-visual {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 34% 25%, var(--orb-a), transparent 22%),
    radial-gradient(circle at 70% 35%, var(--orb-b), transparent 18%),
    linear-gradient(145deg, var(--grad-a), var(--grad-b));
}

.post-cover-visual::before {
  content: "";
  position: absolute;
  inset: 20% 22%;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  transform: rotate(var(--ring-rotate, -18deg));
}

.video-cover {
  display: grid;
  place-items: center;
  color: #fff;
  background:
    radial-gradient(circle at 35% 25%, rgba(234, 76, 137, 0.66), transparent 24%),
    linear-gradient(145deg, #09111f, #19233d);
}

.video-cover span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.thumb-ai {
  --thumb-bg: linear-gradient(135deg, #0d0c22, #ea4c89);
}

.thumb-market {
  --thumb-bg: linear-gradient(135deg, #eef2ff, #62748e);
}

.thumb-code {
  --thumb-bg: linear-gradient(135deg, #15342f, #c4f1d6);
}

.thumb-culture {
  --thumb-bg: linear-gradient(135deg, #fff5d7, #0d0c22);
}

.post-meta {
  grid-area: meta;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
  color: var(--color-smoke);
  font-size: 12px;
}

.post-meta strong {
  color: var(--color-midnight-ink);
  font-weight: 700;
}

.avatar {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 50%;
}

.avatar-pink {
  background: var(--color-dribbble-pink);
}

.avatar-dark {
  background: var(--color-midnight-ink);
}

.avatar-green {
  background: #2aa876;
}

.avatar-blue {
  background: #4666ff;
}

.pro-badge {
  border-radius: 4px;
  background: var(--color-dribbble-pink);
  color: #fff;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 900;
}

.post-card h3 {
  grid-area: title;
  margin: 8px 0 0;
  font-size: 17px;
  line-height: 1.26;
  letter-spacing: 0;
}

.post-card p {
  grid-area: desc;
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  color: var(--color-smoke);
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.post-read-more {
  grid-area: more;
  margin-top: 10px;
  color: var(--color-dribbble-pink);
  font-size: 12px;
  font-weight: 900;
}

.reader-section {
  width: min(100% - 48px, var(--page-max-width));
  margin: 0 auto;
  padding: 64px 0 32px;
}

.reader-shell {
  padding-top: 0;
}

.reader-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.reader-heading h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.12;
  letter-spacing: 0;
}

.reader-frame {
  border: 1px solid var(--color-frost-border);
  border-radius: var(--radius-cards);
  background: #fff;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(13, 12, 34, 0.08);
}

.reader-frame iframe {
  display: block;
  width: 100%;
  min-height: 720px;
  border: 0;
  background: #fff;
}

.reader-videos {
  display: grid;
  gap: 18px;
  padding: clamp(18px, 4vw, 40px);
  background: #fff;
}

.reader-video {
  margin: 0;
}

.reader-video video {
  display: block;
  width: 100%;
  max-height: 76vh;
  border-radius: var(--radius-cards);
  background: #050812;
}

.reader-video figcaption {
  margin-top: 8px;
  color: var(--color-smoke);
  font-size: 13px;
  font-weight: 700;
}

.reader-fallback {
  min-height: 320px;
  padding: clamp(24px, 5vw, 64px);
  display: grid;
  align-content: center;
  gap: 12px;
  background: var(--color-mist);
}

.reader-fallback h3,
.reader-fallback p {
  max-width: 720px;
  margin: 0;
}

.reader-fallback h3 {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}

.reader-fallback p {
  color: var(--color-smoke);
  font-size: 16px;
}

.brief-section {
  border-top: 1px solid var(--color-frost-border);
  border-bottom: 1px solid var(--color-frost-border);
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.outline-button {
  border: 1px solid var(--color-midnight-ink);
  background: #fff;
  color: var(--color-midnight-ink);
}

.brief-section p {
  margin: 0;
  color: var(--color-smoke);
}

.site-footer {
  min-height: 64px;
  margin-top: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: var(--color-deep-plum);
  color: #fff;
}

.site-footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
}

.site-footer button {
  background: #fff;
  color: var(--color-midnight-ink);
}

@media (max-width: 1080px) {
  .hero-section {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-media {
    display: flex;
    margin-top: 8px;
  }

  .featured-article {
    max-width: 640px;
  }

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

  .nav-link-optional {
    display: none;
  }
}

@media (max-width: 720px) {
  .nav-shell {
    padding: 0 16px;
    gap: 12px;
  }

  .brand {
    font-size: 17px;
  }

  .nav-links {
    flex: 1;
    gap: 0;
    margin-left: auto;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-category-button {
    padding-inline: 9px;
    font-size: 13px;
  }

  .nav-dropdown-button {
    padding-inline: 8px;
  }

  .nav-dropdown-menu {
    left: auto;
    right: 0;
    transform: translateY(8px);
  }

  .nav-dropdown.is-open .nav-dropdown-menu {
    transform: translateY(0);
  }

  .nav-actions {
    display: none;
  }

  .hero-section,
  .content-section,
  .reader-section,
  .brief-section {
    width: min(100% - 32px, var(--page-max-width));
  }

  .hero-section {
    padding: 22px 0 18px;
    gap: 18px;
  }

  .hero-copy h1 {
    font-size: 38px;
  }

  .featured-image {
    min-height: 168px;
  }

  .featured-article {
    padding: 10px;
  }

  .cardnews-section {
    min-height: 690px;
    padding: 46px 16px 58px;
  }

  .carousel-wrap {
    min-height: 470px;
  }

  .carousel-stage {
    height: 430px;
  }

  .story-card {
    --card-width: min(74vw, 320px);
    top: 18px;
  }

  .story-reflection {
    top: 396px;
  }

  .story-copy p {
    display: none;
  }

  .story-count {
    font-size: 16px;
  }

  .carousel-button {
    width: 44px;
    height: 44px;
    top: auto;
    bottom: 34px;
  }

  .carousel-button.prev {
    left: calc(50% - 124px);
  }

  .carousel-button.next {
    right: calc(50% - 124px);
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading.inverse {
    align-items: center;
  }

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

  .reader-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .reader-frame iframe {
    min-height: 620px;
  }

  .brief-section {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }
}

/* Branded editorial thumbnail cover — shown when a post image is missing or fails to load */
.post-thumb-cover {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 7px;
  padding: 13px 13px 15px;
  color: #fff;
  background:
    radial-gradient(125% 95% at 80% 6%, var(--ptc-accent, #ea4c89), transparent 48%),
    linear-gradient(162deg, #15142f 4%, #0b0a1d 94%);
}
.post-thumb-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 7, 20, 0) 38%, rgba(8, 7, 20, 0.72));
}
.post-thumb-cover > * {
  position: relative;
}
.ptc-cat {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ptc-accent, #ff7eb0);
}
.ptc-title {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.34;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ptc-brand {
  margin-top: 2px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

/* Image overlays the branded cover; if it fails to load it fades out and the cover shows through */
.post-thumb img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 160ms ease;
}
.post-thumb img.img-failed {
  opacity: 0;
}

/* Per-category accent */
.post-thumb.cat-paper,
.post-thumb.cat-article { --ptc-accent: #ea4c89; }
.post-thumb.cat-repo { --ptc-accent: #6366f1; }
.post-thumb.cat-skill { --ptc-accent: #22d3ee; }
.post-thumb.cat-book-review { --ptc-accent: #f59e0b; }
.post-thumb.cat-vibe-coding { --ptc-accent: #34d399; }

.admin-login-link {
  margin-left: 14px;
  font-size: 12px;
  color: var(--color-stone-500, #6e6d7a);
  opacity: 0.55;
  text-decoration: none;
}
.admin-login-link:hover { opacity: 1; color: var(--color-dribbble-pink, #ea4c89); }

/* ── Netflix-style shelves (Posts section) ───────────────────────────── */
.content-section {
  background: #0c0c12;
  border: 1px solid #1b1b25;
  border-radius: 22px;
  padding: 30px clamp(16px, 3vw, 30px) 22px;
  color: #fff;
}
.content-section .section-heading { margin-bottom: 16px; }
.content-section .section-heading .eyebrow { color: var(--color-dribbble-pink); }
.content-section .section-heading h2 { color: #fff; }

.shelves { display: flex; flex-direction: column; gap: 26px; }
.shelf { min-width: 0; }
.shelf-head { display: flex; align-items: baseline; gap: 9px; margin: 0 0 12px; padding-left: 4px; }
.shelf-title { margin: 0; font-size: clamp(16px, 2vw, 20px); font-weight: 800; color: #fff; }
.shelf-count { font-size: 12px; font-weight: 600; color: #7a7a86; }

/* "전체보기" — 15개 초과 선반의 헤더 링크 (새 창으로 전체 나열) */
.shelf-viewall {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 13px;
  font-weight: 700;
  color: #c9c9d2;
  white-space: nowrap;
  transition: color 0.15s;
}
.shelf-viewall:hover { color: var(--color-dribbble-pink); }
.shelf-viewall svg {
  width: 16px; height: 16px; fill: none; stroke: currentColor;
  stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
}

/* 스와이프 끝의 "+N 전체보기" 타일 */
.shelf-more .shelf-more-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  border: 1px dashed #3a3a46;
  background: rgba(255, 255, 255, 0.03);
  transition: background 0.18s, border-color 0.18s;
}
.shelf-more:hover .shelf-more-box {
  background: rgba(234, 76, 137, 0.1);
  border-color: var(--color-dribbble-pink);
}
.shelf-more-plus { font-size: 22px; font-weight: 800; color: #fff; }
.shelf-more-text { font-size: 13px; font-weight: 700; color: #b9b9c4; }

.shelf-row { position: relative; }
.shelf-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 4px 4px 12px;
  scrollbar-width: none;
}
.shelf-track::-webkit-scrollbar { display: none; }

.shelf-card {
  flex: 0 0 auto;
  width: clamp(150px, 19vw, 190px);
  scroll-snap-align: start;
  display: block;
  color: #fff;
}
.shelf-card .post-thumb {
  width: 100%;
  border-radius: 12px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.shelf-card:hover .post-thumb {
  transform: scale(1.04);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
}
.shelf-card-meta { padding: 9px 2px 0; }
.shelf-card-cat { font-size: 11px; color: #8a8a96; }
.shelf-card h3 {
  margin: 3px 0 0;
  font-size: 13.5px;
  line-height: 1.34;
  font-weight: 700;
  color: #f1f1f5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shelf-arrow {
  position: absolute;
  top: 4px;
  bottom: 46px;
  z-index: 6;
  width: 38px;
  border: 0;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 150ms ease, background 150ms ease;
}
.shelf-row:hover .shelf-arrow { opacity: 1; }
.shelf-arrow:hover { background: rgba(0, 0, 0, 0.84); }
.shelf-arrow svg {
  width: 22px; height: 22px; fill: none; stroke: currentColor;
  stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
}
.shelf-arrow.prev { left: 0; border-radius: 0 10px 10px 0; }
.shelf-arrow.next { right: 0; border-radius: 10px 0 0 10px; }

.post-grid-empty a { color: var(--color-dribbble-pink); }

/* ── Daily Picks (오늘의 추천) — 질문형 후크 줄 ─────────────────────── */
.recommend-section { margin-bottom: 22px; }
.recommend-section[hidden] { display: none; }
.recommend-section .section-heading .eyebrow { color: var(--color-dribbble-pink); }
.shelf--recommend .rec-hook {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: clamp(17px, 2.1vw, 22px);
  letter-spacing: -0.01em;
}
.rec-emoji { font-size: 1.15em; line-height: 1; }

/* ── 빈 선반 플레이스홀더 (예: 아티클 준비 중) ───────────────────────── */
.shelf--empty .shelf-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  min-height: 150px;
  margin: 4px 4px 12px;
  padding: 26px 18px;
  border: 1px dashed #2a2a36;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}
.shelf-placeholder-icon { font-size: 26px; opacity: 0.9; }
.shelf-placeholder-title { margin: 0; font-size: 15px; font-weight: 700; color: #d8d8e0; }
.shelf-placeholder-sub { margin: 0; font-size: 12.5px; color: #7a7a86; }

@media (hover: none) {
  .shelf-arrow { display: none; }
}

/* ════════════════════════════════════════════════════════════════
   FULL DARK (Netflix-style) THEME — overrides the light defaults.
   Pure-black canvas, white text, pink kept as the single accent.
   ════════════════════════════════════════════════════════════════ */
body {
  background: #000;
  color: #fff;
}

.site-header {
  background: #000;
  border-bottom: 1px solid #181820;
}

/* Primary CTA (글쓰기) — pink so it reads on black */
.dark-button {
  background: var(--color-dribbble-pink);
  color: #fff;
}

/* Hero copy on black */
.hero-text { color: #b3b3b3; }
.search-form input {
  background: #16161c;
  color: #fff;
  border: 1px solid #2a2a34;
}
.search-form input::placeholder { color: #7c7c86; }
.search-form input:focus { border-color: #4a4a56; }
.tag-row span { color: #fff; }
.tag-row a { border-color: #2e2e38; color: #b3b3b3; }
.tag-row a:hover { color: #fff; border-color: #fff; }

/* Nav popovers → dark */
.nav-submenu,
.nav-dropdown-menu {
  background: #14141b;
  border-color: #26262f;
  color: #fff;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.6);
}
.nav-submenu button:hover,
.nav-submenu button.is-active,
.nav-dropdown-menu button:hover,
.nav-dropdown-menu button.is-active { background: #24242f; }
.nav-dropdown-menu span { color: #9a9aa6; }

/* Brief / draft band */
.brief-section {
  border-top-color: #1c1c26;
  border-bottom-color: #1c1c26;
}
.brief-section p { color: #b3b3b3; }
.outline-button {
  background: transparent;
  border-color: #fff;
  color: #fff;
}

/* Footer */
.site-footer {
  background: #000;
  border-top: 1px solid #181820;
}
.site-footer button {
  background: var(--color-dribbble-pink);
  color: #fff;
}
.admin-login-link { color: #6a6a76; }

/* Posts shelves blend straight into the black canvas (no panel) */
.content-section {
  background: transparent;
  border: 0;
  padding: 18px 0 30px;
}
