/* VARIABLES - LIGHT THEME (DEFAULT) */
:root {
    --primary-color: #0969da;
    --primary-dark: #033d8b;
    --text-color: #000000;
    --text-light: #666666;
    --text-muted: #999999;
    --bg-color: #ffffff;
    --border-color: #e9ecef;
}

/* VARIABLES - DARK THEME */
[data-theme="dark"] {
    --primary-color: #58a6ff;
    --primary-dark: #1f6feb;
    --text-color: #f0f0f0;
    --text-light: #b0b0b0;
    --text-muted: #808080;
    --bg-color: #1a1a1a;
    --border-color: #404040;
}

/* GENERAL STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}

main {
    flex: 1;
}

/* HEADER */
header {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* NAVBAR */
.navbar {
    background-color: var(--bg-color);
    border-bottom: none;
    padding: 1.5rem 0;
    transition: background-color 0.3s ease;
}

.navbar-nav {
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-color) !important;
    font-size: 0.95rem;
    padding: 0 !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
}

.dropdown-menu {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.dropdown-item {
    color: var(--text-color);
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: var(--bg-color);
    color: var(--primary-color);
}

.btn-theme-toggle {
    color: var(--text-color) !important;
    cursor: pointer;
    transition: color 0.3s ease;
    border: none;
    background: none;
    padding: 0 !important;
    font-size: 0.95rem;
}

.btn-theme-toggle:hover {
    color: var(--primary-color) !important;
}

.search-trigger {
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-trigger:hover {
    color: var(--primary-color) !important;
}

/* DIVIDERS */
.header-divider {
    border-top: 1px solid var(--border-color);
    margin: 0 0 2rem 0;
    transition: border-color 0.3s ease;
}

.footer-divider {
    border-top: 1px solid var(--border-color);
    margin: 2rem 0 0 0;
    transition: border-color 0.3s ease;
}

/* MAIN CONTENT */
.container-xl {
    max-width: 1000px;
}

.container-md {
    max-width: 900px;
}

.page-title {
    font-size: 3rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.page-title strong {
    font-weight: 700;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    transition: color 0.3s ease;
}

.subtitle a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.subtitle a:hover {
    text-decoration: underline;
}

/* BIOGRAPHY TEXT */
.bio-text {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    transition: color 0.3s ease;
}

.bio-text a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.bio-text a:hover {
    text-decoration: underline;
}

.bio-text code {
    background-color: var(--border-color);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

/* PROFILE HEADER */
.profile-header {
    margin-bottom: 2rem;
}

.profile-header-top {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.profile-pic-container {
    flex-shrink: 0;
}

.profile-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.profile-header-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.profile-header-info .page-title {
    margin-bottom: 0.25rem;
    font-size: 2rem;
}

.profile-header-info .subtitle {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

/* PROFILE INFO */
.profile-info {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    text-align: left;
}

.profile-info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-light);
    font-size: 0.9rem;
    transition: all 0.2s ease;
    padding: 0;
}

.profile-info-item i {
    font-size: 0.95rem;
    color: var(--text-light);
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.profile-info-item span {
    color: var(--text-light);
    transition: color 0.2s ease;
}

.profile-info-item:hover {
    color: var(--primary-color);
}

.profile-info-item:hover i {
    color: var(--primary-color);
}

/* SOCIAL ICONS */
.social-icons {
    display: flex;
    gap: 1.5rem;
    font-size: 1.5rem;
    justify-content: center;
}

.social-icons a {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    color: var(--primary-color);
    transform: scale(1.2);
}

/* BLOG PAGE STYLES */
.post-list {
    margin: 0;
    padding: 0;
}

.post-list table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.post-list table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.post-list table tbody tr:hover {
    background-color: var(--border-color);
}

.post-list table td {
    padding: 1rem 0;
    vertical-align: top;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.post-list table td:first-child {
    padding-right: 2rem;
}

.post-list table td:last-child {
    text-align: right;
    color: var(--text-light);
    white-space: nowrap;
    transition: color 0.3s ease;
}

.post-list table a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-list table a:hover {
    text-decoration: underline;
}

.post-list small {
    color: var(--text-light);
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

/* PROJECTS PAGE STYLES */
.projects {
    margin-bottom: 3rem;
}

.projects-grid {
    align-items: stretch;
}

.card {
    background-color: var(--bg-color);
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.card-img-top {
    height: 220px;
    width: 100%;
    object-fit: cover;
    background-color: var(--border-color);
    border: none;
    display: block;
    outline: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

.card-body {
    padding: 1.5rem;
    background-color: var(--bg-color);
    transition: background-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.card-text {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
    transition: color 0.3s ease;
    flex-grow: 1;
}

.card .btn {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    margin-top: auto;
}

.h-100 {
    height: 100%;
}

.d-flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.flex-grow-1 {
    flex-grow: 1;
}

.align-self-start {
    align-self: flex-start;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: transparent;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
    border-color: var(--primary-color);
}

/* REPOSITORIES PAGE STYLES */
.repositories {
    margin-bottom: 3rem;
}

.loading-text {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
    font-size: 0.95rem;
}

.repo {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.repo:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.repo-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.repo-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.repo-title a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.repo-description {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
    transition: color 0.3s ease;
}

.repo-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    transition: border-color 0.3s ease;
    font-size: 0.85rem;
}

.repo-lang {
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.lang-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.repo-stat {
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.repo-stat i {
    color: var(--text-light);
    transition: color 0.3s ease;
}

/* BUTTONS */
.btn {
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
}

/* SEARCH MODAL */
#searchModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    z-index: 10000;
    padding-top: 100px;
}

.search-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: -1;
}

.search-modal-content {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 500px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    transition: all 0.3s ease;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: border-color 0.3s ease;
}

.search-input {
    flex: 1;
    border: none;
    background-color: transparent;
    font-size: 1rem;
    color: var(--text-color);
    outline: none;
    transition: color 0.3s ease;
}

.search-input::placeholder {
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.search-hint {
    color: var(--text-muted);
    font-size: 0.75rem;
    background-color: var(--border-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-left: 1rem;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.search-results {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.search-result-item {
    display: block;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    transition: all 0.2s ease;
    color: var(--text-color);
}

.search-result-item:hover {
    background-color: var(--border-color);
    color: var(--primary-color);
}

.search-result-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.search-result-context {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.4;
    transition: color 0.3s ease;
}

.search-result-empty {
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

/* FOOTER */
footer {
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 3rem;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-text {
    color: var(--text-light);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-text p {
    margin: 0;
}

.footer-social {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.footer-social a {
    color: var(--text-light);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.footer-social a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* UTILITIES */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-light) !important;
    transition: color 0.3s ease;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-5 {
    margin-top: 3rem;
}

.ms-auto {
    margin-left: auto;
}

.justify-content-center {
    justify-content: center;
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .card-img-top {
        height: 180px;
    }

    .card-body {
        padding: 1.25rem;
    }
}

@media (max-width: 768px) {
    .navbar-nav {
        gap: 1rem;
        font-size: 0.85rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .bio-text {
        font-size: 0.9rem;
    }

    .profile-header-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }

    .profile-img {
        width: 180px;
        height: 180px;
    }

    .profile-header-info {
        align-items: center;
        justify-content: center;
    }

    .profile-info {
        text-align: center;
        align-items: center;
    }

    .profile-info-item {
        justify-content: center;
    }

    .profile-header-info .page-title {
        font-size: 1.5rem;
    }

    .card-img-top {
        height: 200px;
    }

    .card-body {
        padding: 1rem;
    }

    .card-title {
        font-size: 1rem;
    }

    .card-text {
        font-size: 0.85rem;
    }

    .container-md {
        max-width: 100%;
        padding: 0 1rem;
    }

    .post-list table td:last-child {
        text-align: left;
    }

    .repo-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    #searchModal {
        padding-top: 50px;
    }

    .search-modal-content {
        width: 95%;
        max-height: 400px;
    }

    .search-input-wrapper {
        padding: 1rem;
    }

    .search-hint {
        display: none;
    }

    .search-result-item {
        padding: 0.75rem 1rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-text {
        order: 2;
    }

    .footer-social {
        order: 1;
    }
}

@media (max-width: 576px) {
    .navbar {
        padding: 1rem 0;
    }

    .navbar-nav {
        gap: 0.75rem;
        font-size: 0.8rem;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .social-icons {
        gap: 1rem;
        font-size: 1.25rem;
    }

    .container-md {
        max-width: 100%;
        padding: 0 1rem;
    }

    .container-xl {
        max-width: 100%;
        padding: 0 1rem;
    }

    .header-divider {
        margin: 0 0 1.5rem 0;
    }

    .footer-divider {
        margin: 1.5rem 0 0 0;
    }

    .footer {
        padding: 1.5rem 0;
    }

    .card {
        border-radius: 6px;
    }

    .card-img-top {
        border-radius: 6px 6px 0 0;
        height: 120px;
    }

    .repo {
        border-radius: 6px;
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .repo-meta {
        gap: 1rem;
        font-size: 0.8rem;
    }

    .post-list table {
        font-size: 0.85rem;
    }

    .post-list table td {
        padding: 0.75rem 0;
    }

    .post-list table td:first-child {
        padding-right: 1rem;
    }
}