html, body {
    height: 100%;
}

/* Disable transitions when theme is being initialized */
.no-transition, 
.no-transition *, 
.no-transition *:before, 
.no-transition *:after {
    transition: none !important;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}
main.container {
    flex: 1 0 auto;
}
footer {
    flex-shrink: 0;
}

/* Theme specific overrides */
[data-bs-theme="dark"] {
    --bs-body-bg: #181a1b;
    --bs-body-color: #f8f9fa;
    --nav-bg: rgba(24, 26, 27, 0.8);
}

[data-bs-theme="light"] {
    --nav-bg: rgba(255, 255, 255, 0.8);
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background-color: var(--nav-bg) !important;
    border-bottom: 1px solid var(--bs-border-color-translucent);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-link {
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
    margin: 0 5px;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--bs-primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

[data-bs-theme="dark"] .navbar {
    background-color: var(--nav-bg) !important;
}

/* Rest of theme.css */

[data-bs-theme="dark"] .card {
    background-color: #23272b;
    border-color: #444c56;
}

[data-bs-theme="dark"] .form-control {
    background-color: #23272b;
    color: #f8f9fa;
    border-color: #444c56;
}

[data-bs-theme="dark"] .form-control:focus {
    background-color: #2b3035;
    color: #f8f9fa;
}

/* Smooth transition for theme change */
body, .navbar, .card, .btn, .form-control, .footer, #markdown-preview, blockquote {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Theme Switch Button Styling */
#theme-switch {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#theme-switch:hover {
    transform: rotate(15deg) scale(1.1);
}

#theme-switch i {
    font-size: 1.2rem;
}

/* Markdown and Content styling */
#markdown-display, #markdown-preview {
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] #markdown-preview {
    background-color: #23272b;
    border-color: #444c56;
}

[data-bs-theme="light"] #markdown-preview {
    background-color: #fafafa;
    border-color: #ccc;
}

blockquote {
    border-left: 4px solid #ccc;
    padding: 0.5em 1em;
    margin: 0 0 1em 0;
}

/* Public Portfolio Styling */
.project-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15) !important;
}

.card-img-container {
    height: 200px;
    overflow: hidden;
    background: linear-gradient(45deg, var(--bs-primary-bg-subtle), var(--bs-info-bg-subtle));
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .card-img-container img {
    transform: scale(1.1);
}

.markdown-body {
    line-height: 1.6;
}

.markdown-body h1, .markdown-body h2, .markdown-body h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: var(--bs-primary);
}

.hero-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--bs-primary-bg-subtle) 0%, var(--bs-body-bg) 100%);
    border-radius: 20px;
    margin-bottom: 3rem;
}

/* Theme specific adjustments */
[data-bs-theme="dark"] .project-card {
    background-color: #23272b;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .display-1 {
        font-size: 3rem;
    }
    .display-3 {
        font-size: 2.2rem;
    }
    .home-hero {
        min-height: auto;
        padding: 3rem 1rem !important;
        margin-bottom: 2rem;
    }
    .hero-section {
        padding: 2.5rem 1rem;
    }
    .project-header {
        padding: 3rem 1rem;
        border-radius: 0 0 20px 20px;
    }
}

/* Base styles cleanup */
.home-hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at top right, var(--bs-primary-bg-subtle), transparent),
                radial-gradient(circle at bottom left, var(--bs-info-bg-subtle), transparent);
    border-radius: 30px;
    margin-bottom: 4rem;
}

.passion-card {
    border: none;
    background: var(--bs-tertiary-bg);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.passion-card:hover {
    background: var(--bs-primary-bg-subtle);
    transform: translateY(-5px);
}

.passion-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--bs-primary);
}

.education-line {
    border-left: 3px solid var(--bs-primary);
    padding-left: 20px;
    margin-left: 10px;
}

/* Skills & Languages */
.skill-badge {
    background-color: var(--bs-secondary-bg);
    border: 1px solid var(--bs-border-color);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    display: inline-block;
    margin: 0.25rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.skill-badge:hover {
    background-color: var(--bs-primary);
    color: white;
    transform: scale(1.05);
}

.lang-level {
    height: 6px;
    background-color: var(--bs-secondary-bg);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 5px;
}

.lang-progress {
    height: 100%;
    background-color: var(--bs-primary);
}

.social-link {
    font-size: 1.5rem;
    color: var(--bs-body-color);
    transition: color 0.3s ease;
}

.social-link:hover {
    color: var(--bs-primary);
}

/* Rest of theme.css */