/* QUP Readable Dark Theme */

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Source Sans', Georgia, sans-serif;
    font-size: 17px;
    line-height: 1.7;
    color: #c8cdd3;
    background: #0d0d1a;
    padding: 0;
    margin: 0;
}

section, footer, header, aside, nav { display: block; }
img { border: 0; height: auto; max-width: 100%; }

/* ---- Headings ---- */
h1, h2, h3, h4, h5, h6 { font-family: 'Source Sans', sans-serif; line-height: 1.3; margin: 0.5em 0; color: #e8ecf0; }
h1 { font-size: 28px; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }
h5 { font-size: 14px; }
h6 { font-size: 12px; }

/* ---- Links ---- */
a, a:visited { outline: none; color: #7fc7ff; text-decoration: none; }
a:hover { text-decoration: underline; color: #a8dbff; }

/* ---- Layout ---- */
#outer-wrapper { margin: 0; padding: 0; width: 100%; }
.container { padding: 0 20px; }
.hide { display: none; }

#content-wrapper { padding: 2.5em 0; }
#content { width: 800px; margin: 0 auto; }
.admin #content { width: 980px; margin: 0 auto; }

/* ---- Navigation ---- */
.site-nav {
    background: #0a0a18;
    border-bottom: 1px solid #1a1a3a;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-nav .nav-inner {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
}

.nav-brand img { width: 32px; height: 32px; }
.nav-brand span {
    font-family: 'Source Sans', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #7fc7ff;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links ul { margin: 0; padding: 0; display: flex; gap: 0; list-style: none; }
.nav-links ul li { margin: 0; }
.nav-links ul li a, .nav-links a.nav-link {
    color: #8899aa;
    font-family: 'Source Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    text-decoration: none !important;
}
.nav-links ul li a:hover, .nav-links a.nav-link:hover {
    color: #e0e0e0;
    background: rgba(127,199,255,0.08);
    text-decoration: none !important;
}
.nav-links ul li.active > a { color: #e0e0e0; background: rgba(127,199,255,0.1); }

/* Dropdown submenus */
.nav-links ul li { position: relative; }
.nav-links ul li > a .caret,
.nav-links ul li > a.dropdown-toggle .caret {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 4px;
    vertical-align: middle;
    border-top: 4px solid currentColor;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
}
.nav-links ul li ul.subnav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #0a0a18;
    border: 1px solid #1a1a3a;
    border-radius: 0 0 8px 8px;
    padding: 6px 0;
    margin: 0;
    flex-direction: column;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    z-index: 200;
    list-style: none;
}
.nav-links ul li:hover > ul.subnav {
    display: block;
}
.nav-links ul li ul.subnav li { width: 100%; }
.nav-links ul li ul.subnav li a {
    display: block;
    padding: 8px 18px;
    color: #8899aa;
    font-size: 13px;
    border-radius: 0;
    white-space: nowrap;
}
.nav-links ul li ul.subnav li a:hover {
    color: #e0e0e0;
    background: rgba(127,199,255,0.1);
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid #1a1a3a;
    color: #7fc7ff;
    font-size: 20px;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
}

/* Nav search */
.nav-links #search-form { float: none; margin-left: 10px; }
.nav-links .search-input {
    background: #12122a !important;
    border: 1px solid #1a1a3a !important;
    color: #c8cdd3;
    border-radius: 6px 0 0 6px;
    padding: 5px 12px;
    font-size: 13px;
    width: 130px;
}
.nav-links .search-button {
    background: #2a5a9f;
    border: 1px solid #2a5a9f;
    color: #fff;
    border-radius: 0 6px 6px 0;
    padding: 5px 10px;
    font-size: 13px;
    cursor: pointer;
}
.nav-links .search-button:hover { background: #3a6abf; }

/* ---- Text elements ---- */
blockquote {
    border-left: 3px solid #2a5a9f;
    margin: 1em 0 1em 1em;
    padding: 12px 20px;
    color: #999;
    background: #12122a;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}
blockquote p { display: inline; }

pre {
    margin: 1em 0;
    overflow: auto;
    background: #12122a;
    border: 1px solid #1a1a3a;
    color: #c8cdd3;
    font-family: Consolas, Menlo, Monaco, monospace;
    font-size: 14px;
    padding: 12px;
    line-height: 1.4;
    border-radius: 8px;
}

code {
    color: #7fc7ff;
    font-family: Consolas, Menlo, Monaco, monospace;
    font-size: 15px;
    padding: 2px 6px;
    background: #12122a;
    border: 1px solid #1a1a3a;
    border-radius: 4px;
}

pre code { color: #c8cdd3; background: none; border: none; padding: 0; font-size: 14px; line-height: 1.6; }

ul, ol { padding-left: 30px; margin: 1em 0; }
ul li, ol li { margin: 0.25em 0; }
p { margin: 1em 0; }

input[type=text], input[type=password] {
    padding: 6px 10px; font-size: 14px;
    background: #12122a; border: 1px solid #1a1a3a; color: #c8cdd3; border-radius: 4px;
}
input[type=text]:hover, input[type=password]:hover { border-color: #2a5a9f; }
input[type=submit] { padding: 6px 12px; font-size: 14px; cursor: pointer; background: #2a5a9f; color: #fff; border: 1px solid #2a5a9f; border-radius: 4px; }
input[type=submit]:hover { background: #3a6abf; }

textarea {
    font-size: 15px; font-family: Georgia, sans-serif; line-height: 1.4;
    background: #12122a; border: 1px solid #1a1a3a; color: #c8cdd3;
    padding: 2%; width: 96%; min-height: 5em; border-radius: 4px;
}

.category {
    background: #12122a; border: 1px solid #1a1a3a; border-radius: 8px;
    color: #c8cdd3; font-size: 13px; margin: 20px 0; padding: 0 1em;
}

.tags a:after { content:", "; }
.tags a:last-child:after { content:""; }

/* ---- Table ---- */
table { font-size: 14px; width: 100%; border-collapse: collapse; margin: 1em 0; }
th, td { padding: 8px 12px; border-bottom: 1px solid #1a1a3a; text-align: left; }
th { background: #12122a; color: #8899aa; font-family: 'Source Sans', sans-serif; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }
td { background: #0f0f24; }
table.post-list td a { margin: 0 5px; }

/* ---- Tab ---- */
.tab { width: 100%; margin: 1.5em 0 0 0; line-height: 1; border-bottom: 1px solid #1a1a3a; }
.tab ul { padding: 0; margin: 0; }
.tab li { display: inline-block; margin: 0; padding: 0; }
.tab a {
    background: #1a1a3a; border-radius: 6px 6px 0 0; color: #8899aa;
    text-align: center; padding: 8px 14px; display: inline-block; margin: 0 5px;
    font-size: 12px; font-weight: bold; font-family: 'Source Sans', sans-serif;
}
.tab a:hover { color: #e0e0e0; text-decoration: none; }

/* ---- Post ---- */
.post { border-bottom: 1px solid #1a1a3a; padding: 1.5em 0; width: 100%; }
.in-post .post { padding-bottom: 0; border: none; }
.in-page .post { padding-top: 0; }
.in-front .first, .in-post .post, .in-tag .first, .in-archive .first, .in-search .first, .error-404 .post, .error-404-search .post { padding-top: 0; }
.in-front .first h2.title-index { margin-top: 0; }

.breadcrumb { font-family: 'Source Sans', sans-serif; font-size: 14px; color: #667788; margin-bottom: 1em; }
.breadcrumb a { color: #7fc7ff; }

.date { font-family: 'Source Sans', sans-serif; font-size: 14px; color: #667788; margin: 0.5em 0 1em; }
.date a { color: #667788; }
.date a:hover { color: #7fc7ff; }

h1.title-post, h2.title-index { font-weight: 600; }
h1.title-post a, h2.title-index a { color: #e8ecf0; }
h1.title-post a:hover, h2.title-index a:hover { color: #7fc7ff; text-decoration: none; }

.in-profile .bio { font-size: 14px; font-style: italic; border-bottom: 1px solid #1a1a3a; padding-bottom: 1em; margin-bottom: 2em; color: #8899aa; }
.post-list { font-size: 14px; }

.featured-video { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; margin: 1em 0; border-radius: 8px; }
.featured-video iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.featured-audio { margin: 1em 0; }

/* ---- Share box ---- */
.separator { font-size: 20px; color: #667788; }
.share-box { font-size: 14px; float: left; width: 100%; }
.author-info { width: 540px; float: left; }
.author-info p { font-style: italic; color: #8899aa; }
.share { width: 140px; margin-right: 1em; float: right; }
.share a { display: inline-block; padding: 6px 14px; margin: 2px; background: #1a1a3a; border-radius: 4px; color: #7fc7ff; font-size: 13px; text-indent: 0; }
.share a:hover { background: #2a5a9f; color: #fff; text-decoration: none; }

/* ---- Comments ---- */
.comments { position: relative; display: block; font-size: 16px; float: left; width: 100%; }
.border { border-top: 1px solid #1a1a3a; margin: 10px 0 15px; padding: 15px 0; width: 100%; float: left; }

/* ---- Related ---- */
.related { font-size: 14px; font-family: 'Source Sans', sans-serif; width: 100%; float: left; margin-bottom: 1em; }
.related ul { margin: 0; }
.related a { color: #7fc7ff; }

/* ---- Pagination ---- */
.postnav, .pager { width: 100%; float: left; padding: 1.5em 0; font-family: 'Source Sans', sans-serif; font-size: 13px; font-weight: bold; }
.postnav a, .pager a {
    background: #1a1a3a; border-radius: 6px; color: #c8cdd3 !important;
    padding: 10px 20px; display: inline-block; text-decoration: none !important;
    transition: background 0.2s;
}
.postnav a:hover, .pager a:hover { background: #2a5a9f; color: #fff !important; }
.postnav .newer, .pager .newer { float: left; }
.postnav .older, .pager .older { float: right; }

.postnav .pagination-arrow { position: relative; }
.postnav .pagination-arrow.newer { padding-left: 25px; }
.postnav .pagination-arrow.older { padding-right: 25px; }
.postnav .pagination-arrow.newer:before, .postnav .pagination-arrow.older:before {
    content: ''; border: 5px solid transparent; width: 0; height: 0; position: absolute; top: 12px;
}
.postnav .pagination-arrow.newer:before { left: 8px; border-right-color: #c8cdd3; }
.postnav .pagination-arrow.older:before { right: 8px; border-left-color: #c8cdd3; }

/* ---- Footer ---- */
#footer-wrapper {
    background: #0a0a18;
    border-top: 1px solid #1a1a3a;
    padding: 24px 0;
    float: left;
    width: 100%;
    color: #556677;
    font-family: 'Source Sans', sans-serif;
}

#footer { width: 800px; margin: 0 auto; font-size: 13px; text-align: center; }
#footer a { color: #7fc7ff; }
.credit { margin-top: 4px; font-size: 12px; color: #445566; }

/* ---- Hero (front page) ---- */
.hero {
    text-align: center;
    padding: 60px 20px 40px;
}
.hero-logo { width: 80px; height: 80px; margin-bottom: 20px; filter: drop-shadow(0 0 20px rgba(74,158,255,0.3)); }
.hero h1 { font-size: 32px; color: #eee; margin-bottom: 12px; }
.hero p { color: #8899aa; font-size: 16px; line-height: 1.6; margin-bottom: 28px; }

.hero-buttons { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.btn {
    display: inline-block; padding: 12px 28px; border-radius: 8px;
    font-family: 'Source Sans', sans-serif; font-weight: 600; font-size: 15px;
    text-decoration: none !important; transition: all 0.2s;
}
.btn-primary { background: #2a5a9f; color: #fff !important; border: 1px solid #2a5a9f; }
.btn-primary:hover { background: #3a6abf; }
.btn-secondary { background: transparent; color: #c8cdd3 !important; border: 1px solid #334455; }
.btn-secondary:hover { border-color: #7fc7ff; color: #7fc7ff !important; }

/* ---- Feature cards ---- */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 860px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

.feature-card {
    background: #12122a;
    border: 1px solid #1a1a3a;
    border-radius: 12px;
    padding: 24px;
    transition: border-color 0.2s;
}
.feature-card:hover { border-color: #2a5a9f; }
.feature-card .icon { font-size: 28px; margin-bottom: 12px; }
.feature-card h3 { font-size: 16px; margin: 0 0 8px; color: #e8ecf0; }
.feature-card p { font-size: 13px; color: #8899aa; margin: 0; line-height: 1.5; }

.static-body { max-width: 800px; margin: 0 auto; padding: 0 20px 40px; }

/* ---- Search form (standalone) ---- */
#search-form { position: relative; }
.search-input {
    padding: 5px 12px; font-size: 14px; border-radius: 6px 0 0 6px;
    background: #12122a !important; border: 1px solid #1a1a3a !important; color: #c8cdd3; width: 140px;
}
.search-button {
    padding: 5px 10px; font-size: 14px; cursor: pointer;
    background: #2a5a9f; border: 1px solid #2a5a9f; color: #fff;
    border-radius: 0 6px 6px 0; width: auto;
}
.search-button:hover { background: #3a6abf; }

.search-404 { float: left; width: 100%; margin-bottom: 1.2em; }
.search-404 #search-form { float: none; }

/* ---- Archive ---- */
ul.archivegroup { padding: 0; margin: 0; }
.archivegroup .expanded ul { display: block; }
.archivegroup .collapsed ul { display: none; }
.archivegroup li.expanded, .archivegroup li.collapsed { list-style: none; }
#more { display: block; height: 1rem; margin-top: -1rem; box-shadow: none; border: none; }

/* ---- Video ---- */
.video-wrapper { margin: 1em 0; }
@media all and (min-width: 420px) {
    .video-wrapper { padding-top: 315px !important; position: relative; width: 100%; max-width: 420px !important; max-height: 315px !important; }
    .video-wrapper iframe, .video-wrapper object, .video-wrapper embed { height: 100%; left: 0; position: absolute; top: 0; max-width: 420px !important; width: 100%; max-height: 315px !important; }
}

/* ---- Responsive ---- */
@media all and (max-width: 860px) {
    #content, #footer { width: 100% !important; }
    .features { grid-template-columns: repeat(2, 1fr); }
    .author-info { width: 100%; }
    .share { width: 100%; float: left; margin: 1em 0; }
}

@media all and (max-width: 600px) {
    .site-nav .nav-inner { flex-wrap: wrap; height: auto; padding: 10px 0; }
    .nav-toggle { display: block; }
    .nav-links {
        display: none; flex-direction: column; width: 100%;
        padding: 10px 0 0; gap: 0;
    }
    .nav-links.open { display: flex; }
    .nav-links ul { flex-direction: column; }
    .nav-links ul li a { display: block; padding: 10px 14px; }
    .nav-links ul li ul.subnav {
        display: block;
        position: static;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        min-width: 0;
    }
    .nav-links ul li ul.subnav li a { padding-left: 28px; font-size: 13px; }
    .nav-links #search-form { margin: 10px 0 0; }

    .features { grid-template-columns: 1fr; }
    .hero h1 { font-size: 24px; }
    .postnav .newer, .postnav .older { float: left; margin-bottom: 0.5em; }

    pre { white-space: pre-wrap; word-wrap: break-word; }
}

@media all and (max-width: 560px) {
    .featured-video, .featured-audio {
        position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; overflow: hidden;
    }
    .featured-video iframe, .featured-audio iframe { height: 100%; left: 0; position: absolute; top: 0; width: 100%; }
}
