/*
Theme Name: TerAstro Redesign
Theme URI: https://terastro.te.ua/
Author: Codex
Description: Custom dark astronomy theme for TerAstro with ACF-powered homepage sections.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Text Domain: terastro
*/

:root {
  color-scheme: dark;
  --bg: #020710;
  --bg-soft: #07101d;
  --panel: rgba(9, 18, 32, 0.82);
  --panel-strong: rgba(13, 25, 44, 0.94);
  --line: rgba(131, 157, 206, 0.18);
  --text: #f7fbff;
  --muted: #aab7ce;
  --blue: #20c7ff;
  --violet: #7c3dff;
  --pink: #e84cb6;
  --yellow: #f0b341;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 18%, rgba(32, 199, 255, 0.18), transparent 28rem),
    radial-gradient(circle at 86% 14%, rgba(124, 61, 255, 0.22), transparent 24rem),
    linear-gradient(180deg, #030711 0%, #030814 52%, #01040a 100%);
  color: var(--text);
  line-height: 1.5;
}

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

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

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

button,
input {
  font: inherit;
}

.page-shell {
  width: min(100%, 1440px);
  margin: 0 auto;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(2, 7, 16, 0.98)),
    #020710;
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.35);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  min-height: 88px;
  padding: 16px 44px;
  background: rgba(2, 7, 16, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: clamp(188px, 18vw, 242px);
  height: auto;
}

.brand-mark {
  position: relative;
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(137, 164, 255, 0.72);
  border-radius: 50%;
  background:
    radial-gradient(circle at 28% 68%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 64% 28%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 74% 64%, #7fd9ff 0 2px, transparent 3px),
    rgba(6, 12, 25, 0.82);
  box-shadow: inset 0 0 22px rgba(32, 199, 255, 0.18), 0 0 24px rgba(36, 104, 255, 0.16);
}

.brand-mark::before,
.brand-mark::after,
.brand-mark span {
  content: "";
  position: absolute;
  height: 1px;
  background: rgba(236, 245, 255, 0.72);
  transform-origin: left center;
}

.brand-mark::before {
  width: 32px;
  left: 13px;
  top: 34px;
  transform: rotate(-42deg);
}

.brand-mark::after {
  width: 26px;
  left: 18px;
  top: 18px;
  transform: rotate(34deg);
}

.brand-mark span {
  width: 18px;
  left: 29px;
  top: 31px;
  transform: rotate(55deg);
}

.brand strong {
  display: block;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: 0;
}

.brand small {
  display: block;
  max-width: 170px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 2vw, 34px);
  color: #dbe5f5;
  font-size: 14px;
  white-space: nowrap;
}

.main-nav li {
  list-style: none;
}

.main-nav a {
  padding: 10px 0;
  color: #dbe5f5;
  transition: color 160ms ease;
}

.main-nav a:hover {
  color: var(--blue);
}

.header-action,
.btn,
.event-item a,
.subscribe-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  border-radius: 8px;
  font-weight: 700;
}

.header-action {
  padding: 0 26px;
  background: linear-gradient(135deg, #174cff, #8f26ff);
  box-shadow: 0 12px 36px rgba(83, 56, 255, 0.35);
}

.hero {
  position: relative;
  min-height: 560px;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 82px 64px 128px;
  background:
    linear-gradient(90deg, rgba(2, 7, 16, 0.96) 0%, rgba(2, 7, 16, 0.82) 34%, rgba(2, 7, 16, 0.24) 68%, rgba(2, 7, 16, 0.55) 100%),
    linear-gradient(0deg, rgba(2, 7, 16, 0.92), rgba(2, 7, 16, 0.06) 42%, rgba(2, 7, 16, 0.18)),
    url("assets/hero-telescope.jpg") right center / min(62vw, 760px) auto no-repeat,
    radial-gradient(circle at 78% 36%, rgba(38, 131, 255, 0.22), transparent 24rem),
    radial-gradient(circle at 60% 20%, rgba(255, 255, 255, 0.16) 0 1px, transparent 2px),
    #020710;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 8% 24%, rgba(255, 255, 255, 0.86) 0 1px, transparent 1.7px),
    radial-gradient(circle at 18% 72%, rgba(141, 183, 255, 0.72) 0 1px, transparent 1.8px),
    radial-gradient(circle at 38% 18%, rgba(255, 255, 255, 0.68) 0 1px, transparent 1.8px),
    radial-gradient(circle at 58% 64%, rgba(255, 255, 255, 0.74) 0 1px, transparent 1.8px),
    radial-gradient(circle at 83% 20%, rgba(164, 197, 255, 0.82) 0 1px, transparent 1.8px);
  background-size: 290px 190px, 360px 240px, 420px 260px, 320px 220px, 460px 300px;
  opacity: 0.48;
  animation: hero-star-drift 28s linear infinite;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 150px;
  background: linear-gradient(180deg, transparent, var(--bg));
  pointer-events: none;
  z-index: 2;
}

.hero-phenomena {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.phenomenon {
  position: absolute;
  display: block;
}

.phenomenon-aurora {
  right: 20%;
  top: 10%;
  width: min(48vw, 620px);
  height: 260px;
  background:
    radial-gradient(ellipse at 48% 56%, rgba(42, 214, 255, 0.32), transparent 58%),
    radial-gradient(ellipse at 70% 34%, rgba(255, 72, 187, 0.18), transparent 55%),
    radial-gradient(ellipse at 24% 38%, rgba(127, 92, 255, 0.24), transparent 58%);
  filter: blur(26px);
  mix-blend-mode: screen;
  opacity: 0.72;
  transform: rotate(-8deg);
  animation: hero-aurora-pulse 12s ease-in-out infinite;
}

.phenomenon-orbit {
  right: 11%;
  top: 16%;
  width: min(34vw, 420px);
  aspect-ratio: 1;
  border: 1px solid rgba(103, 177, 255, 0.24);
  border-right-color: rgba(255, 77, 189, 0.42);
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: rotate(-20deg);
  animation: hero-orbit-spin 34s linear infinite;
}

.phenomenon-orbit::after {
  content: "";
  position: absolute;
  top: 18%;
  right: 13%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 18px rgba(39, 208, 255, 0.9);
}

.phenomenon-meteor {
  width: 180px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.92), rgba(39, 208, 255, 0.1));
  border-radius: 999px;
  filter: drop-shadow(0 0 8px rgba(39, 208, 255, 0.8));
  opacity: 0;
  transform: rotate(-22deg);
}

.phenomenon-meteor::after {
  content: "";
  position: absolute;
  right: 0;
  top: -2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
}

.phenomenon-meteor-one {
  top: 20%;
  left: 62%;
  animation: hero-meteor-one 8s ease-in-out infinite;
}

.phenomenon-meteor-two {
  top: 42%;
  left: 82%;
  width: 120px;
  animation: hero-meteor-two 13s ease-in-out 4s infinite;
}

.phenomenon-eclipse {
  right: 7%;
  bottom: 28%;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 62% 38%, rgba(255, 255, 255, 0.2), transparent 0 20%),
    radial-gradient(circle at 50% 50%, #050914 0 48%, rgba(39, 208, 255, 0.55) 49% 51%, rgba(39, 208, 255, 0.08) 52% 68%, transparent 69%);
  box-shadow: 0 0 36px rgba(39, 208, 255, 0.28), inset -12px 0 20px rgba(255, 255, 255, 0.08);
  opacity: 0.84;
  animation: hero-eclipse-glow 10s ease-in-out infinite;
}

.phenomenon-star {
  width: 14px;
  height: 14px;
  color: #ffffff;
  opacity: 0.82;
  animation: hero-star-twinkle 3.8s ease-in-out infinite;
}

.phenomenon-star::before,
.phenomenon-star::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  background: currentColor;
  border-radius: 999px;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.42);
}

.phenomenon-star::before {
  width: 2px;
  height: 100%;
}

.phenomenon-star::after {
  width: 100%;
  height: 2px;
}

.phenomenon-star-one {
  left: 48%;
  top: 18%;
}

.phenomenon-star-two {
  right: 34%;
  top: 58%;
  width: 10px;
  height: 10px;
  animation-delay: 1.2s;
}

.phenomenon-star-three {
  right: 12%;
  top: 12%;
  width: 18px;
  height: 18px;
  animation-delay: 2.1s;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 660px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: 620px;
  font-size: clamp(48px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero h1 span {
  color: transparent;
  background: linear-gradient(100deg, #27d0ff, #7c58ff 58%, #ff4dbd);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-copy {
  max-width: 560px;
  margin: 28px 0 34px;
  color: #d3dceb;
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.btn {
  padding: 0 26px;
  border: 1px solid transparent;
}

.btn svg,
.header-action svg,
.section-head svg,
.social-row svg,
.footer-socials svg {
  width: 20px;
  height: 20px;
}

.btn-primary {
  background: linear-gradient(135deg, #174cff, #8f26ff);
  box-shadow: 0 14px 36px rgba(34, 81, 255, 0.35);
}

.btn-secondary {
  color: #dbe6fb;
  background: rgba(10, 20, 36, 0.65);
  border-color: rgba(133, 158, 214, 0.34);
}

.social-row {
  display: flex;
  gap: 24px;
  margin-top: 54px;
}

.social-row a,
.footer-socials a {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  color: #ffffff;
  opacity: 0.9;
  transition: color 160ms ease, opacity 160ms ease;
}

.social-glyph {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.social-row a:hover,
.footer-socials a:hover {
  color: var(--blue);
  opacity: 1;
}

.stats {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  width: calc(100% - 88px);
  margin: -82px auto 0;
  padding: 20px 14px;
  background: rgba(8, 16, 30, 0.82);
  border: 1px solid rgba(131, 157, 206, 0.25);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.stats article {
  display: grid;
  grid-template-columns: 56px auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 14px;
  min-height: 70px;
  padding: 0 28px;
  border-right: 1px solid var(--line);
}

.stats article:last-child {
  border-right: 0;
}

.stats svg {
  grid-row: span 2;
  width: 44px;
  height: 44px;
  color: var(--blue);
}

.stats article:nth-child(2) svg,
.stats article:nth-child(4) svg {
  color: var(--violet);
}

.stats article:nth-child(5) svg {
  color: var(--pink);
}

.stats strong {
  font-size: 34px;
  line-height: 1;
}

.stats span {
  color: #d0d9ea;
  font-size: 14px;
  line-height: 1.15;
}

.section,
.info-grid,
.site-footer {
  width: calc(100% - 88px);
  margin: 34px auto 0;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0;
  font-size: 31px;
  line-height: 1.1;
  letter-spacing: 0;
}

.section-head a,
.info-grid a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #9d86ff;
  font-weight: 700;
}

.section-head a svg,
.info-grid a svg {
  width: 18px;
  height: 18px;
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.activity-card {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.activity-card-link {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.activity-card img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  transition: transform 300ms ease;
}

.activity-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 7, 16, 0.02), rgba(2, 7, 16, 0.28) 36%, rgba(2, 7, 16, 0.92));
}

.activity-card:hover img {
  transform: scale(1.05);
}

.activity-card div {
  position: absolute;
  z-index: 1;
  left: 22px;
  right: 22px;
  bottom: 22px;
  display: grid;
  grid-template-columns: 46px 1fr;
  column-gap: 14px;
  align-items: center;
}

.activity-card svg {
  grid-row: span 2;
  width: 46px;
  height: 46px;
  padding: 10px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--violet));
}

.activity-card:nth-child(3) svg {
  background: linear-gradient(135deg, var(--pink), var(--violet));
}

.activity-card:nth-child(4) svg {
  background: linear-gradient(135deg, var(--yellow), #ff7b3d);
}

.activity-card h3 {
  margin: 0 0 2px;
  font-size: 18px;
}

.activity-card p {
  margin: 0;
  color: #d3dceb;
  font-size: 13px;
}

.event-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 34px;
  align-items: start;
}

.event-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 24px 18px;
  padding-top: 10px;
}

.event-timeline::before {
  content: "";
  position: absolute;
  top: 95px;
  left: 6%;
  right: 6%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(47, 202, 255, 0.7), rgba(129, 72, 255, 0.9), transparent);
}

.event-item {
  position: relative;
  text-align: center;
}

.event-item::after {
  content: "";
  position: absolute;
  top: 89px;
  left: calc(50% - 6px);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 18px 4px rgba(45, 201, 255, 0.72);
}

.event-item:nth-child(even)::after {
  box-shadow: 0 0 18px 4px rgba(124, 61, 255, 0.85);
}

.event-item img {
  width: 112px;
  height: 112px;
  margin: 0 auto 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(142, 167, 224, 0.32);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.38);
}

.event-item small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.event-item h3 {
  min-height: 46px;
  margin: 4px 0 12px;
  font-size: 15px;
  line-height: 1.2;
}

.event-item a {
  min-height: 36px;
  padding: 0 24px;
  color: #a68bff;
  background: rgba(19, 25, 55, 0.78);
  border: 1px solid rgba(124, 61, 255, 0.34);
  font-size: 13px;
}

.calendar-card,
.info-grid article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.calendar-card {
  padding: 20px;
}

.calendar-top {
  display: grid;
  gap: 16px;
}

.calendar-top div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.calendar-top button {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  color: #dce6f7;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.calendar-top button svg {
  width: 18px;
  height: 18px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px 8px;
  margin-top: 18px;
  text-align: center;
}

.calendar-grid b,
.calendar-grid span {
  display: grid;
  place-items: center;
  min-height: 28px;
  color: #d7e2f4;
  font-size: 13px;
}

.calendar-grid b {
  color: #7f8ca7;
  font-size: 11px;
  text-transform: uppercase;
}

.calendar-grid .muted {
  color: #66738d;
}

.calendar-grid .active {
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, #1b78ff, #8a34ff);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.photo-grid a {
  display: block;
}

.photo-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 1.55;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

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

.article-strip .post-card {
  min-height: 100%;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.info-grid article {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  padding: 24px;
}

.info-grid h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.info-grid p {
  max-width: 220px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
}

.info-grid img {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 48%;
  height: 75%;
  object-fit: cover;
  opacity: 0.82;
  mask-image: linear-gradient(90deg, transparent, black 28%);
}

.card-icon {
  position: absolute;
  right: 28px;
  bottom: 28px;
  width: 76px;
  height: 76px;
  color: rgba(213, 225, 255, 0.82);
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.5));
}

.weather {
  display: block;
  margin-bottom: 4px;
  font-size: 36px;
}

.weather-meta {
  display: block;
  margin: 0 0 14px;
  color: #9faec8;
  font-size: 12px;
}

.weather-details {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 210px;
  margin-bottom: 14px;
}

.weather-details span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  color: #dce7ff;
  background: rgba(32, 199, 255, 0.08);
  border: 1px solid rgba(32, 199, 255, 0.18);
  border-radius: 6px;
  font-size: 11px;
  line-height: 1;
}

.weather-icon {
  color: #dce7ff;
}

.observing-weather-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.observing-weather-summary > div,
.observing-day {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.observing-weather-summary > div {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  column-gap: 12px;
  padding: 18px;
}

.observing-weather-summary > div > svg {
  grid-row: span 2;
  width: 34px;
  height: 34px;
  padding: 7px;
  color: #7de7ff;
  background: rgba(32, 199, 255, 0.12);
  border: 1px solid rgba(32, 199, 255, 0.24);
  border-radius: 10px;
}

.observing-weather-summary span,
.observing-day small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.observing-weather-summary strong {
  display: block;
  margin-top: 4px;
  color: #ffffff;
  font-size: 20px;
}

.observing-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.observing-day {
  min-height: 260px;
  padding: 16px;
}

.observing-day-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.observing-day-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  color: #ffffff;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.2), rgba(32, 199, 255, 0.12));
  border: 1px solid rgba(32, 199, 255, 0.28);
  border-radius: 12px;
  box-shadow: 0 0 22px rgba(32, 199, 255, 0.12);
}

.observing-day-icon svg {
  width: 22px;
  height: 22px;
}

.observing-day-head time {
  display: block;
  color: #9faec8;
  font-size: 12px;
}

.observing-day-head strong {
  display: block;
  margin-top: 5px;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.15;
}

.observing-day-head > span {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  min-width: 54px;
  height: 30px;
  color: #ffffff;
  background: rgba(32, 199, 255, 0.12);
  border: 1px solid rgba(32, 199, 255, 0.24);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.observing-day-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.observing-day-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 8px;
  color: #dce7ff;
  background: rgba(32, 199, 255, 0.08);
  border: 1px solid rgba(32, 199, 255, 0.18);
  border-radius: 6px;
  font-size: 11px;
  line-height: 1;
}

.observing-day-metrics svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  color: #7de7ff;
}

.observing-day-score-good {
  border-color: rgba(32, 199, 255, 0.34);
}

.observing-day-score-good .observing-day-icon {
  color: #ffffff;
  border-color: rgba(32, 199, 255, 0.38);
}

.observing-day-score-mid {
  border-color: rgba(255, 203, 75, 0.3);
}

.observing-day-score-mid .observing-day-icon,
.observing-day-score-mid .observing-day-metrics svg {
  color: #ffd166;
}

.observing-day-score-low {
  border-color: rgba(255, 91, 135, 0.28);
}

.observing-day-score-low .observing-day-icon,
.observing-day-score-low .observing-day-metrics svg {
  color: #ff7fa3;
}

.info-card-moon {
  padding-right: 142px;
  background:
    radial-gradient(circle at 82% 34%, rgba(143, 38, 255, 0.16), transparent 8rem),
    var(--panel);
}

.info-card-moon p {
  max-width: 190px;
}

.moon-orbital {
  position: absolute;
  right: 22px;
  bottom: 22px;
  display: grid;
  justify-items: center;
  width: 104px;
}

.moon {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 62% 42%, transparent 0 43%, rgba(2, 7, 16, 0.96) 44% 70%, transparent 72%),
    radial-gradient(circle at 38% 38%, #e7eef8, #a7b5c8 46%, #536070 73%);
  box-shadow: inset var(--moon-shadow-x, -18px) 0 28px rgba(0, 0, 0, 0.32), 0 0 35px rgba(96, 152, 255, 0.16);
  filter: brightness(var(--moon-brightness, 1));
}

.moon-details {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 210px;
  margin: 0 0 14px;
}

.moon-details span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  color: #eadfff;
  background: rgba(143, 38, 255, 0.1);
  border: 1px solid rgba(143, 38, 255, 0.22);
  border-radius: 6px;
  font-size: 11px;
  line-height: 1;
}

.moon-percent {
  display: inline-grid;
  place-items: center;
  min-width: 54px;
  min-height: 26px;
  margin-top: 8px;
  color: #ffffff;
  background: rgba(143, 38, 255, 0.18);
  border: 1px solid rgba(143, 38, 255, 0.32);
  border-radius: 999px;
  font-size: 15px;
}

.moon-month-toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.moon-month-toolbar strong {
  color: #ffffff;
  font-size: 20px;
}

.moon-month-toolbar .text-link:last-child {
  justify-self: end;
}

.moon-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.moon-day {
  position: relative;
  overflow: hidden;
  min-height: 214px;
  padding: 14px;
  background:
    radial-gradient(circle at 50% 35%, rgba(143, 38, 255, 0.1), transparent 8rem),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.moon-day-top,
.moon-day > span,
.moon-day strong,
.moon-day small {
  display: block;
}

.moon-day-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.moon-day time {
  color: #9faec8;
  font-size: 12px;
}

.moon-day-top svg {
  width: 16px;
  height: 16px;
  color: #ffdb7a;
  filter: drop-shadow(0 0 10px rgba(255, 219, 122, 0.42));
}

.moon-phase-graphic {
  position: relative;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin: 12px auto 14px;
}

.moon-phase-disk,
.moon-phase-glow {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.moon-phase-disk {
  z-index: 1;
  background:
    radial-gradient(circle at 38% 32%, rgba(255, 255, 255, 0.72), transparent 0 7%, transparent 8%),
    radial-gradient(circle at 66% 62%, rgba(35, 43, 58, 0.2), transparent 0 9%, transparent 10%),
    radial-gradient(circle at 42% 58%, rgba(35, 43, 58, 0.16), transparent 0 6%, transparent 7%),
    linear-gradient(90deg, #dce6f4, #aab6c8 52%, #5f6a7a);
  box-shadow:
    inset var(--moon-shadow-x, 0) 0 42px rgba(2, 7, 16, 0.92),
    inset var(--moon-light-x, 0) 0 18px rgba(255, 255, 255, 0.13);
  filter: brightness(var(--moon-brightness, 1));
}

.moon-phase-glow {
  background:
    radial-gradient(circle, rgba(220, 232, 255, var(--moon-glow-alpha, 0.18)) 0 38%, transparent 70%);
  filter: blur(10px);
  transform: scale(1.22);
}

.moon-day > span {
  min-height: 38px;
  margin: 8px 0;
  color: #f3f6ff;
  font-weight: 800;
  line-height: 1.15;
}

.moon-day strong {
  color: #9d86ff;
  font-size: 22px;
}

.moon-day small {
  margin-top: 8px;
  color: var(--muted);
}

.moon-day.is-key-phase {
  border-color: rgba(143, 38, 255, 0.42);
  box-shadow: 0 0 0 1px rgba(143, 38, 255, 0.12), var(--shadow);
}

.moon-day.is-key-phase .moon-phase-disk {
  box-shadow:
    inset var(--moon-shadow-x, 0) 0 42px rgba(2, 7, 16, 0.9),
    inset var(--moon-light-x, 0) 0 18px rgba(255, 255, 255, 0.14),
    0 0 30px rgba(143, 38, 255, 0.24);
}

.site-footer {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1.05fr 1.3fr;
  gap: 44px;
  padding: 34px 0 18px;
  border-top: 1px solid var(--line);
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 15px;
}

.site-footer a,
.site-footer li,
.subscribe-form label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #c5d1e4;
  font-size: 14px;
}

.site-footer ul,
.site-footer li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a svg {
  width: 16px;
  height: 16px;
}

.footer-socials {
  display: flex;
  gap: 15px;
  margin-top: 12px;
}

.footer-socials a {
  margin-bottom: 0;
}

.subscribe-form div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 12px;
}

.subscribe-form input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(3, 9, 20, 0.82);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
}

.subscribe-form input:focus {
  border-color: rgba(32, 199, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(32, 199, 255, 0.12);
}

.subscribe-form button {
  min-width: 160px;
  padding: 0 20px;
  color: #fff;
  background: linear-gradient(135deg, #174cff, #8f26ff);
  border: 0;
  cursor: pointer;
}

.form-status {
  margin: 10px 0 0;
  color: #dce6f7;
  font-size: 13px;
}

.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 18px;
  color: #8f9ab0;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

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

.internal-hero,
.content-section,
.listing-section,
.contact-layout {
  width: calc(100% - 88px);
  margin: 0 auto;
}

.internal-hero {
  padding: 86px 0 44px;
  background:
    radial-gradient(circle at 88% 28%, rgba(124, 61, 255, 0.2), transparent 24rem),
    radial-gradient(circle at 12% 18%, rgba(32, 199, 255, 0.12), transparent 22rem);
}

.internal-hero > div {
  max-width: 860px;
}

.internal-hero h1 {
  margin: 0;
  max-width: 920px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1;
  letter-spacing: 0;
}

.internal-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 22px 0 0;
  color: #d3dceb;
  font-size: 18px;
}

.content-section,
.listing-section,
.contact-layout {
  margin-top: 24px;
}

.content-cover {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.content-body {
  max-width: 900px;
  color: #d9e2f2;
  font-size: 18px;
}

.content-section .content-body {
  margin-top: 28px;
}

.content-body > *:first-child {
  margin-top: 0;
}

.content-body h2,
.content-body h3,
.content-body h4 {
  color: var(--text);
  line-height: 1.15;
}

.content-body a {
  color: #9d86ff;
  font-weight: 700;
}

.content-body img {
  height: auto;
  border-radius: 8px;
}

.content-body blockquote {
  margin: 28px 0;
  padding: 22px 26px;
  color: #f1f6ff;
  background: var(--panel);
  border-left: 3px solid var(--blue);
  border-radius: 8px;
}

.content-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin: 24px 0 0;
  color: var(--muted);
}

.content-meta span,
.content-meta a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.content-meta svg {
  width: 18px;
  height: 18px;
  color: var(--blue);
}

.single-layout {
  max-width: 960px;
}

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

.post-card,
.resource-card,
.contact-card,
.empty-state {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.post-card {
  overflow: hidden;
}

.post-card-media img {
  width: 100%;
  aspect-ratio: 1.55;
  object-fit: cover;
}

.post-card-body {
  padding: 22px;
}

.post-card time {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}

.post-card h2 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.15;
}

.post-card p,
.resource-card p,
.empty-state p {
  color: var(--muted);
}

.text-link,
.card-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #9d86ff;
  font-weight: 800;
}

.text-link svg,
.card-inline-link svg {
  width: 17px;
  height: 17px;
}

.pagination,
.post-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 34px;
}

.pagination a,
.pagination span,
.post-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 0 14px;
  color: #dbe6fb;
  background: rgba(10, 20, 36, 0.65);
  border: 1px solid rgba(133, 158, 214, 0.34);
  border-radius: 8px;
}

.pagination .current,
.pagination a:hover,
.post-nav a:hover {
  color: #fff;
  background: linear-gradient(135deg, #174cff, #8f26ff);
}

.post-nav {
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

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

.gallery-listing figure {
  position: relative;
  min-height: 280px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.gallery-listing img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}

.gallery-listing figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  gap: 4px;
  padding: 18px;
  background: linear-gradient(180deg, transparent, rgba(2, 7, 16, 0.94) 24%);
}

.gallery-listing figcaption span {
  color: #d3dceb;
  font-size: 14px;
}

.resource-card {
  padding: 24px;
}

.resource-card a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
}

.resource-card svg {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  color: var(--blue);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 34px;
  align-items: start;
}

.contact-grid {
  display: grid;
  gap: 14px;
}

.contact-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 4px 16px;
  align-items: center;
  min-height: 96px;
  padding: 18px;
}

.contact-card svg {
  grid-row: span 2;
  width: 40px;
  height: 40px;
  color: var(--blue);
}

.contact-card span {
  color: var(--muted);
  font-size: 13px;
}

.contact-card strong {
  color: var(--text);
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  max-width: 760px;
  margin-bottom: 28px;
}

.search-form input {
  min-height: 48px;
  padding: 0 16px;
  color: var(--text);
  background: rgba(3, 9, 20, 0.82);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.search-form button {
  min-height: 48px;
  padding: 0 24px;
  color: #fff;
  background: linear-gradient(135deg, #174cff, #8f26ff);
  border: 0;
  border-radius: 8px;
  font-weight: 800;
}

.empty-state {
  max-width: 760px;
  padding: 34px;
}

@keyframes hero-star-drift {
  from {
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0;
  }

  to {
    background-position: 290px 190px, -360px 240px, 420px -260px, -320px -220px, 460px 300px;
  }
}

@keyframes hero-aurora-pulse {
  0%,
  100% {
    opacity: 0.48;
    transform: translate3d(0, 0, 0) rotate(-8deg) scale(1);
  }

  50% {
    opacity: 0.84;
    transform: translate3d(-3%, 4%, 0) rotate(-5deg) scale(1.08);
  }
}

@keyframes hero-orbit-spin {
  from {
    transform: rotate(-20deg);
  }

  to {
    transform: rotate(340deg);
  }
}

@keyframes hero-meteor-one {
  0%,
  56% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(-22deg);
  }

  62% {
    opacity: 1;
  }

  76%,
  100% {
    opacity: 0;
    transform: translate3d(-52vw, 21vw, 0) rotate(-22deg);
  }
}

@keyframes hero-meteor-two {
  0%,
  64% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(-18deg);
  }

  70% {
    opacity: 0.8;
  }

  84%,
  100% {
    opacity: 0;
    transform: translate3d(-42vw, 14vw, 0) rotate(-18deg);
  }
}

@keyframes hero-eclipse-glow {
  0%,
  100% {
    box-shadow: 0 0 28px rgba(39, 208, 255, 0.22), inset -12px 0 20px rgba(255, 255, 255, 0.08);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 54px rgba(39, 208, 255, 0.4), inset -14px 0 24px rgba(255, 255, 255, 0.12);
    transform: scale(1.05);
  }
}

@keyframes hero-star-twinkle {
  0%,
  100% {
    opacity: 0.36;
    transform: scale(0.78) rotate(0deg);
  }

  50% {
    opacity: 1;
    transform: scale(1.15) rotate(12deg);
  }
}

@media (max-width: 1180px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .stats,
  .activity-grid,
  .photo-grid,
  .article-strip,
  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats article:nth-child(2n) {
    border-right: 0;
  }

  .stats article:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    justify-content: center;
  }

  .event-layout {
    grid-template-columns: 1fr;
  }

  .calendar-card {
    max-width: 460px;
  }

  .site-footer {
    grid-template-columns: repeat(2, 1fr);
  }

  .post-grid,
  .resource-grid,
  .gallery-listing,
  .moon-month-grid,
  .observing-weather-summary,
  .observing-week-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }
}

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

  .site-header {
    min-height: auto;
    padding: 14px 18px;
    gap: 14px;
  }

  .brand strong {
    font-size: 20px;
  }

  .brand small {
    max-width: 140px;
    font-size: 10px;
  }

  .brand-logo {
    width: 174px;
  }

  .brand-mark {
    width: 46px;
    height: 46px;
  }

  .header-action {
    min-height: 40px;
    padding: 0 14px;
    font-size: 13px;
  }

  .main-nav {
    gap: 18px;
    font-size: 13px;
  }

  .hero {
    min-height: 620px;
    padding: 64px 22px 120px;
    background:
      linear-gradient(180deg, rgba(2, 7, 16, 0.82), rgba(2, 7, 16, 0.48) 42%, rgba(2, 7, 16, 0.96) 100%),
      url("assets/hero-telescope.jpg") center top / cover no-repeat;
  }

  .phenomenon-aurora {
    right: -18%;
    top: 8%;
    width: 92vw;
    height: 220px;
    opacity: 0.46;
  }

  .phenomenon-orbit,
  .phenomenon-eclipse {
    opacity: 0.42;
    transform: scale(0.78);
  }

  .phenomenon-orbit {
    right: -14%;
    top: 16%;
    width: 64vw;
  }

  .phenomenon-eclipse {
    right: 7%;
    bottom: 36%;
  }

  .phenomenon-meteor-one {
    left: 72%;
  }

  .phenomenon-meteor-two,
  .phenomenon-star-two {
    display: none;
  }

  .hero-copy {
    font-size: 16px;
  }

  .hero-actions {
    display: grid;
  }

  .social-row {
    margin-top: 34px;
  }

  .stats,
  .section,
  .info-grid,
  .internal-hero,
  .content-section,
  .listing-section,
  .contact-layout,
  .site-footer {
    width: calc(100% - 32px);
  }

  .stats {
    grid-template-columns: 1fr;
    margin-top: -64px;
    padding: 0;
  }

  .stats article,
  .stats article:nth-child(2n),
  .stats article:last-child {
    grid-column: auto;
    border-right: 0;
    border-top: 1px solid var(--line);
    justify-content: start;
    padding: 18px;
  }

  .stats article:first-child {
    border-top: 0;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .section-head h2 {
    font-size: 26px;
  }

  .activity-grid,
  .event-timeline,
  .photo-grid,
  .article-strip,
  .info-grid,
  .post-grid,
  .resource-grid,
  .gallery-listing,
  .moon-month-grid,
  .observing-weather-summary,
  .observing-week-grid,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .internal-hero {
    padding-top: 54px;
  }

  .content-body {
    font-size: 16px;
  }

  .search-form {
    grid-template-columns: 1fr;
  }

  .event-timeline {
    gap: 18px;
  }

  .event-timeline::before,
  .event-item::after {
    display: none;
  }

  .event-item {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 14px 18px;
    align-items: center;
    text-align: left;
    padding: 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  .event-item img {
    grid-row: span 3;
    width: 92px;
    height: 92px;
    margin: 0;
  }

  .event-item h3 {
    min-height: 0;
    margin: 0;
  }

  .event-item a {
    width: fit-content;
  }

  .photo-grid {
    gap: 12px;
  }

  .photo-grid img {
    aspect-ratio: 1.8;
  }

  .info-card-moon {
    min-height: 250px;
    padding-right: 24px;
  }

  .info-card-moon p {
    max-width: 100%;
  }

  .moon-orbital {
    right: 22px;
    bottom: 22px;
  }

  .moon-details {
    max-width: calc(100% - 120px);
  }

  .moon-month-toolbar {
    grid-template-columns: 1fr;
  }

  .moon-month-toolbar .text-link:last-child {
    justify-self: start;
  }

  .subscribe-form div,
  .footer-bottom {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .subscribe-form button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before,
  .phenomenon {
    animation: none !important;
  }

  .phenomenon-meteor {
    display: none;
  }
}
