@import url('https://fonts.googleapis.com/css?family=Droid+Sans+Mono');
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* ===== 8-BIT RETRO OVERLAY ===== */

.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
}

/* CRT screen flicker */
@keyframes flicker {
  0%   { opacity: 0.97; }
  50%  { opacity: 1; }
  100% { opacity: 0.98; }
}

/* Old-school CRT logo flicker */
@keyframes crt-logo-flicker {
  0%   { opacity: 1; text-shadow: 0 0 10px #0f0, 2px 2px 0 #003300; }
  3%   { opacity: 0.4; text-shadow: 0 0 10px #0f0, 2px 2px 0 #003300, -2px 0 #f00, 2px 0 #0ff; }
  6%   { opacity: 1; text-shadow: 0 0 10px #0f0, 2px 2px 0 #003300; }
  10%  { opacity: 1; }
  15%  { opacity: 0.85; text-shadow: 0 0 20px #0f0, 2px 2px 0 #003300; }
  16%  { opacity: 1; text-shadow: 0 0 10px #0f0, 2px 2px 0 #003300; }
  45%  { opacity: 1; }
  47%  { opacity: 0.2; text-shadow: none; }
  48%  { opacity: 1; text-shadow: 0 0 15px #0f0, 2px 2px 0 #003300, 3px 0 #f00; }
  49%  { opacity: 1; text-shadow: 0 0 10px #0f0, 2px 2px 0 #003300; }
  70%  { opacity: 1; }
  72%  { opacity: 0.7; text-shadow: 0 0 10px #0f0, -1px 0 #f00, 1px 0 #0ff; }
  73%  { opacity: 1; text-shadow: 0 0 10px #0f0, 2px 2px 0 #003300; }
  100% { opacity: 1; text-shadow: 0 0 10px #0f0, 2px 2px 0 #003300; }
}

/* Blinking cursor for headings */
@keyframes blink-cursor {
  0%, 100% { border-right-color: #0f0; }
  50%      { border-right-color: transparent; }
}

header, footer, section, aside, nav, article, figure {
  display: block;
  margin: 0;
  padding: 0;
}

html {
  padding: 0;
  margin: 0;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Press Start 2P', 'Droid Sans Mono', monaco, 'courier new', courier, monospaced;
  color: #0f0;
  background-color: #001a00;
  position: relative;
  font-size: 9px;
  line-height: 2em;
  background-size: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  animation: flicker 0.15s infinite;
  image-rendering: pixelated;
  text-shadow: 0 0 5px rgba(0, 255, 0, 0.4);
}

.content a {
  color: #0f0;
  text-decoration: none;
  border-bottom: 2px dashed #0f0;
}

a:hover {
  color: #fff;
  text-shadow: 0 0 10px #0f0, 0 0 20px #0f0;
}

mark {
  background-color: #fff;
  font-weight: bold;
  color: #000;
}

#wrapper {
  width: 1100px;
  margin: 0 auto;
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: stretch;
}

.header {
  padding: 10px 0;
  margin: 0 0 30px 0;
  display: block;
  clear: both;
  background-color: rgba(0,0,0,0.85);
  border-bottom: 4px solid #0f0;
  border-top: 4px solid #0f0;
  box-shadow: 0 4px 0 #003300, 0 -4px 0 #003300;
}

.header h1 {
  text-align: left;
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 0.05em;
  line-height: 30px;
  width: 930px;
  margin: 0 auto 5px auto;
  text-transform: uppercase;
}

.header h1 a {
  color: #0f0;
  text-decoration: none;
  text-shadow: 0 0 10px #0f0, 2px 2px 0 #003300;
  border-right: 8px solid #0f0;
  padding-right: 5px;
  animation: crt-logo-flicker 4s infinite, blink-cursor 1s step-end infinite;
}

.header p {
  font-size: 14px;
  font-weight: bold;
  padding: 0;
  margin: 0 auto;
  letter-spacing: 0;
  width: 930px;
}

.content {
  margin: 0;
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

section {
  display: block;
}

article.post, article.page, nav aside, .comments {
  border: 4px solid #0f0;
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0 0 30px 0;
  background-color: rgba(0,0,0,0.85);
  box-shadow: 4px 4px 0 #003300, 0 0 15px rgba(0, 255, 0, 0.1);
  border-radius: 0;
}

article.post header, nav aside header, .comments header, article.page header {
  background: #003300;
  text-align: center;
  padding: 8px 5px;
  font-family: 'Press Start 2P', monospace;
  border-bottom: 4px solid #0f0;
}

article.post header h2, article.post header h1, article.page header h1, nav aside h3, .comments h2 {
  font-weight: bold;
  color: #0f0;
  font-size: 10px;
  margin: 0;
  text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

article.post header h2 a, article.post header h1 a {
  display: block;
  color: inherit !important;
  text-decoration: none;
}

article.post header h2 a:hover, article.post header h1 a:hover {
  color: #999;
  background-color: transparent;
}

article.post section, article.page section, nav aside ul {
  padding: 15px;
  flex: 1;
}

.content > article.post,
.content > article.page {
  flex: 1;
}

.post a:hover {
  background-color: #0f0;
  color: #000;
  text-decoration: none;
  text-shadow: none;
}

.post a img {
  border: 3px solid #0f0;
  padding: 3px;
  image-rendering: pixelated;
}

.post a:hover img {
  border-color: #fff;
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

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

blockquote {
  padding: 0 40px;
  position: relative;
  border: 2px dashed #0f0;
  margin: 0 0 20px 0;
  background: rgba(0, 255, 0, 0.03);
}

blockquote cite {
  font-weight: bold;
}

blockquote:before {
  content: '\201C';
  font-size: 55px;
  color: #0a0;
  position: absolute;
  top: 0;
  left: 10px;
}

blockquote:after {
  content: '\201D';
  font-size: 55px;
  color: #0a0;
  position: absolute;
  bottom: -30px;
  right: 10px;
}

table {
  width: 100%;
  border: 2px solid #0f0;
  font-size: 10px;
  margin-bottom: 20px;
  border-collapse: collapse;
}

th {
  background-color: #003300;
  color: #0f0;
  text-align: left;
  border: 2px solid #0f0;
}

td {
  border: 1px solid #0a0;
}

th, td {
  padding: 5px;
}

dl {
  font-size: 12px;
}

dt {
  font-weight: bold;
}

dd {
  margin-bottom: 5px;
  margin-left: 10px;
}

address {
  font-size: 12px;
}

acronym {
  border-bottom: 1px dashed #ccc;
}

s, strike, del {
  text-decoration: line-through;
}

.size-full {
  max-width: 550px;
  height: auto;
  overflow: hidden;
}

footer {
  text-align: center;
  color: #0f0;
  padding: 10px 0;
  display: block;
  clear: both;
  margin-top: auto;
  background-color: rgba(0,0,0,0.85);
  border-top: 4px solid #0f0;
  box-shadow: 0 -4px 0 #003300;
}

footer p {
  padding: 0 220px 0 0;
  margin: 0;
}

footer a {
  color: inherit;
}

nav {
  display: flex;
  flex-direction: column;
  text-align: left;
  font-size: 10px;
  width: 240px;
  margin-left: 15px;
  margin-right: 10px;
}

nav > ul {
  display: flex;
  flex-direction: column;
  flex: 1;
}

nav > ul > aside.widget_pages,
nav > ul > aside.widget_recent_entries,
nav > ul > aside.widget_text {
  flex: 1;
  display: flex;
  flex-direction: column;
}

nav > ul > aside.widget_pages > ul,
nav > ul > aside.widget_recent_entries > ul,
nav > ul > aside.widget_text > .textwidget {
  flex: 1;
}

nav ul {
  list-style: none;
  line-height: 2.2em;
  padding: 0;
  margin: 0;
  color: #0a0;
}

nav ul li::before {
  content: "> ";
  color: #0f0;
}

nav a {
  color: #0a0;
  text-decoration: none;
}

nav a:hover {
  color: #0f0;
  text-shadow: 0 0 8px #0f0;
}

.wp-caption {
  margin-bottom: 20px;
  text-align: center;
  overflow: hidden;
  max-width: 528px !important;
  height: auto;
}

.wp-caption img {
  border: none;
  margin: 0 0 2px 0;
}

.wp-caption p.wp-caption-text {
  color: #888;
  font-size: 12px;
  margin: 5px 0;
}

.aligncenter {
  display: block;
  margin: 0 auto;
}

.alignleft {
  float: left;
  margin: 0 20px 20px 0;
}

.alignright {
  float: right;
  margin: 0 0 20px 20px;
}

.alignnone {
  display: inline;
}

hr.clearfix {
  visibility: hidden;
  clear: both;
}

.gallery {
  margin: 0 auto;
}

.gallery-item {
  float: left;
  margin-top: 10px;
  text-align: center;
}

.gallery-item img {
  border: 3px solid #0f0;
  image-rendering: pixelated;
}

.gallery-caption {
  margin-left: 0;
}

.sticky {
  display: block;
}

.bypostauthor {
  display: block;
}

img {
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.searchform input[type="text"] {
  width: 120px;
  padding: 4px;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  background: #000;
  color: #0f0;
  border: 2px solid #0f0;
  border-radius: 0;
  outline: none;
}

.searchform input[type="submit"] {
  padding: 4px 8px;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  background: #003300;
  color: #0f0;
  border: 2px solid #0f0;
  border-radius: 0;
  cursor: pointer;
}

.searchform input[type="submit"]:hover {
  background: #0f0;
  color: #000;
}

.post_tags, .post_categories {
  font-size: 12px;
  padding: 0 15px;
}

.current_page_item a {
  color: #0f0 !important;
  font-weight: bold;
  text-shadow: 0 0 10px #0f0;
}

.widget_text .textwidget {
  padding: 0 15px 15px 15px;
}

.widget_text .textwidget a {
  color: #0a0;
  text-decoration: none;
}

.widget_text .textwidget a:hover {
  color: #0f0;
  text-shadow: 0 0 8px #0f0;
}
