@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Color Variables */
@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;600;700;800;900&display=swap');

/* CRITICAL: Force remove all outlines from theme buttons - Must be first */
*[class*="theme"] *,
*[id*="theme"] *,
button[class*="theme"],
button[id*="theme"],
.theme-selector-btn,
#themeSelectorBtn,
#themeSelectorBtnMobile {
    outline: none !important;
    outline-offset: 0 !important;
    outline-width: 0 !important;
    outline-style: none !important;
    outline-color: transparent !important;
    -webkit-outline: none !important;
    -moz-outline: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

/* Firefox specific - remove inner focus border */
button::-moz-focus-inner,
.theme-selector-btn::-moz-focus-inner,
#themeSelectorBtn::-moz-focus-inner,
#themeSelectorBtnMobile::-moz-focus-inner {
    border: 0 !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Webkit specific - remove focus ring */
.theme-selector-btn::-webkit-focus-ring-color,
#themeSelectorBtn::-webkit-focus-ring-color,
#themeSelectorBtnMobile::-webkit-focus-ring-color {
    outline: none !important;
    -webkit-focus-ring-color: transparent !important;
}

/* Theme Variables and Legacy Compatibility */
:root {
    /* Default Theme - Nature Green */
    --theme-primary: #2d6a4f;
    --theme-secondary: #d8f3dc;
    --theme-accent: #52b788;
    --theme-content: #ede7e3;
    --theme-text: #2c3e50;
    --theme-text-light: #ffffff;
    --theme-name: 'Nature Green';
    
    /* RGB values for rgba() functions */
    --theme-accent-rgb: 82, 183, 136;
    --theme-secondary-rgb: 216, 243, 220;
    
    /* Legacy color variables - mapped to theme variables for compatibility */
    --tea-green: var(--theme-secondary);
    --beige: var(--theme-content);
    --cornsilk: var(--theme-content);
    --papaya-whip: var(--theme-content);
    --buff: var(--theme-accent);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--theme-primary);
    position: relative;
    color: var(--theme-text);
}

/* Ensure all headings are visible */
h1, h2, h3, h4, h5, h6 {
    color: var(--theme-text) !important;
}

/* Hero Section Styles */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: 50px 0;
    position: relative;
    z-index: 2;
}

/* Hero Section Responsive Improvements */
@media (max-width: 768px) {
    .hero-section {
        min-height: 80vh;
        padding: 30px 15px;
    }
    
    .hero-title {
        font-size: 2.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.3rem !important;
    }
    
    /* Index page specific - hero section with container-fluid */
    .hero-section .container-fluid {
        padding: 15px !important;
    }
    
    .hero-section .row.g-4.p-4 {
        padding: 1rem !important;
    }
}

@media (max-width: 576px) {
    .hero-section {
        min-height: 70vh;
        padding: 20px 10px;
    }
    
    .hero-title {
        font-size: 2rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.1rem !important;
    }
    
    .scroll-instruction {
        font-size: 0.8rem !important;
    }
    
    /* Index page specific - hero section with container-fluid */
    .hero-section .container-fluid {
        padding: 10px !important;
    }
    
    .hero-section .row.g-4.p-4 {
        padding: 0.75rem !important;
    }
}

@media (max-width: 480px) {
    .hero-section {
        min-height: 60vh;
        padding: 15px 5px;
    }
    
    .hero-title {
        font-size: 1.8rem !important;
        margin-bottom: 15px !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
    }
    
    /* Index page specific - hero section with container-fluid */
    .hero-section .container-fluid {
        padding: 5px !important;
    }
    
    .hero-section .row.g-4.p-4 {
        padding: 0.5rem !important;
    }
}



/* Ensure hero content is above background */
.hero-section .container {
    position: relative;
    z-index: 2;
}




.hero-title {
    font-family: 'Rubik', sans-serif !important;
    font-weight: 800;
    font-size: 5rem;
    color: var(--theme-text-light) !important;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.hero-subtitle {
    font-family: 'Rubik', sans-serif !important;
    font-weight: 600;
    font-size: 2.5rem;
    color: var(--theme-text-light) !important;
    margin-bottom: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    text-align: right;
}

.hero-button {
    background: linear-gradient(135deg, var(--buff), var(--theme-secondary));
    color: var(--theme-text);
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(212, 163, 115, 0.4);
}

.hero-button:hover {
    background: linear-gradient(135deg, var(--theme-secondary), var(--buff));
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(212, 163, 115, 0.5);
}

/* Ensure no white backgrounds override the body background */
main, .container, .row, .col, .col-lg-8, .col-lg-10, section, .section, .hero-section, .about-section, .projects-section, .cv-section, .card {
    background: transparent !important;
}

/* Remove container constraints from main content */
main.container {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
}

/* Force body background to be visible */
html, body {
    background: var(--theme-primary) !important;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Ultra High Priority - Force Background Color */
html, body {
    background: var(--theme-primary) !important;
}





.main-font {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    color: var(--theme-text) !important;
    font-weight: 400;
}

/* Title Font Styles */
.title-font {
    font-family: 'Rubik', sans-serif !important;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--theme-text) !important;
}

.main-title {
    font-family: 'Rubik', sans-serif !important;
    font-weight: 800;
    letter-spacing: 0.03em;
    font-size: 2.5rem;
    color: var(--theme-text) !important;
}

.section-title {
    font-family: 'Rubik', sans-serif !important;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--theme-text) !important;
}

.second-font {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    color: var(--theme-text) !important;
    font-weight: 500;
}


/* Footer Styles - Matching Navbar Colors */
footer {
    background: var(--theme-primary) !important;
    background-color: var(--theme-primary) !important;
    border: 2px solid var(--theme-accent) !important;
    border-radius: 25px;
    box-shadow: 0 8px 32px rgba(27, 67, 50, 0.3), 0 0 0 1px rgba(82, 183, 136, 0.2);
    margin: 20px;
    color: var(--theme-text-light) !important;
    padding: 20px 20px 0 20px !important;
}

footer p {
    color: var(--theme-text-light) !important;
    margin-top: 30px !important;
    margin-bottom: 0 !important;
}

footer p.mt-2 {
    margin-top: 30px !important;
    margin-bottom: 0 !important;
}

footer.p-5 p.mt-2 {
    margin-top: 30px !important;
    margin-bottom: 0 !important;
}

.footer-social-links {
    font-size: 24px;
    text-align: center;
    margin-top: 5%;
    margin-bottom: 0;
}

.footer-social-links a {
    width: 40px;
    height: 40px;
    line-height: 40px !important;
    position: relative;
    margin: 0 10px;
    text-align: center;
    display: inline-block;
    color: var(--theme-text-light) !important;
    transition: all 0.3s ease;
}

.footer-social-links a i,
.footer-social-links a span {
    position: relative;
    top: 2px;
    left: 1px;
    z-index: 2;
}

.footer-social-links a:before {
    content: "";
    display: inline-block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    border: 1px solid var(--theme-accent);
    border-radius: 2px;
    transform: rotate(45deg);
    transition: all 0.3s ease;
    z-index: 1;
}

.footer-social-links a:hover {
    color: var(--theme-accent) !important;
    transform: translateY(-2px);
}

.footer-social-links a:hover:before {
    background: rgba(82, 183, 136, 0.2);
    box-shadow: 0 4px 12px rgba(82, 183, 136, 0.3);
}

/* Navbar Styles */
.navbar {
    background: var(--theme-primary) !important;
    background-color: var(--theme-primary) !important;
    background-image: none !important;
    opacity: 1 !important;
}

.navbar {
    border: 2px solid var(--theme-accent) !important;
    border-radius: 25px;
    box-shadow: 0 8px 32px rgba(27, 67, 50, 0.3), 0 0 0 1px rgba(82, 183, 136, 0.2);
    z-index: 1004;
    position: fixed !important;
    overflow: visible;
    top: -100px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    transition: all 0.3s ease-in-out;
    opacity: 1 !important;
    visibility: hidden;
    width: 95%;
    max-width: 1000px;
    min-width: 300px;
    padding: 12px 20px 12px 20px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    flex: 1;
    gap: 0;
    padding-left: 0;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.navbar-nav {
    display: flex !important;
    flex-direction: row !important;
    gap: 40px;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
    margin-right: 20px;
}

.navbar.visible {
    top: 10px !important;
    opacity: 1 !important;
    visibility: visible;
    background: var(--theme-primary) !important;
    background-color: var(--theme-primary) !important;
    background-image: none !important;
    border: 2px solid var(--theme-accent) !important;
}

/* Hamburger Menu Styles */
.navbar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
    z-index: 1003;
}

.hamburger {
    width: 25px;
    height: 3px;
    background: var(--theme-text-light);
    margin: 5px 0;
    transition: 0.3s;
    border-radius: 2px;
    position: relative;
    display: block;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 3px;
    background: var(--theme-text-light);
    transition: 0.3s;
    border-radius: 2px;
}

.hamburger::before {
    transform: translateY(-8px);
}

.hamburger::after {
    transform: translateY(8px);
}

.navbar-toggle.active .hamburger {
    background: transparent;
}

.navbar-toggle.active .hamburger::before {
    transform: rotate(45deg);
}

.navbar-toggle.active .hamburger::after {
    transform: rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--theme-primary);
    border: 2px solid var(--theme-accent);
    border-top: none;
    border-radius: 0 0 20px 20px;
    padding: 20px;
    flex-direction: column;
    gap: 15px;
    z-index: 1005;
}

.mobile-menu.show {
    display: flex;
}

.mobile-menu .nav-link {
    color: var(--theme-text-light) !important;
    text-decoration: none;
    font-weight: 500;
    padding: 12px 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
    text-align: center;
}

.mobile-menu .nav-link:hover {
    background: var(--theme-accent);
    color: var(--theme-text-light) !important;
    transform: translateX(5px);
}

/* Responsive Navbar */
@media (max-width: 768px) {
    .navbar {
        width: 90% !important;
        min-width: 280px;
        padding: 10px 15px 10px 15px !important;
        border-radius: 20px;
        position: fixed !important;
        top: -100px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: none !important;
        box-sizing: border-box !important;
    }
    
    .navbar.visible {
        top: 10px !important;
        opacity: 1 !important;
        visibility: visible;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
        padding-left: 15px;
    }
    
    .navbar-nav {
        display: none !important;
    }
    
    .navbar-theme-controls {
        display: none !important;
    }
    
    .navbar-toggle {
        display: block !important;
        position: relative;
    }
    
    .mobile-menu {
        display: none;
    }
    
    .mobile-theme-controls {
        display: flex;
    }
}

@media (max-width: 480px) {
    .navbar {
        width: 95% !important;
        min-width: 250px;
        padding: 8px 10px 8px 10px !important;
        border-radius: 15px;
        position: fixed !important;
        top: -100px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: none !important;
        box-sizing: border-box !important;
    }
    
    .navbar.visible {
        top: 10px !important;
        opacity: 1 !important;
        visibility: visible;
    }
    
    .navbar-brand {
        font-size: 1rem;
        padding-left: 10px;
    }
    
    .navbar-nav {
        display: none !important;
    }
    
    .navbar-toggle {
        display: block !important;
    }
    
    .nav-link {
        font-size: 0.8rem;
        padding: 6px 8px;
    }
}

/* Additional mobile-specific styles */
@media (max-width: 991px) {
    .navbar-nav {
        display: none !important;
    }
    
    .navbar-toggle {
        display: block !important;
    }
}

/* Force hamburger button visibility on mobile */
@media screen and (max-width: 768px) {
    .navbar-toggle {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .navbar-nav {
        display: none !important;
    }
}

.navbar-brand {
    font-size: 1.3rem;
    color: var(--theme-text-light) !important;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    margin-left: 0;
    margin-right: 0;
    padding-left: 20px;
    position: relative;
    z-index: 1;
    background: transparent;
}

.navbar-brand:hover,
.navbar .navbar-brand:hover {
    color: var(--theme-accent) !important;
    text-decoration: none;
    transform: translateY(-1px);
}

.nav-link {
    color: var(--theme-text-light) !important;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 32px !important;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    letter-spacing: 0.3px;
    display: inline-block !important;
    white-space: nowrap;
}

.nav-link:hover,
.navbar .nav-link:hover,
.navbar-nav .nav-link:hover {
    color: var(--theme-accent) !important;
    background: #ffffff !important;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(82, 183, 136, 0.3);
}

.nav-link::after {
    display: none;
}

.nav-link.active {
    color: var(--buff) !important;
    background: rgba(212, 163, 115, 0.15);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: var(--buff);
    transform: translateX(-50%);
}

.navbar-toggler {
    border: none;
    padding: 4px 8px;
    border-radius: 10px;
    background: rgba(155, 195, 255, 0.1);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(155, 195, 255, 0.25);
}

.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%28223, 223, 223, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}


/* Project Cards Styles */
.project-card {
    border: 1px solid var(--buff) !important;
    overflow: hidden;
    position: relative;
    height: 100%;
    background: #fefae0 !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, box-shadow, background-color, border-color;
}

.project-card h3,
.project-card h4,
.project-card h5,
.project-card p,
.project-card .card-text,
.project-card .project-title,
.project-card .project-description {
    color: var(--theme-text) !important;
}

.project-card:hover {
    box-shadow: 0 25px 60px rgba(var(--theme-accent-rgb, 82, 183, 136), 0.4);
    border-color: var(--theme-accent) !important;
    background: var(--theme-accent) !important;
    transform: translateY(-10px);
}

.project-card:hover h3,
.project-card:hover h4,
.project-card:hover h5,
.project-card:hover p,
.project-card:hover .card-text,
.project-card:hover .project-title,
.project-card:hover .project-description {
    color: var(--theme-text-light) !important;
}

.project-image-container {
    position: relative;
    overflow: hidden;
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(212, 163, 115, 0.9), rgba(204, 213, 174, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.project-btn {
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 600;
    min-width: 120px;
}

.project-btn:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

/* Tech tags - shared by project cards and other components */
.tech-tag,
.skill-tag {
    background: linear-gradient(135deg, rgba(212, 163, 115, 0.2), rgba(204, 213, 174, 0.2));
    color: var(--buff);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--buff);
}

.project-card:hover .tech-tag,
.skill-tag:hover {
    background: linear-gradient(135deg, rgba(var(--theme-accent-rgb, 82, 183, 136), 0.3), rgba(var(--theme-secondary-rgb, 216, 243, 220), 0.3));
}

.coming-soon-placeholder {
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(212, 163, 115, 0.1), rgba(204, 213, 174, 0.1));
    border: 2px dashed var(--buff);
    border-radius: 10px;
    margin: 10px;
    color: var(--buff);
}

.coming-soon {
    opacity: 0.7;
}

.coming-soon:hover {
    opacity: 1;
}


/* Full-width Section Styles */
.story-section,
.expertise-section,
.cv-section {
    background: var(--theme-secondary);
    padding: 40px 10px;
    margin: 20px 0;
    width: calc(100% - 40px);
    margin-left: calc(-50vw + 50% + 20px);
    margin-right: calc(-50vw + 50% + 20px);
    border-radius: 15px;
    color: var(--theme-text) !important;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Override container width within full-width sections */
.story-section .container,
.expertise-section .container,
.cv-section .container,
.cta-section .container,
.philosophy-card .container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 40px !important;
    margin: 0 auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

/* Add horizontal margins to content within sections */
.story-section .row,
.expertise-section .row,
.cv-section .row,
.cta-section .row,
.philosophy-card .row {
    margin: 0 20px !important;
}

/* Add horizontal margins to columns within sections */
.story-section .col,
.story-section .col-lg-2,
.story-section .col-lg-10,
.expertise-section .col,
.expertise-section .col-lg-6,
.cv-section .col,
.cv-section .col-lg-10,
.cta-section .col,
.philosophy-card .col {
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* Ensure rows within sections are centered */
.story-section .row,
.expertise-section .row,
.cv-section .row,
.cta-section .row,
.philosophy-card .row {
    justify-content: center !important;
    align-items: center !important;
}

/* Scroll Animation */
.story-section.animate-in,
.expertise-section.animate-in,
.cv-section.animate-in,
.cta-section.animate-in,
.philosophy-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Section hover effects removed */

/* Icon styles - shared by story and expertise cards */
.section-icon {
    color: var(--theme-accent) !important;
    font-size: 3rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Ensure text visibility in sections */
.story-section p,
.story-section h1,
.story-section h2,
.story-section h3,
.story-section h4,
.story-section h5,
.story-section h6,
.expertise-section p,
.expertise-section h1,
.expertise-section h2,
.expertise-section h3,
.expertise-section h4,
.expertise-section h5,
.expertise-section h6,
.cv-section p,
.cv-section h1,
.cv-section h2,
.cv-section h3,
.cv-section h4,
.cv-section h5,
.cv-section h6,
.cta-section p,
.cta-section h1,
.cta-section h2,
.cta-section h3,
.cta-section h4,
.cta-section h5,
.cta-section h6,
.philosophy-card p,
.philosophy-card h1,
.philosophy-card h2,
.philosophy-card h3,
.philosophy-card h4,
.philosophy-card h5,
.philosophy-card h6 {
    color: #2c3e50 !important;
}

.story-card:hover .story-icon i,
.expertise-card:hover .expertise-icon i {
    color: var(--theme-accent) !important;
}

.expertise-card:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(var(--theme-accent-rgb, 82, 183, 136), 0.2);
    background: var(--theme-accent) !important;
}

.expertise-card:hover h3,
.expertise-card:hover h4,
.expertise-card:hover h5,
.expertise-card:hover h6,
.expertise-card:hover p,
.expertise-card:hover .card-text,
.expertise-card:hover .card-title,
.expertise-card:hover .card-subtitle {
    color: var(--theme-text-light) !important;
}

.tech-highlights {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.tech-highlight {
    background: linear-gradient(135deg, rgba(180, 195, 150, 0.4), rgba(190, 150, 100, 0.3)) !important;
    color: #8a9a6b !important;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid #8a9a6b !important;
}

.story-card:hover .tech-highlight {
    background: var(--theme-accent) !important;
    color: var(--theme-text-light) !important;
    box-shadow: 0 5px 15px rgba(var(--theme-accent-rgb, 82, 183, 136), 0.4) !important;
}

/* CTA Section Styles */
.cta-section {
    background: var(--theme-secondary);
    padding: 40px 20px;
    margin: 20px 0;
    width: calc(100% - 80px);
    margin-left: calc(-50vw + 50% + 40px);
    margin-right: calc(-50vw + 50% + 40px);
    border-radius: 15px;
    color: var(--theme-text) !important;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* CTA section hover effect removed */

.cta-link {
    color: var(--buff) !important;
    position: relative;
}

.cta-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--buff);
}

.cta-link:hover::after {
    width: 100%;
}

.cta-link:hover {
    color: var(--buff) !important;
}

.cta-button {
    background: linear-gradient(135deg, #8a9a6b, #7a8a5b);
    border: none;
    position: relative;
    overflow: hidden;
    color: #ffffff;
    transition: all 0.3s ease;
}

.cta-button:hover {
    box-shadow: 0 8px 25px rgba(138, 154, 107, 0.6);
    background: linear-gradient(135deg, #6a7a4b, #5a6a3b);
    color: #ffffff;
    transform: translateY(-2px);
}

/* About Page Styles */
.about-section {
    padding: 40px 0;
}


.philosophy-card {
    background: var(--theme-secondary) !important;
    padding: 40px 20px;
    margin: 20px 0;
    width: calc(100% - 80px);
    margin-left: calc(-50vw + 50% + 40px);
    margin-right: calc(-50vw + 50% + 40px);
    border-radius: 15px;
    color: var(--theme-text) !important;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Philosophy card hover effect removed */

.values i {
    color: var(--theme-accent) !important;
}

.values i:hover {
    color: var(--theme-accent) !important;
}

.cta-buttons .btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cta-buttons .btn:hover {
    box-shadow: 0 8px 25px rgba(138, 154, 107, 0.6);
    transform: translateY(-2px);
}

/* CV Page Styles */
.cv-section {
    margin-bottom: 40px;
}

/* CV Page Specific Mobile Adjustments */
@media (max-width: 576px) {
    /* CV specific mobile adjustments */
    .experience-item, .education-item {
        padding: 0.75rem 0 !important;
    }
    
    .skill-category {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .skill-description, .experience-description, .education-description, .project-description {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
    }
    
    .tech-highlight {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.5rem !important;
        margin: 0.125rem !important;
    }
}

/* CV card specific hover effect */
.cv-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, box-shadow, background-color, border-color;
}

.cv-card h3,
.cv-card h4,
.cv-card h5,
.cv-card p,
.cv-card .card-text,
.cv-card .cv-title,
.cv-card .cv-description {
    color: var(--theme-text) !important;
}

.cv-card:hover {
    box-shadow: 0 20px 50px rgba(var(--theme-accent-rgb, 82, 183, 136), 0.4);
    border-color: var(--theme-accent) !important;
    background: var(--theme-accent) !important;
    transform: translateY(-8px);
}

.cv-card:hover h3,
.cv-card:hover h4,
.cv-card:hover h5,
.cv-card:hover p,
.cv-card:hover .card-text,
.cv-card:hover .cv-title,
.cv-card:hover .cv-description {
    color: var(--theme-text-light) !important;
}

.cv-photo {
    max-width: 150px;
    border: 3px solid var(--buff);
    box-shadow: 0 8px 25px rgba(212, 163, 115, 0.2);
}

.cv-photo:hover {
    box-shadow: 0 12px 35px rgba(212, 163, 115, 0.3);
    border-color: var(--buff);
}

.section-title {
    color: var(--buff);
    font-weight: 600;
    border-bottom: 2px solid var(--buff);
    padding-bottom: 10px;
}

.experience-item, .education-item {
    padding: 20px 0;
    border-bottom: 1px solid rgba(212, 163, 115, 0.1);
}

.experience-item:last-child, .education-item:last-child {
    border-bottom: none;
}


.company, .institution {
    color: var(--buff);
    font-style: italic;
}


.experience-details li {
    margin-bottom: 8px;
    position: relative;
}

.experience-details li::before {
    content: "▶";
    color: var(--buff);
    position: absolute;
    left: -15px;
}

.skill-category {
    color: var(--buff);
    margin-bottom: 15px;
    font-weight: 600;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}


.competencies-list {
    margin-top: 20px;
}

.competency-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(212, 163, 115, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(212, 163, 115, 0.1);
}

.competency-item:hover {
    background: rgba(212, 163, 115, 0.1);
    border-color: rgba(212, 163, 115, 0.2);
}

.competency-number {
    background: linear-gradient(135deg, var(--theme-accent), var(--theme-secondary));
    color: var(--theme-text);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    margin-right: 15px;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(212, 163, 115, 0.3);
}

.competency-text {
    flex: 1;
    line-height: 1.5;
    color: var(--theme-text);
    font-size: 0.95rem;
}

/* Compact competency styles */
.competencies-list.compact {
    margin-top: 15px;
}

.competency-item.compact {
    margin-bottom: 8px;
    padding: 10px 12px;
    background: rgba(212, 163, 115, 0.03);
    border: 1px solid rgba(212, 163, 115, 0.08);
}

.competency-item.compact:hover {
    background: rgba(212, 163, 115, 0.08);
    border-color: rgba(212, 163, 115, 0.15);
}

.competency-item.compact .competency-number {
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
    margin-right: 12px;
}

.competency-item.compact .competency-text {
    font-size: 0.85rem;
    line-height: 1.4;
}


/* Print Styles for CV */
/* Print styles will be defined later to avoid duplication */

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Touch device optimizations */
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .email-widget-toggle {
        min-height: 44px;
    }
    
    .email-widget-btn {
        min-height: 44px;
    }
    
    .cta-button {
        min-height: 44px;
    }
    
    .project-btn {
        min-height: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .story-card:hover,
    .expertise-card:hover,
    .cv-card:hover,
    .project-card:hover {
        transform: none;
    }
    
    .nav-link:hover,
    .email-widget-toggle:hover,
    .email-widget-btn:hover,
    .cta-button:hover,
    .project-btn:hover {
        transform: none;
    }
}

/* Prevent zoom on input focus for iOS */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    select, textarea, input[type="text"], input[type="password"], 
    input[type="datetime"], input[type="datetime-local"], 
    input[type="date"], input[type="month"], input[type="time"], 
    input[type="week"], input[type="number"], input[type="email"], 
    input[type="url"], input[type="search"], input[type="tel"], 
    input[type="color"] {
        font-size: 16px;
    }
}

/* Back to top button styles */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--buff);
    color: var(--theme-text);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(212, 163, 115, 0.3);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--theme-accent);
    color: var(--theme-text);
    box-shadow: 0 6px 16px rgba(var(--theme-accent-rgb, 82, 183, 136), 0.4);
}

/* Icon color styles for consistent theming */
.story-icon i,
.expertise-icon i,
.values i,
.section-title i,
.cta-button i,
.btn i {
    color: var(--theme-text-light) !important;
}

/* Header margin for fixed navbar */
.header-with-navbar {
    margin-top: 80px;
}

/* Text color utilities */
.text-primary {
    color: var(--buff) !important;
}

/* Email Contact Widget Styles */
.email-widget {
    position: fixed;
    bottom: -100px;
    left: 20px;
    z-index: 1000;
    transition: all 0.3s ease-in-out;
    opacity: 0;
    visibility: hidden;
}

.email-widget.visible {
    bottom: 20px;
    opacity: 1;
    visibility: visible;
}

.email-widget.hidden {
    transform: translateX(-100%);
    opacity: 0;
}

.email-widget-toggle {
    background: #40916c;
    color: #ffffff;
    border: none;
    border-radius: 50px;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(64, 145, 108, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 200px;
    justify-content: center;
    transition: all 0.3s ease;
}

.email-widget-toggle:hover {
    background: var(--theme-accent);
    color: var(--theme-text-light);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(27, 67, 50, 0.4);
    scale: 1.05;
}

.email-widget-content {
    position: absolute;
    bottom: 70px;
    left: 0;
    background: var(--theme-secondary);
    backdrop-filter: blur(15px);
    border: 2px solid var(--theme-accent);
    border-radius: 15px;
    padding: 20px;
    min-width: 300px;
    box-shadow: 0 10px 40px rgba(45, 106, 79, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
}

.email-widget-content.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.email-widget-content h4 {
    color: var(--buff);
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
}

.email-widget-content p {
    color: var(--theme-text);
    margin-bottom: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.email-widget-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.email-widget-btn {
    background: var(--theme-accent);
    color: var(--theme-text-light);
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    justify-content: center;
    min-width: 120px;
}

.email-widget-btn:hover {
    box-shadow: 0 5px 15px rgba(45, 106, 79, 0.4);
    background: var(--theme-primary);
    color: var(--theme-text-light);
    text-decoration: none;
}

.email-widget-btn.secondary {
    background: transparent;
    color: var(--theme-accent);
    border: 2px solid var(--theme-accent);
}

.email-widget-btn.secondary:hover {
    background: var(--theme-accent);
    color: var(--theme-text-light);
    border-color: var(--theme-accent);
}

.email-widget-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--theme-text);
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
}

.email-widget-close:hover {
    color: var(--theme-accent);
    background: var(--theme-secondary);
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE FIRST APPROACH
   ======================================== */

/* Large screens (1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .navbar {
        max-width: 800px;
    }
    
    .story-card, .expertise-card, .cv-card {
        min-height: 400px;
    }
}

/* Medium screens (992px to 1199px) */
@media (max-width: 1199px) {
    .navbar {
        max-width: 700px;
        padding: 12px 40px;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .nav-link {
        padding: 10px 32px !important;
        font-size: 0.9rem;
    }
}

/* Small screens (768px to 991px) */
@media (max-width: 991px) {
    /* Navigation - mobile centering handled by responsive navbar rules */
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .nav-link {
        padding: 10px 32px !important;
        margin: 2px 0;
        text-align: center;
    }
    
    /* Header adjustments */
    header h1, header h2 {
        font-size: 1.8rem;
        text-align: center;
        padding: 0 15px;
    }
    
    .header-with-navbar {
        margin-top: 100px;
    }
    
    /* Main content */
    .container {
        padding: 0 20px;
    }
    
    /* Cards and sections */
    .story-card, .expertise-card, .cv-card {
        margin-bottom: 20px;
    }
    
    .story-card .card-body,
    .expertise-card .card-body,
    .cv-card .card-body {
        padding: 20px;
    }
    
    /* CTA sections */
    .cta-section {
        padding: 25px 15px;
        margin: 20px 0;
    }
    
    .story-section,
    .expertise-section,
    .cv-section,
    .philosophy-card {
        padding: 25px 15px;
        width: calc(100% - 50px);
        margin-left: calc(-50vw + 50% + 25px);
        margin-right: calc(-50vw + 50% + 25px);
        border-radius: 12px;
    }
    
    .cta-section {
        padding: 25px 15px;
        width: calc(100% - 50px);
        margin-left: calc(-50vw + 50% + 25px);
        margin-right: calc(-50vw + 50% + 25px);
        border-radius: 12px;
    }
    
    .cta-button {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    /* Tech highlights and tags */
    .tech-highlights {
        justify-content: center;
        gap: 8px;
    }
    
    .tech-highlight {
        font-size: 0.8rem;
        padding: 5px 12px;
        color: #8a9a6b !important;
        border: 1px solid #8a9a6b !important;
    }
    
    .tech-stack {
        justify-content: center;
    }
    
    .tech-tag, .skill-tag {
        font-size: 0.8rem;
        padding: 4px 10px;
    }
}

/* Extra small screens (576px to 767px) */
@media (max-width: 767px) {
    /* Navigation - mobile centering handled by responsive navbar rules */
    
    .navbar-brand {
        font-size: 0.95rem;
    }
    
    .navbar-toggler {
        padding: 2px 6px;
    }
    
    /* Header */
    header {
        padding: 20px 10px !important;
        margin-bottom: 30px !important;
    }
    
    header h1, header h2 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .header-with-navbar {
        margin-top: 120px;
    }
    
    /* Main content */
    .container {
        padding: 0 15px;
    }
    
    /* Typography */
    .lead {
        font-size: 1rem;
    }
    
    h2 {
        font-size: 1.4rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    h4 {
        font-size: 1.1rem;
    }
    
    /* Cards */
    .story-card, .expertise-card, .cv-card {
        margin-bottom: 15px;
    }
    
    .story-card .card-body,
    .expertise-card .card-body,
    .cv-card .card-body {
        padding: 15px;
    }
    
    .story-card .card-title,
    .expertise-card .card-title,
    .cv-card .card-title {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
    
    /* Icons */
    .story-icon i,
    .expertise-icon i {
        font-size: 1.5rem !important;
    }
    
    .values i {
        font-size: 1.5rem !important;
    }
    
    /* CTA sections */
    .cta-section {
        padding: 20px 12px;
        margin: 15px 0;
    }
    
    .story-section,
    .expertise-section,
    .cv-section,
    .philosophy-card {
        padding: 20px 12px;
        width: calc(100% - 35px);
        margin-left: calc(-50vw + 50% + 17px);
        margin-right: calc(-50vw + 50% + 17px);
        border-radius: 10px;
    }
    
    .cta-section {
        padding: 20px 12px;
        width: calc(100% - 35px);
        margin-left: calc(-50vw + 50% + 17px);
        margin-right: calc(-50vw + 50% + 17px);
        border-radius: 10px;
    }
    
    .cta-button {
        padding: 10px 25px;
        font-size: 0.9rem;
    width: 100%;
        margin-top: 10px;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .cta-buttons .btn {
        width: 100%;
    }
    
    /* Tech elements */
    .tech-highlights {
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }
    
    .tech-highlight {
        font-size: 0.75rem;
        padding: 4px 10px;
        color: #8a9a6b !important;
        border: 1px solid #8a9a6b !important;
    }
    
    .tech-stack {
        justify-content: center;
        gap: 6px;
    }
    
    .tech-tag, .skill-tag {
        font-size: 0.75rem;
        padding: 3px 8px;
    }
    
    /* CV specific */
    .cv-photo {
        max-width: 120px;
        margin: 0 auto 15px;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
    
    .experience-item, .education-item {
        padding: 15px 0;
    }
    
    .competency-item {
        padding: 12px;
        margin-bottom: 10px;
    }
    
    .competency-item.compact {
        padding: 8px 10px;
        margin-bottom: 6px;
    }
    
    .competency-number {
        width: 25px;
        height: 25px;
        font-size: 0.8rem;
        margin-right: 10px;
    }
    
    .competency-item.compact .competency-number {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
        margin-right: 8px;
    }
    
    /* Project cards - handled by uniform responsive system */
    
    /* Footer */
    footer {
        margin: 15px;
        border-radius: 20px;
        padding: 15px 15px 0 15px !important;
    }
    
    .footer-social-links {
        font-size: 20px;
        margin-top: 3%;
        margin-bottom: 0;
    }
    
    footer p {
        margin-top: 25px !important;
    }
    
    footer p.mt-2,
    footer.p-5 p.mt-2 {
        margin-top: 25px !important;
    }
    
    .footer-social-links a {
        width: 35px;
        height: 35px;
        line-height: 35px !important;
        margin: 0 8px;
    }
    
    /* Email widget */
    .email-widget {
        bottom: 15px;
        left: 15px;
    }
    
    .email-widget-toggle {
        padding: 12px 16px;
        font-size: 14px;
        min-width: 160px;
    }
    
    .email-widget-content {
        min-width: 280px;
        padding: 15px;
    }
    
    .email-widget-actions {
        flex-direction: column;
    }
    
    .email-widget-btn {
        min-width: auto;
    }
}

/* Very small screens (up to 575px) */
@media (max-width: 575px) {
    /* Navigation - mobile centering handled by responsive navbar rules */
    
    .navbar-brand {
        font-size: 0.9rem;
    }
    
    .nav-link {
        padding: 10px 32px !important;
        font-size: 0.85rem;
    }
    
    /* Header */
    header {
        padding: 15px 5px !important;
        margin-bottom: 25px !important;
    }
    
    header h1, header h2 {
        font-size: 1.3rem;
        line-height: 1.2;
    }
    
    .header-with-navbar {
        margin-top: 130px;
    }
    
    /* Main content */
    .container {
        padding: 0 10px;
    }
    
    /* Typography */
    .lead {
        font-size: 0.95rem;
    }
    
    h2 {
        font-size: 1.2rem;
    }
    
    h3 {
        font-size: 1.1rem;
    }
    
    h4 {
        font-size: 1rem;
    }
    
    /* Cards */
    .story-card .card-body,
    .expertise-card .card-body,
    .cv-card .card-body {
        padding: 12px;
    }
    
    .story-card .card-title,
    .expertise-card .card-title,
    .cv-card .card-title {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    /* Icons */
    .story-icon i,
    .expertise-icon i {
        font-size: 1.3rem !important;
    }
    
    .values i {
        font-size: 1.3rem !important;
    }
    
    /* CTA sections */
    .cta-section {
        padding: 15px 10px;
        margin: 10px 0;
    }
    
    .story-section,
    .expertise-section,
    .cv-section,
    .philosophy-card {
        padding: 15px 10px;
        width: calc(100% - 30px);
        margin-left: calc(-50vw + 50% + 15px);
        margin-right: calc(-50vw + 50% + 15px);
        border-radius: 8px;
    }
    
    .cta-section {
        padding: 15px 10px;
        width: calc(100% - 30px);
        margin-left: calc(-50vw + 50% + 15px);
        margin-right: calc(-50vw + 50% + 15px);
        border-radius: 8px;
    }
    
    .cta-button {
        padding: 8px 20px;
        font-size: 0.85rem;
    }
    
    /* Tech elements */
    .tech-highlight {
        font-size: 0.7rem;
        padding: 3px 8px;
        color: #8a9a6b !important;
        border: 1px solid #8a9a6b !important;
    }
    
    .tech-tag, .skill-tag {
        font-size: 0.7rem;
        padding: 2px 6px;
    }
    
    /* CV specific */
    .cv-photo {
        max-width: 100px;
    }
    
    .section-title {
        font-size: 1rem;
    }
    
    .experience-item, .education-item {
        padding: 12px 0;
    }
    
    .competency-item {
        padding: 10px;
        margin-bottom: 8px;
    }
    
    .competency-item.compact {
        padding: 6px 8px;
        margin-bottom: 4px;
    }
    
    .competency-number {
        width: 22px;
        height: 22px;
        font-size: 0.75rem;
        margin-right: 8px;
    }
    
    .competency-item.compact .competency-number {
        width: 18px;
        height: 18px;
        font-size: 0.65rem;
        margin-right: 6px;
    }
    
    /* Project cards - handled by uniform responsive system */
    
    /* Footer */
    footer {
        margin: 10px;
        border-radius: 15px;
        padding: 12px 12px 0 12px !important;
    }
    
    .footer-social-links {
        font-size: 18px;
        margin-top: 2%;
        margin-bottom: 0;
    }
    
    footer p {
        margin-top: 20px !important;
    }
    
    footer p.mt-2,
    footer.p-5 p.mt-2 {
        margin-top: 20px !important;
    }
    
    .footer-social-links a {
        width: 32px;
        height: 32px;
        line-height: 32px !important;
        margin: 0 6px;
    }
    
    /* Email widget */
    .email-widget {
        bottom: 10px;
        left: 10px;
    }
    
    .email-widget-toggle {
        padding: 10px 14px;
        font-size: 13px;
        min-width: 140px;
    }
    
    .email-widget-content {
        min-width: 260px;
        padding: 12px;
        bottom: 60px;
    }
    
    .email-widget-content h4 {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .email-widget-content p {
        font-size: 0.8rem;
        margin-bottom: 12px;
    }
    
    .email-widget-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
}

/* Landscape orientation adjustments for mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .header-with-navbar {
        margin-top: 80px;
    }
    
    .navbar {
        padding: 4px 15px;
    }
    
    .email-widget-content {
        bottom: 50px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .navbar {
        border-width: 0.5px;
    }
    
    .story-card, .expertise-card, .cv-card {
        border-width: 0.5px;
    }
}

/* Print styles */
/* Print Styles - Not needed as we use a separate print window */

/* ========================================
   UNIFORM RESPONSIVE SYSTEM
   ======================================== */

/* Base responsive margins for all pages */
body {
    padding-left: 60px !important;
    padding-right: 60px !important;
}

/* Tablet responsive margins */
@media (max-width: 768px) {
    body {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

/* Mobile responsive margins */
@media (max-width: 576px) {
    body {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

/* Small mobile responsive margins */
@media (max-width: 480px) {
    body {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

/* ========================================
   UNIFORM CONTAINER SYSTEM
   ======================================== */

/* Standard container for all pages */
.container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Standard row system for all pages */
.container-fluid .row.g-4 {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
}

/* Desktop navbar - maintain centering while overriding body padding */
@media (min-width: 769px) {
    .navbar {
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 95% !important;
        max-width: 1000px !important;
    }
}

/* Mobile navbar centering is handled by the responsive navbar rules above */

/* ========================================
   UNIFORM RESPONSIVE GRID SYSTEM
   ======================================== */

/* Tablet responsive grid (768px and below) */
@media (max-width: 768px) {
    .container-fluid .row.g-4 {
        padding: 1rem !important;
        gap: 1rem !important;
    }
    
    .container-fluid .row.g-4 .col-lg-6 {
        margin-bottom: 1rem;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    .story-card {
        margin-bottom: 1rem;
    }
    
    /* Project-specific tablet adjustments */
    .project-image {
        height: 180px !important;
    }
    
    .project-btn {
        padding: 6px 15px !important;
        font-size: 0.8rem !important;
        min-width: 100px !important;
    }
}

/* Mobile responsive grid (576px and below) */
@media (max-width: 576px) {
    .container-fluid .row.g-4 {
        padding: 0.75rem !important;
        gap: 0.75rem !important;
    }
    
    .container-fluid .row.g-4 .col-lg-6 {
        margin-bottom: 0.75rem;
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
    }
    
    .story-card {
        margin-bottom: 0.75rem;
    }
    
    .story-card .card-body {
        padding: 1rem !important;
    }
    
    /* Better text wrapping */
    .card-text, .lead, p {
        word-wrap: break-word;
        hyphens: auto;
    }
}

@media (max-width: 575px) {
    /* Final mobile optimizations */
    .row {
        margin-left: -3px;
        margin-right: -3px;
    }
    
    .col-lg-10, .col-lg-8, .col-lg-6, .col-lg-5, .col-lg-4,
    .col-md-6, .col-md-4, .col-md-3, .col-md-9 {
        padding-left: 3px;
        padding-right: 3px;
    }
    
    /* Ensure all columns stack properly */
    .col-lg-5, .col-lg-6, .col-md-6, .col-md-4, .col-md-3, .col-md-9 {
        margin-bottom: 10px;
    }
    
    /* Improve readability */
    .card-text {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .lead {
        font-size: 0.95rem;
        line-height: 1.4;
    }
}

/* Small mobile responsive grid (480px and below) */
@media (max-width: 480px) {
    .container-fluid .row.g-4 {
        padding: 0.5rem !important;
        gap: 0.5rem !important;
    }
    
    .container-fluid .row.g-4 .col-lg-6 {
        margin-bottom: 0.5rem;
        padding-left: 0.125rem !important;
        padding-right: 0.125rem !important;
    }
    
    .story-card {
        margin-bottom: 0.5rem;
    }
    
    .story-card .card-body {
        padding: 0.75rem !important;
    }
    
    /* Project-specific mobile adjustments */
    .project-image {
        height: 160px !important;
    }
    
    .project-btn {
        padding: 5px 12px !important;
        font-size: 0.75rem !important;
        min-width: 90px !important;
    }
}

/* Universal Page Responsive Improvements - Applied to All Pages */
@media (max-width: 768px) {
    .story-card {
        padding: 20px !important;
        margin-bottom: 20px !important;
    }
    
    .story-card h3 {
        font-size: 1.4rem !important;
    }
    
    .story-card .lead {
        font-size: 1.1rem !important;
    }
    
    .section-icon {
        width: 60px !important;
        height: 60px !important;
        font-size: 1.5rem !important;
    }
    
    .tech-highlights {
        text-align: center !important;
    }
    
    .tech-highlight {
        margin: 5px !important;
        padding: 8px 12px !important;
        font-size: 0.9rem !important;
    }
    
    /* All pages - buttons and interactive elements */
    .btn-primary, .btn-outline-primary {
        padding: 10px 20px !important;
        font-size: 0.95rem !important;
    }
    
    .tech-highlights {
        margin: 15px 0 !important;
    }
    
    /* Index page specific - main content area */
    .container-fluid .row.g-4.p-4 {
        padding: 1rem !important;
    }
}

@media (max-width: 576px) {
    .story-card {
        padding: 15px !important;
        margin-bottom: 15px !important;
    }
    
    .story-card h3 {
        font-size: 1.2rem !important;
    }
    
    .story-card .lead {
        font-size: 1rem !important;
    }
    
    .story-card p {
        font-size: 0.9rem !important;
    }
    
    .section-icon {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.2rem !important;
    }
    
    .btn-lg {
        padding: 12px 24px !important;
        font-size: 1rem !important;
    }
    
    .tech-highlight {
        margin: 3px !important;
        padding: 6px 10px !important;
        font-size: 0.8rem !important;
    }
    
    /* All pages - buttons and interactive elements */
    .btn-primary, .btn-outline-primary {
        padding: 10px 18px !important;
        font-size: 0.9rem !important;
    }
    
    .tech-highlights {
        margin: 12px 0 !important;
    }
    
    /* Index page specific - main content area */
    .container-fluid .row.g-4.p-4 {
        padding: 0.75rem !important;
    }
}

@media (max-width: 480px) {
    .story-card {
        padding: 12px !important;
        margin-bottom: 12px !important;
    }
    
    .story-card h3 {
        font-size: 1.1rem !important;
        margin-bottom: 15px !important;
    }
    
    .story-card .lead {
        font-size: 0.95rem !important;
        margin-bottom: 15px !important;
    }
    
    .story-card p {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
    }
    
    .section-icon {
        width: 45px !important;
        height: 45px !important;
        font-size: 1.1rem !important;
        margin-bottom: 15px !important;
    }
    
    .btn-lg {
        padding: 10px 20px !important;
        font-size: 0.9rem !important;
    }
    
    .tech-highlight {
        margin: 2px !important;
        padding: 5px 8px !important;
        font-size: 0.75rem !important;
    }
    
    /* Improve spacing for dual expertise section */
    .col-md-6.mb-3 {
        margin-bottom: 20px !important;
    }
    
    .d-flex.align-items-center.mb-2 {
        margin-bottom: 10px !important;
    }
    
    /* Container and grid improvements for very small screens */
    .container-fluid {
        padding: 5px !important;
    }
    
    .row.g-4 {
        --bs-gutter-x: 0.25rem !important;
        --bs-gutter-y: 0.25rem !important;
    }
    
    .col-lg-6 {
        padding: 0.125rem !important;
    }
    
    /* About page specific improvements for very small screens */
    .hero-section .container {
        padding: 0 10px !important;
    }
    
    .row.g-4.p-4 {
        padding: 0.5rem !important;
    }
    
    /* Projects page specific improvements */
    .tech-highlights {
        margin: 10px 0 !important;
    }
    
    .btn-primary, .btn-outline-primary {
        padding: 8px 16px !important;
        font-size: 0.85rem !important;
    }
    
    /* Index page specific improvements for very small screens */
    .hero-section .container-fluid .row {
        margin: 0 !important;
    }
    
    .hero-section .col-12 {
        padding: 0.25rem !important;
    }
}

/* Accessibility improvements for responsive design */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate__animated {
        animation: none !important;
    }
}

/* Dark mode support (if user prefers dark mode) */
@media (prefers-color-scheme: dark) {
    /* The site is already dark themed, but we can add some refinements */
    /* Navbar background is handled by CSS variables */
}

/* Light Mode - Default friendly theme */
@media (prefers-color-scheme: light) {
    /* Body background is handled by CSS variables */
}

/* Dark theme support - Integrated with color themes */

/* Dark variants for each color theme */
.dark-theme[data-theme="default"],
.dark-theme {
    --theme-primary: #1a2e1a;
    --theme-secondary: #2d4a2d;
    --theme-accent: #4a7c59;
    --theme-content: #1a2e1a;
    --theme-text: #e8f5e8;
    --theme-text-light: #ffffff;
    
    /* RGB values for rgba() functions */
    --theme-accent-rgb: 74, 124, 89;
    --theme-secondary-rgb: 45, 74, 45;
}

.dark-theme[data-theme="ocean"] {
    --theme-primary: #0f1b3a;
    --theme-secondary: #1e3a8a;
    --theme-accent: #3b82f6;
    --theme-content: #0f1b3a;
    --theme-text: #dbeafe;
    --theme-text-light: #ffffff;
    
    /* RGB values for rgba() functions */
    --theme-accent-rgb: 59, 130, 246;
    --theme-secondary-rgb: 30, 58, 138;
}

.dark-theme[data-theme="sunset"] {
    --theme-primary: #3d1a0a;
    --theme-secondary: #ea580c;
    --theme-accent: #f97316;
    --theme-content: #3d1a0a;
    --theme-text: #fed7aa;
    --theme-text-light: #ffffff;
    
    /* RGB values for rgba() functions */
    --theme-accent-rgb: 249, 115, 22;
    --theme-secondary-rgb: 234, 88, 12;
}

.dark-theme[data-theme="forest"] {
    --theme-primary: #2d1a4a;
    --theme-secondary: #7c3aed;
    --theme-accent: #a855f7;
    --theme-content: #2d1a4a;
    --theme-text: #e9d5ff;
    --theme-text-light: #ffffff;
    
    /* RGB values for rgba() functions */
    --theme-accent-rgb: 168, 85, 247;
    --theme-secondary-rgb: 124, 58, 237;
}

.dark-theme[data-theme="midnight"] {
    --theme-primary: #0f1419;
    --theme-secondary: #1f2937;
    --theme-accent: #6b7280;
    --theme-content: #0f1419;
    --theme-text: #f3f4f6;
    --theme-text-light: #ffffff;
    
    /* RGB values for rgba() functions */
    --theme-accent-rgb: 107, 114, 128;
    --theme-secondary-rgb: 31, 41, 55;
}

/* Dark theme base styles */
.dark-theme {
    background: var(--theme-primary) !important;
    color: var(--theme-text) !important;
}

/* Ensure dark theme body background with maximum specificity */
html.dark-theme,
body.dark-theme,
html.dark-theme body,
body.dark-theme,
.dark-theme {
    background: var(--theme-primary) !important;
    background-color: var(--theme-primary) !important;
    background-image: none !important;
    background-attachment: initial !important;
    background-size: initial !important;
    background-position: initial !important;
}

body.dark-theme,
.dark-theme body,
html.dark-theme body {
    background: var(--theme-primary) !important;
    color: var(--theme-text) !important;
}

.dark-theme .main-font,
.dark-theme .second-font {
    color: var(--theme-text) !important;
}

.dark-theme .navbar {
    background: var(--theme-secondary) !important;
    background-color: var(--theme-secondary) !important;
    border: 2px solid var(--theme-accent) !important;
    opacity: 1 !important;
}

.dark-theme .navbar-brand,
.dark-theme .nav-link {
    color: var(--theme-text-light) !important;
}

.dark-theme .navbar-brand:hover,
.dark-theme .nav-link:hover {
    color: var(--theme-accent) !important;
}

.dark-theme .story-section,
.dark-theme .expertise-section,
.dark-theme .cv-section,
.dark-theme .cta-section,
.dark-theme .philosophy-card {
    background: var(--theme-secondary) !important;
    color: var(--theme-text) !important;
}

.dark-theme footer {
    background: var(--theme-secondary) !important;
    background-color: var(--theme-secondary) !important;
    border: 2px solid var(--theme-accent) !important;
    color: var(--theme-text-light) !important;
}

.dark-theme footer p {
    color: var(--theme-text-light) !important;
}

.dark-theme .footer-social-links a {
    color: var(--theme-text-light) !important;
}

.dark-theme .footer-social-links a:hover {
    color: var(--theme-accent) !important;
}

.dark-theme .story-section p, .dark-theme .story-section h1, .dark-theme .story-section h2, .dark-theme .story-section h3, .dark-theme .story-section h4, .dark-theme .story-section h5, .dark-theme .story-section h6,
.dark-theme .expertise-section p, .dark-theme .expertise-section h1, .dark-theme .expertise-section h2, .dark-theme .expertise-section h3, .dark-theme .expertise-section h4, .dark-theme .expertise-section h5, .dark-theme .expertise-section h6,
.dark-theme .cv-section p, .dark-theme .cv-section h1, .dark-theme .cv-section h2, .dark-theme .cv-section h3, .dark-theme .cv-section h4, .dark-theme .cv-section h5, .dark-theme .cv-section h6,
.dark-theme .cta-section p, .dark-theme .cta-section h1, .dark-theme .cta-section h2, .dark-theme .cta-section h3, .dark-theme .cta-section h4, .dark-theme .cta-section h5, .dark-theme .cta-section h6,
.dark-theme .philosophy-card p, .dark-theme .philosophy-card h1, .dark-theme .philosophy-card h2, .dark-theme .philosophy-card h3, .dark-theme .philosophy-card h4, .dark-theme .philosophy-card h5, .dark-theme .philosophy-card h6 {
    color: var(--theme-text) !important;
}

.dark-theme h1, .dark-theme h2, .dark-theme h3, .dark-theme h4, .dark-theme h5, .dark-theme h6 {
    color: var(--theme-text) !important;
}

.dark-theme .theme-btn {
    background: var(--theme-secondary);
    border: 1px solid var(--theme-accent);
    color: var(--theme-text-light);
}

.dark-theme .theme-btn:hover {
    background: var(--theme-accent);
    color: var(--theme-text-light);
}

.dark-theme .theme-btn.active {
    background: var(--theme-accent);
    color: var(--theme-text-light);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    /* Body background is handled by CSS variables */
    
    .main-font {
        color: #000000 !important;
    }
    
    .second-font {
        color: #2c3e50 !important;
    }
    
    .navbar {
        background: #ffffff !important;
        border: 2px solid var(--buff);
        box-shadow: 0 0 0 2px var(--theme-accent);
    }
    
    .navbar-brand {
        color: #000000 !important;
    }
    
    .navbar-brand:hover {
        color: var(--theme-accent) !important;
    }
    
    .nav-link {
        color: #000000 !important;
        border: 1px solid transparent;
    }
    
    .nav-link:hover {
        color: var(--theme-accent) !important;
        background: #ffffff;
        border: 1px solid var(--theme-accent);
    }
    
    .nav-link.active {
        background: var(--buff) !important;
        color: var(--theme-text-light) !important;
        border: 2px solid var(--theme-accent);
    }
    
    .story-card, .expertise-card, .cv-card, .project-card {
        background: #ffffff !important;
        border: 2px solid var(--buff) !important;
        box-shadow: 0 0 0 1px var(--theme-accent);
    }
    
    .cta-section,
    .philosophy-card {
        background: #ffffff !important;
        border: 2px solid var(--buff) !important;
        box-shadow: 0 0 0 1px var(--theme-accent);
    }
    
    .tech-tag,
    .skill-tag,
    .tech-highlight {
        background: #ffffff !important;
        color: #8a9a6b !important;
        border: 1px solid #8a9a6b !important;
    }
    
    footer {
        background: #ffffff !important;
        background-color: #ffffff !important;
        border: 3px solid #000000 !important;
        color: #000000 !important;
    }
    
    footer p {
        color: #000000 !important;
    }
    
    .footer-social-links a {
        color: #000000 !important;
        font-weight: 600 !important;
    }
    
    .footer-social-links a:before {
        border: 2px solid #000000 !important;
    }
    
    .footer-social-links a:hover {
        color: #000000 !important;
        background: #ffff00 !important;
    }
    
    .footer-social-links a:hover:before {
        background: rgba(255, 255, 0, 0.3) !important;
        border: 2px solid #000000 !important;
    }
    
    .email-widget-toggle {
        border: 2px solid var(--buff);
        background: #ffffff;
        color: #000000;
    }
}

/* Manual Theme Classes */
.friendly-theme {
    color: #2c3e50 !important;
}

.friendly-theme .main-font {
    color: #2c3e50 !important;
}

.friendly-theme .second-font {
    color: #2c3e50 !important;
}

.friendly-theme .navbar {
    border: 1px solid var(--buff) !important;
    opacity: 1 !important;
}

.friendly-theme .navbar-brand {
    color: #2c3e50 !important;
}

.friendly-theme .navbar-brand:hover {
    color: var(--theme-accent) !important;
}

.friendly-theme .nav-link {
    color: #2c3e50 !important;
}

.friendly-theme .nav-link:hover {
    color: var(--theme-accent) !important;
    background: rgba(82, 183, 136, 0.1) !important;
}

.friendly-theme .nav-link.active {
    color: var(--buff) !important;
    background: rgba(212, 163, 115, 0.15) !important;
}

.friendly-theme .story-card,
.friendly-theme .expertise-card,
.friendly-theme .cv-card,
.friendly-theme .project-card {
    background: #fefae0 !important;
    border: 1px solid var(--buff) !important;
}

.friendly-theme .cta-section,
.friendly-theme .philosophy-card {
    background: #fefae0 !important;
    border: 1px solid var(--buff) !important;
}

.friendly-theme footer {
    background: var(--theme-accent) !important;
    background-color: var(--theme-accent) !important;
    border: 1px solid var(--buff) !important;
    color: #2c3e50 !important;
}

.friendly-theme footer p {
    color: #2c3e50 !important;
}

.friendly-theme .footer-social-links a {
    color: #2c3e50 !important;
}

.friendly-theme .footer-social-links a:hover {
    color: var(--buff) !important;
}

/* High Contrast Theme - WCAG AAA Compliant */
.high-contrast-theme {
    color: #000000 !important;
    background: #ffffff !important;
}

.high-contrast-theme body {
    color: #000000 !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
}

.high-contrast-theme .main-font,
.high-contrast-theme .second-font {
    color: #000000 !important;
}

.high-contrast-theme .navbar,
body.high-contrast-theme .navbar,
html.high-contrast-theme .navbar {
    border: 2px solid #000000 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px #000000 !important;
    /* Use same positioning as normal navbar to prevent movement */
    box-sizing: border-box !important;
    position: fixed !important;
    top: -100px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    /* Maintain original dimensions */
    width: 95% !important;
    max-width: 1000px !important;
    min-width: 300px !important;
    /* Ensure consistent padding to prevent visual expansion */
    padding: 12px 20px 12px 20px !important;
    /* Disable transitions to prevent visual expansion effects */
    transition: none !important;
    /* Force override any other width/padding rules */
    margin: 0 !important;
    height: auto !important;
    z-index: 1004 !important;
}

/* Make navbar visible in high contrast mode when it has the .visible class */
.high-contrast-theme .navbar.visible,
body.high-contrast-theme .navbar.visible,
html.high-contrast-theme .navbar.visible {
    top: 10px !important;
    opacity: 1 !important;
    visibility: visible;
}

.high-contrast-theme .navbar-brand {
    color: #000000 !important;
    font-weight: 700 !important;
}

.high-contrast-theme .navbar-brand:hover {
    color: #000000 !important;
    background: #ffff00 !important;
    text-decoration: underline !important;
}

.high-contrast-theme .nav-link {
    color: #000000 !important;
    font-weight: 600 !important;
    border: 2px solid transparent !important;
    padding: 10px 32px !important;
    /* Maintain original padding to prevent navbar growth */
    box-sizing: border-box !important;
}

.high-contrast-theme .nav-link:hover {
    color: #000000 !important;
    background: #ffff00 !important;
    border: 2px solid #000000 !important;
    text-decoration: underline !important;
}

.high-contrast-theme .nav-link.active {
    background: #000000 !important;
    color: var(--theme-text-light) !important;
    border: 2px solid #000000 !important;
    font-weight: 700 !important;
}

.high-contrast-theme .story-section,
.high-contrast-theme .expertise-section,
.high-contrast-theme .cv-section,
.high-contrast-theme .cta-section,
.high-contrast-theme .philosophy-card,
.high-contrast-theme .story-card {
    background: #ffffff !important;
    border: 3px solid #000000 !important;
    color: #000000 !important;
    box-shadow: 0 0 0 1px #000000 !important;
}

/* High contrast hover effects for story cards */
.high-contrast-theme .story-card:hover {
    background: #ffff00 !important;
    color: #000000 !important;
    border: 3px solid #000000 !important;
    box-shadow: 0 0 0 1px #000000 !important;
    transform: none !important;
}

.high-contrast-theme .story-card:hover h3,
.high-contrast-theme .story-card:hover h5,
.high-contrast-theme .story-card:hover p {
    color: #000000 !important;
}

.high-contrast-theme .story-card:hover .section-icon {
    background: #000000 !important;
    color: #ffffff !important;
}

/* High contrast hover effects for experience and education items */
.high-contrast-theme .experience-item,
.high-contrast-theme .education-item {
    color: #000000 !important;
}

.high-contrast-theme .story-card:hover .experience-item,
.high-contrast-theme .story-card:hover .education-item {
    color: #000000 !important;
}

.high-contrast-theme .story-card:hover .experience-item h5,
.high-contrast-theme .story-card:hover .education-item h5 {
    color: #000000 !important;
}

.high-contrast-theme .story-card:hover .experience-item p,
.high-contrast-theme .story-card:hover .education-item p {
    color: #000000 !important;
}

/* Override inline styles with maximum specificity for high contrast hover */
.high-contrast-theme .story-card:hover p[style*="color: #2d6a4f"],
.high-contrast-theme .story-card:hover h5[style*="color: #2d6a4f"] {
    color: #000000 !important;
}

/* More specific selectors to override inline styles */
body.high-contrast-theme .story-card:hover p[style*="color"],
body.high-contrast-theme .story-card:hover h5[style*="color"] {
    color: #000000 !important;
}

/* Override all inline color styles in high contrast hover */
html.high-contrast-theme .story-card:hover *[style*="color"] {
    color: #000000 !important;
}

/* CV Page specific styles */
.experience-description,
.education-description,
.skill-description,
.project-description {
    color: var(--theme-text) !important;
    font-size: 0.9em;
}

.skill-category,
.project-title {
    color: var(--theme-text) !important;
    font-size: 1.1em;
}

.skill-description {
    margin-bottom: 15px;
}

.project-description {
    margin-bottom: 15px;
}

/* Normal hover effects for CV specific classes */
.story-card:hover .experience-description,
.story-card:hover .education-description,
.story-card:hover .skill-description,
.story-card:hover .project-description,
.story-card:hover .skill-category,
.story-card:hover .project-title {
    color: var(--theme-text-light, #ffffff) !important;
}

/* More specific hover effects to ensure they work */
.story-card:hover .experience-item .experience-description,
.story-card:hover .education-item .education-description,
.story-card:hover .skills-content .skill-description,
.story-card:hover .skills-content .skill-category,
.story-card:hover .project-content .project-description,
.story-card:hover .project-content .project-title {
    color: var(--theme-text-light) !important;
}

/* Ultra-specific rule to ensure visibility */
.story-card:hover .experience-description,
.story-card:hover .education-description {
    color: #ffffff !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* High contrast hover effects for CV specific classes - Maximum specificity */
html.high-contrast-theme .story-card:hover .experience-description,
html.high-contrast-theme .story-card:hover .education-description,
html.high-contrast-theme .story-card:hover .skill-description,
html.high-contrast-theme .story-card:hover .project-description,
html.high-contrast-theme .story-card:hover .skill-category,
html.high-contrast-theme .story-card:hover .project-title,
body.high-contrast-theme .story-card:hover .experience-description,
body.high-contrast-theme .story-card:hover .education-description,
body.high-contrast-theme .story-card:hover .skill-description,
body.high-contrast-theme .story-card:hover .project-description,
body.high-contrast-theme .story-card:hover .skill-category,
body.high-contrast-theme .story-card:hover .project-title {
    color: #000000 !important;
}

/* Override the normal story-card hover rules in high contrast mode */
html.high-contrast-theme .story-card:hover h3,
html.high-contrast-theme .story-card:hover h5,
html.high-contrast-theme .story-card:hover p,
body.high-contrast-theme .story-card:hover h3,
body.high-contrast-theme .story-card:hover h5,
body.high-contrast-theme .story-card:hover p {
    color: #000000 !important;
}

.high-contrast-theme .story-section p, .high-contrast-theme .story-section h1, .high-contrast-theme .story-section h2, .high-contrast-theme .story-section h3, .high-contrast-theme .story-section h4, .high-contrast-theme .story-section h5, .high-contrast-theme .story-section h6,
.high-contrast-theme .expertise-section p, .high-contrast-theme .expertise-section h1, .high-contrast-theme .expertise-section h2, .high-contrast-theme .expertise-section h3, .high-contrast-theme .expertise-section h4, .high-contrast-theme .expertise-section h5, .high-contrast-theme .expertise-section h6,
.high-contrast-theme .cv-section p, .high-contrast-theme .cv-section h1, .high-contrast-theme .cv-section h2, .high-contrast-theme .cv-section h3, .high-contrast-theme .cv-section h4, .high-contrast-theme .cv-section h5, .high-contrast-theme .cv-section h6,
.high-contrast-theme .cta-section p, .high-contrast-theme .cta-section h1, .high-contrast-theme .cta-section h2, .high-contrast-theme .cta-section h3, .high-contrast-theme .cta-section h4, .high-contrast-theme .cta-section h5, .high-contrast-theme .cta-section h6,
.high-contrast-theme .philosophy-card p, .high-contrast-theme .philosophy-card h1, .high-contrast-theme .philosophy-card h2, .high-contrast-theme .philosophy-card h3, .high-contrast-theme .philosophy-card h4, .high-contrast-theme .philosophy-card h5, .high-contrast-theme .philosophy-card h6 {
    color: #000000 !important;
}

.high-contrast-theme h1, .high-contrast-theme h2, .high-contrast-theme h3, .high-contrast-theme h4, .high-contrast-theme h5, .high-contrast-theme h6 {
    color: #000000 !important;
    font-weight: 700 !important;
}

.high-contrast-theme .hero-title,
.high-contrast-theme .hero-subtitle {
    color: #000000 !important;
    text-shadow: none !important;
}

.high-contrast-theme .tech-tag,
.high-contrast-theme .skill-tag,
.high-contrast-theme .tech-highlight {
    background: #000000 !important;
    color: var(--theme-text-light) !important;
    border: 2px solid #000000 !important;
    font-weight: 600 !important;
}

.high-contrast-theme .tech-tag:hover,
.high-contrast-theme .skill-tag:hover,
.high-contrast-theme .tech-highlight:hover {
    background: #ffff00 !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
}

.high-contrast-theme .footer-social-links a {
    color: #000000 !important;
    font-weight: 600 !important;
    text-decoration: underline !important;
}

.high-contrast-theme .footer-social-links a:hover {
    color: #000000 !important;
    background: #ffff00 !important;
    text-decoration: underline !important;
}

/* High Contrast Email Widget */
.high-contrast-theme .email-widget-toggle {
    background: #000000 !important;
    color: var(--theme-text-light) !important;
    border: 3px solid #000000 !important;
    font-weight: 700 !important;
}

.high-contrast-theme .email-widget-toggle:hover {
    background: #ffff00 !important;
    color: #000000 !important;
    border: 3px solid #000000 !important;
    text-decoration: underline !important;
}

.high-contrast-theme .email-widget-content {
    background: #ffffff !important;
    border: 3px solid #000000 !important;
    box-shadow: 0 0 0 1px #000000 !important;
}

.high-contrast-theme .email-widget-content h4 {
    color: #000000 !important;
    font-weight: 700 !important;
}

.high-contrast-theme .email-widget-content p {
    color: #000000 !important;
    font-weight: 600 !important;
}

.high-contrast-theme .email-widget-btn {
    background: #000000 !important;
    color: var(--theme-text-light) !important;
    border: 3px solid #000000 !important;
    font-weight: 700 !important;
}

.high-contrast-theme .email-widget-btn:hover {
    background: #ffff00 !important;
    color: #000000 !important;
    border: 3px solid #000000 !important;
    text-decoration: underline !important;
}

.high-contrast-theme .email-widget-close {
    color: #000000 !important;
    font-weight: 700 !important;
    border: 2px solid #000000 !important;
}

.high-contrast-theme .email-widget-close:hover {
    background: #ffff00 !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
}

/* Navbar Theme Controls */
.navbar-theme-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    margin-right: 15px;
}

.mobile-theme-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--theme-accent);
}

/* Theme Selector Button - Match other theme buttons */
.theme-selector-btn {
    background: var(--theme-accent);
    border: 1px solid var(--theme-accent);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    color: var(--theme-text-light);
    transition: all 0.3s ease;
    outline: none !important;
    outline-offset: 0 !important;
}

.theme-selector-btn:hover {
    background: var(--theme-primary);
    border-color: var(--theme-accent);
    color: var(--theme-text-light);
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    scale: 1.05;
    outline: none !important;
    outline-offset: 0 !important;
}

.theme-selector-btn:focus {
    outline: none !important;
    outline-offset: 0 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 0 0 2px var(--theme-accent);
}

.theme-selector-btn:active {
    outline: none !important;
    outline-offset: 0 !important;
}

.theme-btn {
    background: var(--theme-accent);
    border: 1px solid var(--theme-accent);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    color: var(--theme-text-light);
    transition: all 0.3s ease;
    outline: none !important;
    outline-offset: 0 !important;
}

/* Responsive Theme Toggle Buttons */
@media (max-width: 1199px) {
    .theme-toggle {
        top: 15px;
        right: 15px;
        gap: 8px;
    }
    
    .theme-btn {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

@media (max-width: 991px) {
    .theme-toggle {
        top: 12px;
        right: 12px;
        gap: 6px;
    }
    
    .theme-btn {
        width: 42px;
        height: 42px;
        font-size: 15px;
    }
}

@media (max-width: 767px) {
    .theme-toggle {
        top: 10px;
        right: 10px;
        gap: 5px;
    }
    
    .theme-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

@media (max-width: 575px) {
    .theme-toggle {
        top: 8px;
        right: 8px;
        gap: 4px;
    }
    
    .theme-btn {
        width: 38px;
        height: 38px;
        font-size: 13px;
    }
}

@media (max-width: 400px) {
    .theme-toggle {
        top: 6px;
        right: 6px;
        gap: 3px;
    }
    
    .theme-btn {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }
}

/* Landscape orientation adjustments for mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .theme-toggle {
        top: 5px;
        right: 5px;
        gap: 2px;
    }
    
    .theme-btn {
        width: 32px;
        height: 32px;
        font-size: 11px;
    }
    
}

/* Very small screens (iPhone SE, etc.) */
@media (max-width: 320px) {
    .theme-toggle {
        top: 4px;
        right: 4px;
        gap: 2px;
    }
    
    .theme-btn {
        width: 32px;
        height: 32px;
        font-size: 11px;
    }
    
}

.theme-btn:hover {
    background: var(--theme-primary);
    border-color: var(--theme-accent);
    color: var(--theme-text-light);
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    scale: 1.05;
    outline: none !important;
    outline-offset: 0 !important;
}

.theme-btn:focus {
    outline: none !important;
    outline-offset: 0 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 0 0 2px var(--theme-accent);
}

.theme-btn:active {
    outline: none !important;
    outline-offset: 0 !important;
}

.theme-btn.active {
    background: #1b4332;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(27, 67, 50, 0.4);
    scale: 1.05;
}

.friendly-theme .theme-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--buff);
    color: var(--theme-text);
}

.friendly-theme .theme-btn:hover {
    background: rgba(255, 255, 255, 1);
    color: var(--buff);
}

.friendly-theme .theme-btn.active {
    background: #1b4332;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(27, 67, 50, 0.4);
    scale: 1.05;
}

.high-contrast-theme .theme-btn {
    background: #ffffff !important;
    border: 2px solid #000000 !important;
    color: #000000 !important;
    font-weight: 700 !important;
    /* Maintain original button dimensions */
    width: 35px !important;
    height: 35px !important;
    box-sizing: border-box !important;
    /* Ensure consistent padding to prevent visual expansion */
    padding: 6px !important;
    /* Prevent any transform effects that could cause visual expansion */
    transform: none !important;
    box-shadow: none !important;
}

.high-contrast-theme .theme-btn:hover {
    background: #ffff00 !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
    text-decoration: underline !important;
    /* Prevent any transform effects that could cause visual expansion */
    transform: none !important;
    box-shadow: none !important;
}

.high-contrast-theme .theme-btn.active {
    background: #000000 !important;
    color: var(--theme-text-light) !important;
    border: 2px solid #000000 !important;
    font-weight: 700 !important;
    /* Prevent any transform effects that could cause visual expansion */
    transform: none !important;
    box-shadow: none !important;
}


/* Modal Widget Styles */
.modal-widget {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal-widget.show {
    display: flex;
}

.modal-widget-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid var(--buff);
    border-radius: 15px;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(212, 163, 115, 0.3);
}


.modal-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px 15px;
    border-bottom: 1px solid var(--buff);
}

.modal-widget-title {
    margin: 0;
    color: var(--buff);
    font-weight: 600;
    font-size: 1.2rem;
}

.modal-widget-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--theme-text);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-widget-close:hover {
    background: var(--theme-secondary);
    color: var(--theme-accent);
}

.modal-widget-body {
    padding: 20px 25px;
}

.modal-widget-body p {
    margin: 0;
    color: var(--theme-text);
    line-height: 1.5;
    font-size: 1rem;
}

.modal-widget-footer {
    padding: 15px 25px 20px;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid var(--buff);
}

.modal-widget-btn {
    background: var(--buff);
    color: var(--theme-text);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.95rem;
}

.modal-widget-btn:hover {
    background: var(--theme-accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Friendly Theme Modal Styles */
.friendly-theme .modal-widget-content {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--buff);
}

.friendly-theme .modal-widget-title {
    color: var(--buff);
}

.friendly-theme .modal-widget-close {
    color: var(--theme-text);
}

.friendly-theme .modal-widget-close:hover {
    background: var(--theme-secondary);
    color: var(--theme-accent);
}

.friendly-theme .modal-widget-body p {
    color: var(--theme-text);
}

.friendly-theme .modal-widget-header,
.friendly-theme .modal-widget-footer {
    border-color: var(--buff);
}

.friendly-theme .modal-widget-btn {
    background: var(--buff);
    color: var(--theme-text);
}

.friendly-theme .modal-widget-btn:hover {
    background: var(--theme-accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* High Contrast Theme Modal Styles */
.high-contrast-theme .modal-widget-content {
    background: #ffffff !important;
    border: 3px solid #000000 !important;
    box-shadow: 0 0 0 1px #000000 !important;
}

.high-contrast-theme .modal-widget-title {
    color: #000000 !important;
    font-weight: 700 !important;
}

.high-contrast-theme .modal-widget-close {
    color: #000000 !important;
    font-weight: 700 !important;
    border: 2px solid #000000 !important;
}

.high-contrast-theme .modal-widget-close:hover {
    background: #ffff00 !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
}

.high-contrast-theme .modal-widget-body p {
    color: #000000 !important;
    font-weight: 600 !important;
}

.high-contrast-theme .modal-widget-header,
.high-contrast-theme .modal-widget-footer {
    border: 3px solid #000000 !important;
    background: #ffffff !important;
}

.high-contrast-theme .modal-widget-btn {
    background: #000000 !important;
    color: var(--theme-text-light) !important;
    border: 3px solid #000000 !important;
    font-weight: 700 !important;
}

.high-contrast-theme .modal-widget-btn:hover {
    background: #ffff00 !important;
    color: #000000 !important;
    border: 3px solid #000000 !important;
    text-decoration: underline !important;
}

/* Responsive Modal Styles */
@media (max-width: 768px) {
    .modal-widget-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-widget-header,
    .modal-widget-body,
    .modal-widget-footer {
        padding: 15px 20px;
    }
    
    .modal-widget-title {
        font-size: 1.1rem;
    }
}

/* Force Navbar Hover Colors - Highest Priority */
body .navbar .navbar-brand:hover,
body .navbar .nav-link:hover,
body .navbar .navbar-nav .nav-link:hover,
.navbar .navbar-brand:hover,
.navbar .nav-link:hover,
.navbar .navbar-nav .nav-link:hover {
    color: var(--theme-accent) !important;
    color: rgb(82, 183, 136) !important;
    color: rgba(82, 183, 136, 1) !important;
}

/* Ultra High Priority - Force All Navbar Hover Colors */
html body .navbar .navbar-brand:hover,
html body .navbar .nav-link:hover,
html body .navbar .navbar-nav .nav-link:hover,
html body .navbar .navbar-content .navbar-brand:hover,
html body .navbar .navbar-content .nav-link:hover {
    color: var(--theme-accent) !important;
    color: rgb(82, 183, 136) !important;
}

/* Force Navbar Link Padding - Maximum Specificity */
html body .navbar .navbar-content .nav-link,
html body .navbar .navbar-nav .nav-link,
html body .navbar .nav-link {
    padding: 10px 32px !important;
    padding-left: 32px !important;
    padding-right: 32px !important;
}

/* Force story-section background for CV page */
.story-section {
    background: #fefae0 !important;
    background-color: #fefae0 !important;
}

/* Force text color visibility in story sections */
.story-section,
.story-section * {
    color: #2c3e50 !important;
}

.story-section h1,
.story-section h2,
.story-section h3,
.story-section h4,
.story-section h5,
.story-section h6 {
    color: #2c3e50 !important;
}

.story-section p,
.story-section .lead,
.story-section .title-font {
    color: #2c3e50 !important;
}

/* Override text-light class in story sections */
.story-section .text-light,
.story-section a.text-light {
    color: #2c3e50 !important;
}

.story-section .company,
.story-section .company a {
    color: #2c3e50 !important;
}

/* Style date badges in story sections */
.story-section .badge {
    padding: 8px 12px !important;
    background-color: #ffffff !important;
    color: #2c3e50 !important;
    border: 1px solid #2c3e50 !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    margin-bottom: 10px !important;
    display: inline-block !important;
}

/* Add padding between dates and descriptions in education section */
.story-section .education-item {
    margin-bottom: 25px !important;
}

.story-section .education-item .row {
    margin-bottom: 20px !important;
}

.story-section .education-item .col-md-3 {
    margin-bottom: 25px !important;
    padding-bottom: 20px !important;
}

.story-section .education-item .col-md-9 {
    padding-top: 20px !important;
    margin-top: 20px !important;
}

/* More specific selectors for education section */
.story-section .col-lg-10 .education-item .col-md-3 {
    margin-bottom: 25px !important;
    padding-bottom: 20px !important;
}

.story-section .col-lg-10 .education-item .col-md-9 {
    padding-top: 20px !important;
    margin-top: 20px !important;
}

/* Ensure education section padding is not overridden by responsive rules */
@media (max-width: 767px) {
    .story-section .education-item .col-md-3,
    .story-section .education-item .col-md-9,
    .story-section .col-lg-10 .education-item .col-md-3,
    .story-section .col-lg-10 .education-item .col-md-9 {
        margin-bottom: 25px !important;
        padding-bottom: 20px !important;
    }
}

@media (max-width: 575px) {
    .story-section .education-item .col-md-3,
    .story-section .education-item .col-md-9,
    .story-section .col-lg-10 .education-item .col-md-3,
    .story-section .col-lg-10 .education-item .col-md-9 {
        margin-bottom: 25px !important;
        padding-bottom: 20px !important;
    }
}

/* Test with different color to verify hover is working */

/* Force project-btn styling in CV page */
.cv-section .project-btn,
.story-section .project-btn {
    padding: 8px 20px !important;
    border-radius: 25px !important;
    font-weight: 600 !important;
    min-width: 120px !important;
    font-size: 0.9rem !important;
}

/* Force light text in CV download section */
.cta-section .section-title.text-light,
.cta-section .second-font.text-light {
    color: var(--theme-text-light) !important;
}

/* Force spacing in CV download section */
.cta-section .section-title {
    margin-bottom: 2rem !important;
}

.cta-section .second-font {
    margin-bottom: 2rem !important;
}

.cta-section .mt-4 {
    margin-top: 2rem !important;
}

/* Ultra-specific spacing for CV download section */
.cta-section h3.section-title.text-light {
    margin-bottom: 2rem !important;
    display: block !important;
}

.cta-section p.second-font.text-light {
    margin-bottom: 2rem !important;
    display: block !important;
}

.cta-section div[style*="margin-top: 2rem"] {
    margin-top: 2rem !important;
    display: block !important;
}

/* SIMPLE EDUCATION PADDING - FORCE OVERRIDE */
.education-item .row {
    align-items: flex-start !important;
    margin-bottom: 30px !important;
}

.education-item .col-md-3 {
    margin-bottom: 30px !important;
    padding-bottom: 20px !important;
    padding-right: 20px !important;
    display: block !important;
}

.education-item .col-md-9 {
    padding-top: 20px !important;
    margin-top: 20px !important;
    padding-left: 20px !important;
    display: block !important;
}


/* Force all sections to be visible */
.story-section,
.expertise-section,
.cv-section,
.cta-section,
.philosophy-card {
    opacity: 1 !important;
    transform: translateY(0) !important;
    visibility: visible !important;
    display: flex !important;
}

/* Print styles - simple and effective */
@media print {
    * {
        color: black !important;
        background: white !important;
    }
    
    body {
        color: black !important;
        background: white !important;
    }
    
    .navbar, .theme-toggle, .email-widget, .back-to-top, .cta-section {
        display: none !important;
    }
    
    .story-section, .expertise-section, .cv-section {
        color: black !important;
        background: white !important;
        border: 1px solid #ccc !important;
        margin: 10px 0 !important;
        padding: 15px !important;
    }
    
    .story-section *, .expertise-section *, .cv-section * {
        color: black !important;
        background: white !important;
    }
}

/* Ultra-specific education section padding - Force override */
.story-section .col-lg-10 .education-item .col-md-3 {
    margin-bottom: 40px !important;
    padding-bottom: 30px !important;
    padding-right: 20px !important;
    text-align: left !important;
}

.story-section .col-lg-10 .education-item .col-md-9 {
    padding-top: 30px !important;
    margin-top: 30px !important;
    padding-left: 20px !important;
}

/* Force override for all screen sizes */
@media (max-width: 1199px) {
    .story-section .col-lg-10 .education-item .col-md-3 {
        margin-bottom: 40px !important;
        padding-bottom: 30px !important;
        padding-right: 20px !important;
    }
    .story-section .col-lg-10 .education-item .col-md-9 {
        padding-top: 30px !important;
        margin-top: 30px !important;
        padding-left: 20px !important;
    }
}

@media (max-width: 991px) {
    .story-section .col-lg-10 .education-item .col-md-3 {
        margin-bottom: 40px !important;
        padding-bottom: 30px !important;
        padding-right: 20px !important;
    }
    .story-section .col-lg-10 .education-item .col-md-9 {
        padding-top: 30px !important;
        margin-top: 30px !important;
        padding-left: 20px !important;
    }
}

@media (max-width: 767px) {
    .story-section .col-lg-10 .education-item .col-md-3 {
        margin-bottom: 40px !important;
        padding-bottom: 30px !important;
        padding-right: 20px !important;
    }
    .story-section .col-lg-10 .education-item .col-md-9 {
        padding-top: 30px !important;
        margin-top: 30px !important;
        padding-left: 20px !important;
    }
}

@media (max-width: 575px) {
    .story-section .col-lg-10 .education-item .col-md-3 {
        margin-bottom: 40px !important;
        padding-bottom: 30px !important;
        padding-right: 20px !important;
    }
    .story-section .col-lg-10 .education-item .col-md-9 {
        padding-top: 30px !important;
        margin-top: 30px !important;
        padding-left: 20px !important;
    }
}

/* ===== COLOR THEME SYSTEM ===== */

/* Default Theme - Nature Green (moved to main :root declaration) */

/* Ocean Blue Theme */
[data-theme="ocean"] {
    --theme-primary: #1e3a8a;
    --theme-secondary: #dbeafe;
    --theme-accent: #3b82f6;
    --theme-content: #f0f9ff;
    --theme-text: #2c3e50;
    --theme-text-light: #ffffff;
    --theme-name: 'Ocean Blue';
    
    /* RGB values for rgba() functions */
    --theme-accent-rgb: 59, 130, 246;
    --theme-secondary-rgb: 219, 234, 254;
}

/* Sunset Orange Theme */
[data-theme="sunset"] {
    --theme-primary: #ea580c;
    --theme-secondary: #fed7aa;
    --theme-accent: #f97316;
    --theme-content: #fff7ed;
    --theme-text: #2c3e50;
    --theme-text-light: #ffffff;
    --theme-name: 'Sunset Orange';
    
    /* RGB values for rgba() functions */
    --theme-accent-rgb: 249, 115, 22;
    --theme-secondary-rgb: 254, 215, 170;
}

/* Forest Purple Theme */
[data-theme="forest"] {
    --theme-primary: #7c3aed;
    --theme-secondary: #e9d5ff;
    --theme-accent: #a855f7;
    --theme-content: #faf5ff;
    --theme-text: #2c3e50;
    --theme-text-light: #ffffff;
    --theme-name: 'Forest Purple';
    
    /* RGB values for rgba() functions */
    --theme-accent-rgb: 168, 85, 247;
    --theme-secondary-rgb: 233, 213, 255;
}

/* Midnight Dark Theme */
[data-theme="midnight"] {
    --theme-primary: #1f2937;
    --theme-secondary: #f3f4f6;
    --theme-accent: #6b7280;
    --theme-content: #f9fafb;
    --theme-text: #2c3e50;
    --theme-text-light: #ffffff;
    --theme-name: 'Midnight Dark';
    
    /* RGB values for rgba() functions */
    --theme-accent-rgb: 107, 114, 128;
    --theme-secondary-rgb: 243, 244, 246;
}

/* Theme colors are applied via the main body rule above */

/* Theme Selector Styles */
/* Theme Dropdown Container */
.theme-dropdown-container {
    position: relative;
    display: inline-block;
}

.theme-toggle-btn {
    background: var(--theme-accent);
    color: var(--theme-text-light);
    border: 1px solid var(--theme-accent);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    transition: all 0.3s ease;
    outline: none !important;
    outline-offset: 0 !important;
}

.theme-toggle-btn:hover {
    background: var(--theme-primary);
    border-color: var(--theme-accent);
    color: var(--theme-text-light);
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    scale: 1.05;
    outline: none !important;
    outline-offset: 0 !important;
}

.theme-toggle-btn:focus {
    outline: none !important;
    outline-offset: 0 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 0 0 2px var(--theme-accent);
}

.theme-toggle-btn:active {
    outline: none !important;
    outline-offset: 0 !important;
}

/* Theme dropdown styling */
.dropdown-menu {
    position: fixed !important;
    z-index: 9999 !important;
    background: var(--theme-primary) !important;
    border: 2px solid var(--theme-accent) !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3) !important;
    min-width: 10rem !important;
    padding: 0.25rem 0 !important;
    margin: 0 !important;
    font-size: 1rem !important;
    color: var(--theme-text-light) !important;
    text-align: left !important;
    list-style: none !important;
    background-clip: padding-box !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
}

.dropdown-menu.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.dropdown-menu:not(.show) {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.dropdown-item {
    display: block !important;
    width: 100% !important;
    padding: 0.5rem 1rem !important;
    clear: both !important;
    font-weight: 400 !important;
    color: var(--theme-text-light) !important;
    text-align: inherit !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    background-color: transparent !important;
    border: 0 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

.dropdown-item:hover {
    color: var(--theme-text-light) !important;
    background-color: var(--theme-accent) !important;
    transform: translateX(2px) !important;
}

.dropdown-item:focus {
    color: var(--theme-text-light) !important;
    background-color: var(--theme-secondary) !important;
    outline: none !important;
}

/* Ensure dropdown container doesn't clip content */
.dropdown {
    position: relative !important;
    overflow: visible !important;
}

.navbar-theme-controls .dropdown {
    overflow: visible !important;
    position: relative !important;
}

/* Bootstrap handles dropdown styling - removed conflicting CSS */


/* Update existing styles to use CSS variables - consolidated */

.section-icon {
    background: var(--theme-accent) !important;
    color: var(--theme-text-light) !important;
}

.tech-highlight {
    background: var(--theme-accent) !important;
    color: var(--theme-text-light) !important;
}

.btn-primary {
    background: var(--theme-primary) !important;
    color: var(--theme-text-light) !important;
    border-color: var(--theme-accent) !important;
}

#main-content {
    background: var(--theme-content) !important;
}

/* ===== CLEAN PROJECT STYLES ===== */

/* Scroll Instruction */
.scroll-instruction {
    font-size: 0.9em;
    opacity: 0.6;
    animation: subtle-bounce 5s infinite;
}

@keyframes subtle-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-3px);
    }
    60% {
        transform: translateY(-1px);
    }
}

/* Hero Card - removed as unused */

.hero-actions .btn {
    transition: all 0.3s ease;
}

.hero-actions .btn:hover {
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2em !important;
    }
    
    .hero-subtitle {
        font-size: 1.2em !important;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    /* Responsive Theme Selector */
    .theme-selector {
        bottom: 15px;
        right: 15px;
    }
    
    .theme-toggle-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    /* Bootstrap handles responsive dropdown styling */
}

@media (max-width: 480px) {
    /* Responsive Theme Selector for Small Screens */
    .theme-selector {
        bottom: 10px;
        right: 10px;
    }
    
    .theme-toggle-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    /* Bootstrap handles responsive dropdown styling */
}

/* Main Content Container */
.main-content-container {
    padding: 60px 20px;
    border-radius: 15px;
    margin: 40px auto;
    max-width: 1200px;
    width: 90%;
}

/* Remove cursor pointer from all cards */
.story-card,
.expertise-card,
.cv-card,
.project-card,
.philosophy-card {
    cursor: default !important;
}

/* Story Cards */
.story-card {
    background: var(--theme-secondary);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    height: 100%;
    transition: all 0.4s ease;
    cursor: default;
    color: var(--theme-text);
}

.story-card:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(var(--theme-accent-rgb, 82, 183, 136), 0.2);
    background: var(--theme-accent) !important;
}

.story-card:hover .section-icon {
    background: var(--theme-secondary);
    color: var(--theme-text);
}

/* Section Icons */
.section-icon {
    background: var(--theme-accent);
    color: var(--theme-text-light);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* Tech Highlights */
.tech-highlights {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.tech-highlight {
    background: var(--theme-accent);
    color: var(--theme-text-light);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    margin: 2px;
}

/* Buttons */
.btn-primary {
    background: var(--theme-primary);
    color: var(--theme-text-light);
    border: none;
    border-radius: 25px;
}

.btn-primary:hover {
    background: var(--theme-accent) !important;
    color: var(--theme-text-light) !important;
    border-color: var(--theme-primary) !important;
}

/* Enhanced hover effect for View My Projects button */
.story-card .btn-primary:hover {
    background: var(--theme-accent) !important;
    color: var(--theme-text-light) !important;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--theme-primary) !important;
    transition: all 0.3s ease;
}

/* Print CV Button */
.print-cv-btn {
    background: var(--theme-primary);
    color: var(--theme-text-light);
    border: 3px solid var(--theme-accent);
    border-radius: 25px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Theme Toggle Buttons */
.theme-btn {
    background: var(--theme-accent);
    color: var(--theme-text-light);
    border: 2px solid var(--theme-primary);
    border-radius: 50px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.theme-btn:hover {
    background: var(--theme-primary);
    color: var(--theme-text-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* Email Widget */
.email-widget {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    background: var(--theme-secondary);
    border: 2px solid var(--theme-primary);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    display: none;
}

.email-widget.show {
    display: block;
}

.email-widget-toggle {
    background: var(--theme-accent);
    color: var(--theme-text-light);
    border: 2px solid var(--theme-primary);
    border-radius: 50px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.email-widget-close {
    background: var(--theme-primary);
    color: var(--theme-text-light);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal Widget */
.modal-widget {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-widget.show {
    display: flex;
}

.modal-widget-content {
    background: var(--theme-secondary);
    border: 2px solid var(--theme-primary);
    border-radius: 15px;
    padding: 30px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.modal-widget-close {
    background: var(--theme-primary);
    color: var(--theme-text-light);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

/* Force remove all outlines from theme buttons - Global override */
button.theme-btn,
button.theme-selector-btn,
button.theme-toggle-btn,
.theme-btn,
.theme-selector-btn,
.theme-toggle-btn {
    outline: none !important;
    outline-offset: 0 !important;
    outline-width: 0 !important;
    outline-style: none !important;
    outline-color: transparent !important;
}

button.theme-btn:hover,
button.theme-selector-btn:hover,
button.theme-toggle-btn:hover,
.theme-btn:hover,
.theme-selector-btn:hover,
.theme-toggle-btn:hover {
    outline: none !important;
    outline-offset: 0 !important;
    outline-width: 0 !important;
    outline-style: none !important;
    outline-color: transparent !important;
}

button.theme-btn:focus,
button.theme-selector-btn:focus,
button.theme-toggle-btn:focus,
.theme-btn:focus,
.theme-selector-btn:focus,
.theme-toggle-btn:focus {
    outline: none !important;
    outline-offset: 0 !important;
    outline-width: 0 !important;
    outline-style: none !important;
    outline-color: transparent !important;
}

button.theme-btn:active,
button.theme-selector-btn:active,
button.theme-toggle-btn:active,
.theme-btn:active,
.theme-selector-btn:active,
.theme-toggle-btn:active {
    outline: none !important;
    outline-offset: 0 !important;
    outline-width: 0 !important;
    outline-style: none !important;
    outline-color: transparent !important;
}

/* FINAL OVERRIDE - Dark Mode Body Background */
body.dark-theme {
    background: var(--theme-primary) !important;
    background-color: var(--theme-primary) !important;
    background-image: none !important;
}

html.dark-theme body {
    background: var(--theme-primary) !important;
    background-color: var(--theme-primary) !important;
    background-image: none !important;
}

/* ULTRA HIGH SPECIFICITY - Dark Mode Body Background */
html.dark-theme body.dark-theme {
    background: var(--theme-primary) !important;
    background-color: var(--theme-primary) !important;
    background-image: none !important;
    color: var(--theme-text) !important;
}

/* ===== EXTRACTED INLINE STYLES ===== */

/* Scroll instruction animation - extracted from about.html, cv.html, projects.html */
.scroll-instruction {
    animation: subtle-bounce 5s infinite;
}

@keyframes subtle-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-3px);
    }
    60% {
        transform: translateY(-1px);
    }
}

/* CV Print Styles - extracted from cv-print.html */
.cv-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.cv-header {
    background: #f8f9fa;
    color: var(--theme-text) !important;
    padding: 30px 30px;
    text-align: center;
    border-bottom: 2px solid var(--theme-accent);
}

.cv-header h1 {
    font-size: 2.2em;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--theme-text) !important;
    letter-spacing: -0.3px;
}

.cv-header .subtitle {
    font-size: 1.2em;
    color: #555;
    font-weight: 400;
}

.cv-header .title-line {
    width: 40px;
    height: 2px;
    background: #2d6a4f;
    margin: 12px auto;
    border-radius: 1px;
}

.cv-content {
    padding: 40px;
}

.cv-section {
    margin-bottom: 35px;
    position: relative;
}

.cv-section:last-child {
    margin-bottom: 0;
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #2d6a4f;
}

.section-icon {
    width: 24px;
    height: 24px;
    background: #2d6a4f;
    border-radius: 50%;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.section-title {
    color: var(--theme-text) !important;
    font-size: 1.4em;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.3px;
}

.section-content {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #2d6a4f;
}

.personal-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.info-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    background: #2d6a4f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
}

.info-text {
    color: #555;
    font-size: 0.95em;
}

.experience-item, .education-item, .project-item {
    background: white;
    padding: 20px;
    margin: 15px 0;
}

/* Fix hover background for experience and education items */
.story-card:hover .experience-item,
.story-card:hover .education-item,
.story-card:hover .project-item {
    background: transparent !important;
}

/* Fix hover background for skill categories */
.story-card:hover .skill-category {
    background: transparent !important;
}

/* Fix hover background for competency items */
.story-card:hover .competency-item {
    background: transparent !important;
}

/* Add white outline to experience and education items on hover */
.story-card:hover .experience-item,
.story-card:hover .education-item {
    border: 1px solid #ffffff !important;
    border-radius: 6px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.item-title {
    color: #2c3e50;
    font-size: 1.1em;
    font-weight: 600;
    margin: 0;
}

.item-date {
    color: var(--theme-text) !important;
    font-size: 0.9em;
    font-weight: 500;
    background: #e8f5e8;
    padding: 4px 8px;
    border-radius: 4px;
}

.item-company {
    color: #52b788;
    font-weight: 500;
    margin: 5px 0;
}

.item-description {
    color: #555;
    line-height: 1.5;
    margin: 10px 0;
}

.item-list {
    margin: 10px 0;
    padding-left: 20px;
}

.item-list li {
    color: #555;
    margin: 5px 0;
    line-height: 1.4;
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

.skill-category {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.skill-category h4 {
    color: var(--theme-text) !important;
    font-size: 1em;
    margin-bottom: 10px;
    font-weight: 600;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.skill-tag {
    background: #2d6a4f;
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 500;
}

.competencies-list {
    counter-reset: competency;
}

.competency-item {
    display: flex;
    align-items: flex-start;
    margin: 12px 0;
    padding: 10px;
    background: white;
    border-radius: 6px;
    border-left: 3px solid #52b788;
}

.competency-number {
    background: #2d6a4f;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    font-weight: 600;
    margin-right: 12px;
    flex-shrink: 0;
}

.competency-text {
    color: #555;
    line-height: 1.4;
}

/* Print styles for CV - Optimized for A4 */
@page {
    size: A4;
    margin: 15mm;
}

@media print {
    body {
        background: white !important;
        padding: 0 !important;
        margin: 0 !important;
        font-size: 10pt !important;
        line-height: 1.3 !important;
        font-family: Arial, sans-serif !important;
    }
    
    .cv-container {
        box-shadow: none !important;
        border-radius: 0 !important;
        max-width: none !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    .cv-header {
        background: #f8f9fa !important;
        padding: 12px 15px !important;
        border-bottom: 1px solid #2d6a4f !important;
        margin-bottom: 8px !important;
    }
    
    .cv-header h1 {
        font-size: 1.8em !important;
        margin: 0 0 5px 0 !important;
    }
    
    .cv-header .subtitle {
        font-size: 1.1em !important;
        margin: 0 !important;
    }
    
    .cv-content {
        padding: 0 15px !important;
    }
    
    .cv-section {
        margin: 8px 0 !important;
        page-break-inside: avoid;
    }
    
    .section-header {
        margin-bottom: 8px !important;
    }
    
    .section-title {
        font-size: 1.2em !important;
        margin: 0 !important;
    }
    
    .section-content {
        background: white !important;
        border: 0.5px solid #ddd !important;
        padding: 8px !important;
        margin-bottom: 6px !important;
    }
    
    .experience-item, .education-item, .project-item {
        margin: 4px 0 !important;
        padding: 6px !important;
        page-break-inside: avoid;
        background: white !important;
        box-shadow: none !important;
        border: 0.5px solid #ddd !important;
    }
    
    .experience-item h5, .education-item h5 {
        font-size: 1em !important;
        margin: 0 0 3px 0 !important;
    }
    
    .item-title {
        font-size: 1em !important;
        font-weight: bold !important;
        margin: 0 0 2px 0 !important;
        color: #2d6a4f !important;
    }
    
    .item-header {
        margin-bottom: 3px !important;
        display: block !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;
    }
    
    .item-title {
        display: block !important;
        width: 100% !important;
        margin-bottom: 2px !important;
        float: none !important;
        clear: both !important;
    }
    
    .item-date {
        display: block !important;
        width: 100% !important;
        margin-top: 2px !important;
        float: none !important;
        clear: both !important;
    }
    
    /* Force all flex layouts to be vertical in print */
    .item-header * {
        display: block !important;
        width: 100% !important;
        float: none !important;
    }
    
    .item-company {
        font-weight: bold !important;
        margin: 0 0 2px 0 !important;
        font-size: 0.9em !important;
        display: block !important;
        width: 100% !important;
    }
    
    .experience-description, .education-description {
        font-size: 0.9em !important;
        margin: 0 !important;
        line-height: 1.2 !important;
    }
    
    .personal-info {
        display: flex !important;
        justify-content: space-between !important;
        flex-wrap: wrap !important;
    }
    
    .info-item {
        margin: 2px 0 !important;
        font-size: 0.9em !important;
    }
    
    .tech-highlight {
        font-size: 0.8em !important;
        padding: 2px 6px !important;
        margin: 1px !important;
    }
    
    .skill-category {
        margin: 4px 0 !important;
        padding: 6px !important;
    }
    
    .skill-category h5 {
        font-size: 1em !important;
        margin: 0 0 3px 0 !important;
    }
    
    .skill-description {
        font-size: 0.85em !important;
        margin: 0 !important;
        line-height: 1.2 !important;
    }
    
    /* Additional print optimizations */
    .section-icon {
        display: none !important;
    }
    
    .tech-highlights {
        margin: 4px 0 !important;
    }
    
    .project-content, .skills-content {
        margin: 0 !important;
    }
    
    /* Ensure proper page breaks */
    .cv-section:nth-child(3) {
        page-break-before: auto;
    }
    
    /* Compact spacing for better fit */
    .mb-3, .mb-4, .mb-5 {
        margin-bottom: 8px !important;
    }
    
    .mt-3, .mt-4, .mt-5 {
        margin-top: 8px !important;
    }
    
    /* CV Print specific classes */
    .competencies-title {
        color: #2d6a4f;
        margin-bottom: 15px;
        font-size: 1.1em;
    }
    
    .languages-container {
        display: flex;
        gap: 30px;
    }
    
    .language-label {
        color: #2d6a4f;
    }
    
    /* List items styling for print */
    .item-list {
        margin: 4px 0 0 0 !important;
        padding-left: 15px !important;
    }
    
    .item-list li {
        font-size: 0.9em !important;
        margin: 2px 0 !important;
        line-height: 1.2 !important;
    }
    
    .item-description {
        font-size: 0.9em !important;
        margin: 4px 0 0 0 !important;
        line-height: 1.2 !important;
    }
    
    /* Print styles for new classes */
    .competencies-title {
        color: #2d6a4f !important;
        margin-bottom: 8px !important;
        font-size: 1em !important;
    }
    
    .languages-container {
        display: flex !important;
        gap: 20px !important;
    }
    
    .language-label {
        color: #2d6a4f !important;
        font-weight: bold !important;
    }
    
    .item-date {
        font-size: 0.8em !important;
        padding: 2px 6px !important;
    }
    
    .skills-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .personal-info {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    
    .skill-tag {
        font-size: 0.7em !important;
        padding: 3px 8px !important;
    }
    
    .competency-item {
        margin: 8px 0 !important;
        padding: 8px !important;
    }
    
    .competency-number {
        width: 20px !important;
        height: 20px !important;
        font-size: 0.7em !important;
    }
}

/* ========================================
   STORY CARD STYLES - Replace inline styles
   ======================================== */

.story-card {
    background: var(--theme-secondary) !important;
    border-radius: 15px;
    padding: 30px; /* Will be overridden by responsive rules */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    height: 100%;
    transition: all 0.4s ease;
    cursor: pointer;
    color: var(--theme-text) !important;
}

.story-card h3,
.story-card h4,
.story-card h5,
.story-card h6,
.story-card p,
.story-card .card-text,
.story-card .card-title,
.story-card .card-subtitle {
    color: var(--theme-text) !important;
}

.expertise-card {
    background: var(--theme-secondary) !important;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    height: 100%;
    transition: all 0.4s ease;
    cursor: pointer;
    color: var(--theme-text) !important;
}

.expertise-card h3,
.expertise-card h4,
.expertise-card h5,
.expertise-card h6,
.expertise-card p,
.expertise-card .card-text,
.expertise-card .card-title,
.expertise-card .card-subtitle {
    color: var(--theme-text) !important;
}

/* Responsive overrides for story-card padding */
@media (max-width: 768px) {
    .story-card {
        padding: 20px !important;
    }
}

@media (max-width: 576px) {
    .story-card {
        padding: 15px !important;
    }
}

@media (max-width: 480px) {
    .story-card {
        padding: 12px !important;
    }
}

.story-card:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(var(--theme-accent-rgb, 82, 183, 136), 0.2);
    background: var(--theme-accent) !important;
}

.story-card:hover h3,
.story-card:hover h4,
.story-card:hover h5,
.story-card:hover h6,
.story-card:hover p,
.story-card:hover .card-text,
.story-card:hover .card-title,
.story-card:hover .card-subtitle {
    color: var(--theme-text-light) !important;
}

/* Ensure high contrast hover overrides normal hover */
html.high-contrast-theme .story-card:hover h3,
html.high-contrast-theme .story-card:hover h5,
html.high-contrast-theme .story-card:hover p,
body.high-contrast-theme .story-card:hover h3,
body.high-contrast-theme .story-card:hover h5,
body.high-contrast-theme .story-card:hover p {
    color: #000000 !important;
}

.story-card:hover .section-icon {
    background: var(--theme-secondary) !important;
    color: var(--theme-text) !important;
}

.section-icon {
    background: var(--theme-accent);
    color: var(--theme-text-light);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.tech-highlight {
    background: var(--theme-accent);
    color: var(--theme-text-light);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    margin: 2px;
    display: inline-block;
}

.btn-primary {
    background: var(--theme-accent) !important;
    color: var(--theme-text-light) !important;
    border: none;
    border-radius: 25px;
}

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

/* Theme selector button styles */
.theme-selector-btn {
    outline: none !important;
    outline-offset: 0 !important;
    outline-width: 0 !important;
    outline-style: none !important;
    outline-color: transparent !important;
    -webkit-outline: none !important;
    -moz-outline: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    border: 0 !important;
    -webkit-focus-ring-color: transparent !important;
}

.theme-selector-btn:focus {
    outline: none !important;
    outline-offset: 0 !important;
    outline-width: 0 !important;
    outline-style: none !important;
    outline-color: transparent !important;
    -webkit-outline: none !important;
    -moz-outline: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    border: 0 !important;
    -webkit-focus-ring-color: transparent !important;
}

/* Scroll instruction styles */
.scroll-instruction {
    font-size: 0.9em;
    opacity: 0.6;
}

/* Ultra-specific selectors for theme picker buttons */
#themeSelectorBtn,
#themeSelectorBtnMobile,
button#themeSelectorBtn,
button#themeSelectorBtnMobile,
.theme-selector button,
.theme-selector button:hover,
.theme-selector button:focus,
.theme-selector button:active {
    outline: none !important;
    outline-offset: 0 !important;
    outline-width: 0 !important;
    outline-style: none !important;
    outline-color: transparent !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

/* Universal button outline removal for theme buttons */
button[class*="theme"],
button[id*="theme"] {
    outline: none !important;
    outline-offset: 0 !important;
    outline-width: 0 !important;
    outline-style: none !important;
    outline-color: transparent !important;
}

.modal-widget-btn {
    background: var(--theme-primary);
    color: var(--theme-text-light);
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    cursor: pointer;
    margin-top: 15px;
}