/* ================================
   CUSTOM PROPERTIES
================================ */
:root {
  --bg-deep:       #060810;
  --card-bg:       rgba(10, 14, 22, 0.96);
  --border-dark:   rgba(40, 60, 100, 0.45);
  --border-bright: rgba(70, 110, 170, 0.6);
  --text-main:     #9aadc4;
  --text-dim:      #4a5f7a;
  --text-bright:   #c8d8ee;
  --accent:        #6a9fd8;
  --accent-dim:    #2a4a7a;
  --glow-blue:     rgba(50, 90, 170, 0.35);
  --glow-deep:     rgba(10, 20, 60, 0.4);
  --shine-color:   rgba(80, 120, 200, 0.06);
}

/* ================================
   RESET & BASE
================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Nunito', 'Arial Rounded MT Bold', Arial, sans-serif;
  min-height: 100vh;
  color: var(--text-main);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(30, 55, 110, 0.3) 0%, transparent 65%),
    radial-gradient(ellipse at 80% 100%, rgba(10, 20, 60, 0.3) 0%, transparent 50%),
    linear-gradient(160deg, #080b12 0%, #060810 55%, #090c14 100%);
  background-attachment: fixed;
}

/* ================================
   GRAIN OVERLAY
================================ */
.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.78' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='250' height='250' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 38%,
    rgba(0, 0, 0, 0.78) 100%
  );
  pointer-events: none;
  z-index: 0;
}

.bg-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ================================
   HEADER
================================ */
.site-header {
  background: linear-gradient(
    180deg,
    rgba(12, 18, 32, 0.95) 0%,
    rgba(8, 12, 22, 0.9) 100%
  );
  border-bottom: 1px solid var(--border-bright);
  box-shadow:
    0 4px 30px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(80, 130, 210, 0.1);
  padding: 18px 24px;
  position: relative;
  overflow: hidden;
}

.site-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(80, 130, 210, 0.65) 50%,
    transparent
  );
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 780px;
  margin: 0 auto;
  width: 100%;
}

.back-btn {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-dim);
  text-decoration: none;
  border: 1px solid var(--border-dark);
  border-radius: 999px;
  padding: 5px 14px;
  background: rgba(20, 30, 55, 0.7);
  transition: all 0.16s ease;
  white-space: nowrap;
}

.back-btn:hover {
  color: var(--text-bright);
  border-color: var(--border-bright);
  background: rgba(30, 55, 100, 0.8);
  box-shadow: 0 0 10px var(--glow-blue);
}

.header-spacer {
  /* mirrors back-btn width so title stays centered */
  width: 90px;
}

.site-title {
  font-family: 'Cinzel', serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--accent);
  text-shadow:
    0 0 18px rgba(80, 140, 220, 0.5),
    0 2px 4px rgba(0, 0, 0, 0.9);
  letter-spacing: 3px;
  text-align: center;
}

/* ================================
   NAV
================================ */
.site-nav {
  background: rgba(6, 9, 16, 0.75);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border-dark);
  padding: 10px 20px;
  display: flex;
  justify-content: center;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.site-nav a {
  display: block;
  padding: 8px 20px;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    rgba(18, 26, 46, 0.98) 0%,
    rgba(10, 15, 28, 0.98) 100%
  );
  border: 1.5px solid var(--border-dark);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(80, 130, 210, 0.08);
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  transition: all 0.18s ease;
}

.site-nav a:hover,
.site-nav a.active {
  background: linear-gradient(
    180deg,
    rgba(30, 58, 110, 0.98) 0%,
    rgba(16, 34, 72, 0.98) 100%
  );
  color: var(--text-bright);
  border-color: var(--border-bright);
  box-shadow:
    0 3px 14px rgba(0, 0, 0, 0.7),
    0 0 12px var(--glow-blue),
    inset 0 1px 0 rgba(100, 160, 240, 0.15);
  transform: translateY(-1px);
}

/* ================================
   MAIN
================================ */
.site-main {
  flex: 1;
  max-width: 780px;
  width: 100%;
  margin: 32px auto;
  padding: 0 20px;
}

/* ================================
   SECTION TITLE
================================ */
.section-title {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 20px;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
  text-shadow: 0 0 12px rgba(70, 130, 210, 0.4);
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(60, 100, 180, 0.6),
    transparent 70%
  );
}

/* ================================
   BLOG CARDS
================================ */
.blog-card {
  background: var(--card-bg);
  border-radius: 18px;
  border: 1px solid var(--border-dark);
  box-shadow:
    0 6px 30px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(70, 110, 180, 0.06),
    0 0 0 1px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
  margin-bottom: 22px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.blog-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-bright);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.7),
    0 0 22px var(--glow-blue),
    0 0 8px var(--glow-deep),
    inset 0 1px 0 rgba(90, 140, 220, 0.1);
}

/* Full post card — no hover lift */
.post-full {
  cursor: default;
}

.post-full:hover {
  transform: none;
  border-color: var(--border-dark);
  box-shadow:
    0 6px 30px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(70, 110, 180, 0.06);
}

.card-shine {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 42%;
  background: linear-gradient(
    180deg,
    var(--shine-color) 0%,
    transparent 100%
  );
  border-radius: 18px 18px 50% 50% / 18px 18px 28px 28px;
  pointer-events: none;
  z-index: 1;
}

.blog-card::before {
  content: '';
  position: absolute;
  top: 15%;
  bottom: 15%;
  left: 0;
  width: 2px;
  background: linear-gradient(
    180deg,
    transparent,
    var(--accent-dim) 30%,
    rgba(30, 60, 130, 0.8) 70%,
    transparent
  );
  border-radius: 0 2px 2px 0;
}

.card-body {
  padding: 22px 26px;
  position: relative;
  z-index: 2;
}

.post-date {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.post-title {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-bright);
  margin: 8px 0 12px;
  line-height: 1.4;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.post-excerpt {
  font-size: 0.91rem;
  color: var(--text-main);
  line-height: 1.7;
  margin-bottom: 18px;
  opacity: 0.85;
}

/* Full post body text */
.post-body {
  margin: 4px 0 22px;
}

.post-body-text {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.8;
  margin-bottom: 1.2em;
  opacity: 0.9;
}

.post-body-text:last-child {
  margin-bottom: 0;
}

/* ================================
   BUTTONS
================================ */
.read-more-btn {
  display: inline-block;
  padding: 7px 18px;
  background: linear-gradient(
    180deg,
    rgba(28, 52, 100, 0.95) 0%,
    rgba(14, 28, 60, 0.98) 100%
  );
  color: var(--text-bright);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
  border: 1px solid var(--border-bright);
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(100, 160, 240, 0.1);
  transition: all 0.18s ease;
  letter-spacing: 0.5px;
}

.read-more-btn:hover {
  background: linear-gradient(
    180deg,
    rgba(40, 75, 145, 0.98) 0%,
    rgba(20, 42, 90, 0.98) 100%
  );
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.65),
    0 0 14px var(--glow-blue),
    inset 0 1px 0 rgba(120, 180, 255, 0.15);
  transform: translateY(-1px);
  color: #ddeeff;
}

/* ================================
   LOADING / ERROR MSG
================================ */
.loading-msg {
  color: var(--text-dim);
  font-style: italic;
  font-size: 0.9rem;
  padding: 12px 0;
}

/* ================================
   FOOTER
================================ */
.site-footer {
  text-align: center;
  padding: 16px 20px;
  font-size: 0.82rem;
  color: var(--text-dim);
  font-weight: 600;
  letter-spacing: 1px;
  background: rgba(4, 6, 12, 0.7);
  border-top: 1px solid var(--border-dark);
}

.site-footer a {
  color: var(--accent);
  text-decoration: none;
}

.site-footer a:hover {
  text-shadow: 0 0 10px var(--glow-blue);
  text-decoration: underline;
}