/* =============================================================================
   JEKYLL BEAR THEME - TECH LAB / PCB PORTFOLIO AESTHETIC
   ============================================================================= */
/* =============================================================================
   FONTS & IMPORTS
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap');

/* =============================================================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   ============================================================================= */

:root {
    /* Layout */
    --width: 720px;
    
    /* Typography */
    --font-main: 'IBM Plex Mono', monospace;
    --font-secondary: 'IBM Plex Mono', monospace;
    --font-monospace: 'IBM Plex Mono', monospace;
    --font-scale: 0.9em;
    
    /* Spacing */
    --spacing-xs: 5px;
    --spacing-sm: 10px;
    --spacing-md: 20px;
    --spacing-lg: 40px;
    --spacing-xl: 60px;
    
    /* Border radius */
    --radius-sm: 3px;
    --radius-md: 5px;
    
    /* Transitions */
    --transition-fast: 0.2s;
    --transition-normal: 0.3s;
    
    /* Z-index scale */
    --z-dropdown: 200;
    --z-modal: 1000;

    /* =============================================================================
       TECH LAB THEME – LIGHT MODE (Workbench / CAD View)
       ============================================================================= */

    --background-color: #F3F6F9; /* Clean ESD-safe workbench */
    --heading-color: #0B1F2A;    /* Graphite blue */
    --text-color: #1C2B36;       /* Technical charcoal */

    --link-color: #0F7B6C;       /* Solder mask green */
    --visited-color: #0A5A50;    /* Dark trace */
    --main-color: #18A999;       /* Signal / net highlight */

    --code-background-color: #E6EBF0; /* IDE panel */
    --code-color: #0B1F2A;            /* Terminal text */

    --blockquote-color: #8EA0AE; /* Cool steel */

    /* Interactive colors derived from theme */
    --hover-color: #FFFFFF;
    --border-color: rgba(24, 169, 153, 0.45); /* Soft signal outline */
    --shadow-color: rgba(0, 0, 0, 0.16);
    
    /* Glow effects – restrained, professional */
    --glow-color-light: rgba(24, 169, 153, 0.25);
    --glow-color-medium: rgba(24, 169, 153, 0.45);
}

/* =============================================================================
   DARK MODE COLOR OVERRIDES (Electronics Lab)
   ============================================================================= */

@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #0B0F14; /* Oscilloscope black */
        --heading-color: #E6EDF3;    /* Crisp lab white */
        --text-color: #C9D4DD;       /* Soft technical gray */

        --link-color: #3CFFB0;    /* LED / signal green */
        --visited-color: #7EF5C8; /* Muted signal */
        --main-color: #2BD9A8;    /* Active trace */

        --code-background-color: #111820; /* Terminal panel */
        --code-color: #E6EDF3;           /* Monospace clarity */

        --blockquote-color: #5F7383; /* Steel gray */

        /* Keep interactive variables consistent in dark mode too */
        --hover-color: #0B0F14;
        --border-color: rgba(60, 255, 176, 0.28);
        --shadow-color: rgba(0, 0, 0, 0.35);

        /* Subtle tech glow (NOT gamer RGB) */
        --glow-color-light: rgba(60, 255, 176, 0.25);
        --glow-color-medium: rgba(60, 255, 176, 0.45);
    }
}

/* =============================================================================
   BASE STYLES
   ============================================================================= */

body {
    font-family: var(--font-secondary);
    font-size: var(--font-scale);
    margin: auto;
    padding: var(--spacing-md);
    max-width: var(--width);
    text-align: left;
    background-color: var(--background-color);
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.5;
    color: var(--text-color);
}

/* =============================================================================
   TYPOGRAPHY
   ============================================================================= */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-main);
    color: var(--heading-color);
}

strong, b {
    color: var(--heading-color);
}

/* =============================================================================
   LINKS
   ============================================================================= */

a {
    color: var(--link-color);
    font-family: var(--font-main);
    cursor: pointer;
    text-decoration: none;
    border-bottom: 3px solid var(--main-color);
    transition: all var(--transition-fast) ease;
}

a:hover {
    background-color: var(--main-color);
    color: var(--hover-color);
    text-decoration: none;
}

a:visited {
    color: var(--visited-color);
}

/* External link marker */
a[href^="http"]:where(:not([href*="sini6a.github.io"])):not(:has(img))::after {
    content: "↗";
    font-family: var(--font-monospace);
}

/* =============================================================================
   LAYOUT COMPONENTS
   ============================================================================= */

header {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px dashed var(--main-color);
    text-align: left;
}

header nav p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0;
}

header nav p > span {
    display: inline-flex;
    align-items: center;
}

header nav p a {
    display: inline-block;
    margin: 0 10px 0 0;
}

.nav-left {
    flex: 1;
    justify-content: flex-start;
}

.nav-right {
    flex: 1;
    justify-content: flex-end;
}

.nav-right a:last-child {
    margin-right: 0;
}



main {
    line-height: 1.6;
}

footer {
    margin-top: var(--spacing-lg);
    border-top: 2px dashed var(--main-color);
    padding: 25px 0;
    text-align: center;
}

footer > span:has(a[href="https://bearblog.dev"]) {
    display: none;
}

/* =============================================================================
   CONTENT ELEMENTS
   ============================================================================= */

hr {
    border: 0;
    border-top: 1px dashed var(--border-color);
}

/* FIX: remove hardcoded green glow and use theme border color */
img, figure {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    max-width: 100%;
}

/* .post-content img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

@media (max-width: 700px) {
    .post-content img {
        aspect-ratio: 1 / 1;
    }
} */

blockquote {
    border-left: 1px solid var(--blockquote-color);
    color: var(--text-color); /* FIX: was var(--code-color) */
    padding-left: var(--spacing-md);
    font-style: italic;
}

/* =============================================================================
   CODE & SYNTAX HIGHLIGHTING
   ============================================================================= */

code {
    font-family: var(--font-monospace);
    padding: 2px;
    background-color: var(--code-background-color);
    color: var(--code-color);
    border-radius: var(--radius-sm);
}

.highlight,
.code {
    padding: 1px 15px;
    background-color: var(--code-background-color);
    color: var(--code-color);
    border-radius: var(--radius-sm);
    margin-block-start: 1em;
    margin-block-end: 1em;
    overflow-x: auto;
}

/* =============================================================================
   TABLES
   ============================================================================= */

table {
    width: 100%;
    border-spacing: 0;
}

th, td {
    padding: 6px 13px;
    border: 1px solid var(--border-color);
    font-size: 1em;
}

/* =============================================================================
   BLOG POST LISTINGS
   ============================================================================= */

ul.blog-posts {
    list-style-type: none;
    padding: unset;
}

ul.blog-posts li {
    display: flex;
    margin-bottom: var(--spacing-sm);
}

ul.blog-posts li span {
    flex: 0 0 130px;
}

ul.blog-posts li a:visited {
    color: var(--visited-color);
}

i time {
    font-style: normal;
    opacity: 0.7;
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */

.inline {
    width: auto !important;
}

button {
    margin: 0;
    cursor: pointer;
}

/* =============================================================================
   FORM ELEMENTS
   ============================================================================= */

input, button, textarea, select {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font: inherit;
}

legend {
    margin: var(--spacing-md) 0;
    font-weight: bold;
}

label {
    display: block;
    font-weight: bold;
}

input, textarea {
    margin: 0 0 var(--spacing-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
    color: var(--text-color);
    background: var(--code-background-color);
    border: 2px solid var(--link-color);
    border-radius: var(--radius-md);
}

input {
    width: 55%;
}

textarea {
    width: 95%;
}

input[type=button], 
input[type=submit], 
input[type=reset] {
    margin: 0 0 var(--spacing-md);
    padding: 7px;
    font-family: var(--font-secondary);
    font-weight: bold;
    color: var(--background-color);
    background: var(--link-color);
    border-radius: var(--radius-md);
    cursor: pointer;
}

::placeholder {
    color: var(--text-color);
    opacity: 0.7;
}

/* =============================================================================
   SCROLLBAR STYLING – TECH LAB (Scoped & Subtle)
   ============================================================================= */

/* ---------- Firefox ---------- */
pre,
.highlight,
.code {
    scrollbar-width: thin;
    scrollbar-color: var(--main-color) var(--code-background-color);
}

/* ---------- Chromium / WebKit ---------- */
pre::-webkit-scrollbar,
.highlight::-webkit-scrollbar,
.code::-webkit-scrollbar {
    height: 8px;          /* horizontal scrollbar */
    width: 8px;           /* vertical scrollbar (just in case) */
}

pre::-webkit-scrollbar-track,
.highlight::-webkit-scrollbar-track,
.code::-webkit-scrollbar-track {
    background: var(--code-background-color);
    border-radius: 6px;
}

pre::-webkit-scrollbar-thumb,
.highlight::-webkit-scrollbar-thumb,
.code::-webkit-scrollbar-thumb {
    background-color: var(--main-color);
    border-radius: 6px;
    border: 2px solid var(--code-background-color); /* floating thumb look */
}

pre::-webkit-scrollbar-thumb:hover,
.highlight::-webkit-scrollbar-thumb:hover,
.code::-webkit-scrollbar-thumb:hover {
    background-color: var(--link-color);
}

/* Subtle page scrollbar (optional) */
body {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

body::-webkit-scrollbar {
    width: 10px;
}

body::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 10px;
}
