/* ---------- Font ----------
   Licensed ITC Benguiat Condensed files, supplied in /ITC. Six styles
   are mapped onto one "ITC Benguiat" family via weight/style so normal
   CSS (font-weight: bold, font-style: italic, etc.) just works. */
@font-face {
  font-family: "ITC Benguiat";
  src: url("../ITC/ITCBenguiatStdBookCn.OTF") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "ITC Benguiat";
  src: url("../ITC/ITCBenguiatStdBookCnIt.OTF") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "ITC Benguiat";
  src: url("../ITC/ITCBenguiatStdMediumCn.OTF") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "ITC Benguiat";
  src: url("../ITC/ITCBenguiatStdMediumCnIt.OTF") format("opentype");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "ITC Benguiat";
  src: url("../ITC/ITCBenguiatStdBoldCn.OTF") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "ITC Benguiat";
  src: url("../ITC/ITCBenguiatStdBoldCnIt.OTF") format("opentype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #050507;
  --bg-alt: #0d0d11;
  --red: #c9080f;
  --red-bright: #ff1a1a;
  --red-glow: rgba(255, 26, 26, 0.55);
  --blue-glow: #49d8ff;
  --text: #d9d2c5;
  --text-dim: #948e82;
  --border: #232329;
  --font-display: "ITC Benguiat", Georgia, "Times New Roman", serif;
  --font-body: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -5%, rgba(201, 8, 15, 0.16), transparent 70%),
    radial-gradient(ellipse 70% 40% at 50% 108%, rgba(73, 216, 255, 0.05), transparent 70%);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* CRT scanlines laid over everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.22) 0px,
    rgba(0, 0, 0, 0.22) 1px,
    transparent 1px,
    transparent 3px
  );
  animation: crt-flicker 6s infinite;
}

/* Tube vignette — darkened corners like an old TV */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 99;
  pointer-events: none;
  background: radial-gradient(ellipse 95% 95% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}

@keyframes crt-flicker {
  0%, 100% { opacity: 1; }
  92%      { opacity: 1; }
  93%      { opacity: 0.65; }
  94%      { opacity: 1; }
  97%      { opacity: 0.85; }
  98%      { opacity: 1; }
}

a {
  color: var(--red-bright);
}

/* ---------- Header ---------- */
.site-header {
  padding: 3.5rem 1.5rem 1.5rem;
  text-align: center;
  position: relative;
}

/* Blinking VHS "REC" indicator */
.rec-indicator {
  position: absolute;
  top: 1.1rem;
  left: 1.4rem;
  font-family: "Courier New", monospace;
  font-weight: bold;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--red-bright);
  animation: rec-blink 1.4s steps(1) infinite;
}

.vhs-mode {
  position: absolute;
  top: 1.1rem;
  right: 1.4rem;
  font-family: "Courier New", monospace;
  font-weight: bold;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
}

@keyframes rec-blink {
  0%, 60% { opacity: 1; }
  61%, 100% { opacity: 0.15; }
}

/* --- Title card: dark-filled letters, glowing red outline, rules
       running behind the letters like the show's opening title --- */
.title-wrap {
  position: relative;
  display: inline-block;
  padding: 0.28em 0.45em 0.18em;
}

.title-wrap::before,
.title-wrap::after {
  content: "";
  position: absolute;
  left: -0.6em;
  right: -0.6em;
  height: 3px;
  background: var(--red);
  box-shadow: 0 0 8px var(--red-glow), 0 0 18px var(--red-glow);
  font-size: clamp(2.6rem, 9vw, 5.5rem); /* scale line offsets with the title */
}

.title-wrap::before { top: 0.42em; }
.title-wrap::after  { bottom: 0.30em; }

.site-title {
  position: relative;
  z-index: 1; /* letter fills sit on top of the rules */
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 9vw, 5.5rem);
  letter-spacing: 0.06em;
  margin: 0;
  line-height: 1;
  text-transform: uppercase;
  color: var(--bg); /* hollow: dark fill, glowing stroke */
  -webkit-text-stroke: 0.022em var(--red-bright);
  text-shadow:
    0 0 6px var(--red-glow),
    0 0 16px var(--red-glow),
    0 0 45px rgba(255, 26, 26, 0.35);
  animation: title-flicker 9s infinite;
}

/* Enlarged first/last letters that break past the rules */
.site-title .big {
  font-size: 1.32em;
  line-height: 0;
  vertical-align: -0.06em;
}

.site-title a {
  color: inherit;
  text-decoration: none;
  -webkit-text-stroke: inherit;
}

@keyframes title-flicker {
  0%, 100% { opacity: 1; }
  88%  { opacity: 1; }
  89%  { opacity: 0.6; }
  90%  { opacity: 1; }
  91.5%{ opacity: 0.8; }
  92%  { opacity: 1; }
}

.site-tagline {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--blue-glow);
  letter-spacing: 0.45em;
  text-transform: uppercase;
  font-size: 0.72rem;
  margin-top: 1.4rem;
  text-shadow: 0 0 10px rgba(73, 216, 255, 0.7), 0 0 25px rgba(73, 216, 255, 0.35);
}

.main-nav {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 2.5rem;
}

.main-nav a {
  font-family: var(--font-display);
  font-weight: 500;
  text-decoration: none;
  color: var(--text-dim);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-size: 0.9rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s, text-shadow 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--red-bright);
  border-color: var(--red);
  text-shadow: 0 0 10px var(--red-glow);
}

/* ---------- Layout ---------- */
main {
  flex: 1;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

section + section {
  margin-top: 4rem;
}

.section-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.9rem;
  letter-spacing: 0.14em;
  color: var(--red-bright);
  text-shadow: 0 0 12px var(--red-glow), 0 0 30px rgba(255, 26, 26, 0.25);
  margin: 0 0 1.75rem;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* trailing rule after each section heading */
.section-heading::after {
  content: "";
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--red), transparent);
  box-shadow: 0 0 8px var(--red-glow);
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 1rem 0;
}

.hero p {
  color: var(--text-dim);
  max-width: 38em;
  margin: 0 auto;
  line-height: 1.8;
  font-style: italic;
  font-size: 1.05rem;
}

/* ---------- Video grid ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

.video-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.video-card:hover {
  border-color: var(--red);
  transform: translateY(-4px);
  box-shadow: 0 0 20px rgba(201, 8, 15, 0.35), 0 12px 30px rgba(0, 0, 0, 0.6);
}

.video-card .video-frame {
  position: relative;
  padding-top: 56.25%;
  background: #000;
}

.video-card .video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Explore blog button ---------- */
.explore-wrap {
  text-align: center;
  margin-top: 3.5rem;
}

.btn {
  display: inline-block;
  position: relative;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--red-bright);
  background: rgba(201, 8, 15, 0.06);
  border: 2px solid var(--red);
  padding: 1rem 2.6rem 0.9rem;
  border-radius: 2px;
  text-shadow: 0 0 8px var(--red-glow);
  box-shadow:
    0 0 14px rgba(201, 8, 15, 0.35),
    inset 0 0 14px rgba(201, 8, 15, 0.15);
  transition: background 0.25s, box-shadow 0.25s, color 0.25s, text-shadow 0.25s;
}

.btn:hover {
  background: var(--red);
  color: #050507;
  text-shadow: none;
  box-shadow:
    0 0 30px var(--red-glow),
    0 0 60px rgba(255, 26, 26, 0.3);
}

/* ---------- Blog list ---------- */
.post {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  border-radius: 3px;
  padding: 1.75rem 2rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.post + .post {
  margin-top: 2rem;
}

.post h2 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.4rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.post h2 a {
  color: inherit;
  text-decoration: none;
}

.post h2 a:hover {
  color: var(--red-bright);
}

.post-full h2 {
  font-size: 2.2rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--text-dim);
  text-decoration: none;
}

.back-link:hover {
  color: var(--red-bright);
}

.post-list .post {
  margin-bottom: 2rem;
}

.btn-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--blue-glow);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.btn-link:hover {
  color: var(--red-bright);
}

.lead-text {
  color: var(--text-dim);
  max-width: 34em;
  margin: 0 auto 1.5rem;
  line-height: 1.7;
  font-style: italic;
}

.lead-text code {
  color: var(--blue-glow);
  font-family: "Courier New", monospace;
}

.post .post-date {
  font-family: "Courier New", monospace;
  font-weight: bold;
  color: var(--blue-glow);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(73, 216, 255, 0.5);
}

.post .post-body {
  margin-top: 1.1rem;
  line-height: 1.8;
  color: var(--text-dim);
}

.post .post-body p {
  margin: 0 0 1em;
}

.empty-note {
  color: var(--text-dim);
  text-align: center;
  font-style: italic;
}

/* ---------- Admin ---------- */
.admin-bar {
  text-align: right;
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.admin-bar a {
  color: var(--blue-glow);
}

.section-heading {
  flex-wrap: wrap;
  row-gap: 0.75rem;
}

.btn-small {
  font-size: 0.65rem;
  padding: 0.5rem 1rem 0.45rem;
  letter-spacing: 0.15em;
  text-shadow: none;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.9rem 1.2rem;
  flex-wrap: wrap;
}

.admin-row strong {
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.03em;
}

.admin-meta {
  display: block;
  color: var(--text-dim);
  font-size: 0.78rem;
  margin-top: 0.25rem;
  font-family: "Courier New", monospace;
  letter-spacing: 0.02em;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.admin-actions a {
  color: var(--blue-glow);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.admin-actions form {
  display: inline;
}

.admin-actions button {
  background: none;
  border: none;
  color: var(--red-bright);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  letter-spacing: 0.05em;
  padding: 0;
}

.admin-actions a:hover,
.admin-actions button:hover {
  text-decoration: underline;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  max-width: 640px;
}

.admin-form label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin-form input,
.admin-form textarea {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text);
  padding: 0.7rem 0.9rem;
  font-family: Georgia, serif;
  font-size: 0.95rem;
  text-transform: none;
  letter-spacing: normal;
}

.admin-form input:focus,
.admin-form textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 8px var(--red-glow);
}

.admin-form input:disabled {
  color: var(--text-dim);
  opacity: 0.7;
}

.admin-form-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--text-dim);
  font-family: "Courier New", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-top: 1px solid var(--border);
}
