/*
 * 1it.biz — Modern IT/Security Overlay
 * Layered on top of main.css. Dark palette, cyan accent, monospace accents.
 * Targets Bootstrap Basic markup (col-2cl, container, nav-container, entry-*).
 */

/* ===== Design tokens ===== */
:root {
    --bg:            #0b1016;
    --bg-elev-1:     #111923;
    --bg-elev-2:     #17212e;
    --bg-code:       #0a0f15;
    --border:        #1f2a3a;
    --border-strong: #2c3c52;

    --text:          #e6edf3;
    --text-dim:      #a3b1c2;
    --text-mute:     #6e7f95;

    --accent:        #22d3ee;   /* cyan-400 */
    --accent-hover:  #5ee8f7;
    --accent-soft:   rgba(34, 211, 238, 0.12);
    --accent-line:   rgba(34, 211, 238, 0.35);

    --ok:            #4ade80;
    --warn:          #fbbf24;
    --bad:           #f87171;

    --radius:        10px;
    --radius-sm:     6px;
    --shadow:        0 2px 4px rgba(0,0,0,0.25), 0 8px 24px rgba(0,0,0,0.35);

    --font-sans:     "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono:     "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Roboto Mono", monospace;
}

/* ===== Reset & base ===== */
html { scroll-behavior: smooth; }

body,
body.home,
body.blog {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body::before {
    /* Subtle top gradient band */
    content: "";
    position: fixed;
    inset: 0 0 auto 0;
    height: 280px;
    background: radial-gradient(1200px 280px at 50% -80px,
                rgba(34, 211, 238, 0.10) 0%,
                transparent 60%);
    pointer-events: none;
    z-index: 0;
}

#wrapper { position: relative; z-index: 1; }

/* Typography */
h1, h2, h3, h4, h5, h6,
.entry-title, .page-title {
    font-family: var(--font-sans);
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.25;
}
h1, .entry-title { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }

p { color: var(--text); }

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover, a:focus {
    color: var(--accent-hover);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Selection */
::selection { background: var(--accent-soft); color: var(--text); }

/* ===== Header / nav ===== */
#header {
    background: var(--bg-elev-1);
    border-bottom: 1px solid var(--border);
    position: relative;
}
#header::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 1px;
    background: linear-gradient(to right,
                transparent 0%,
                var(--accent-line) 50%,
                transparent 100%);
    pointer-events: none;
}

.nav-container,
#nav-topbar {
    background: transparent;
}

.nav-container a,
.nav-wrap a,
#menu-home a {
    color: var(--text-dim) !important;
    font-weight: 500;
    letter-spacing: 0.01em;
    border: none;
    padding: 14px 18px;
    transition: color 0.15s ease, background 0.15s ease;
}
.nav-container a:hover,
.nav-wrap a:hover,
#menu-home a:hover {
    color: var(--accent) !important;
    background: var(--accent-soft) !important;
}

.nav-toggle {
    color: var(--text);
    padding: 14px 18px;
}
.nav-toggle:hover { color: var(--accent); }

/* Site title (when visible) */
.site-title,
.site-title a,
.blog-title,
.blog-title a {
    font-family: var(--font-mono);
    color: var(--text) !important;
    font-weight: 600;
    letter-spacing: -0.02em;
}
.site-title a::before,
.blog-title a::before {
    content: "$ ";
    color: var(--accent);
    opacity: 0.7;
}
.site-description { color: var(--text-mute); font-size: 0.9rem; }

/* ===== Layout ===== */
.container {
    max-width: 1140px;
    padding-left: 20px;
    padding-right: 20px;
}

#content,
.main-content,
.col-left.main-leyout,
.col-right.main-leyout {
    background: transparent;
    color: var(--text);
}

/* ===== Post cards ===== */
article.post,
.hentry,
#content article {
    background: var(--bg-elev-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    transition: border-color 0.2s ease, transform 0.2s ease;
}
article.post:hover,
.hentry:hover {
    border-color: var(--border-strong);
}

.entry-header {
    margin-bottom: 16px;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 12px;
}
.entry-title a { color: var(--text); }
.entry-title a:hover { color: var(--accent); text-decoration: none; }

.entry-meta,
.entry-date,
.posted-on,
.byline {
    color: var(--text-mute);
    font-size: 0.85rem;
    font-family: var(--font-mono);
}
.entry-meta a { color: var(--text-dim); }
.entry-meta a:hover { color: var(--accent); }

.entry-content {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.75;
}
.entry-content p { margin: 0 0 1.1em; }

/* Read more */
.more-link,
a.more-link {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--accent-line);
    border-radius: var(--radius-sm);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.15s ease;
}
.more-link:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    text-decoration: none;
    color: var(--accent-hover);
}

/* ===== Code / tech accents ===== */
code, kbd, pre, tt, samp {
    font-family: var(--font-mono);
    font-size: 0.92em;
}
:not(pre) > code {
    background: var(--bg-code);
    color: var(--accent);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--border);
}
pre {
    background: var(--bg-code);
    color: var(--text);
    padding: 16px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow-x: auto;
    line-height: 1.55;
}
pre code { background: transparent; border: none; color: inherit; padding: 0; }

blockquote {
    border-left: 3px solid var(--accent);
    background: var(--accent-soft);
    margin: 1.4em 0;
    padding: 14px 20px;
    color: var(--text-dim);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
}
blockquote p:last-child { margin-bottom: 0; }

/* ===== Sidebar / widgets ===== */
#sidebar,
.sidebar,
aside.sidebar,
.col-sidebar {
    background: transparent;
}
.widget,
.widget_recent_entries,
.widget_categories,
.widget_search,
.widget_archive,
.widget_tag_cloud {
    background: var(--bg-elev-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-bottom: 20px;
}
.widget-title,
.widget h2,
.widget h3 {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li {
    padding: 8px 0;
    border-bottom: 1px dotted var(--border);
    color: var(--text-dim);
    font-size: 0.92rem;
}
.widget li:last-child { border-bottom: none; }
.widget li a { color: var(--text); }
.widget li a:hover { color: var(--accent); text-decoration: none; }

/* ===== Search ===== */
.search-form,
#searchform,
.widget_search form {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
input[type="search"],
input[type="text"],
input[type="email"],
input[type="url"],
textarea,
.search-field,
#s {
    flex: 1;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type="search"]:focus,
input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
input[type="submit"],
button,
.search-submit,
.wp-block-button__link {
    background: var(--accent);
    color: var(--bg);
    border: none;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}
input[type="submit"]:hover,
button:hover,
.search-submit:hover,
.wp-block-button__link:hover {
    background: var(--accent-hover);
}
input[type="submit"]:active,
button:active { transform: translateY(1px); }

/* ===== Tables ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}
th, td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
th { color: var(--accent); font-family: var(--font-mono); font-size: 0.88rem; }

/* ===== Horizontal rule ===== */
hr {
    border: none;
    border-top: 1px dashed var(--border);
    margin: 2em 0;
}

/* ===== Pagination ===== */
.wp-pagenavi,
.pagination,
.nav-links {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin: 24px 0;
}
.wp-pagenavi a,
.wp-pagenavi span,
.pagination a,
.pagination span,
.page-numbers {
    display: inline-block;
    padding: 8px 14px;
    background: var(--bg-elev-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-decoration: none;
}
.wp-pagenavi .current,
.page-numbers.current {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}
.wp-pagenavi a:hover,
.page-numbers:hover {
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}

/* ===== Images ===== */
img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
}
.entry-content img { border: 1px solid var(--border); }

/* ===== Footer ===== */
#footer,
footer#footer {
    background: var(--bg-elev-1);
    border-top: 1px solid var(--border);
    color: var(--text-mute);
    padding: 32px 0;
    margin-top: 48px;
    font-size: 0.88rem;
}
#footer a { color: var(--text-dim); }
#footer a:hover { color: var(--accent); }

/* ===== Comments ===== */
#comments, .comments-area {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.comment {
    background: var(--bg-elev-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 14px;
}
.comment-author { color: var(--accent); font-family: var(--font-mono); }
.comment-metadata { color: var(--text-mute); font-size: 0.8rem; }

/* ===== Utility / overrides for Bootstrap Basic's inline styles ===== */
.label, .badge {
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--accent-line);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
}

/* Remove Bootstrap 3 default light backgrounds */
.well, .panel, .panel-default {
    background: var(--bg-elev-1);
    border-color: var(--border);
    color: var(--text);
}

/* ===== Kill broken external image references from old theme ===== */
/* main.css had hard-coded background images from tecmint.com that 404.
   Replace with solid colors from the palette. */
#nav-topbar .nav ul,
#nav-header .nav ul,
.ie8 #nav-header .nav > li > a:hover,
.ie8 #nav-header .nav > li:hover > a,
.ie8 .toggle-search:hover,
.ie8 .toggle-search.active,
.ie8 .search-expand-inner {
    background: var(--bg-elev-2) !important;
    background-image: none !important;
}

/* ===== Dropdown menus (category sub-menus) ===== */
#nav-topbar .nav ul.sub-menu,
#nav-header .nav ul.sub-menu,
.dropdown-menu {
    background: var(--bg-elev-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    padding: 6px 0;
    min-width: 200px;
}
.dropdown-menu > li > a,
#nav-topbar .sub-menu li a,
#nav-header .sub-menu li a {
    color: var(--text-dim) !important;
    padding: 8px 16px !important;
    font-size: 0.92rem;
    border-bottom: none !important;
}
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus,
#nav-topbar .sub-menu li a:hover,
#nav-header .sub-menu li a:hover {
    background: var(--accent-soft) !important;
    color: var(--accent) !important;
}
.dropdown-menu > .divider {
    background-color: var(--border);
    margin: 4px 0;
}

/* Menu item separators — drop the tecmint-style box shadows */
#nav-topbar .nav ul li,
#nav-header .nav ul li {
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    body { font-size: 15px; }
    article.post, .hentry {
        padding: 20px 18px;
    }
    h1, .entry-title { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
}

/* ===== A11y ===== */
*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 3px;
}
.screen-reader-text {
    position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden;
}

/* ===== Print ===== */
@media print {
    body { background: #fff; color: #000; }
    article.post { border: none; box-shadow: none; }
    a { color: #000; text-decoration: underline; }
}
