/* ── Keyframes ── */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes headerSlideDown {
  from { opacity: 0; transform: translateY(-100%); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes borderPulse {
  0%   { border-color: #2a3f6f; }
  50%  { border-color: #3d5fa0; }
  100% { border-color: #2a3f6f; }
}
@keyframes snowfall {
  0%   { transform: translateY(-10px) translateX(0px); opacity: 1; }
  100% { transform: translateY(100vh) translateX(30px); opacity: 0.3; }
}

/* ── Snow ── */
#snow-container {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}
.snowflake {
  position: absolute;
  top: -10px;
  color: #a8c4e8;
  font-size: 0.8em;
  animation: snowfall linear infinite;
  opacity: 0.7;
  user-select: none;
}

/* ── Base — Comic Sans for UI ── */
body {
  background-color: #0a0e1a;
  font-size: 18px;
  font-family: "Comic Sans MS", "Comic Sans", cursive;
  margin: 0;
  color: #c8d4e8;
}
p {
  line-height: 1.6em;
}
hr {
  border: solid #2a3f6f;
  border-width: 2px 0 0 0;
}
img {
  max-width: 100%;
  height: auto;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  transition: opacity 0.3s ease;
}
img:hover { opacity: 0.88; }

.right  { float: right; margin-left: 1em; }
.left   { float: left; margin-right: 1em; }
.center { display: block; margin-right: auto; margin-left: auto; text-align: center; }

@media only screen and (min-width: 600px) {
  .small { max-width: 60%; height: auto; }
}

.caption {
  margin-top: 0;
  font-size: 0.9em;
  font-style: italic;
  color: #7a90b8;
  font-family: Arial, Helvetica, sans-serif;
}

/* ── Links ── */
a {
  color: #5b8dee;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}
a:hover {
  background-color: #1a2540;
  color: #ffffff;
}

/* ── Headings (UI) — Comic Sans ── */
h1, h2, h3, h4, h5 {
  font-family: "Comic Sans MS", "Comic Sans", cursive;
  color: #5b8dee;
  letter-spacing: 0.05em;
  border-bottom: 2px solid #1e2d50;
  padding-bottom: 0.2em;
}

/* ── Container ── */
#container {
  margin: 3em auto;
  width: 90%;
  max-width: 700px;
  background-color: #0f1624;
  color: #c8d4e8;
  border: 2px solid #2a3f6f;
  animation: fadeSlideIn 0.5s ease both, borderPulse 4s ease-in-out 0.5s infinite;
}

/* ── Content ── */
#content {
  padding: 10px 5% 20px 5%;
  animation: fadeSlideIn 0.5s ease 0.15s both;
}

/* ══════════════════════════════════════
   POST BODY — Arial, forced on everything
   ══════════════════════════════════════ */
.post-body,
.post-body * {
  font-family: Arial, Helvetica, sans-serif !important;
}
.post-body {
  line-height: 1.7em;
}
.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4,
.post-body h5 {
  letter-spacing: 0;
  text-transform: none;
}

/* ── Header ── */
#header {
  background-color: #0d1830;
  padding: 0 5%;
  border-bottom: 2px solid #2a3f6f;
  animation: headerSlideDown 0.4s ease both;
}
#header ul {
  list-style-type: none;
  padding: 0.5em 0;
  margin: 0;
}
#header li {
  font-size: 1.1em;
  display: inline-block;
  margin-right: 1.5em;
  margin-bottom: 0.2em;
  margin-top: 0.2em;
  font-family: "Comic Sans MS", "Comic Sans", cursive;
  letter-spacing: 0.04em;
}
#header li a {
  color: #8aaee0;
  text-decoration: none;
  background-color: inherit;
  transition: color 0.2s ease, background-color 0.2s ease;
}
#header li a:hover {
  color: #ffffff;
  background-color: #1a2a50;
}

/* ── Search box ── */
#search-container {
  margin-bottom: 1.2em;
}
#search-input {
  width: 100%;
  box-sizing: border-box;
  background-color: #0a0e1a;
  border: 2px solid #2a3f6f;
  color: #c8d4e8;
  font-family: "Comic Sans MS", "Comic Sans", cursive;
  font-size: 0.9em;
  padding: 7px 10px;
  outline: none;
  transition: border-color 0.2s ease;
}
#search-input:focus {
  border-color: #5b8dee;
}
#search-input::placeholder {
  color: #3d5480;
}

/* ── Post preview cards ── */
.post-preview {
  margin-bottom: 1.6em;
  border: 1px solid #2a3f6f;
  border-left: 3px solid #2a3f6f;
  transition: border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #0a0e1a;
}
.post-preview:hover {
  border-color: #5b8dee;
  border-left-color: #5b8dee;
}
.post-preview-img-wrap {
  width: 100%;
  height: 160px;
  overflow: hidden;
  display: block;
  flex-shrink: 0;
}
.post-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.post-preview:hover .post-preview-img {
  transform: scale(1.03);
  opacity: 0.9;
}
.post-preview-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 10px 12px 0 12px;
}
.post-preview-title {
  font-family: "Comic Sans MS", "Comic Sans", cursive;
  font-size: 1.05em;
  color: #a8c8f0;
  display: block;
  margin-bottom: 0.15em;
  transition: color 0.2s ease;
}
.post-preview-title:hover {
  color: #ffffff;
  background-color: transparent;
}
.post-preview-meta {
  font-family: "Comic Sans MS", "Comic Sans", cursive;
  font-size: 0.75em;
  color: #3d5480;
  display: block;
  margin-bottom: 0.3em;
}
/* Excerpt with fade-out */
.post-preview-excerpt-wrap {
  position: relative;
  max-height: 3.6em;
  overflow: hidden;
  margin-bottom: 0;
}
.post-preview-excerpt-wrap::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2em;
  background: linear-gradient(transparent, #0a0e1a);
  pointer-events: none;
}
.post-preview-excerpt {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.85em;
  color: #7a90b8;
  line-height: 1.5em;
  display: block;
}
.post-preview-readmore {
  font-family: "Comic Sans MS", "Comic Sans", cursive;
  font-size: 0.78em;
  color: #3d5480;
  padding: 6px 12px 10px;
  display: block;
  transition: color 0.2s;
}
.post-preview:hover .post-preview-readmore {
  color: #5b8dee;
}

.moreposts {
  font-size: 0.8em;
  margin-top: 0.2em;
}

/* ── Next / Prev ── */
#nextprev {
  text-align: center;
  margin-top: 1.4em;
  font-size: 0.95em;
}
#disqus_thread { margin-top: 1.6em; }

/* ── Footer ── */
#footer {
  font-size: 0.8em;
  padding: 0 5% 10px 5%;
  color: #3d5480;
  border-top: 2px solid #1e2d50;
  animation: fadeSlideIn 0.5s ease 0.3s both;
}

/* ── Post date stamp ── */
.post-date {
  font-family: "Comic Sans MS", "Comic Sans", cursive;
  font-size: 0.8em;
  color: #3d5480;
  margin-top: -0.5em;
  margin-bottom: 1em;
  display: block;
}