/* Dark Theme Styles */

/* Root variables inherit from Jekyll configuration for light theme */

[data-theme="dark"] {
    /* Dark theme */
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --navbar-bg: #2d2d2d;
    --navbar-text: #e0e0e0;
    --navbar-border: #404040;
    --link-color: #66b3ff;
    --hover-color: #4da6ff;
    --footer-bg: #2d2d2d;
    --footer-text: #b0b0b0;
    --footer-link: #e0e0e0;
    --code-bg: #2d2d2d;
    --code-text: #e0e0e0;
    --border-color: #404040;
    --blockquote-border: #666;
    --blockquote-bg: #2d2d2d;
}

/* Dark theme overrides */
[data-theme="dark"] body {
    background-color: #1a1a1a;
    color: #e0e0e0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Navbar styles */
[data-theme="dark"] .navbar-custom {
    background-color: #2d2d2d;
    border-bottom: 1px solid #404040;
    transition: background-color 0.3s ease;
}

[data-theme="dark"] .navbar-custom .navbar-brand,
[data-theme="dark"] .navbar-custom .navbar-nav .nav-link {
    color: #e0e0e0;
    transition: color 0.3s ease;
}

[data-theme="dark"] .navbar-custom .navbar-nav .nav-link:hover,
[data-theme="dark"] .navbar-custom .navbar-nav .nav-link:focus {
    color: #4da6ff;
}

/* Links */
[data-theme="dark"] a {
    color: #66b3ff;
    transition: color 0.3s ease;
}

[data-theme="dark"] a:hover,
[data-theme="dark"] a:focus {
    color: #4da6ff;
}

/* Footer */
[data-theme="dark"] footer {
    background-color: #2d2d2d;
    color: #b0b0b0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] footer a {
    color: #e0e0e0;
}

[data-theme="dark"] footer a:hover {
    color: #4da6ff;
}

/* Code blocks */
[data-theme="dark"] pre,
[data-theme="dark"] code {
    background-color: #2d2d2d;
    color: #e0e0e0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] .highlight {
    background-color: #2d2d2d;
}

[data-theme="dark"] .highlight pre {
    background-color: transparent;
}

/* Borders and dividers */
[data-theme="dark"] .border,
[data-theme="dark"] hr,
[data-theme="dark"] .table,
[data-theme="dark"] .table th,
[data-theme="dark"] .table td {
    border-color: #404040;
}

/* Blockquotes */
[data-theme="dark"] blockquote {
    border-left: 5px solid #666;
    background-color: #2d2d2d;
    color: #e0e0e0;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Cards and panels */
[data-theme="dark"] .card,
[data-theme="dark"] .panel {
    background-color: #1a1a1a;
    border-color: #404040;
    color: #e0e0e0;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Theme toggle button */
.theme-toggle {
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.3s ease, opacity 0.3s ease;
    display: flex;
    align-items: center;
    text-decoration: none !important;
}

.theme-toggle:hover {
    opacity: 0.8;
    text-decoration: none !important;
}

.theme-toggle:focus {
    outline: none;
    text-decoration: none !important;
}

/* Dark theme specific navbar adjustments */
[data-theme="dark"] .dropdown-menu {
    background-color: #2d2d2d;
    border-color: #404040;
}

[data-theme="dark"] .dropdown-item {
    color: #e0e0e0;
}

[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
    background-color: #404040;
    color: #4da6ff;
}

/* Post content adjustments */
[data-theme="dark"] .post-preview {
    border-bottom-color: #404040;
}

[data-theme="dark"] .post-preview .post-title {
    color: #e0e0e0;
}

[data-theme="dark"] .post-preview .post-subtitle {
    color: #b0b0b0;
}

[data-theme="dark"] .post-preview .post-meta {
    color: #b0b0b0;
}

/* Social links */
[data-theme="dark"] .list-inline-item a {
    color: #e0e0e0;
}

[data-theme="dark"] .list-inline-item a:hover {
    color: #4da6ff;
}

/* Social media icons - all use GitHub dark grey in light mode */
.fa-stack .fa-circle {
    color: #333333;
    /* GitHub dark grey for all icons */
}

.list-inline-item a[href*="github"] .fa-circle,
.list-inline-item a[href*="twitter"] .fa-circle,
.list-inline-item a[href*="x.com"] .fa-circle,
.list-inline-item a[href*="linkedin"] .fa-circle,
.list-inline-item a[href*="facebook"] .fa-circle,
.list-inline-item a[href*="telegram"] .fa-circle,
.list-inline-item a[href*="stackoverflow"] .fa-circle,
.list-inline-item a[href*="youtube"] .fa-circle,
.list-inline-item a[href*="instagram"] .fa-circle {
    color: #333333;
    /* All platforms use same dark grey */
}

/* Social media icons - grey-ish colors for dark mode */
[data-theme="dark"] .fa-stack .fa-circle {
    color: #666666;
    /* Medium grey for all icons in dark mode */
}

[data-theme="dark"] .fa-stack .fa-inverse {
    color: #e0e0e0 !important;
    /* Light icon on dark circle */
}

[data-theme="dark"] .fa-stack:hover .fa-circle {
    color: #888888;
    /* Lighter grey on hover */
}

[data-theme="dark"] .fa-stack:hover .fa-inverse {
    color: #1a1a1a !important;
    /* Dark icon on light circle on hover */
}

/* Override individual platform colors in dark mode to use grey */
[data-theme="dark"] .list-inline-item a[href*="github"] .fa-circle,
[data-theme="dark"] .list-inline-item a[href*="twitter"] .fa-circle,
[data-theme="dark"] .list-inline-item a[href*="x.com"] .fa-circle,
[data-theme="dark"] .list-inline-item a[href*="linkedin"] .fa-circle,
[data-theme="dark"] .list-inline-item a[href*="facebook"] .fa-circle,
[data-theme="dark"] .list-inline-item a[href*="telegram"] .fa-circle,
[data-theme="dark"] .list-inline-item a[href*="stackoverflow"] .fa-circle,
[data-theme="dark"] .list-inline-item a[href*="youtube"] .fa-circle,
[data-theme="dark"] .list-inline-item a[href*="instagram"] .fa-circle {
    color: #666666 !important;
    /* Force grey for all platforms in dark mode */
}

/* Tags styling */
[data-theme="dark"] .tag-btn {
    background-color: #2d2d2d;
    color: #e0e0e0;
    border-color: #404040;
}

[data-theme="dark"] .tag-btn:hover {
    background-color: #404040;
    color: #4da6ff;
    border-color: #66b3ff;
}

[data-theme="dark"] .tag-btn .fa-tag {
    color: #66b3ff;
}

/* Navigation hamburger icon for dark mode */
[data-theme="dark"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28224, 224, 224, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* General icon improvements for dark mode */
[data-theme="dark"] .fas,
[data-theme="dark"] .fab,
[data-theme="dark"] .far {
    color: inherit;
}

/* Share buttons - match the grey color scheme of other social icons */
[data-theme="dark"] .btn-social,
[data-theme="dark"] .btn-facebook,
[data-theme="dark"] .btn-linkedin,
[data-theme="dark"] .btn-twitter {
    background-color: #666666 !important;
    border-color: #666666 !important;
    color: #e0e0e0 !important;
}

[data-theme="dark"] .btn-social:hover,
[data-theme="dark"] .btn-facebook:hover,
[data-theme="dark"] .btn-linkedin:hover,
[data-theme="dark"] .btn-twitter:hover {
    background-color: #888888 !important;
    border-color: #888888 !important;
    color: #ffffff !important;
}

/* Footer brand/theme-by text */
[data-theme="dark"] .theme-by {
    color: #b0b0b0;
}

[data-theme="dark"] .theme-by a {
    color: #66b3ff;
}

/* Image borders and shadows */
[data-theme="dark"] .avatar-img-border,
[data-theme="dark"] img {
    border-color: #404040;
}

/* Form elements */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background-color: #2d2d2d;
    color: #e0e0e0;
    border-color: #404040;
}

[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus {
    background-color: #1a1a1a;
    border-color: #66b3ff;
}

/* Tag styling */
[data-theme="dark"] .tag-btn {
    background-color: #2d2d2d;
    color: #e0e0e0;
    border-color: #404040;
}

[data-theme="dark"] .tag-btn:hover {
    background-color: #404040;
    color: #4da6ff;
}

/* Pagination */
[data-theme="dark"] .pagination .page-link {
    background-color: #2d2d2d;
    color: #e0e0e0;
    border-color: #404040;
}

[data-theme="dark"] .pagination .page-link:hover {
    background-color: #404040;
    color: #4da6ff;
}

[data-theme="dark"] .pagination .page-item.active .page-link {
    background-color: #66b3ff;
    border-color: #66b3ff;
    color: #1a1a1a;
}

/* Ensure readability of text */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: #e0e0e0;
}

[data-theme="dark"] p,
[data-theme="dark"] li,
[data-theme="dark"] td,
[data-theme="dark"] th {
    color: #e0e0e0;
}

/* Complete syntax highlighting for dark theme - Monokai inspired */
[data-theme="dark"] .highlight {
    background-color: #2d2d2d;
    color: #f8f8f2;
}

[data-theme="dark"] .highlight pre {
    background-color: transparent;
    color: #f8f8f2;
}

/* Base syntax colors */
[data-theme="dark"] .highlight .hll {
    background-color: #49483e
}

[data-theme="dark"] .highlight .c {
    color: #75715e
}

/* Comment */
[data-theme="dark"] .highlight .err {
    color: #960050;
    background-color: #1e0010
}

/* Error */
[data-theme="dark"] .highlight .k {
    color: #66d9ef
}

/* Keyword */
[data-theme="dark"] .highlight .l {
    color: #ae81ff
}

/* Literal */
[data-theme="dark"] .highlight .n {
    color: #f8f8f2
}

/* Name */
[data-theme="dark"] .highlight .o {
    color: #f92672
}

/* Operator */
[data-theme="dark"] .highlight .p {
    color: #f8f8f2
}

/* Punctuation */
[data-theme="dark"] .highlight .ch {
    color: #75715e
}

/* Comment.Hashbang */
[data-theme="dark"] .highlight .cm {
    color: #75715e
}

/* Comment.Multiline */
[data-theme="dark"] .highlight .cp {
    color: #75715e
}

/* Comment.Preproc */
[data-theme="dark"] .highlight .cpf {
    color: #75715e
}

/* Comment.PreprocFile */
[data-theme="dark"] .highlight .c1 {
    color: #75715e
}

/* Comment.Single */
[data-theme="dark"] .highlight .cs {
    color: #75715e
}

/* Comment.Special */

/* Keyword variations */
[data-theme="dark"] .highlight .kc {
    color: #66d9ef
}

/* Keyword.Constant */
[data-theme="dark"] .highlight .kd {
    color: #66d9ef
}

/* Keyword.Declaration */
[data-theme="dark"] .highlight .kn {
    color: #f92672
}

/* Keyword.Namespace */
[data-theme="dark"] .highlight .kp {
    color: #66d9ef
}

/* Keyword.Pseudo */
[data-theme="dark"] .highlight .kr {
    color: #66d9ef
}

/* Keyword.Reserved */
[data-theme="dark"] .highlight .kt {
    color: #66d9ef
}

/* Keyword.Type */

/* Literals */
[data-theme="dark"] .highlight .ld {
    color: #e6db74
}

/* Literal.Date */
[data-theme="dark"] .highlight .m {
    color: #ae81ff
}

/* Literal.Number */
[data-theme="dark"] .highlight .s {
    color: #e6db74
}

/* Literal.String */

/* Names */
[data-theme="dark"] .highlight .na {
    color: #a6e22e
}

/* Name.Attribute */
[data-theme="dark"] .highlight .nb {
    color: #f8f8f2
}

/* Name.Builtin */
[data-theme="dark"] .highlight .nc {
    color: #a6e22e
}

/* Name.Class */
[data-theme="dark"] .highlight .no {
    color: #66d9ef
}

/* Name.Constant */
[data-theme="dark"] .highlight .nd {
    color: #a6e22e
}

/* Name.Decorator */
[data-theme="dark"] .highlight .ni {
    color: #f8f8f2
}

/* Name.Entity */
[data-theme="dark"] .highlight .ne {
    color: #a6e22e
}

/* Name.Exception */
[data-theme="dark"] .highlight .nf {
    color: #a6e22e
}

/* Name.Function */
[data-theme="dark"] .highlight .nl {
    color: #f8f8f2
}

/* Name.Label */
[data-theme="dark"] .highlight .nn {
    color: #f8f8f2
}

/* Name.Namespace */
[data-theme="dark"] .highlight .nx {
    color: #a6e22e
}

/* Name.Other */
[data-theme="dark"] .highlight .py {
    color: #f8f8f2
}

/* Name.Property */
[data-theme="dark"] .highlight .nt {
    color: #f92672
}

/* Name.Tag */
[data-theme="dark"] .highlight .nv {
    color: #f8f8f2
}

/* Name.Variable */

/* Operators */
[data-theme="dark"] .highlight .ow {
    color: #f92672
}

/* Operator.Word */

/* Numbers */
[data-theme="dark"] .highlight .mb {
    color: #ae81ff
}

/* Literal.Number.Bin */
[data-theme="dark"] .highlight .mf {
    color: #ae81ff
}

/* Literal.Number.Float */
[data-theme="dark"] .highlight .mh {
    color: #ae81ff
}

/* Literal.Number.Hex */
[data-theme="dark"] .highlight .mi {
    color: #ae81ff
}

/* Literal.Number.Integer */
[data-theme="dark"] .highlight .mo {
    color: #ae81ff
}

/* Literal.Number.Oct */

/* Strings */
[data-theme="dark"] .highlight .sa {
    color: #e6db74
}

/* Literal.String.Affix */
[data-theme="dark"] .highlight .sb {
    color: #e6db74
}

/* Literal.String.Backtick */
[data-theme="dark"] .highlight .sc {
    color: #e6db74
}

/* Literal.String.Char */
[data-theme="dark"] .highlight .dl {
    color: #e6db74
}

/* Literal.String.Delimiter */
[data-theme="dark"] .highlight .sd {
    color: #e6db74
}

/* Literal.String.Doc */
[data-theme="dark"] .highlight .s2 {
    color: #e6db74
}

/* Literal.String.Double */
[data-theme="dark"] .highlight .se {
    color: #ae81ff
}

/* Literal.String.Escape */
[data-theme="dark"] .highlight .sh {
    color: #e6db74
}

/* Literal.String.Heredoc */
[data-theme="dark"] .highlight .si {
    color: #e6db74
}

/* Literal.String.Interpol */
[data-theme="dark"] .highlight .sx {
    color: #e6db74
}

/* Literal.String.Other */
[data-theme="dark"] .highlight .sr {
    color: #e6db74
}

/* Literal.String.Regex */
[data-theme="dark"] .highlight .s1 {
    color: #e6db74
}

/* Literal.String.Single */
[data-theme="dark"] .highlight .ss {
    color: #e6db74
}

/* Literal.String.Symbol */

/* Variable names */
[data-theme="dark"] .highlight .bp {
    color: #f8f8f2
}

/* Name.Builtin.Pseudo */
[data-theme="dark"] .highlight .fm {
    color: #a6e22e
}

/* Name.Function.Magic */
[data-theme="dark"] .highlight .vc {
    color: #f8f8f2
}

/* Name.Variable.Class */
[data-theme="dark"] .highlight .vg {
    color: #f8f8f2
}

/* Name.Variable.Global */
[data-theme="dark"] .highlight .vi {
    color: #f8f8f2
}

/* Name.Variable.Instance */
[data-theme="dark"] .highlight .vm {
    color: #f8f8f2
}

/* Name.Variable.Magic */

/* Generic tokens */
[data-theme="dark"] .highlight .il {
    color: #ae81ff
}

/* Literal.Number.Integer.Long */
[data-theme="dark"] .highlight .ge {
    font-style: italic
}

/* Generic.Emph */
[data-theme="dark"] .highlight .gs {
    font-weight: bold
}

/* Generic.Strong */

/* Language specific improvements */
/* C/C++ */
[data-theme="dark"] .highlight .cp {
    color: #f92672
}

/* C++ preprocessor */

/* Python */
[data-theme="dark"] .highlight .k {
    color: #66d9ef
}

/* Python keywords */

/* JavaScript */
[data-theme="dark"] .highlight .nx {
    color: #f8f8f2
}

/* JS variables */

/* CSS */
[data-theme="dark"] .highlight .nc {
    color: #a6e22e
}

/* CSS classes */
[data-theme="dark"] .highlight .nf {
    color: #a6e22e
}

/* CSS functions */

/* HTML/XML */
[data-theme="dark"] .highlight .nt {
    color: #f92672
}

/* HTML tags */
[data-theme="dark"] .highlight .na {
    color: #a6e22e
}

/* HTML attributes */

/* Shell/Bash */
[data-theme="dark"] .highlight .nb {
    color: #a6e22e
}

/* Shell builtins */