/*! HTML5 Boilerplate v5.3.0 | MIT License | https://html5boilerplate.com/ */

/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
    color: #222;
    background-color: #1a01a7;
    font-size: 1em;
    line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * These selection rule sets have to be separate.
 * Customize the background color to match your design.
 */

::-moz-selection {
    background: #b3d4fc;
    text-shadow: none;
}

::selection {
    background: #b3d4fc;
    text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid #ccc;
    margin: 1em 0;
    padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
    vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
    resize: vertical;
}

/* ==========================================================================
   Browser Upgrade Prompt
   ========================================================================== */

.browserupgrade {
    margin: 0.2em 0;
    background: #ccc;
    color: #000;
    padding: 0.2em 0;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

















/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden {
    display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.visuallyhidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    white-space: nowrap; /* 1 */
}

/*
 * Extends the .visuallyhidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
    clip: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    position: static;
    width: auto;
    white-space: inherit;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
    visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * For modern browsers
 * 1. The space content is one way to avoid an Opera bug when the
 *    `contenteditable` attribute is included anywhere else in the document.
 *    Otherwise it causes space to appear at the top and bottom of elements
 *    that receive the `clearfix` class.
 * 2. The use of `table` rather than `block` is only necessary if using
 *    `:before` to contain the top-margins of child elements.
 */

.clearfix:before,
.clearfix:after {
    content: " "; /* 1 */
    display: table; /* 2 */
}

.clearfix:after {
    clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
    /* Style adjustments for viewports that meet the condition */
}

@media print,
       (-webkit-min-device-pixel-ratio: 1.25),
       (min-resolution: 1.25dppx),
       (min-resolution: 120dpi) {
    /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   http://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
    *,
    *:before,
    *:after,
    p:first-letter,
    div:first-letter,
    blockquote:first-letter,
    li:first-letter,
    p:first-line,
    div:first-line,
    blockquote:first-line,
    li:first-line {
        background: transparent !important;
        color: #000 !important; /* Black prints faster:
                                   http://www.sanbeiji.com/archives/953 */
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }

    abbr[title]:after {
        content: " (" attr(title) ")";
    }

    /*
     * Don't show links that are fragment identifiers,
     * or use the `javascript:` pseudo protocol
     */

    a[href^="#"]:after,
    a[href^="javascript:"]:after {
        content: "";
    }

    pre {
        white-space: pre-wrap !important;
    }
    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    /*
     * Printing Tables:
     * http://css-discuss.incutio.com/wiki/Printing_Tables
     */

    thead {
        display: table-header-group;
    }

    tr,
    img {
        page-break-inside: avoid;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }
}

@font-face {
	font-family: 'VCR OSD Mono';
	src: url('/fonts/VCROSDMono.eot');
	src: url('/fonts/VCROSDMono.eot?#iefix') format('embedded-opentype'),
		url('/fonts/VCROSDMono.woff') format('woff'),
		url('/fonts/VCROSDMono.ttf') format('truetype');
	font-weight: normal;
	font-style: normal;
}

.title {
    text-align: center;
    font-family: 'VCR OSD Mono';
    color: #ffffff;
    font-weight: normal;
    font-style: normal;
}

.menu-wrapper {
    padding: 15px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}


html {
    animation: blur 30ms infinite, flick 50ms infinite, jump 50ms infinite;
}

@keyframes blur {
  0%   { filter: blur(1px); opacity:0.8;}
  50% { filter: blur(1px); opacity:1; }
  100%{ filter: blur(1px); opacity:0.8; }
}

@keyframes flick {
  50% { left:2px; }
  51% { left:0; }
}
@keyframes jump {
  30% { top:10px; }
  31% { top:0; }
}

.menu {
    text-align: right;
    padding-right: 10%;
}

.menu-item:hover {
    list-style-type: square;
}

.menu-item a {
    text-decoration: none;
    color: #ffffff;
}

.menu-item {
    font-size: 1.7em;
    list-style-type: none;
    list-style-position: inside;
    font-family: 'VCR OSD Mono';
    color: #ffffff; 
}

.back-menu-item {
    padding-bottom: 15px;
}

.menu-item-detail {
    font-size: 1.2em;
    list-style-type: none;
    list-style-position: inside;
    font-family: 'VCR OSD Mono';
    color: #ffffff;
    padding-bottom: 15px;
}

.footer {
    font-family: 'VCR OSD Mono';
    text-align: center;
    color: #ffffff;
}

/* Blog post image styling */
.menu-wrapper img {
    max-width: 800px;
    width: 100%;
    height: auto;
}

/* Responsive image class for mobile screenshots - specific override */
.post-content img.mobile-image {
    max-width: 360px;
    width: auto;
    height: auto;
}

@media only screen and (max-width: 768px) {
    .post-content img.mobile-image {
        max-width: 100%;
        width: 100%;
        height: auto;
    }
}

/* Blog-specific light retro styling - override main site styles for blog pages */
html.blog-page,
body.blog-page {
    --crt-plate: linear-gradient(135deg, #f2f2f2 0%, #e7e7e7 100%);
    --crt-ink: #242424;
    --crt-muted: #626262;
    --crt-border: #b8b8b8;
    --crt-radius: 10px;
    --crt-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --space-1: 6px;
    --space-2: 10px;
    --space-3: 16px;
    --space-4: 22px;
    --space-5: 30px;
}

body.blog-page {
    background: repeating-linear-gradient(
        0deg,
        #f9f9f9,
        #f9f9f9 2px,
        #f7f7f7 2px,
        #f7f7f7 4px
    );
    color: var(--crt-ink);
    animation: none; /* Remove CRT effects for blog */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.65;
    max-width: 760px;
    margin: 0 auto;
    padding: var(--space-4) var(--space-3);
}

html.blog-page {
    background-color: #ececec;
    color: var(--crt-ink);
    animation: none; /* Remove CRT effects for blog */
}

/* 1990s TV menu inspired header */
.blog-header {
    background: var(--crt-plate);
    border: 1px solid var(--crt-border);
    border-radius: var(--crt-radius);
    padding: var(--space-4) var(--space-3);
    margin-bottom: var(--space-4);
    box-shadow: var(--crt-shadow);
    text-align: center;
}

.blog-title {
    font-family: 'VCR OSD Mono', monospace;
    font-size: 1.85em;
    color: var(--crt-ink);
    margin: 0 0 var(--space-2) 0;
    text-shadow: 0 1px 0 rgba(0,0,0,0.08);
    letter-spacing: 0.5px;
}

.blog-nav {
    display: inline-flex;
    gap: var(--space-2);
    margin-top: var(--space-2);
}

.blog-nav a {
    display: inline-block;
    padding: 7px 13px;
    background: #f4f4f4;
    border: 1px solid var(--crt-border);
    border-radius: 6px;
    text-decoration: none;
    color: var(--crt-ink);
    font-family: 'VCR OSD Mono', monospace;
    font-size: 0.88em;
    letter-spacing: 0.3px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.blog-nav a:hover {
    background: #ededed;
    border-color: #a8a8a8;
    transform: translateY(-1px);
}

.blog-subtitle {
    text-align: center;
    font-size: 10px;
    opacity: 0.62;
    margin-top: var(--space-2);
    letter-spacing: 0.4px;
}

.blog-tagline {
    text-align: center;
    font-size: 0.9em;
    color: var(--crt-muted);
    margin-top: var(--space-1);
    letter-spacing: 0.2px;
}

/* Post cards for list */
.post-card {
    background: #ffffff;
    border: 1px solid #dfdfdf;
    border-radius: var(--crt-radius);
    padding: var(--space-3);
    margin-bottom: var(--space-3);
    box-shadow: var(--crt-shadow);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.post-card:hover {
    box-shadow: 0 3px 14px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.post-title {
    font-family: 'VCR OSD Mono', monospace;
    font-size: 1.25em;
    color: var(--crt-ink);
    margin: 0 0 var(--space-2) 0;
}

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

.post-title a:hover {
    color: #3a3a3a;
}

.post-meta {
    color: var(--crt-muted);
    font-size: 0.85em;
    margin-bottom: var(--space-2);
    font-family: 'VCR OSD Mono', monospace;
}

.post-summary {
    color: #3a3a3a;
    line-height: 1.6;
}

.read-more {
    display: inline-block;
    margin-top: var(--space-2);
    padding: 6px 11px;
    background: #f4f4f4;
    border: 1px solid var(--crt-border);
    border-radius: 6px;
    text-decoration: none;
    color: var(--crt-ink);
    font-family: 'VCR OSD Mono', monospace;
    font-size: 0.84em;
    transition: transform 0.15s ease, background 0.15s ease;
}

.read-more:hover {
    background: #ededed;
    transform: translateY(-1px);
}

/* Individual post styling */
.post-content {
    background: #ffffff;
    border: 1px solid #dfdfdf;
    border-radius: var(--crt-radius);
    padding: var(--space-3) var(--space-3);
    margin-bottom: var(--space-3);
    box-shadow: var(--crt-shadow);
}

.post-content h1 {
    font-family: 'VCR OSD Mono', monospace;
    color: var(--crt-ink);
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: var(--space-2);
    margin-bottom: var(--space-3);
    font-size: 1.6em;
}

.post-content h2, 
.post-content h3 {
    font-family: 'VCR OSD Mono', monospace;
    color: #333;
    margin-top: var(--space-4);
}

.post-content p {
    margin-bottom: var(--space-3);
}

.post-content a {
    color: #0d5aa6;
    text-decoration: underline;
}

.post-content a:hover {
    color: #0b4a89;
}

.post-content pre {
    background: #f4f4f4;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: var(--space-3);
    overflow-x: auto;
    font-family: 'VCR OSD Mono', monospace;
    font-size: 0.85em;
    line-height: 1.5;
    margin: var(--space-3) 0;
}

.post-content code {
    font-family: 'VCR OSD Mono', monospace;
    font-size: 0.9em;
    background: #f0f0f0;
    padding: 2px 5px;
    border-radius: 3px;
}

.post-content pre code {
    background: none;
    padding: 0;
    font-size: inherit;
}

.post-content blockquote {
    background: #f4f4f4;
    border-left: 3px solid #7a7a7a;
    margin: var(--space-4) 0;
    padding: var(--space-3);
    font-style: italic;
    color: #3f3f3f;
    border-radius: 0 6px 6px 0;
    box-shadow: inset 1px 1px 3px rgba(0,0,0,0.04);
    position: relative;
}

.post-content blockquote::before {
    content: '"';
    font-family: 'VCR OSD Mono', monospace;
    font-size: 1.6em;
    color: #9a9a9a;
    position: absolute;
    left: 10px;
    top: 6px;
    line-height: 1;
}

/* Blog image styling - override general img rule */
.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: var(--space-3) auto;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Wrap images in links so they open full size */
.post-content a > img {
    cursor: zoom-in;
}

/* Footnote styling */
.post-content .footnote-definition {
    font-size: 0.85em;
    color: var(--crt-muted);
    border-top: 1px solid #e0e0e0;
    margin-top: var(--space-4);
    padding-top: var(--space-3);
}

.post-content .footnote-definition-label {
    font-family: 'VCR OSD Mono', monospace;
    font-weight: normal;
}

.post-content .footnote-definition p {
    display: inline;
    margin: 0;
}

.post-content sup {
    font-family: 'VCR OSD Mono', monospace;
    font-size: 0.75em;
}

.post-content .footnote-reference {
    font-family: 'VCR OSD Mono', monospace;
    text-decoration: none;
    color: var(--crt-muted);
    padding: 0 2px;
}

.post-content .footnote-reference:hover {
    color: var(--crt-ink);
}

/* Blog footer */
.blog-footer {
    text-align: center;
    padding: var(--space-4) var(--space-3);
    margin-top: var(--space-4);
    font-family: 'VCR OSD Mono', monospace;
    font-size: 0.75em;
    color: var(--crt-muted);
}

/* Accessible focus styles */
a:focus, button:focus {
    outline: 2px solid #0d5aa6;
    outline-offset: 2px;
}

/* Newsletter subscription form */
.newsletter-signup {
    background: var(--crt-plate);
    border: 1px solid var(--crt-border);
    border-radius: var(--crt-radius);
    padding: var(--space-4) var(--space-3);
    margin: var(--space-4) 0 var(--space-3);
    box-shadow: var(--crt-shadow);
}

.newsletter-header h3 {
    font-family: 'VCR OSD Mono', monospace;
    color: var(--crt-ink);
    margin: 0 0 var(--space-1) 0;
    font-size: 1.1em;
    text-shadow: 0 1px 0 rgba(0,0,0,0.08);
    letter-spacing: 0.4px;
}

.newsletter-header p {
    color: var(--crt-muted);
    margin: 0 0 var(--space-3) 0;
    font-family: 'VCR OSD Mono', monospace;
    font-size: 0.85em;
    letter-spacing: 0.3px;
}

.newsletter-form .form-group {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
    flex-wrap: wrap;
}

.email-input {
    flex: 1;
    min-width: 200px;
    padding: 11px 14px;
    border: 1px solid #9c9c9c;
    border-radius: 6px;
    font-family: 'VCR OSD Mono', monospace;
    font-size: 0.88em;
    background: #ffffff;
    color: var(--crt-ink);
    transition: all 0.2s ease;
}

.email-input:focus {
    outline: none;
    border-color: #6e6e6e;
    box-shadow: 0 0 0 2px rgba(110, 110, 110, 0.2);
}

.email-input::placeholder {
    color: #9c9c9c;
    font-style: italic;
}

.subscribe-btn {
    padding: 11px 16px;
    background: #f4f4f4;
    border: 1px solid #9c9c9c;
    border-radius: 6px;
    font-family: 'VCR OSD Mono', monospace;
    font-size: 0.88em;
    color: var(--crt-ink);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
    white-space: nowrap;
}

.subscribe-btn:hover:not(:disabled) {
    background: #ededed;
    border-color: #7c7c7c;
    transform: translateY(-1px);
}

.subscribe-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.status-message {
    font-family: 'VCR OSD Mono', monospace;
    font-size: 0.82em;
    min-height: 20px;
    margin-top: var(--space-1);
}

.status-message.success {
    color: #265017;
    background: #d9eed3;
    border: 1px solid #c8e4c2;
    border-radius: 4px;
    padding: 8px 10px;
}

.status-message.error {
    color: #6f1b1f;
    background: #f7d9dc;
    border: 1px solid #f0bfc4;
    border-radius: 4px;
    padding: 8px 10px;
}

@media (max-width: 720px) {
    body.blog-page {
        padding: var(--space-3) var(--space-2);
        max-width: 100%;
    }

    .blog-header {
        padding: var(--space-3);
        margin-bottom: var(--space-3);
    }

    .blog-title {
        font-size: 1.65em;
    }

    .blog-nav {
        gap: var(--space-1);
    }

    .blog-nav a {
        padding: 6px 11px;
        font-size: 0.82em;
    }

    .blog-tagline {
        font-size: 0.88em;
    }

    .post-card,
    .post-content {
        padding: var(--space-3);
        margin-bottom: var(--space-2);
    }

    .post-title {
        font-size: 1.18em;
    }

    .post-meta {
        font-size: 0.82em;
    }

    .newsletter-signup {
        padding: var(--space-3);
        margin: var(--space-3) 0 var(--space-2);
    }

    .newsletter-form .form-group {
        flex-direction: column;
    }

    .subscribe-btn {
        width: 100%;
        text-align: center;
    }
}
