.writers-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: clamp(220px, 25vw, 300px);
  place-items: center;
  overflow: hidden;
  text-align: center;
  padding: 42px 32px;
  border: 1px solid rgba(168, 224, 229, 0.48);
  box-shadow: 0 24px 60px rgba(8, 40, 80, 0.2);
}

.writers-hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(110deg, transparent 15%, rgba(255, 255, 255, 0.13) 34%, rgba(83, 194, 204, 0.27) 49%, transparent 64%);
  transform: translateX(-72%);
  animation: writersHeroSweep 8s ease-in-out infinite;
}

.writers-hero > div {
  display: grid;
  width: min(100%, 860px);
  justify-items: center;
  align-content: center;
  margin-inline: auto;
}

.writers-hero > div > span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  padding: 0 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  font-size: 13px;
  font-weight: 750;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.writers-hero .writers-hero-title {
  display: block;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0;
  color: #fff;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 44px;
  font-weight: 740;
  line-height: 1.18;
  text-align: center;
  text-wrap: balance;
  text-shadow: 0 12px 30px rgba(3, 22, 46, 0.28);
}

@keyframes writersHeroSweep {
  0%, 16% { transform: translateX(-72%); opacity: 0; }
  38%, 58% { opacity: 1; }
  82%, 100% { transform: translateX(72%); opacity: 0; }
}

.writer-profile-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid transparent;
  background: transparent;
  box-shadow: 0 26px 68px rgba(8, 40, 80, 0.18);
}

.writer-profile-hero::before {
  position: absolute;
  z-index: 0;
  inset: -72%;
  content: "";
  background: conic-gradient(from 0deg, transparent 0 70%, rgba(32, 231, 255, 0.7) 78%, rgba(255, 255, 255, 0.94) 82%, rgba(83, 194, 204, 0.74) 87%, transparent 94%);
  animation: writerFrameOrbit 9s linear infinite;
}

.writer-profile-hero::after {
  position: absolute;
  z-index: 0;
  inset: 2px;
  content: "";
  background: radial-gradient(circle at 18% 12%, rgba(83, 194, 204, 0.2), transparent 34%), radial-gradient(circle at 86% 88%, rgba(95, 136, 255, 0.12), transparent 36%), var(--panel);
  border-radius: calc(var(--radius) - 1px);
}

.writer-profile-photo,
.writer-profile-copy {
  position: relative;
  z-index: 1;
}

.writer-profile-photo {
  padding: 4px;
  background: linear-gradient(145deg, #fff, #dff9fb 52%, #53c2cc);
  border: 0;
  box-shadow: 0 22px 52px rgba(8, 40, 80, 0.24), 0 0 0 1px rgba(83, 194, 204, 0.2);
}

.writer-profile-photo img {
  border-radius: 4px;
}

.writer-profile-copy {
  display: grid;
  justify-items: center;
  text-align: center;
}

.writer-profile-copy > span {
  max-width: 680px;
  padding: 10px 18px 13px;
  color: var(--teal-dark);
  background: linear-gradient(90deg, transparent, rgba(83, 194, 204, 0.12), transparent);
  border-bottom: 2px solid rgba(83, 194, 204, 0.42);
  font-size: clamp(16px, 2vw, 22px);
}

.writer-profile-copy h1 {
  margin-top: 20px;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(42px, 5.6vw, 68px);
  font-weight: 770;
  text-align: center;
  text-shadow: 0 12px 28px rgba(83, 194, 204, 0.14);
}

@keyframes writerFrameOrbit {
  to { transform: rotate(360deg); }
}

html[data-theme="dark"] .writer-profile-hero::after {
  background: radial-gradient(circle at 18% 12%, rgba(83, 194, 204, 0.14), transparent 34%), radial-gradient(circle at 86% 88%, rgba(95, 136, 255, 0.12), transparent 36%), #0d1d31;
}

@media (max-width: 720px) {
  .writers-hero {
    min-height: 220px;
    padding: 34px 38px 36px 24px;
  }

  .writers-hero .writers-hero-title {
    max-width: 330px;
    font-size: 30px;
    font-weight: 720;
    line-height: 1.22;
  }

  .writer-profile-hero {
    gap: 24px;
    padding: 22px 18px 30px;
  }

  .writer-profile-photo {
    width: min(76vw, 280px);
    margin-inline: auto;
  }

  .writer-profile-copy h1 {
    font-size: clamp(40px, 13vw, 58px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .writers-hero::before,
  .writer-profile-hero::before {
    animation: none;
  }
}

/* Writer directory: stable card actions and ranked reading list. */
.writers-page .writer-showcase .writer-card-footer,
.writers-page .writer-showcase .writer-card > .writer-card-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  width: 100%;
  min-height: 112px;
  align-items: center;
  gap: 20px;
}

.writers-page .writer-showcase .writer-posts-toggle {
  position: static;
  width: auto;
  min-width: 178px;
  max-width: 220px;
  margin: 0;
  transform: none;
}

.writers-page .writer-showcase[hidden] {
  display: none;
}

.writers-page .writer-group-empty {
  grid-column: 1 / -1;
  padding: 42px 28px;
  text-align: center;
  border: 1px solid #c8dce7;
  border-top: 3px solid #35dce0;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(5, 29, 62, 0.08);
}

.writers-page .writer-group-empty[hidden] {
  display: none;
}

.writers-page .writer-group-empty strong {
  color: #071d3b;
  font-size: 22px;
}

.writers-page .writer-group-empty p {
  margin: 8px 0 0;
  color: #60748a;
  font-size: 14px;
}

.writers-page .writers-tabs a {
  min-width: 0;
  position: relative;
  overflow: hidden;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.writers-page .writers-tabs a.active {
  color: #061a36;
  background: #35dce0;
}

.writers-page .writers-tabs a:hover,
.writers-page .writers-tabs a:focus-visible {
  transform: translateY(-2px);
}

.writers-page .writer-showcase .writer-card {
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.writers-page .writer-showcase .writer-card:hover {
  transform: translateY(-4px);
  border-color: rgba(53, 220, 224, 0.72);
  box-shadow: 0 20px 46px rgba(6, 26, 54, 0.2);
}

.writers-page .popular {
  scroll-margin-top: 110px;
  overflow: hidden;
  border: 1px solid rgba(11, 87, 147, 0.18);
  box-shadow: 0 18px 42px rgba(6, 26, 54, 0.12);
}

.writers-page .writers-agenda h2,
.writers-page .popular h2 {
  position: relative;
  margin: 0 0 12px;
  padding-bottom: 18px;
  color: #061a36;
}

.writers-page .writers-agenda h2::before,
.writers-page .popular h2::before {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 100%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent 0%, rgba(24, 145, 165, 0.5) 12%, #22d5df 42%, #79f7f4 50%, #22d5df 58%, rgba(24, 145, 165, 0.5) 88%, transparent 100%);
  transform: translateX(-50%);
}

.writers-page .writers-agenda h2::after,
.writers-page .popular h2::after {
  position: absolute;
  bottom: -3px;
  left: 50%;
  width: 64px;
  height: 7px;
  content: "";
  background: radial-gradient(ellipse at center, rgba(157, 255, 252, 0.9) 0%, rgba(34, 213, 223, 0.42) 34%, transparent 74%);
  filter: blur(1px);
  pointer-events: none;
  transform: translateX(-50%);
}

.writers-page .popular a {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 12px 10px;
  color: #172642;
  border-bottom: 1px solid rgba(11, 87, 147, 0.1);
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.writers-page .popular a:last-child {
  border-bottom: 0;
}

.writers-page .popular a:hover,
.writers-page .popular a:focus-visible {
  color: #0b5793;
  background: #eefcff;
  transform: translateX(3px);
}

.writers-page .popular a > span:first-child {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #fff;
  border-radius: 4px;
  background: #071d3b;
  border: 1px solid rgba(74, 223, 224, 0.42);
  box-shadow: 0 5px 12px rgba(7, 29, 59, 0.2);
  font-size: 12px;
  font-weight: 900;
}

.writers-page .popular-loading {
  margin: 16px 0 4px;
  color: #64738d;
  font-size: 14px;
  font-weight: 700;
}

@media (max-width: 620px) {
  .writers-page .writer-showcase .writer-card-footer,
  .writers-page .writer-showcase .writer-card > .writer-card-footer {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .writers-page .writer-showcase .writer-posts-toggle {
    width: 100%;
    max-width: none;
  }
}

/* Writer-led archive: one visual identity followed by that writer's articles. */
.writers-page .daily-writers,
.writers-page .writer-post-title,
.writers-page .writer-post-list {
  display: none;
}

.writers-page .writer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
}

.writers-page .writer-showcase {
  scroll-margin-top: 24px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d6e2e9;
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(5, 29, 62, 0.1);
}

.writers-page .writer-showcase .writer-card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.writers-page .writer-showcase .writer-card-visual {
  aspect-ratio: 1672 / 941;
}

.writers-page .writer-showcase .writer-card-footer {
  min-height: 104px;
  padding: 18px 24px;
  background: #071d3b;
  border-top: 1px solid rgba(83, 194, 204, 0.35);
}

.writers-page .writer-showcase .writer-card-footer span {
  color: #4adfe0;
}

.writers-page .writer-showcase .writer-card-footer h2 {
  color: #fff;
}

.writers-page .writer-showcase .writer-card-link {
  color: #071d3b;
  background: #42d7d9;
}

.writers-page .writer-showcase-posts {
  padding: 8px 24px 12px;
}

.writers-page .writer-showcase-heading {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #dce6eb;
}

.writers-page .writer-showcase-heading span {
  color: #168d98;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.writers-page .writer-showcase-heading strong {
  color: #657386;
  font-size: 13px;
}

.writers-page .writer-showcase-post {
  position: relative;
  padding: 24px 140px 24px 0;
  border-bottom: 1px solid #e2eaee;
}

.writers-page .writer-showcase-post:last-child {
  border-bottom: 0;
}

.writers-page .writer-showcase-post time {
  display: block;
  margin-bottom: 8px;
  color: #168d98;
  font-size: 13px;
  font-weight: 800;
}

.writers-page .writer-showcase-post h3 {
  max-width: 740px;
  margin: 0;
  color: #071d3b;
  font-size: 25px;
  line-height: 1.24;
}

.writers-page .writer-showcase-post h3 a {
  color: inherit;
}

.writers-page .writer-showcase-post p {
  max-width: 760px;
  margin: 10px 0 0;
  color: #5c6979;
  font-size: 15px;
  line-height: 1.65;
}

.writers-page .writer-post-link {
  position: absolute;
  top: 50%;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0a2d59;
  font-size: 14px;
  font-weight: 800;
  transform: translateY(-50%);
}

.writers-page .writer-post-link span {
  color: #16aeb7;
  font-size: 20px;
}

.writers-page .writer-showcase-empty {
  margin: 0;
  padding: 28px 0;
  color: #687789;
}

html[data-theme="dark"] .writers-page .writer-showcase {
  background: #0d1d31;
  border-color: rgba(114, 191, 205, 0.22);
}

html[data-theme="dark"] .writers-page .writer-showcase-heading,
html[data-theme="dark"] .writers-page .writer-showcase-post {
  border-color: rgba(114, 191, 205, 0.18);
}

html[data-theme="dark"] .writers-page .writer-showcase-post h3,
html[data-theme="dark"] .writers-page .writer-post-link {
  color: #f2f8fb;
}

html[data-theme="dark"] .writers-page .writer-showcase-post p {
  color: #b8c6d2;
}

@media (max-width: 620px) {
  .writers-page .writer-grid {
    gap: 24px;
  }

  .writers-page .writer-showcase {
    border-radius: 6px;
  }

  .writers-page .writer-showcase .writer-card-footer {
    min-height: 82px;
    padding: 14px 16px;
  }

  .writers-page .writer-showcase .writer-card-footer h2 {
    font-size: 20px;
  }

  .writers-page .writer-showcase .writer-card-link {
    width: auto;
    padding: 9px 11px;
  }

  .writers-page .writer-showcase-posts {
    padding: 4px 16px 8px;
  }

  .writers-page .writer-showcase-post {
    padding: 20px 0 22px;
  }

  .writers-page .writer-showcase-post h3 {
    font-size: 21px;
    line-height: 1.3;
  }

  .writers-page .writer-showcase-post p {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.58;
  }

  .writers-page .writer-post-link {
    position: static;
    margin-top: 14px;
    transform: none;
  }
}

/* Writer archive: image-led editorial system */
.writers-page main {
  padding-bottom: 54px;
  background: #f3f7fa;
}

.writers-page .writers-hero {
  width: 100%;
  max-width: none;
  min-height: 260px;
  margin: 0 0 28px;
  padding: 54px max(24px, calc((100% - 1180px) / 2));
  place-items: center;
  color: #fff;
  background: #061a36;
  border: 0;
  border-bottom: 3px solid #22cbd1;
  border-radius: 0;
  box-shadow: none;
  text-align: center;
}

.writers-page .writers-hero::before {
  display: none;
}

.writers-page .writers-hero > div {
  width: min(100%, 820px);
  justify-items: center;
  margin: 0 auto;
}

.writers-page .writers-hero > div > span {
  min-height: 0;
  margin-bottom: 18px;
  padding: 0;
  color: #38dfe1;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 13px;
  letter-spacing: 0;
}

.writers-page .writers-hero .writers-hero-title {
  max-width: 820px;
  margin: 0 auto;
  color: #fff;
  font-size: 44px;
  line-height: 1.18;
  text-align: center;
  text-shadow: none;
}

.writers-page .writers-layout {
  gap: 28px;
}

.writers-page .writers-tabs {
  padding: 6px;
  background: #071d3b;
  border: 0;
  border-radius: 6px;
  box-shadow: 0 12px 30px rgba(4, 24, 52, 0.12);
}

.writers-page .writers-tabs a {
  color: #dceaf4;
  background: transparent;
  border: 0;
  border-radius: 4px;
}

.writers-page .writers-tabs a.active,
.writers-page .writers-tabs a:hover {
  color: #061a36;
  background: #36d8d8;
}

.writers-page .writer-picker {
  grid-template-columns: 180px minmax(0, 1fr);
  background: #fff;
  border-color: #d8e2e9;
  border-radius: 6px;
  box-shadow: 0 10px 26px rgba(6, 26, 54, 0.07);
}

.writers-page .writer-picker-head {
  justify-items: center;
  text-align: center;
  background: #0a2d59;
}

.writers-page .writer-picker-head > span {
  width: 100%;
  text-align: center;
}

.writers-page .writer-picker-list a {
  border-radius: 4px;
}

.writers-page .daily-writers {
  gap: 20px;
}

.writers-page .daily-writers article {
  display: block;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border-color: #d8e2e9;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(5, 29, 62, 0.1);
}

.writers-page .daily-writer-cover,
.writers-page .writer-card-visual {
  display: block;
  width: 100%;
  aspect-ratio: 1672 / 941;
  overflow: hidden;
  background: #061a36;
}

.writers-page .daily-writer-cover img,
.writers-page .writer-card-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.writers-page .daily-writers article:hover .daily-writer-cover img,
.writers-page .writer-card:hover .writer-card-visual img {
  transform: scale(1.015);
}

.writers-page .daily-writer-copy {
  padding: 20px 22px 22px;
}

.writers-page .daily-writers h2 {
  margin: 0;
  color: #071d3b;
  font-size: 26px;
  line-height: 1.2;
}

.writers-page .daily-writers p {
  margin: 12px 0 16px;
}

.writers-page .daily-writers time {
  padding-top: 14px;
  border-top: 1px solid #e2e9ee;
}

.writers-page .section-title {
  margin-bottom: 16px;
  border-bottom-color: #bed1dd;
}

.writers-page .section-title h2 {
  color: #071d3b;
}

.writers-page .writer-grid {
  gap: 20px;
}

.writers-page .writer-card,
.writers-page .writer-card-featured {
  display: block;
  grid-column: auto;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border-color: #d8e2e9;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(5, 29, 62, 0.1);
}

.writers-page .writer-card-footer {
  display: flex;
  width: 100%;
  height: auto;
  min-height: 112px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
}

.writers-page .writer-card > .writer-card-footer {
  display: flex;
  height: auto;
  flex-direction: row;
  align-items: center;
}

.writers-page .writer-card-footer > div {
  min-width: 0;
}

.writers-page .writer-card span,
.writers-page .writer-card-featured span {
  min-height: 0;
  margin: 0 0 6px;
  color: #168d98;
  font-size: 11px;
  line-height: 1.3;
  text-transform: uppercase;
}

.writers-page .writer-card h2,
.writers-page .writer-card-featured h2 {
  margin: 0;
  color: #071d3b;
  font-size: 22px;
  line-height: 1.15;
}

.writers-page .writer-card-link {
  flex: 0 0 auto;
  margin: 0;
  padding: 10px 13px;
  color: #fff;
  background: #0a2d59;
  border-radius: 4px;
}

.writers-page .writer-card > .writer-card-footer > .writer-card-link {
  margin-top: 0;
  padding-top: 10px;
}

.writers-page .writer-card-link:hover {
  color: #061a36;
  background: #36d8d8;
}

.writers-page .writer-post-list article {
  border-radius: 6px;
  border-left: 3px solid #1fcbd0;
  box-shadow: 0 8px 22px rgba(5, 29, 62, 0.06);
}

.writers-page .writers-sidebar section {
  border-radius: 6px;
}

html[data-theme="dark"] .writers-page main {
  background: #091423;
}

html[data-theme="dark"] .writers-page .writer-picker,
html[data-theme="dark"] .writers-page .daily-writers article,
html[data-theme="dark"] .writers-page .writer-card,
html[data-theme="dark"] .writers-page .writer-post-list article {
  background: #0d1d31;
  border-color: rgba(114, 191, 205, 0.22);
}

html[data-theme="dark"] .writers-page .daily-writers h2,
html[data-theme="dark"] .writers-page .writer-card h2,
html[data-theme="dark"] .writers-page .section-title h2 {
  color: #f2f8fb;
}

@media (max-width: 860px) {
  .writers-page .writers-hero {
    min-height: 220px;
    padding: 42px 24px;
  }

  .writers-page .writers-hero .writers-hero-title {
    font-size: 34px;
  }

  .writers-page .writer-picker {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .writers-page main {
    padding-bottom: 36px;
  }

  .writers-page .writers-hero {
    min-height: 200px;
    padding: 34px 38px 36px 24px;
  }

  .writers-page .writers-hero .writers-hero-title {
    max-width: 330px;
    font-size: 30px;
    line-height: 1.22;
  }

  .writers-page .writers-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .writers-page .writers-tabs a {
    justify-content: center;
    padding: 0 8px;
    text-align: center;
  }

  .writers-page .daily-writers,
  .writers-page .writer-grid {
    grid-template-columns: 1fr;
  }

  .writers-page .writer-card-footer {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .writers-page .writer-card > .writer-card-footer {
    height: auto;
    flex-direction: column;
    align-items: flex-start;
  }

  .writers-page .writer-card-link {
    width: 100%;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .writers-page .daily-writer-cover img,
  .writers-page .writer-card-visual img {
    transition: none;
  }
}
