﻿

:root {
    --home-bg: #f3f6fb;
    --home-surface: #ffffff;
    --home-surface-alt: #f8fafc;
    --home-text: #172033;
    --home-muted: #526174;
    --home-border: #dce4ee;
    --home-accent: #2563eb;
    --home-shadow: 0 12px 34px rgba(20, 35, 60, 0.07);
}

html[data-theme="light"] {
    color-scheme: light;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --home-bg: #0b1220;
    --home-surface: #141e30;
    --home-surface-alt: #1c2940;
    --home-text: #eaf0fb;
    --home-muted: #a9bad0;
    --home-border: #33445e;
    --home-accent: #83b5ff;
    --home-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
}

html,
body.portfolio-body {
    min-height: 100%;
}

body.portfolio-body .home-footer {
    border-color: var(--home-border);
    background-color: var(--home-surface);
    color: var(--home-muted);
}

body.portfolio-body .home-footer-links a {
    color: var(--home-muted);
}

body.portfolio-body .home-footer-links a:hover {
    color: var(--home-text);
}

body.portfolio-body .back-to-top {
    border-color: var(--home-border);
    background-color: var(--home-surface);
    color: var(--home-text);
}

body.portfolio-body {
    background-color: var(--home-bg) !important;
    color: var(--home-text);
    transition: background-color 0.2s ease, color 0.2s ease;
}

    body.portfolio-body .home-main {
        background-color: var(--home-bg) !important;
        color: var(--home-text);
    }

        body.portfolio-body .home-main .resume-section {
            background-color: var(--home-surface) !important;
            color: var(--home-text);
            border-color: var(--home-border);
        }

            body.portfolio-body .home-main .resume-section.bg-white,
            body.portfolio-body .home-main .resume-section.bg-light {
                background-color: var(--home-surface) !important;
            }

#about .about-description {
    width: 100%;
    max-width: 100%;
    text-align: justify !important;
    line-height: 1.8;
    overflow-wrap: break-word;
    hyphens: auto;
}

    #about .about-description p,
    #about .about-description div,
    #about .about-description li {
        text-align: justify !important;
        line-height: inherit;
        overflow-wrap: break-word;
    }

    #about .about-description p {
        margin-top: 0;
        margin-bottom: 16px;
    }

    #about .about-description h1,
    #about .about-description h2,
    #about .about-description h3,
    #about .about-description h4,
    #about .about-description h5,
    #about .about-description h6 {
        text-align: left !important;
    }

body.portfolio-body .home-main h1,
body.portfolio-body .home-main h2,
body.portfolio-body .home-main h3,
body.portfolio-body .home-main h4,
body.portfolio-body .home-main h5,
body.portfolio-body .home-main h6,
body.portfolio-body .home-project-modal .modal-title,
body.portfolio-body .home-project-modal-section h4 {
    color: var(--home-text);
}

body.portfolio-body .home-main p,
body.portfolio-body .home-main li,
body.portfolio-body .home-main .about-description,
body.portfolio-body .home-project-modal .lead,
body.portfolio-body .home-project-modal-section p,
body.portfolio-body .home-project-modal-section li {
    color: var(--home-muted);
}

body.portfolio-body .home-portfolio-eyebrow,
body.portfolio-body .home-project-category {
    color: #0f766e;
}

body.portfolio-body .home-project-detail-button {
    color: var(--home-accent);
}

body.portfolio-body .home-project-detail-button:hover {
    color: #1d4ed8;
}

body.portfolio-body .home-project-tags li {
    background-color: var(--home-surface);
    border-color: var(--home-border);
    color: var(--home-muted);
}

body.portfolio-body .home-project-verification strong {
    color: #166534;
}

html[data-theme="dark"] body.portfolio-body .home-portfolio-eyebrow,
html[data-theme="dark"] body.portfolio-body .home-project-category {
    color: #6ee7b7;
}

html[data-theme="dark"] body.portfolio-body .home-project-detail-button {
    color: #93c5fd;
}

html[data-theme="dark"] body.portfolio-body .home-project-detail-button:hover {
    color: #bfdbfe;
}

html[data-theme="dark"] body.portfolio-body .home-project-verification strong {
    color: #86efac;
}

html[data-theme="dark"] .home-main .text-muted,
html[data-theme="dark"] .home-main .text-secondary {
    color: var(--home-muted) !important;
}

html[data-theme="dark"] .home-main a:not(.btn) {
    color: var(--home-accent);
}

html[data-theme="dark"] .home-main .card,
html[data-theme="dark"] .home-main .home-project-card,
html[data-theme="dark"] .modal-content {
    background-color: var(--home-surface-alt) !important;
    color: var(--home-text) !important;
    border-color: var(--home-border) !important;
}

html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer {
    border-color: var(--home-border);
}

html[data-theme="dark"] .home-project-card-actions { border-color: var(--home-border); }

    html[data-theme="dark"] .modal-header .btn-close {
        filter: invert(1) grayscale(100%);
    }

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] textarea {
    background-color: var(--home-surface-alt);
    color: var(--home-text);
    border-color: var(--home-border);
}

    html[data-theme="dark"] .form-control::placeholder {
        color: var(--home-muted);
    }

html[data-theme="dark"] #homeSidebar {
    background-color: var(--home-surface) !important;
    color: var(--home-text) !important;
}

    html[data-theme="dark"] #homeSidebar .nav-link {
        color: var(--home-text);
    }

        html[data-theme="dark"] #homeSidebar .nav-link:hover,
        html[data-theme="dark"] #homeSidebar .nav-link.active {
            color: var(--home-accent);
        }

#themeToggle.theme-toggle {
    position: fixed !important;
    top: 20px !important;
    right: 24px !important;
    bottom: auto !important;
    left: auto !important;
    z-index: 1100 !important;
    pointer-events: auto !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    min-width: 120px;
    height: 44px;
    padding: 0 16px;
    border: 1px solid var(--home-border);
    border-radius: 999px;
    background-color: var(--home-surface);
    color: var(--home-text);
    box-shadow: var(--home-shadow);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer !important;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

    #themeToggle.theme-toggle:hover {
        border-color: var(--home-accent);
        transform: translateY(-2px);
    }

    #themeToggle.theme-toggle:focus-visible {
        outline: 3px solid var(--home-accent);
        outline-offset: 3px;
    }

    #themeToggle.theme-toggle i,
    #themeToggle.theme-toggle span {
        pointer-events: none;
    }

    #themeToggle.theme-toggle i {
        font-size: 17px;
        color: var(--home-accent);
    }

#themeToggle .theme-toggle-label {
    display: inline;
    font-size: 14px;
    font-weight: 600;
}

html[data-theme="dark"] #themeToggle.theme-toggle {
    background-color: var(--home-surface-alt) !important;
    color: var(--home-text) !important;
    border-color: var(--home-border) !important;
}

@media (max-width: 767.98px) {
    #themeToggle.theme-toggle {
        top: 68px !important;
        right: 12px !important;
        width: 44px;
        min-width: 44px;
        height: 44px;
        padding: 0;
        gap: 0;
        border-radius: 50%;
    }

    #themeToggle .theme-toggle-label {
        display: none;
    }

    #themeToggle.theme-toggle i {
        font-size: 18px;
    }
}

@media (max-width: 575.98px) {
    #about .about-description {
        line-height: 1.7;
    }

        #about .about-description p {
            margin-bottom: 12px;
        }
}

@media (prefers-reduced-motion: reduce) {
    body.portfolio-body,
    #themeToggle.theme-toggle {
        transition: none;
    }

        #themeToggle.theme-toggle:hover {
            transform: none;
        }
}
