/*
Theme Name: Cloud Index Journal
Author: Rowan Vale Works
Description: A classic WordPress theme for The Void with a full-screen illustrated hero, dynamic category navigation, and quiet editorial layouts.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: tvx-theme
Tags: blog, custom-logo, custom-menu, featured-images, responsive-layout, translation-ready
*/

:root {
  --tvx-ink: #102049;
  --tvx-navy: #193486;
  --tvx-navy-deep: #0b1d5f;
  --tvx-blue: #2f5790;
  --tvx-blue-soft: #899ec4;
  --tvx-cream: #faf9f1;
  --tvx-cream-soft: #f2f1df;
  --tvx-peach: #f5b596;
  --tvx-line: rgba(250, 249, 241, 0.34);
  --tvx-shadow: 0 24px 60px rgba(11, 29, 95, 0.28);
  --tvx-sans: Inter, Manrope, "Segoe UI", Arial, sans-serif;
  --tvx-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--tvx-blue);
  color: var(--tvx-cream);
  font-family: var(--tvx-sans);
  font-size: 16px;
  line-height: 1.6;
}

body.admin-bar .tvx-site-header {
  top: 32px;
}

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

img {
  display: block;
  height: auto;
  max-width: 100%;
}

.tvx-screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.tvx-site {
  min-height: 100vh;
  overflow-x: clip;
}

.tvx-site-header {
  left: 0;
  pointer-events: none;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 50;
}

.tvx-header-shell {
  align-items: center;
  backdrop-filter: blur(18px);
  background: linear-gradient(90deg, rgba(25, 52, 134, 0.92), rgba(166, 185, 219, 0.9));
  border: 1px solid rgba(250, 249, 241, 0.18);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(9, 24, 82, 0.18);
  display: flex;
  gap: 28px;
  justify-content: space-between;
  margin: 28px auto 0;
  max-width: 1240px;
  min-height: 78px;
  padding: 14px 18px;
  pointer-events: auto;
  width: min(calc(100% - 48px), 1240px);
}

.tvx-brand {
  align-items: center;
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  font-family: var(--tvx-serif);
  font-size: clamp(2rem, 3vw, 3.15rem);
  font-weight: 700;
  line-height: 1;
  min-width: 0;
}

.tvx-brand img {
  max-height: 48px;
  width: auto;
}

.tvx-brand-text {
  text-shadow: 0 6px 28px rgba(5, 18, 72, 0.22);
}

.tvx-menu-toggle {
  display: none;
}

.tvx-menu-button {
  align-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: none;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.tvx-menu-button span,
.tvx-menu-button span::before,
.tvx-menu-button span::after {
  background: #fff;
  border-radius: 999px;
  content: "";
  display: block;
  height: 2px;
  transition: transform 180ms ease, opacity 180ms ease;
  width: 22px;
}

.tvx-menu-button span::before {
  transform: translateY(-7px);
}

.tvx-menu-button span::after {
  transform: translateY(5px);
}

.tvx-nav-wrap {
  align-items: center;
  display: flex;
  gap: 22px;
}

.tvx-nav {
  align-items: center;
  display: flex;
  gap: 10px;
}

.tvx-nav ul {
  align-items: center;
  display: flex;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tvx-nav a {
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 12px 15px;
}

.tvx-nav a:focus-visible,
.tvx-nav a:hover {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.tvx-header-cta,
.tvx-button {
  align-items: center;
  background: var(--tvx-cream);
  border: 0;
  border-radius: 7px;
  color: var(--tvx-navy-deep);
  display: inline-flex;
  font-weight: 800;
  gap: 12px;
  justify-content: center;
  line-height: 1;
  min-height: 52px;
  padding: 0 20px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.tvx-header-cta:hover,
.tvx-button:hover {
  box-shadow: 0 12px 28px rgba(11, 29, 95, 0.22);
  transform: translateY(-1px);
}

.tvx-button-icon {
  font-size: 1.3em;
  line-height: 1;
}

.tvx-hero {
  background-color: var(--tvx-navy);
  background-image: linear-gradient(180deg, rgba(7, 23, 91, 0.08), rgba(47, 87, 144, 0.1)), var(--tvx-hero-image);
  background-position: center bottom;
  background-repeat: no-repeat;
  background-size: cover;
  display: grid;
  min-height: 100vh;
  overflow: hidden;
  padding: 130px 24px 90px;
  place-items: center;
  position: relative;
}

.tvx-hero::after {
  background: linear-gradient(180deg, rgba(47, 87, 144, 0), rgba(47, 87, 144, 0.8));
  bottom: 0;
  content: "";
  height: 18vh;
  left: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
}

.tvx-hero-inner {
  margin-top: -4vh;
  max-width: 740px;
  position: relative;
  text-align: center;
  z-index: 2;
}

.tvx-hero-title {
  color: #fff;
  font-family: var(--tvx-serif);
  font-size: clamp(3.15rem, 6.2vw, 5.65rem);
  font-weight: 500;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

.tvx-hero-copy {
  color: #fff;
  font-size: clamp(1rem, 1.35vw, 1.22rem);
  font-weight: 700;
  line-height: 1.55;
  margin: 28px auto 34px;
  max-width: 680px;
  text-wrap: balance;
}

.tvx-main {
  background: linear-gradient(180deg, var(--tvx-blue), #335f98 42%, #294d87);
  min-height: 100vh;
}

.tvx-section {
  margin: 0 auto;
  max-width: 1240px;
  padding: 96px 24px;
  position: relative;
}

.tvx-section-head {
  margin: 0 auto 44px;
  max-width: 760px;
  text-align: center;
}

.tvx-kicker {
  color: rgba(250, 249, 241, 0.76);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.tvx-section-title,
.tvx-archive-title,
.tvx-entry-title {
  color: #fff;
  font-family: var(--tvx-serif);
  font-size: clamp(2.25rem, 4.5vw, 4rem);
  font-weight: 500;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

.tvx-section-copy {
  color: rgba(250, 249, 241, 0.9);
  font-weight: 650;
  margin: 14px auto 0;
  max-width: 640px;
}

.tvx-category-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: -18px auto 58px;
  max-width: 1060px;
}

.tvx-chip {
  background: rgba(250, 249, 241, 0.96);
  border: 1px solid rgba(25, 52, 134, 0.14);
  border-radius: 999px;
  color: var(--tvx-navy);
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 10px 18px;
}

.tvx-chip:hover {
  background: var(--tvx-navy);
  color: #fff;
}

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

.tvx-card {
  background: var(--tvx-navy);
  border-radius: 18px;
  box-shadow: var(--tvx-shadow);
  color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
}

.tvx-card:nth-child(2n) {
  background: var(--tvx-cream-soft);
  color: var(--tvx-navy);
}

.tvx-card-media {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, rgba(250, 249, 241, 0.2), rgba(245, 181, 150, 0.38)), var(--tvx-hero-image);
  background-position: center;
  background-size: cover;
  border-radius: 14px;
  margin: 16px 16px 0;
  overflow: hidden;
}

.tvx-card-media img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.tvx-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

.tvx-card-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.tvx-card-category {
  background: rgba(250, 249, 241, 0.18);
  border-radius: 999px;
  color: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 5px 10px;
}

.tvx-card:nth-child(2n) .tvx-card-category {
  background: rgba(25, 52, 134, 0.12);
}

.tvx-card-date {
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0.86;
}

.tvx-card-title {
  font-family: var(--tvx-serif);
  font-size: clamp(1.55rem, 2.1vw, 2rem);
  font-weight: 500;
  line-height: 1.18;
  margin: 0 0 14px;
}

.tvx-card-title a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.tvx-card-excerpt {
  font-weight: 650;
  margin: 0 0 20px;
  opacity: 0.92;
}

.tvx-read-more {
  align-items: center;
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 850;
  gap: 10px;
  margin-top: auto;
}

.tvx-read-more:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.tvx-empty {
  background: rgba(250, 249, 241, 0.1);
  border: 1px solid var(--tvx-line);
  border-radius: 18px;
  padding: 28px;
  text-align: center;
}

.tvx-archive-hero {
  background: linear-gradient(180deg, var(--tvx-navy-deep), var(--tvx-blue));
  padding: 170px 24px 76px;
  text-align: center;
}

.tvx-archive-description {
  color: rgba(250, 249, 241, 0.88);
  font-weight: 650;
  margin: 14px auto 0;
  max-width: 680px;
}

.tvx-single-wrap {
  margin: 0 auto;
  max-width: 980px;
  padding: 170px 0 96px;
  width: 80vw;
}

.tvx-single-card {
  background: var(--tvx-cream);
  border-radius: 20px;
  box-shadow: var(--tvx-shadow);
  color: #1d2540;
  padding: clamp(28px, 5vw, 64px);
}

.tvx-entry-meta {
  color: rgba(29, 37, 64, 0.72);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.92rem;
  font-weight: 750;
  gap: 12px;
  margin: 18px 0 30px;
}

.tvx-entry-title {
  color: var(--tvx-ink);
}

.tvx-entry-content {
  font-size: 1.08rem;
}

.tvx-entry-content a {
  color: var(--tvx-navy);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.tvx-entry-content h2,
.tvx-entry-content h3,
.tvx-entry-content h4 {
  color: var(--tvx-ink);
  font-family: var(--tvx-serif);
  font-weight: 500;
  line-height: 1.18;
  margin-top: 1.7em;
}

.tvx-entry-content img {
  border-radius: 14px;
}

.tvx-post-nav {
  border-top: 1px solid rgba(25, 52, 134, 0.14);
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
  margin-top: 46px;
  padding-top: 24px;
}

.tvx-post-nav a {
  color: var(--tvx-navy);
  font-weight: 850;
}

.tvx-post-nav-next {
  text-align: right;
}

.tvx-site-footer {
  background: var(--tvx-navy-deep);
  color: rgba(250, 249, 241, 0.86);
  padding: 34px 24px;
}

.tvx-footer-inner {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1240px;
}

.tvx-footer-title {
  color: #fff;
  font-family: var(--tvx-serif);
  font-size: 1.8rem;
}

.tvx-footer-copy {
  font-size: 0.9rem;
  font-weight: 650;
}

.tvx-pagination {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 44px;
}

.tvx-pagination .page-numbers {
  background: rgba(250, 249, 241, 0.95);
  border-radius: 999px;
  color: var(--tvx-navy);
  display: inline-flex;
  font-weight: 850;
  min-width: 42px;
  padding: 9px 14px;
  justify-content: center;
}

.tvx-pagination .current {
  background: var(--tvx-navy);
  color: #fff;
}

@media (max-width: 900px) {
  body.admin-bar .tvx-site-header {
    top: 46px;
  }

  .tvx-header-shell {
    border-radius: 0;
    margin-top: 0;
    min-height: 72px;
    width: 100%;
  }

  .tvx-brand {
    font-size: 2rem;
  }

  .tvx-menu-button {
    display: inline-flex;
  }

  .tvx-menu-toggle:checked + .tvx-menu-button span {
    transform: rotate(45deg);
  }

  .tvx-menu-toggle:checked + .tvx-menu-button span::before {
    opacity: 0;
  }

  .tvx-menu-toggle:checked + .tvx-menu-button span::after {
    transform: translateY(-2px) rotate(-90deg);
  }

  .tvx-nav-wrap {
    background: rgba(25, 52, 134, 0.98);
    border-bottom: 1px solid rgba(250, 249, 241, 0.16);
    display: none;
    flex-direction: column;
    left: 0;
    padding: 18px 24px 24px;
    position: absolute;
    right: 0;
    top: 72px;
  }

  .tvx-menu-toggle:checked ~ .tvx-nav-wrap {
    display: flex;
  }

  .tvx-nav,
  .tvx-nav ul {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .tvx-nav a,
  .tvx-header-cta {
    justify-content: center;
    width: 100%;
  }

  .tvx-hero {
    min-height: 100vh;
    padding: 114px 20px 80px;
  }

  .tvx-hero-inner {
    margin-top: -12vh;
  }

  .tvx-hero-title {
    font-size: clamp(2.55rem, 12vw, 4rem);
  }

  .tvx-post-grid {
    grid-template-columns: 1fr;
  }

  .tvx-section {
    padding: 72px 20px;
  }

  .tvx-single-wrap {
    padding-top: 120px;
    width: 80vw;
  }

  .tvx-footer-inner,
  .tvx-post-nav {
    grid-template-columns: 1fr;
  }

  .tvx-footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .tvx-post-nav-next {
    text-align: left;
  }
}

@media (max-width: 600px) {
  body.admin-bar .tvx-site-header {
    top: 0;
  }

  .tvx-hero-copy {
    font-size: 0.98rem;
  }

  .tvx-button {
    width: min(100%, 260px);
  }

  .tvx-category-bar {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }
}
