
html {
    scroll-behavior: smooth;
    scroll-padding-top: 2rem;  /* This helps with fixed headers */
}
/* Remove the blue tap highlight on Android/iOS */
* {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

/* Keep outline for keyboard users, hide it for touch/mouse */
*:focus:not(:focus-visible) {
  outline: none;
}

/* For Safari and older browsers that don't support scroll-behavior */
@media screen and (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Optional: Add smooth transitions to all elements */
* {
    transition: all 0.3s ease-out;
    /* Exclude transforms and opacity if they're used for other animations */
    transition-property: background-color, color, border-color, box-shadow;
}

/* For users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    * {
        transition: none !important;
    }
}

/* Section Headings Animation */
@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes titleReveal {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Minimal section heading design */
.section-heading {
    position: relative;
    text-align: center;
    margin-bottom: 3rem;
}

.section-heading h2 {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Decorative line design */
.section-heading::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    margin: 0 auto;
    border-radius: 2px;
    position: relative;
}

/* Small dots design */
.section-heading::before {
    content: '';  /* Remove the dots from content */
    display: flex;
    gap: 8px;
    font-size: 1.5rem;
    margin-top: 0.5rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -25px;
}

/* Add this class to style the dots container */
.dots-container {
    display: flex;
    gap: 8px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -15px;  /* Changed from -25px to -15px */
    font-size: 1.5rem;
}

.dots-container .dot {
    opacity: 0.2;
}

.dots-container .dot:nth-child(1) {
    color: #ff3333; /* Red */
    animation: blinkDot 4s infinite 0s;
}

.dots-container .dot:nth-child(2) {
    color: #4169E1; /* Blue */
    animation: blinkDot 4s infinite 1s;
}

.dots-container .dot:nth-child(3) {
    color: #28a745; /* Green */
    animation: blinkDot 4s infinite 2s;
}

.dots-container .dot:nth-child(4) {
    color: #ffc107; /* Yellow */
    animation: blinkDot 4s infinite 3s;
}

@keyframes blinkDot {
    0%, 15% { opacity: 1; }
    20%, 100% { opacity: 0.2; }
}

/* Hover effect */
.section:hover .section-heading::after {
    width: 80px;
    transition: width 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .section-heading h2 {
        font-size: 1.75rem;
    }

    .section-heading::after {
        width: 50px;
    }

    .section-heading::before {
        font-size: 1.2rem;
        letter-spacing: 6px;
        bottom: -20px;
    }

    .dots-container {
        bottom: -12px;  /* Slightly closer on mobile */
        font-size: 1.2rem;  /* Smaller dots on mobile */
    }
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    opacity: 0.7;
    margin-bottom: 0.5rem;
    transform: translateY(20px);
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.section-title {
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff3333 33%, #cc0000 67%, #ff6b6b 100%);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: 
        titleReveal 0.8s ease forwards,
        gradientFlow 8s linear infinite;
    margin: 0;
    line-height: 1.2;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ff3333, transparent);
    transform: translateX(-50%);
    animation: lineReveal 0.8s ease forwards 0.4s;
}

@keyframes lineReveal {
    to {
        width: 100px;
    }
}

/* Dark theme adjustment for section titles */
:root[data-theme="dark"] .section-title {
    background: linear-gradient(135deg, #ff8080 0%, #ff4444 33%, #ff1111 67%, #ff8080 100%);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Section Layout */
.section {
    padding: 5rem 0;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .section-title {
        font-size: 2.5rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .section {
        padding: 3rem 0;
    }

    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 2rem;
    }

    .section {
        padding: 2rem 0;
    }
}

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes shimmer {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Section Links */
.section-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.section-link:hover {
    transform: translateY(-5px);
}

.section-link:hover .section-title {
    color: var(--primary-color);
}
#languagesChart {
    width: 100% !important;
    max-width: 300px !important;
    height: 300px !important;
    margin: auto;
}



.github-stats-wrapper {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    flex: 0.8;
    max-width: 500px;
}

.languages-chart {
    flex: 1.2;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 600px;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.languages-chart canvas {
    width: 100% !important;
    max-width: 300px !important;
    height: 300px !important;
    margin: auto;
}

.github-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: nowrap;
    margin-top: 1rem;
}

.github-buttons .btn {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    width: calc(50% - 0.5rem);
    justify-content: center;
    white-space: nowrap;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.github-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.github-buttons .btn.dark {
    background: #24292e;
    color: #fff;
    border: none;
}

.github-buttons .btn.primary {
    background: #4169E1;
    color: #fff;
    border: none;
}

.member-buttons.pc-only {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding-top: .5rem;
}

.member-buttons.pc-only .member-since {
    margin: 0;
}

.languages-header.mobile-only {
    display: none;
}

@media (max-width: 1024px) {
    .member-buttons.pc-only {
        display: none;
    }

    .languages-header.mobile-only {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        padding-top: 1rem;
        border-top: 1px solid #eee;
    }

    .languages-header.mobile-only .member-since {
        margin: 0;
    }
}

@media (max-width: 1024px) {
    .github-stats-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .stats-grid {
        width: 100%;
        max-width: 600px;
        grid-template-columns: repeat(2, 1fr);
        margin-bottom: 2rem;
    }

    .languages-chart {
        width: 100%;
        max-width: 600px;
    }
}

.github-stats-container {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 2rem auto;
    max-width: 800px;
    width: 90%;
}

.language-chart {
    width: 100%;
    max-width: 400px;
    margin: 0 auto 2rem;
    padding: 1rem;
}

.github-info {
    text-align: center;
    padding: 0 1rem;
}

.member-since {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.github-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: nowrap;
    margin-top: 1.5rem;
}

.github-buttons .btn {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    width: calc(50% - 0.5rem);
    justify-content: center;
    white-space: nowrap;
}

.github-buttons .btn:hover {
    transform: translateY(-2px);
}

.github-buttons .btn.dark {
    background: #24292e;
    color: #fff;
}

.github-buttons .btn.primary {
    background: #4169E1;
    color: #fff;
}

.github-buttons i {
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .github-stats-container {
        padding: 1.5rem;
        margin: 1.5rem auto;
    }

    .language-chart {
        padding: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .github-buttons {
        gap: 0.75rem;
    }

    .github-buttons .btn {
        padding: 0.6rem 0.75rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .github-stats-container {
        padding: 1rem;
        margin: 1rem auto;
        width: 95%;
    }

    .language-chart {
        padding: 0;
    }

    .github-buttons {
        flex-direction: row;
        gap: 0.5rem;
    }

    .github-buttons .btn {
        width: calc(50% - 0.25rem);
        padding: 0.6rem 0.5rem;
        font-size: 0.5rem;
    }
}

.languages-header {
    text-align: center;
    border-top: 1px solid #eee;
}

.languages-chart h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-color);
    text-align: center;
    margin-bottom: 2rem;
}

.member-since {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.github-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: nowrap;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .languages-chart {
        padding: 1.25rem;
    }

    .languages-header {
        padding-top: 0.75rem;
    }

    .languages-chart h3 {
        font-size: 1.6rem;
        margin-bottom: 1.25rem;
    }

    .member-since {
        margin-bottom: 0.75rem;
    }

    .github-buttons {
        margin-top: 0.75rem;
    }
}

@media (max-width: 480px) {
    .languages-header {
        margin-top: 1rem;
        padding: 1rem 0.5rem 0;
    }

    .languages-chart h3 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
}

.stat-box {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.stat-box h2 {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: baseline;
    font-size: 2.5rem;
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
    line-height: 1;
}

.stat-box h2 .unit {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-left: 2px;
    font-weight: normal;
    position: relative;
    bottom: -0.2em;
}

/* Specific styling for experience stat to ensure centering */
#total-experience {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    width: 100%;
}

.stat-box p {
    margin: 10px 0 0;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.languages-chart h3 {
    color: var(--text-color);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.stats-grid-section {
    flex: 0.8;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.member-buttons.pc-only {
    display: block;
    text-align: center;
    padding-top: .5rem;
}

.languages-header.mobile-only {
    display: none;
}

@media (max-width: 1024px) {
    .member-buttons.pc-only {
        display: none;
    }

    .languages-header.mobile-only {
        display: block;
        text-align: center;
        padding-top: 1rem;
        border-top: 1px solid #eee;
    }

    .stats-grid-section {
        width: 100%;
        max-width: 600px;
        margin-bottom: 2rem;
    }
}

:root[data-theme="light"] {
    --border-color: rgba(0, 0, 0, 0.1);
    --text-color: #333;
    --text-secondary: #666;
}

:root[data-theme="dark"] {
    --border-color: rgba(255, 255, 255, 0.1);
    --text-color: #fff;
    --text-secondary: #aaa;
}

/* Add these styles for the More About Me button */
.view-more-widgets {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    margin: 1rem auto;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.view-more-widgets:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.view-more-widgets i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    margin: 0 auto;
}

.view-more-widgets:hover i {
    transform: translateY(2px);
}

/* Add styles for experience description indentation */
.experience-item .company {
    margin-left: 1.5rem;
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: -0.5rem;
    position: relative;
}

.experience-item .company::before {
    content: "•";
    position: absolute;
    left: -1rem;
    color: var(--text-secondary);
    opacity: 0.6;
    font-size: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
}

.experience-item .period {
    margin-left: 2.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: -0.25rem;
    opacity: 0.9;
}

.experience-item .description {
    margin-left: 1.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.experience-item .view-details-btn {
    margin-left: 1.5rem;
    font-size: 0.9rem;
    color: #ff3333;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.experience-item .view-details-btn:hover {
    opacity: 1;
    color: #cc0000;
}

.experience-item .view-details-btn i {
    margin-right: 0.5rem;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

/* Style for widget expand buttons */
.widget-card .expand-button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.7rem;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.widget-card .expand-button:hover {
    opacity: 1;
    color: var(--text-color);
}

.widget-card .expand-button i {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.widget-card .expand-button.expanded i {
    transform: rotate(180deg);
}

.widget-card .hidden-fields {
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Style for experience duration */
.experience-item .duration {
    color: var(--text-secondary);
    font-size: 0.85rem;
    opacity: 0.8;
    font-weight: normal;
    margin-left: 0.25rem;
}

/* Professional Footer Styles */
footer {
    padding: 2rem 0;
    position: relative;
    overflow: hidden;
}

.copyright {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    padding: 0 1rem;
    transition: all 0.3s ease;
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 0;
}

.copyright a {
    color: inherit;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
}

.copyright a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}

.copyright a:hover::after {
    width: 100%;
}

.copyright:hover {
    color: var(--text-color);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    footer {
        padding: 1.5rem 0;
    }

    .copyright {
        font-size: 0.85rem;
        padding-bottom: 15px;
    }
}

/* Add these professional design enhancements */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.widget-card, .experience-item, .project-card {
    transition: all 0.3s ease;
    border-radius: 12px;
    position: relative;
    background: var(--bg-color);
}

.widget-card:hover, .experience-item:hover, .project-card:hover {
    animation: float 3s ease-in-out infinite;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.section {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #ff6b6b var(--scroll), transparent 0);
    z-index: 1000;
}

:root {
    --h1-size: clamp(2rem, 5vw, 3.5rem);
    --h2-size: clamp(1.5rem, 4vw, 2.5rem);
    --h3-size: clamp(1.2rem, 3vw, 2rem);
    --body-size: clamp(0.9rem, 2vw, 1.1rem);
}

h2 { font-size: var(--h2-size); }
h3 { font-size: var(--h3-size); }
p { font-size: var(--body-size); }

/* Restore original greeting size */
.greeting {
    font-size: 1.5rem;
    font-weight: normal;
    opacity: 0.8;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* Style for name */
.hero-name {
    font-size: 3.5rem;
    font-weight: bold;
    color: #ff3333;
    margin: 0;
    line-height: 1.2;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff3333 50%, #cc0000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* View More Button Styles */
.view-more-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    margin: 1rem auto;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.view-more-btn:hover {
    opacity: 1;
}

.view-more-btn i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

/* Bounce Animation */
.bounce {
    animation: bounce 2s infinite;
}

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

/* Experience Section Styles - Professional Spacing */
.experience-item {
    padding: 1rem;
    margin-bottom: 1rem;
}

.experience-item h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.15rem;
    margin-left: 1rem;
}

.experience-item .company {
    margin-left: 2.5rem;
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: -0.3rem;
}

.experience-item .period {
    margin-left: 3.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: -0.2rem;
    opacity: 0.9;
}

.experience-item .description {
    margin-left: 2.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
    margin-top: 0.3rem;
    margin-bottom: 0.3rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.experience-item .view-details-btn {
    margin-left: 2.5rem;
    font-size: 0.9rem;
    color: #ff3333;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem 0;
    transition: all 0.3s ease;
    opacity: 0.8;
}

/* For multiple roles within same company */
.experience-item .role-item h4 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

/* Experience Section Styles - Connected Cards */
.experience-item {
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;  /* For positioning the connector */
}

/* Experience Card Connectors */
/* First card bullet point with color cycling */
.experience-item:first-child::before {
    content: '•';
    position: absolute;
    left: 2.65rem;
    top: 1.2rem;
    font-size: 24px;
    line-height: 1;
    animation: colorCycle 9s infinite;  /* Increased duration for smoother transitions */
    transform-origin: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 24px;
}

@keyframes colorCycle {
    0%, 28% {
        color: #ff3333; /* Red */
        opacity: 1;
    }
    30%, 31% {
        opacity: 0.2; /* Fade out */
    }
    33%, 61% {
        color: #28a745; /* Green */
        opacity: 1;
    }
    63%, 64% {
        opacity: 0.2; /* Fade out */
    }
    66%, 94% {
        color: #ffc107; /* Yellow */
        opacity: 1;
    }
    96%, 97% {
        opacity: 0.2; /* Fade out */
    }
    98%, 100% {
        color: #ff3333; /* Back to red */
        opacity: 1;
    }
}

/* Up arrows for other cards */
.experience-item:not(:first-child)::before {
    content: '▲';
    position: absolute;
    left: 2.65rem;
    top: 1.5rem;
    font-size: 12px;
    animation: fadeUpArrow 2s infinite;
    transform-origin: center;
}

/* Color the arrows in sequence */
.experience-item:nth-child(2)::before {
    color: #ff3333; /* Red */
}

.experience-item:nth-child(3)::before {
    color: #ffc107; /* Yellow */
}

.experience-item:nth-child(4)::before {
    color: #28a745; /* Green */
}

.experience-item:nth-child(5)::before {
    color: #ff3333; /* Red */
}

.experience-item:nth-child(6)::before {
    color: #ffc107; /* Yellow */
}

.experience-item:nth-child(7)::before {
    color: #28a745; /* Green */
}

/* Continue the pattern for more items if needed */
.experience-item:nth-child(8)::before {
    color: #ff3333;
}

.experience-item:nth-child(9)::before {
    color: #ffc107;
}

.experience-item:nth-child(10)::before {
    color: #28a745;
}

/* Remove the last card special dot section */

/* Connector line between cards */
.experience-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 3rem;
    bottom: -1rem;
    width: 2px;
    height: 1rem;
    background: linear-gradient(180deg, var(--border-color) 50%, transparent);
    animation: connectLine 1s ease forwards;
    transform-origin: top;
}

/* Arrow animation */
@keyframes fadeUpArrow {
    0% {
        transform: translateY(0);
        opacity: 0.4;
    }
    50% {
        transform: translateY(-3px);
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }
}

/* Animations */
@keyframes connectLine {
    from {
        transform: scaleY(0);
    }
    to {
        transform: scaleY(1);
    }
}

@keyframes pulseDot {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);  /* Yellow glow */
    }
    50% {
        box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.3);  /* Green glow */
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);  /* Back to yellow */
    }
}

/* Adjust existing margins to accommodate the timeline */
.experience-item h3 {
    margin-left: 3rem;
}

.experience-item .company {
    margin-left: 4.5rem;
}

.experience-item .period {
    margin-left: 5.5rem;
}

.experience-item .description {
    margin-left: 4.5rem;
}

.experience-item .view-details-btn {
    margin-left: 4.5rem;
}

/* Nested Roles Styling */
.role-item {
    position: relative;
    margin-left: 5.5rem;  /* Align with the main timeline */
    padding-left: 1rem;   /* Reduced padding */
}

/* Adjust nested role content spacing */
.role-item h4 {
    margin-bottom: 0.15rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
}

.role-item .period {
    margin-left: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.9;
}

.role-item .description {
    margin-left: 1rem;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-secondary);
}

/* Skills Icon Animation */
.skill-item {
    cursor: pointer;  /* Add pointer cursor */
    transition: all 0.3s ease;
}

.skill-item .skill-icon i {
    transition: all 0.3s ease;
}

.skill-item:hover .skill-icon i {
    animation: skillIconAnimation 0.5s ease;
    transform-origin: center;
    filter: drop-shadow(0 0 3px #ff3333);
}

@keyframes skillIconAnimation {
    0% {
        transform: scale(1) rotate(0);
    }
    25% {
        transform: scale(1.2) rotate(-5deg);
    }
    50% {
        transform: scale(1.2) rotate(5deg);
    }
    75% {
        transform: scale(1.1) rotate(-3deg);
    }
    100% {
        transform: scale(1) rotate(0);
    }
}

/* Hover effect for skill name */
.skill-item:hover {
    color: #ff3333;
}

.skill-item .fab {
    transition: all 0.3s ease;
}

.skill-item:hover .fab {
    color: #ff3333 !important;
}

/* Base proficiency badge styles */
.skill-item {
    position: relative;
    min-height: 70px;
    display: flex;
    align-items: flex-start; /* Align content to top */
    margin-bottom: 10px;
}

.proficiency-badge {
    position: absolute;
    right: 10px;
    bottom: -10px; /* Changed from top to bottom positioning */
    width: 100px !important;
    height: 45px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    background: transparent !important;
    -webkit-mask-image: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/8399/grunge.png');
    -webkit-mask-size: 944px 604px;
    -webkit-mask-position: 13rem 6rem;
    mix-blend-mode: multiply;
    z-index: 1;
    text-transform: uppercase !important;
    overflow: visible;
    font-family: 'Arial Black', 'Helvetica Bold', sans-serif;
    opacity: 0;
    transition: all 0.5s ease;
    transform: none !important; /* Remove any rotation */
}

/* Stamp handle */
.proficiency-badge::before {
    content: '';
    position: absolute;
    top: -50px;  /* Adjusted position */
    right: 45%;  /* Center the handle */
    width: 8px;  /* Thinner handle */
    height: 50px;
    background: linear-gradient(to right, #444, #666, #444);  /* Better handle look */
    border-radius: 2px;
    opacity: 0;
    transition: all 0.5s ease;
    transform-origin: bottom;
    transform: rotate(-15deg);
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);  /* Handle shadow */
}

/* Ink spreading effect */
.proficiency-badge::after {
    content: '';
    position: absolute;
    inset: -2px;
    border: 2px double;
    border-radius: 3px;
    opacity: 0;
    transition: all 0.5s ease;
    transform: scale(1.1);
}

/* Hover animations */
.skill-item:hover .proficiency-badge {
    opacity: 1;
    animation: stampDown 0.5s ease-out forwards;
}

.skill-item:hover .proficiency-badge::before {
    opacity: 1;
    animation: handlePress 0.5s ease-out forwards;
}

.skill-item:hover .proficiency-badge::after {
    opacity: 1;
    animation: inkSpread 0.5s ease-out forwards;
}

/* Exit animations */
@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: translateY(-50%) rotate(var(--rotation, -15deg));
    }
    100% {
        opacity: 0;
        transform: translateY(-50%) rotate(var(--rotation, -15deg));  /* Keep same rotation */
    }
}

@keyframes handleLift {
    0% {
        transform: rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: rotate(-15deg);
        opacity: 0;
    }
}

@keyframes inkFade {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.05);  /* Reduced scale change */
        opacity: 0;
    }
}

/* Proficiency Level Colors */
.proficiency-badge.beginner::before,
.proficiency-badge.beginner::after {
    border-color: #dc3545 !important;
}
.proficiency-badge.beginner span {
    color: #dc3545 !important;
}

.proficiency-badge.basic::before,
.proficiency-badge.basic::after {
    border-color: #fd7e14 !important;
}
.proficiency-badge.basic span {
    color: #fd7e14 !important;
}

.proficiency-badge.intermediate::before,
.proficiency-badge.intermediate::after {
    border-color: #17a2b8 !important;
}
.proficiency-badge.intermediate span {
    color: #17a2b8 !important;
}

.proficiency-badge.advanced::before,
.proficiency-badge.advanced::after {
    border-color: #28a745 !important;
}
.proficiency-badge.advanced span {
    color: #28a745 !important;
}

.proficiency-badge.expert span {
    color: #007bff !important;
}

/* Section heading stamp effect */
.section-heading h2 {
    -webkit-mask-image: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/8399/grunge.png');
    -webkit-mask-size: 944px 604px;
    -webkit-mask-position: 13rem 6rem;
    mix-blend-mode: multiply;
    font-family: Arial, sans-serif;
    font-weight: 600;
    position: relative;
    display: inline-block;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
    background-size: 100%;
    -webkit-background-clip: text;
    background-clip: text;
    transition: all 0.3s ease;
}

/* Keep the existing section heading animations */
.section-heading {
    position: relative;
    text-align: center;
    margin-bottom: 3rem;
    overflow: visible;
    padding: 0 1rem;
}

/* Preserve existing hover effects if any */
.section-heading h2:hover::before,
.section-heading h2:hover::after {
    opacity: 0.5;
}

.certification-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.certification-title h3 {
    font-size: 1.1rem;  /* Reduced from default size to match experience role */
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
}

.certification-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.certification-icon i {
    font-size: 1.2rem;
    color: var(--text-color);  /* Use the default text color */
}

/* Remove the color variations */
.certification-card:nth-child(3n) .certification-icon,
.certification-card:nth-child(3n+1) .certification-icon,
.certification-card:nth-child(3n+2) .certification-icon {
    background: none;
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.certification-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease;
    border: 1px solid var(--border-color);
}

/* Light mode specific styles */
:root[data-theme="light"] .certification-card {
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Dark mode specific styles */
:root[data-theme="dark"] .certification-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.certification-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.desktop-only {
    display: none;
}

.mobile-cert-link {
    display: none;
}

@media (min-width: 768px) {
    .desktop-only {
        display: block;
    }
    .mobile-cert-link {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .desktop-only {
        display: none !important;
    }
    .mobile-cert-link {
        display: inline-flex !important;
        align-items: center;
        gap: 0.5rem;
        margin-top: 1rem;
    }
    .certification-buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
}

/* Chatbot mobile positioning */
@media (max-width: 768px) {
    .index-chatbot-widget {
        bottom: 100px; /* Increase spacing to avoid overlap */
        right: 20px;   /* Add some right margin */
    }
}

/* Additional adjustment for very small screens */
@media (max-width: 480px) {
    .index-chatbot-widget {
        bottom: 120px; /* Even more space on smaller screens */
        right: 15px;   /* Slightly closer to edge on small screens */
    }
}

/* Skill item base styles */
.skill-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.skill-name {
    font-size: 1rem;
    color: var(--text-color);
}

.proficiency-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

/* Mobile view adjustments */
@media (max-width: 768px) {
    .skill-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
    }

    .skill-name {
        font-size: 0.95rem;  /* Keep original text size */
    }

    .proficiency-badge {
        transform: none !important;
        margin-left: auto;
        font-size: 0.7rem;
        padding: 3px 8px;
    }
}

/* Remove tap highlight and improve mobile interactions */
* {
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

/* Specific styles for interactive elements */
button,
a,
.nav-links a,
.hamburger,
.section-toggle,
.index-chatbot-widget,
.index-quick-reply,
.cert-link,
.mobile-cert-link,
.skill-tag,
.project-card,
.blog-card {
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

/* Fix sidebar toggle appearance */
.section-toggle {
    cursor: default;
    pointer-events: none;
    opacity: 0.7;
}

/* Only enable pointer events when section is loaded */
.section.loaded .section-toggle {
    cursor: pointer;
    pointer-events: auto;
    opacity: 1;
}

/* Mobile certification card styles */
@media (max-width: 768px) {
    .certification-card {
        padding: 1rem;
        margin-bottom: 1rem;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 8px;
    }

    .certification-title {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
    }

    .certification-icon {
        font-size: 1rem;
    }

    .certification-title h3 {
        font-size: 0.95rem;
        font-weight: 600;
        margin: 0;
        line-height: 1.4;
    }

    .certification-org {
        font-size: 0.85rem;
        color: var(--secondary-text);
        margin-bottom: 4px;
    }

    .certification-date {
        font-size: 0.8rem;
        color: var(--secondary-text);
        opacity: 0.8;
    }

    .cert-link, .mobile-cert-link {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 0.85rem;
        color: var(--primary-color);
        text-decoration: none;
        margin-top: 8px;
    }

    .cert-link i, .mobile-cert-link i {
        font-size: 0.8rem;
    }
}

/* Core scrolling optimizations */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-overflow-scrolling: touch;
    overflow-y: scroll;
}

/* Performance optimizations for smooth scrolling */
.navbar,
.section,
.certification-card,
.project-card,
.blog-card,
.experience-card {
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
    will-change: transform;
}

/* Prevent content jumping during scroll */
main {
    overflow-x: hidden;
    position: relative;
}

/* Ensure smooth scrolling even on Safari */
@supports (-webkit-overflow-scrolling: touch) {
    body {
        -webkit-overflow-scrolling: touch;
    }
}

/* Blog filter dropdown styles */
.filter-select {
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
}

/* Dropdown options styling */
.filter-select option {
    background-color: var(--card-bg);
    color: var(--text-color);
    padding: 8px;
}

/* Dark mode specific styles */
:root[data-theme="dark"] .filter-select {
    background-color: var(--card-bg);
    color: var(--text-color);
    border-color: var(--border-color);
}

:root[data-theme="dark"] .filter-select option {
    background-color: var(--card-bg);
    color: var(--text-color);
}

/* Hover states */
.filter-select:hover {
    border-color: var(--primary-color);
}

/* Focus states */
.filter-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.1);
}

/* Minimal Blog Cards */
.blog-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 350px;
    margin: 0 auto;
}

.blog-card-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 2.8em;
}

/* Show preview text with 3 lines */
.blog-card-preview {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-top: auto;
}

.blog-card-category {
    color: var(--primary-color);
    font-weight: 500;
}

.blog-card-date {
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .blog-card-title {
        font-size: 1rem;
        height: 2.6em;
    }

    .blog-card-preview {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
    }

    .blog-card-meta {
        font-size: 0.8rem;
    }
}

/* Blog grid layout */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); /* Match project card width */
    gap: 2rem;
    padding: 1rem 0;
    max-width: 1200px; /* Match max-width with projects section if needed */
    margin: 0 auto;
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1rem;
        padding: 0.5rem;
    }
    
    .blog-card {
        min-height: 350px;
    }
}

/* Message Box Styles */
.message-box {
    position: fixed;
    top: 100px; /* Move down from the top */
    right: 20px; /* Position to the right */
    left: auto; /* Remove left positioning to align right */
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 0.95rem;
    z-index: 100000; /* Increase z-index to ensure visibility */
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease forwards;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 400px; /* Reduce width */
    width: auto;
    margin: 0; /* Remove horizontal centering */
}

.message-box.success {
    background-color: #28a745;
    color: white;
    border-left: 4px solid #1e7e34;
}

.message-box.error {
    background-color: #dc3545;
    color: white;
    border-left: 4px solid #bd2130;
}

.message-box.info {
    background-color: #17a2b8;
    color: white;
    border-left: 4px solid #138496;
}

.message-box.warning {
    background-color: #ffc107;
    color: #000;
    border-left: 4px solid #d39e00;
}

.message-box i {
    font-size: 1.2rem;
}

.message-box .close-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    font-size: 1.1rem;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.message-box .close-btn:hover {
    opacity: 1;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}


#messageContainer .message-box {
    pointer-events: auto; /* Re-enable interaction for messages */
}


/* When virtual keyboard is likely open */
@media (max-height: 400px) {
    .message-box {
        top: 50px; /* Slightly higher when keyboard is open */
    }
    
    #messageContainer {
        top: 50px; /* Slightly higher when keyboard is open */
    }
}

/* Send Message Button Styles */
.contact-form button[type="submit"] {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff3333 50%, #cc0000 100%) !important;
    color: white !important;
    border: none !important;
    padding: 12px 25px !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    font-size: 1rem !important;
    box-shadow: 0 4px 15px rgba(255, 51, 51, 0.2) !important;
}

.contact-form button[type="submit"]:hover {
    background: linear-gradient(135deg, #ff8080 0%, #ff4444 50%, #ff1111 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(255, 51, 51, 0.3) !important;
}

.contact-form button[type="submit"]:disabled {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff3333 50%, #cc0000 100%) !important;
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Dark mode specific adjustments */
:root[data-theme="dark"] .contact-form button[type="submit"] {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff3333 50%, #cc0000 100%) !important;
    box-shadow: 0 4px 15px rgba(255, 51, 51, 0.3) !important;
}

:root[data-theme="dark"] .contact-form button[type="submit"]:hover {
    background: linear-gradient(135deg, #ff8080 0%, #ff4444 50%, #ff1111 100%) !important;
    box-shadow: 0 6px 20px rgba(255, 51, 51, 0.4) !important;
}

/* Animation styles for sending state */
.contact-form button[type="submit"] i {
    margin-right: 8px !important;
}

.contact-form button[type="submit"].sending {
    pointer-events: none !important;
    opacity: 0.8 !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .contact-form button[type="submit"] {
        padding: 10px 20px !important;
        font-size: 0.95rem !important;
    }
}

/* Add this CSS in the style section or your CSS file */

.combined-stats {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    width: 100%;
    padding: 1rem 0;  
}

.combined-stats .stat-box {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    min-width: 140px;
    width: 140px;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
}
.stat-box[href="#certifications"] {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.stat-box[href="#certifications"] h2 {
    margin-bottom: 0.3rem;  /* Reduced margin */
}

.stat-box[href="#certifications"] p {
    font-size: 0.9rem;  /* Slightly smaller font */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;  /* Space between icon and text */
    white-space: nowrap;  /* Prevent text wrapping */
}

.stat-box[href="#certifications"] i {
    font-size: 1rem;  /* Consistent icon size */
}

.combined-stats .stat-box h2 {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: baseline;
    font-size: 2.5rem;
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
    line-height: 1;
}

.combined-stats .stat-box h2 .unit {
    font-size: 0.5em;
    margin-left: 2px;
    opacity: 0.8;
    position: relative;
    bottom: -0.3em;
}

/* Specific styling for experience stat to ensure centering */
#total-experience {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    width: 100%;
}

.stat-box p {
    margin: 10px 0 0;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.languages-chart h3 {
    color: var(--text-color);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.stats-grid-section {
    flex: 0.8;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.member-buttons.pc-only {
    display: block;
    text-align: center;
    padding-top: .5rem;
}

.languages-header.mobile-only {
    display: none;
}

@media (max-width: 1024px) {
    .member-buttons.pc-only {
        display: none;
    }

    .languages-header.mobile-only {
        display: block;
        text-align: center;
        padding-top: 1rem;
        border-top: 1px solid #eee;
    }

    .stats-grid-section {
        width: 100%;
        max-width: 600px;
        margin-bottom: 2rem;
    }
}

:root[data-theme="light"] {
    --border-color: rgba(0, 0, 0, 0.1);
    --text-color: #333;
    --text-secondary: #666;
}

:root[data-theme="dark"] {
    --border-color: rgba(255, 255, 255, 0.1);
    --text-color: #fff;
    --text-secondary: #aaa;
}

/* Add these styles for the More About Me button */
.view-more-widgets {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    margin: 1rem auto;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.view-more-widgets:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.view-more-widgets i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    margin: 0 auto;
}

.view-more-widgets:hover i {
    transform: translateY(2px);
}

/* Add styles for experience description indentation */
.experience-item .company {
    margin-left: 1.5rem;
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: -0.5rem;
    position: relative;
}

.experience-item .company::before {
    content: "•";
    position: absolute;
    left: -1rem;
    color: var(--text-secondary);
    opacity: 0.6;
    font-size: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
}

.experience-item .period {
    margin-left: 2.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: -0.25rem;
    opacity: 0.9;
}

.experience-item .description {
    margin-left: 1.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.experience-item .view-details-btn {
    margin-left: 1.5rem;
    font-size: 0.9rem;
    color: #ff3333;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.experience-item .view-details-btn:hover {
    opacity: 1;
    color: #cc0000;
}

.experience-item .view-details-btn i {
    margin-right: 0.5rem;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

/* Style for widget expand buttons */
.widget-card .expand-button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.7rem;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.widget-card .expand-button:hover {
    opacity: 1;
    color: var(--text-color);
}

.widget-card .expand-button i {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.widget-card .expand-button.expanded i {
    transform: rotate(180deg);
}

.widget-card .hidden-fields {
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Style for experience duration */
.experience-item .duration {
    color: var(--text-secondary);
    font-size: 0.85rem;
    opacity: 0.8;
    font-weight: normal;
    margin-left: 0.25rem;
}

/* Professional Footer Styles */
footer {
    padding: 2rem 0;
    position: relative;
    overflow: hidden;
}

.copyright {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    padding: 0 1rem;
    transition: all 0.3s ease;
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 0;
}

.copyright a {
    color: inherit;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
}

.copyright a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}

.copyright a:hover::after {
    width: 100%;
}

.copyright:hover {
    color: var(--text-color);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    footer {
        padding: 1.5rem 0;
    }

    .copyright {
        font-size: 0.85rem;
        padding-bottom: 15px;
    }
}

/* Add these professional design enhancements */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.widget-card, .experience-item, .project-card {
    transition: all 0.3s ease;
    border-radius: 12px;
    position: relative;
    background: var(--bg-color);
}

.widget-card:hover, .experience-item:hover, .project-card:hover {
    animation: float 3s ease-in-out infinite;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.section {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #ff6b6b var(--scroll), transparent 0);
    z-index: 1000;
}

:root {
    --h1-size: clamp(2rem, 5vw, 3.5rem);
    --h2-size: clamp(1.5rem, 4vw, 2.5rem);
    --h3-size: clamp(1.2rem, 3vw, 2rem);
    --body-size: clamp(0.9rem, 2vw, 1.1rem);
}

h2 { font-size: var(--h2-size); }
h3 { font-size: var(--h3-size); }
p { font-size: var(--body-size); }

/* Restore original greeting size */
.greeting {
    font-size: 1.5rem;
    font-weight: normal;
    opacity: 0.8;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* Style for name */
.hero-name {
    font-size: 3.5rem;
    font-weight: bold;
    color: #ff3333;
    margin: 0;
    line-height: 1.2;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff3333 50%, #cc0000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* View More Button Styles */
.view-more-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    margin: 1rem auto;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.view-more-btn:hover {
    opacity: 1;
}

.view-more-btn i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

/* Bounce Animation */
.bounce {
    animation: bounce 2s infinite;
}

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

/* Experience Section Styles - Professional Spacing */
.experience-item {
    padding: 1rem;
    margin-bottom: 1rem;
}

.experience-item h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.15rem;
    margin-left: 1rem;
}

.experience-item .company {
    margin-left: 2.5rem;
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: -0.3rem;
}

.experience-item .period {
    margin-left: 3.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: -0.2rem;
    opacity: 0.9;
}

.experience-item .description {
    margin-left: 2.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
    margin-top: 0.3rem;
    margin-bottom: 0.3rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.experience-item .view-details-btn {
    margin-left: 2.5rem;
    font-size: 0.9rem;
    color: #ff3333;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem 0;
    transition: all 0.3s ease;
    opacity: 0.8;
}

/* For multiple roles within same company */
.experience-item .role-item h4 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

/* Experience Section Styles - Connected Cards */
.experience-item {
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;  /* For positioning the connector */
}

/* Experience Card Connectors */
/* First card bullet point with color cycling */
.experience-item:first-child::before {
    content: '•';
    position: absolute;
    left: 2.65rem;
    top: 1.2rem;
    font-size: 24px;
    line-height: 1;
    animation: colorCycle 9s infinite;  /* Increased duration for smoother transitions */
    transform-origin: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 24px;
}

@keyframes colorCycle {
    0%, 28% {
        color: #ff3333; /* Red */
        opacity: 1;
    }
    30%, 31% {
        opacity: 0.2; /* Fade out */
    }
    33%, 61% {
        color: #28a745; /* Green */
        opacity: 1;
    }
    63%, 64% {
        opacity: 0.2; /* Fade out */
    }
    66%, 94% {
        color: #ffc107; /* Yellow */
        opacity: 1;
    }
    96%, 97% {
        opacity: 0.2; /* Fade out */
    }
    98%, 100% {
        color: #ff3333; /* Back to red */
        opacity: 1;
    }
}

/* Up arrows for other cards */
.experience-item:not(:first-child)::before {
    content: '▲';
    position: absolute;
    left: 2.65rem;
    top: 1.5rem;
    font-size: 12px;
    animation: fadeUpArrow 2s infinite;
    transform-origin: center;
}

/* Color the arrows in sequence */
.experience-item:nth-child(2)::before {
    color: #ff3333; /* Red */
}

.experience-item:nth-child(3)::before {
    color: #ffc107; /* Yellow */
}

.experience-item:nth-child(4)::before {
    color: #28a745; /* Green */
}

.experience-item:nth-child(5)::before {
    color: #ff3333; /* Red */
}

.experience-item:nth-child(6)::before {
    color: #ffc107; /* Yellow */
}

.experience-item:nth-child(7)::before {
    color: #28a745; /* Green */
}

/* Continue the pattern for more items if needed */
.experience-item:nth-child(8)::before {
    color: #ff3333;
}

.experience-item:nth-child(9)::before {
    color: #ffc107;
}

.experience-item:nth-child(10)::before {
    color: #28a745;
}

/* Remove the last card special dot section */

/* Connector line between cards */
.experience-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 3rem;
    bottom: -1rem;
    width: 2px;
    height: 1rem;
    background: linear-gradient(180deg, var(--border-color) 50%, transparent);
    animation: connectLine 1s ease forwards;
    transform-origin: top;
}

/* Arrow animation */
@keyframes fadeUpArrow {
    0% {
        transform: translateY(0);
        opacity: 0.4;
    }
    50% {
        transform: translateY(-3px);
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }
}

/* Animations */
@keyframes connectLine {
    from {
        transform: scaleY(0);
    }
    to {
        transform: scaleY(1);
    }
}

@keyframes pulseDot {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);  /* Yellow glow */
    }
    50% {
        box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.3);  /* Green glow */
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);  /* Back to yellow */
    }
}

/* Adjust existing margins to accommodate the timeline */
.experience-item h3 {
    margin-left: 3rem;
}

.experience-item .company {
    margin-left: 4.5rem;
}

.experience-item .period {
    margin-left: 5.5rem;
}

.experience-item .description {
    margin-left: 4.5rem;
}

.experience-item .view-details-btn {
    margin-left: 4.5rem;
}

/* Nested Roles Styling */
.role-item {
    position: relative;
    margin-left: 5.5rem;  /* Align with the main timeline */
    padding-left: 1rem;   /* Reduced padding */
}

/* Adjust nested role content spacing */
.role-item h4 {
    margin-bottom: 0.15rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
}

.role-item .period {
    margin-left: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.9;
}

.role-item .description {
    margin-left: 1rem;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-secondary);
}

/* Skills Icon Animation */
.skill-item {
    cursor: pointer;  /* Add pointer cursor */
    transition: all 0.3s ease;
}

.skill-item .skill-icon i {
    transition: all 0.3s ease;
}

.skill-item:hover .skill-icon i {
    animation: skillIconAnimation 0.5s ease;
    transform-origin: center;
    filter: drop-shadow(0 0 3px #ff3333);
}

@keyframes skillIconAnimation {
    0% {
        transform: scale(1) rotate(0);
    }
    25% {
        transform: scale(1.2) rotate(-5deg);
    }
    50% {
        transform: scale(1.2) rotate(5deg);
    }
    75% {
        transform: scale(1.1) rotate(-3deg);
    }
    100% {
        transform: scale(1) rotate(0);
    }
}

/* Hover effect for skill name */
.skill-item:hover {
    color: #ff3333;
}

.skill-item .fab {
    transition: all 0.3s ease;
}

.skill-item:hover .fab {
    color: #ff3333 !important;
}

/* Base proficiency badge styles */
.skill-item {
    position: relative;
    min-height: 70px;
    display: flex;
    align-items: flex-start; /* Align content to top */
    margin-bottom: 10px;
}

.proficiency-badge {
    position: absolute;
    right: 10px;
    bottom: -10px; /* Changed from top to bottom positioning */
    width: 100px !important;
    height: 45px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    background: transparent !important;
    -webkit-mask-image: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/8399/grunge.png');
    -webkit-mask-size: 944px 604px;
    -webkit-mask-position: 13rem 6rem;
    mix-blend-mode: multiply;
    z-index: 1;
    text-transform: uppercase !important;
    overflow: visible;
    font-family: 'Arial Black', 'Helvetica Bold', sans-serif;
    opacity: 0;
    transition: all 0.5s ease;
    transform: none !important; /* Remove any rotation */
}

/* Stamp handle */
.proficiency-badge::before {
    content: '';
    position: absolute;
    top: -50px;  /* Adjusted position */
    right: 45%;  /* Center the handle */
    width: 8px;  /* Thinner handle */
    height: 50px;
    background: linear-gradient(to right, #444, #666, #444);  /* Better handle look */
    border-radius: 2px;
    opacity: 0;
    transition: all 0.5s ease;
    transform-origin: bottom;
    transform: rotate(-15deg);
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);  /* Handle shadow */
}

/* Ink spreading effect */
.proficiency-badge::after {
    content: '';
    position: absolute;
    inset: -2px;
    border: 2px double;
    border-radius: 3px;
    opacity: 0;
    transition: all 0.5s ease;
    transform: scale(1.1);
}

/* Hover animations */
.skill-item:hover .proficiency-badge {
    opacity: 1;
    animation: stampDown 0.5s ease-out forwards;
}

.skill-item:hover .proficiency-badge::before {
    opacity: 1;
    animation: handlePress 0.5s ease-out forwards;
}

.skill-item:hover .proficiency-badge::after {
    opacity: 1;
    animation: inkSpread 0.5s ease-out forwards;
}

/* Exit animations */
@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: translateY(-50%) rotate(var(--rotation, -15deg));
    }
    100% {
        opacity: 0;
        transform: translateY(-50%) rotate(var(--rotation, -15deg));  /* Keep same rotation */
    }
}

@keyframes handleLift {
    0% {
        transform: rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: rotate(-15deg);
        opacity: 0;
    }
}

@keyframes inkFade {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.05);  /* Reduced scale change */
        opacity: 0;
    }
}

/* Proficiency Level Colors */
.proficiency-badge.beginner::before,
.proficiency-badge.beginner::after {
    border-color: #dc3545 !important;
}
.proficiency-badge.beginner span {
    color: #dc3545 !important;
}

.proficiency-badge.basic::before,
.proficiency-badge.basic::after {
    border-color: #fd7e14 !important;
}
.proficiency-badge.basic span {
    color: #fd7e14 !important;
}

.proficiency-badge.intermediate::before,
.proficiency-badge.intermediate::after {
    border-color: #17a2b8 !important;
}
.proficiency-badge.intermediate span {
    color: #17a2b8 !important;
}

.proficiency-badge.advanced::before,
.proficiency-badge.advanced::after {
    border-color: #28a745 !important;
}
.proficiency-badge.advanced span {
    color: #28a745 !important;
}

.proficiency-badge.expert::before,
.proficiency-badge.expert::after {
    border-color: #007bff !important;
}
.proficiency-badge.expert span {
    color: #007bff !important;
}

/* Section heading stamp effect */
.section-heading h2 {
    -webkit-mask-image: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/8399/grunge.png');
    -webkit-mask-size: 944px 604px;
    -webkit-mask-position: 13rem 6rem;
    mix-blend-mode: multiply;
    font-family: Arial, sans-serif;
    font-weight: 600;
    position: relative;
    display: inline-block;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
    background-size: 100%;
    -webkit-background-clip: text;
    background-clip: text;
    transition: all 0.3s ease;
}

/* Keep the existing section heading animations */
.section-heading {
    position: relative;
    text-align: center;
    margin-bottom: 3rem;
    overflow: visible;
    padding: 0 1rem;
}

/* Preserve existing hover effects if any */
.section-heading h2:hover::before,
.section-heading h2:hover::after {
    opacity: 0.5;
}

.certification-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.certification-title h3 {
    font-size: 1.1rem;  /* Reduced from default size to match experience role */
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
}

.certification-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.certification-icon i {
    font-size: 1.2rem;
    color: var(--text-color);  /* Use the default text color */
}

/* Remove the color variations */
.certification-card:nth-child(3n) .certification-icon,
.certification-card:nth-child(3n+1) .certification-icon,
.certification-card:nth-child(3n+2) .certification-icon {
    background: none;
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.certification-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease;
    border: 1px solid var(--border-color);
}

/* Light mode specific styles */
:root[data-theme="light"] .certification-card {
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Dark mode specific styles */
:root[data-theme="dark"] .certification-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.certification-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.desktop-only {
    display: none;
}

.mobile-cert-link {
    display: none;
}

@media (min-width: 768px) {
    .desktop-only {
        display: block;
    }
    .mobile-cert-link {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .desktop-only {
        display: none !important;
    }
    .mobile-cert-link {
        display: inline-flex !important;
        align-items: center;
        gap: 0.5rem;
        margin-top: 1rem;
    }
    .certification-buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
}

/* Chatbot mobile positioning */
@media (max-width: 768px) {
    .index-chatbot-widget {
        bottom: 100px; /* Increase spacing to avoid overlap */
        right: 20px;   /* Add some right margin */
    }
}

/* Additional adjustment for very small screens */
@media (max-width: 480px) {
    .index-chatbot-widget {
        bottom: 120px; /* Even more space on smaller screens */
        right: 15px;   /* Slightly closer to edge on small screens */
    }
}

/* Skill item base styles */
.skill-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.skill-name {
    font-size: 1rem;
    color: var(--text-color);
}

.proficiency-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

/* Mobile view adjustments */
@media (max-width: 768px) {
    .skill-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
    }

    .skill-name {
        font-size: 0.95rem;  /* Keep original text size */
    }

    .proficiency-badge {
        transform: none !important;
        margin-left: auto;
        font-size: 0.7rem;
        padding: 3px 8px;
    }
}

/* Remove tap highlight and improve mobile interactions */
* {
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

/* Specific styles for interactive elements */
button,
a,
.nav-links a,
.hamburger,
.section-toggle,
.index-chatbot-widget,
.index-quick-reply,
.cert-link,
.mobile-cert-link,
.skill-tag,
.project-card,
.blog-card {
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

/* Fix sidebar toggle appearance */
.section-toggle {
    cursor: default;
    pointer-events: none;
    opacity: 0.7;
}

/* Only enable pointer events when section is loaded */
.section.loaded .section-toggle {
    cursor: pointer;
    pointer-events: auto;
    opacity: 1;
}

/* Mobile certification card styles */
@media (max-width: 768px) {
    .certification-card {
        padding: 1rem;
        margin-bottom: 1rem;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 8px;
    }

    .certification-title {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
    }

    .certification-icon {
        font-size: 1rem;
    }

    .certification-title h3 {
        font-size: 0.95rem;
        font-weight: 600;
        margin: 0;
        line-height: 1.4;
    }

    .certification-org {
        font-size: 0.85rem;
        color: var(--secondary-text);
        margin-bottom: 4px;
    }

    .certification-date {
        font-size: 0.8rem;
        color: var(--secondary-text);
        opacity: 0.8;
    }

    .cert-link, .mobile-cert-link {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 0.85rem;
        color: var(--primary-color);
        text-decoration: none;
        margin-top: 8px;
    }

    .cert-link i, .mobile-cert-link i {
        font-size: 0.8rem;
    }
}

/* Core scrolling optimizations */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-overflow-scrolling: touch;
    overflow-y: scroll;
}

/* Performance optimizations for smooth scrolling */
.navbar,
.section,
.certification-card,
.project-card,
.blog-card,
.experience-card {
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
    will-change: transform;
}

/* Prevent content jumping during scroll */
main {
    overflow-x: hidden;
    position: relative;
}

/* Ensure smooth scrolling even on Safari */
@supports (-webkit-overflow-scrolling: touch) {
    body {
        -webkit-overflow-scrolling: touch;
    }
}

/* Blog filter dropdown styles */
.filter-select {
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
}

/* Dropdown options styling */
.filter-select option {
    background-color: var(--card-bg);
    color: var(--text-color);
    padding: 8px;
}

/* Dark mode specific styles */
:root[data-theme="dark"] .filter-select {
    background-color: var(--card-bg);
    color: var(--text-color);
    border-color: var(--border-color);
}

:root[data-theme="dark"] .filter-select option {
    background-color: var(--card-bg);
    color: var(--text-color);
}

/* Hover states */
.filter-select:hover {
    border-color: var(--primary-color);
}

/* Focus states */
.filter-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.1);
}

/* Minimal Blog Cards */
.blog-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 350px;
    margin: 0 auto;
}

.blog-card-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 2.8em;
}

/* Show preview text with 3 lines */
.blog-card-preview {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-top: auto;
}

.blog-card-category {
    color: var(--primary-color);
    font-weight: 500;
}

.blog-card-date {
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .blog-card-title {
        font-size: 1rem;
        height: 2.6em;
    }

    .blog-card-preview {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
    }

    .blog-card-meta {
        font-size: 0.8rem;
    }
}

/* Blog grid layout */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); /* Match project card width */
    gap: 2rem;
    padding: 1rem 0;
    max-width: 1200px; /* Match max-width with projects section if needed */
    margin: 0 auto;
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1rem;
        padding: 0.5rem;
    }
    
    .blog-card {
        min-height: 350px;
    }
}

/* Message Box Styles */
.message-box {
    position: fixed;
    top: 100px; /* Move down from the top */
    right: 20px; /* Position to the right */
    left: auto; /* Remove left positioning to align right */
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 0.95rem;
    z-index: 100000; /* Increase z-index to ensure visibility */
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease forwards;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 400px; /* Reduce width */
    width: auto;
    margin: 0; /* Remove horizontal centering */
}

.message-box.success {
    background-color: #28a745;
    color: white;
    border-left: 4px solid #1e7e34;
}

.message-box.error {
    background-color: #dc3545;
    color: white;
    border-left: 4px solid #bd2130;
}

.message-box.info {
    background-color: #17a2b8;
    color: white;
    border-left: 4px solid #138496;
}

.message-box.warning {
    background-color: #ffc107;
    color: #000;
    border-left: 4px solid #d39e00;
}

.message-box i {
    font-size: 1.2rem;
}

.message-box .close-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    font-size: 1.1rem;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.message-box .close-btn:hover {
    opacity: 1;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}



#messageContainer .message-box {
    pointer-events: auto; /* Re-enable interaction for messages */
}


/* When virtual keyboard is likely open */
@media (max-height: 400px) {
    .message-box {
        top: 50px; /* Slightly higher when keyboard is open */
    }
    
    #messageContainer {
        top: 50px; /* Slightly higher when keyboard is open */
    }
}

/* Send Message Button Styles */
.contact-form button[type="submit"] {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff3333 50%, #cc0000 100%) !important;
    color: white !important;
    border: none !important;
    padding: 12px 25px !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    font-size: 1rem !important;
    box-shadow: 0 4px 15px rgba(255, 51, 51, 0.2) !important;
}

.contact-form button[type="submit"]:hover {
    background: linear-gradient(135deg, #ff8080 0%, #ff4444 50%, #ff1111 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(255, 51, 51, 0.3) !important;
}

.contact-form button[type="submit"]:disabled {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff3333 50%, #cc0000 100%) !important;
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Dark mode specific adjustments */
:root[data-theme="dark"] .contact-form button[type="submit"] {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff3333 50%, #cc0000 100%) !important;
    box-shadow: 0 4px 15px rgba(255, 51, 51, 0.3) !important;
}

:root[data-theme="dark"] .contact-form button[type="submit"]:hover {
    background: linear-gradient(135deg, #ff8080 0%, #ff4444 50%, #ff1111 100%) !important;
    box-shadow: 0 6px 20px rgba(255, 51, 51, 0.4) !important;
}

/* Animation styles for sending state */
.contact-form button[type="submit"] i {
    margin-right: 8px !important;
}

.contact-form button[type="submit"].sending {
    pointer-events: none !important;
    opacity: 0.8 !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .contact-form button[type="submit"] {
        padding: 10px 20px !important;
        font-size: 0.95rem !important;
    }
}


    .combined-stats .stat-box {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    min-width: 140px;
    width: 140px;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.combined-stats .stat-box h2 .unit {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-left: 2px;
    font-weight: normal;
    position: relative;
    bottom: -0.2em;
}

/* Specific styling for experience stat to ensure centering */
#total-experience {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    width: 100%;
}

.stat-box p {
    margin: 10px 0 0;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.languages-chart h3 {
    color: var(--text-color);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.stats-grid-section {
    flex: 0.8;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.member-buttons.pc-only {
    display: block;
    text-align: center;
    padding-top: .5rem;
}

.languages-header.mobile-only {
    display: none;
}

@media (max-width: 1024px) {
    .member-buttons.pc-only {
        display: none;
    }

    .languages-header.mobile-only {
        display: block;
        text-align: center;
        padding-top: 1rem;
        border-top: 1px solid #eee;
    }

    .stats-grid-section {
        width: 100%;
        max-width: 600px;
        margin-bottom: 2rem;
    }
}

:root[data-theme="light"] {
    --border-color: rgba(0, 0, 0, 0.1);
    --text-color: #333;
    --text-secondary: #666;
}

:root[data-theme="dark"] {
    --border-color: rgba(255, 255, 255, 0.1);
    --text-color: #fff;
    --text-secondary: #aaa;
}

/* Add these styles for the More About Me button */
.view-more-widgets {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    margin: 1rem auto;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.view-more-widgets:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.view-more-widgets i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    margin: 0 auto;
}

.view-more-widgets:hover i {
    transform: translateY(2px);
}

/* Add styles for experience description indentation */
.experience-item .company {
    margin-left: 1.5rem;
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: -0.5rem;
    position: relative;
}

.experience-item .company::before {
    content: "•";
    position: absolute;
    left: -1rem;
    color: var(--text-secondary);
    opacity: 0.6;
    font-size: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
}

.experience-item .period {
    margin-left: 2.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: -0.25rem;
    opacity: 0.9;
}

.experience-item .description {
    margin-left: 1.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.experience-item .view-details-btn {
    margin-left: 1.5rem;
    font-size: 0.9rem;
    color: #ff3333;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.experience-item .view-details-btn:hover {
    opacity: 1;
    color: #cc0000;
}

.experience-item .view-details-btn i {
    margin-right: 0.5rem;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

/* Style for widget expand buttons */
.widget-card .expand-button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.7rem;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.widget-card .expand-button:hover {
    opacity: 1;
    color: var(--text-color);
}

.widget-card .expand-button i {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.widget-card .expand-button.expanded i {
    transform: rotate(180deg);
}

.widget-card .hidden-fields {
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Style for experience duration */
.experience-item .duration {
    color: var(--text-secondary);
    font-size: 0.85rem;
    opacity: 0.8;
    font-weight: normal;
    margin-left: 0.25rem;
}

/* Professional Footer Styles */
footer {
    padding: 2rem 0;
    position: relative;
    overflow: hidden;
}

.copyright {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    padding: 0 1rem;
    transition: all 0.3s ease;
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 0;
}

.copyright a {
    color: inherit;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
}

.copyright a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}

.copyright a:hover::after {
    width: 100%;
}

.copyright:hover {
    color: var(--text-color);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    footer {
        padding: 1.5rem 0;
    }

    .copyright {
        font-size: 0.85rem;
        padding-bottom: 15px;
    }
}

/* Add these professional design enhancements */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.widget-card, .experience-item, .project-card {
    transition: all 0.3s ease;
    border-radius: 12px;
    position: relative;
    background: var(--bg-color);
}

.widget-card:hover, .experience-item:hover, .project-card:hover {
    animation: float 3s ease-in-out infinite;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.section {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #ff6b6b var(--scroll), transparent 0);
    z-index: 1000;
}

:root {
    --h1-size: clamp(2rem, 5vw, 3.5rem);
    --h2-size: clamp(1.5rem, 4vw, 2.5rem);
    --h3-size: clamp(1.2rem, 3vw, 2rem);
    --body-size: clamp(0.9rem, 2vw, 1.1rem);
}

h2 { font-size: var(--h2-size); }
h3 { font-size: var(--h3-size); }
p { font-size: var(--body-size); }

/* Restore original greeting size */
.greeting {
    font-size: 1.5rem;
    font-weight: normal;
    opacity: 0.8;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* Style for name */
.hero-name {
    font-size: 3.5rem;
    font-weight: bold;
    color: #ff3333;
    margin: 0;
    line-height: 1.2;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff3333 50%, #cc0000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* View More Button Styles */
.view-more-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    margin: 1rem auto;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.view-more-btn:hover {
    opacity: 1;
}

.view-more-btn i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

/* Bounce Animation */
.bounce {
    animation: bounce 2s infinite;
}

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

/* Experience Section Styles - Professional Spacing */
.experience-item {
    padding: 1rem;
    margin-bottom: 1rem;
}

.experience-item h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.15rem;
    margin-left: 1rem;
}

.experience-item .company {
    margin-left: 2.5rem;
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: -0.3rem;
}

.experience-item .period {
    margin-left: 3.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: -0.2rem;
    opacity: 0.9;
}

.experience-item .description {
    margin-left: 2.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
    margin-top: 0.3rem;
    margin-bottom: 0.3rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.experience-item .view-details-btn {
    margin-left: 2.5rem;
    font-size: 0.9rem;
    color: #ff3333;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem 0;
    transition: all 0.3s ease;
    opacity: 0.8;
}

/* For multiple roles within same company */
.experience-item .role-item h4 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

/* Experience Section Styles - Connected Cards */
.experience-item {
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;  /* For positioning the connector */
}

/* Experience Card Connectors */
/* First card bullet point with color cycling */
.experience-item:first-child::before {
    content: '•';
    position: absolute;
    left: 2.65rem;
    top: 1.2rem;
    font-size: 24px;
    line-height: 1;
    animation: colorCycle 9s infinite;  /* Increased duration for smoother transitions */
    transform-origin: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 24px;
}

@keyframes colorCycle {
    0%, 28% {
        color: #ff3333; /* Red */
        opacity: 1;
    }
    30%, 31% {
        opacity: 0.2; /* Fade out */
    }
    33%, 61% {
        color: #28a745; /* Green */
        opacity: 1;
    }
    63%, 64% {
        opacity: 0.2; /* Fade out */
    }
    66%, 94% {
        color: #ffc107; /* Yellow */
        opacity: 1;
    }
    96%, 97% {
        opacity: 0.2; /* Fade out */
    }
    98%, 100% {
        color: #ff3333; /* Back to red */
        opacity: 1;
    }
}

/* Up arrows for other cards */
.experience-item:not(:first-child)::before {
    content: '▲';
    position: absolute;
    left: 2.65rem;
    top: 1.5rem;
    font-size: 12px;
    animation: fadeUpArrow 2s infinite;
    transform-origin: center;
}

/* Color the arrows in sequence */
.experience-item:nth-child(2)::before {
    color: #ff3333; /* Red */
}

.experience-item:nth-child(3)::before {
    color: #ffc107; /* Yellow */
}

.experience-item:nth-child(4)::before {
    color: #28a745; /* Green */
}

.experience-item:nth-child(5)::before {
    color: #ff3333; /* Red */
}

.experience-item:nth-child(6)::before {
    color: #ffc107; /* Yellow */
}

.experience-item:nth-child(7)::before {
    color: #28a745; /* Green */
}

/* Continue the pattern for more items if needed */
.experience-item:nth-child(8)::before {
    color: #ff3333;
}

.experience-item:nth-child(9)::before {
    color: #ffc107;
}

.experience-item:nth-child(10)::before {
    color: #28a745;
}

/* Remove the last card special dot section */

/* Connector line between cards */
.experience-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 3rem;
    bottom: -1rem;
    width: 2px;
    height: 1rem;
    background: linear-gradient(180deg, var(--border-color) 50%, transparent);
    animation: connectLine 1s ease forwards;
    transform-origin: top;
}

/* Arrow animation */
@keyframes fadeUpArrow {
    0% {
        transform: translateY(0);
        opacity: 0.4;
    }
    50% {
        transform: translateY(-3px);
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }
}

/* Animations */
@keyframes connectLine {
    from {
        transform: scaleY(0);
    }
    to {
        transform: scaleY(1);
    }
}

@keyframes pulseDot {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);  /* Yellow glow */
    }
    50% {
        box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.3);  /* Green glow */
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);  /* Back to yellow */
    }
}

/* Adjust existing margins to accommodate the timeline */
.experience-item h3 {
    margin-left: 3rem;
}

.experience-item .company {
    margin-left: 4.5rem;
}

.experience-item .period {
    margin-left: 5.5rem;
}

.experience-item .description {
    margin-left: 4.5rem;
}

.experience-item .view-details-btn {
    margin-left: 4.5rem;
}

/* Nested Roles Styling */
.role-item {
    position: relative;
    margin-left: 5.5rem;  /* Align with the main timeline */
    padding-left: 1rem;   /* Reduced padding */
}

/* Adjust nested role content spacing */
.role-item h4 {
    margin-bottom: 0.15rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
}

.role-item .period {
    margin-left: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.9;
}

.role-item .description {
    margin-left: 1rem;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-secondary);
}

/* Skills Icon Animation */
.skill-item {
    cursor: pointer;  /* Add pointer cursor */
    transition: all 0.3s ease;
}

.skill-item .skill-icon i {
    transition: all 0.3s ease;
}

.skill-item:hover .skill-icon i {
    animation: skillIconAnimation 0.5s ease;
    transform-origin: center;
    filter: drop-shadow(0 0 3px #ff3333);
}

@keyframes skillIconAnimation {
    0% {
        transform: scale(1) rotate(0);
    }
    25% {
        transform: scale(1.2) rotate(-5deg);
    }
    50% {
        transform: scale(1.2) rotate(5deg);
    }
    75% {
        transform: scale(1.1) rotate(-3deg);
    }
    100% {
        transform: scale(1) rotate(0);
    }
}

/* Hover effect for skill name */
.skill-item:hover {
    color: #ff3333;
}

.skill-item .fab {
    transition: all 0.3s ease;
}

.skill-item:hover .fab {
    color: #ff3333 !important;
}

/* Base proficiency badge styles */
.skill-item {
    position: relative;
    min-height: 70px;
    display: flex;
    align-items: flex-start; /* Align content to top */
    margin-bottom: 10px;
}

.proficiency-badge {
    position: absolute;
    right: 10px;
    bottom: -10px; /* Changed from top to bottom positioning */
    width: 100px !important;
    height: 45px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    background: transparent !important;
    -webkit-mask-image: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/8399/grunge.png');
    -webkit-mask-size: 944px 604px;
    -webkit-mask-position: 13rem 6rem;
    mix-blend-mode: multiply;
    z-index: 1;
    text-transform: uppercase !important;
    overflow: visible;
    font-family: 'Arial Black', 'Helvetica Bold', sans-serif;
    opacity: 0;
    transition: all 0.5s ease;
    transform: none !important; /* Remove any rotation */
}

/* Stamp handle */
.proficiency-badge::before {
    content: '';
    position: absolute;
    top: -50px;  /* Adjusted position */
    right: 45%;  /* Center the handle */
    width: 8px;  /* Thinner handle */
    height: 50px;
    background: linear-gradient(to right, #444, #666, #444);  /* Better handle look */
    border-radius: 2px;
    opacity: 0;
    transition: all 0.5s ease;
    transform-origin: bottom;
    transform: rotate(-15deg);
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);  /* Handle shadow */
}

/* Ink spreading effect */
.proficiency-badge::after {
    content: '';
    position: absolute;
    inset: -2px;
    border: 2px double;
    border-radius: 3px;
    opacity: 0;
    transition: all 0.5s ease;
    transform: scale(1.1);
}

/* Hover animations */
.skill-item:hover .proficiency-badge {
    opacity: 1;
    animation: stampDown 0.5s ease-out forwards;
}

.skill-item:hover .proficiency-badge::before {
    opacity: 1;
    animation: handlePress 0.5s ease-out forwards;
}

.skill-item:hover .proficiency-badge::after {
    opacity: 1;
    animation: inkSpread 0.5s ease-out forwards;
}

/* Exit animations */
@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: translateY(-50%) rotate(var(--rotation, -15deg));
    }
    100% {
        opacity: 0;
        transform: translateY(-50%) rotate(var(--rotation, -15deg));  /* Keep same rotation */
    }
}

@keyframes handleLift {
    0% {
        transform: rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: rotate(-15deg);
        opacity: 0;
    }
}

@keyframes inkFade {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.05);  /* Reduced scale change */
        opacity: 0;
    }
}

/* Proficiency Level Colors */
.proficiency-badge.beginner::before,
.proficiency-badge.beginner::after {
    border-color: #dc3545 !important;
}
.proficiency-badge.beginner span {
    color: #dc3545 !important;
}

.proficiency-badge.basic::before,
.proficiency-badge.basic::after {
    border-color: #fd7e14 !important;
}
.proficiency-badge.basic span {
    color: #fd7e14 !important;
}

.proficiency-badge.intermediate::before,
.proficiency-badge.intermediate::after {
    border-color: #17a2b8 !important;
}
.proficiency-badge.intermediate span {
    color: #17a2b8 !important;
}

.proficiency-badge.advanced::before,
.proficiency-badge.advanced::after {
    border-color: #28a745 !important;
}
.proficiency-badge.advanced span {
    color: #28a745 !important;
}

.proficiency-badge.expert::before,
.proficiency-badge.expert::after {
    border-color: #007bff !important;
}
.proficiency-badge.expert span {
    color: #007bff !important;
}

/* Section heading stamp effect */
.section-heading h2 {
    -webkit-mask-image: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/8399/grunge.png');
    -webkit-mask-size: 944px 604px;
    -webkit-mask-position: 13rem 6rem;
    mix-blend-mode: multiply;
    font-family: Arial, sans-serif;
    font-weight: 600;
    position: relative;
    display: inline-block;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
    background-size: 100%;
    -webkit-background-clip: text;
    background-clip: text;
    transition: all 0.3s ease;
}

/* Keep the existing section heading animations */
.section-heading {
    position: relative;
    text-align: center;
    margin-bottom: 3rem;
    overflow: visible;
    padding: 0 1rem;
}

/* Preserve existing hover effects if any */
.section-heading h2:hover::before,
.section-heading h2:hover::after {
    opacity: 0.5;
}

.certification-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.certification-title h3 {
    font-size: 1.1rem;  /* Reduced from default size to match experience role */
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
}

.certification-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.certification-icon i {
    font-size: 1.2rem;
    color: var(--text-color);  /* Use the default text color */
}

/* Remove the color variations */
.certification-card:nth-child(3n) .certification-icon,
.certification-card:nth-child(3n+1) .certification-icon,
.certification-card:nth-child(3n+2) .certification-icon {
    background: none;
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.certification-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease;
    border: 1px solid var(--border-color);
}

/* Light mode specific styles */
:root[data-theme="light"] .certification-card {
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Dark mode specific styles */
:root[data-theme="dark"] .certification-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.certification-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.desktop-only {
    display: none;
}

.mobile-cert-link {
    display: none;
}

@media (min-width: 768px) {
    .desktop-only {
        display: block;
    }
    .mobile-cert-link {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .desktop-only {
        display: none !important;
    }
    .mobile-cert-link {
        display: inline-flex !important;
        align-items: center;
        gap: 0.5rem;
        margin-top: 1rem;
    }
    .certification-buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
}

/* Chatbot mobile positioning */
@media (max-width: 768px) {
    .index-chatbot-widget {
        bottom: 100px; /* Increase spacing to avoid overlap */
        right: 20px;   /* Add some right margin */
    }
}

/* Additional adjustment for very small screens */
@media (max-width: 480px) {
    .index-chatbot-widget {
        bottom: 120px; /* Even more space on smaller screens */
        right: 15px;   /* Slightly closer to edge on small screens */
    }
}

/* Skill item base styles */
.skill-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.skill-name {
    font-size: 1rem;
    color: var(--text-color);
}

.proficiency-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

/* Mobile view adjustments */
@media (max-width: 768px) {
    .skill-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
    }

    .skill-name {
        font-size: 0.95rem;  /* Keep original text size */
    }

    .proficiency-badge {
        transform: none !important;
        margin-left: auto;
        font-size: 0.7rem;
        padding: 3px 8px;
    }
}

/* Remove tap highlight and improve mobile interactions */
* {
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

/* Specific styles for interactive elements */
button,
a,
.nav-links a,
.hamburger,
.section-toggle,
.index-chatbot-widget,
.index-quick-reply,
.cert-link,
.mobile-cert-link,
.skill-tag,
.project-card,
.blog-card {
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

/* Fix sidebar toggle appearance */
.section-toggle {
    cursor: default;
    pointer-events: none;
    opacity: 0.7;
}

/* Only enable pointer events when section is loaded */
.section.loaded .section-toggle {
    cursor: pointer;
    pointer-events: auto;
    opacity: 1;
}

/* Mobile certification card styles */
@media (max-width: 768px) {
    .certification-card {
        padding: 1rem;
        margin-bottom: 1rem;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 8px;
    }

    .certification-title {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
    }

    .certification-icon {
        font-size: 1rem;
    }

    .certification-title h3 {
        font-size: 0.95rem;
        font-weight: 600;
        margin: 0;
        line-height: 1.4;
    }

    .certification-org {
        font-size: 0.85rem;
        color: var(--secondary-text);
        margin-bottom: 4px;
    }

    .certification-date {
        font-size: 0.8rem;
        color: var(--secondary-text);
        opacity: 0.8;
    }

    .cert-link, .mobile-cert-link {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 0.85rem;
        color: var(--primary-color);
        text-decoration: none;
        margin-top: 8px;
    }

    .cert-link i, .mobile-cert-link i {
        font-size: 0.8rem;
    }
}

/* Core scrolling optimizations */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-overflow-scrolling: touch;
    overflow-y: scroll;
}

/* Performance optimizations for smooth scrolling */
.navbar,
.section,
.certification-card,
.project-card,
.blog-card,
.experience-card {
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
    will-change: transform;
}

/* Prevent content jumping during scroll */
main {
    overflow-x: hidden;
    position: relative;
}

/* Ensure smooth scrolling even on Safari */
@supports (-webkit-overflow-scrolling: touch) {
    body {
        -webkit-overflow-scrolling: touch;
    }
}

/* Blog filter dropdown styles */
.filter-select {
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
}

/* Dropdown options styling */
.filter-select option {
    background-color: var(--card-bg);
    color: var(--text-color);
    padding: 8px;
}

/* Dark mode specific styles */
:root[data-theme="dark"] .filter-select {
    background-color: var(--card-bg);
    color: var(--text-color);
    border-color: var(--border-color);
}

:root[data-theme="dark"] .filter-select option {
    background-color: var(--card-bg);
    color: var(--text-color);
}

/* Hover states */
.filter-select:hover {
    border-color: var(--primary-color);
}

/* Focus states */
.filter-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.1);
}

/* Minimal Blog Cards */
.blog-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 350px;
    margin: 0 auto;
}

.blog-card-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 2.8em;
}

/* Show preview text with 3 lines */
.blog-card-preview {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-top: auto;
}

.blog-card-category {
    color: var(--primary-color);
    font-weight: 500;
}

.blog-card-date {
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .blog-card-title {
        font-size: 1rem;
        height: 2.6em;
    }

    .blog-card-preview {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
    }

    .blog-card-meta {
        font-size: 0.8rem;
    }
}

/* Blog grid layout */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); /* Match project card width */
    gap: 2rem;
    padding: 1rem 0;
    max-width: 1200px; /* Match max-width with projects section if needed */
    margin: 0 auto;
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1rem;
        padding: 0.5rem;
    }
    
    .blog-card {
        min-height: 350px;
    }
}

/* Message Box Styles */
.message-box {
    position: fixed;
    top: 100px; /* Move down from the top */
    right: 20px; /* Position to the right */
    left: auto; /* Remove left positioning to align right */
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 0.95rem;
    z-index: 100000; /* Increase z-index to ensure visibility */
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease forwards;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 400px; /* Reduce width */
    width: auto;
    margin: 0; /* Remove horizontal centering */
}

.message-box.success {
    background-color: #28a745;
    color: white;
    border-left: 4px solid #1e7e34;
}

.message-box.error {
    background-color: #dc3545;
    color: white;
    border-left: 4px solid #bd2130;
}

.message-box.info {
    background-color: #17a2b8;
    color: white;
    border-left: 4px solid #138496;
}

.message-box.warning {
    background-color: #ffc107;
    color: #000;
    border-left: 4px solid #d39e00;
}

.message-box i {
    font-size: 1.2rem;
}

.message-box .close-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    font-size: 1.1rem;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.message-box .close-btn:hover {
    opacity: 1;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}



#messageContainer .message-box {
    pointer-events: auto; /* Re-enable interaction for messages */
}

/* When virtual keyboard is likely open */
@media (max-height: 400px) {
    .message-box {
        top: 50px; /* Slightly higher when keyboard is open */
    }
    
    #messageContainer {
        top: 50px; /* Slightly higher when keyboard is open */
    }
}

/* Send Message Button Styles */
.contact-form button[type="submit"] {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff3333 50%, #cc0000 100%) !important;
    color: white !important;
    border: none !important;
    padding: 12px 25px !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    font-size: 1rem !important;
    box-shadow: 0 4px 15px rgba(255, 51, 51, 0.2) !important;
}

.contact-form button[type="submit"]:hover {
    background: linear-gradient(135deg, #ff8080 0%, #ff4444 50%, #ff1111 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(255, 51, 51, 0.3) !important;
}

.contact-form button[type="submit"]:disabled {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff3333 50%, #cc0000 100%) !important;
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Dark mode specific adjustments */
:root[data-theme="dark"] .contact-form button[type="submit"] {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff3333 50%, #cc0000 100%) !important;
    box-shadow: 0 4px 15px rgba(255, 51, 51, 0.3) !important;
}

:root[data-theme="dark"] .contact-form button[type="submit"]:hover {
    background: linear-gradient(135deg, #ff8080 0%, #ff4444 50%, #ff1111 100%) !important;
    box-shadow: 0 6px 20px rgba(255, 51, 51, 0.4) !important;
}

/* Animation styles for sending state */
.contact-form button[type="submit"] i {
    margin-right: 8px !important;
}

.contact-form button[type="submit"].sending {
    pointer-events: none !important;
    opacity: 0.8 !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .contact-form button[type="submit"] {
        padding: 10px 20px !important;
        font-size: 0.95rem !important;
    }
}


.combined-stats .stat-box {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    min-width: 140px;
    width: 140px;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
}


.combined-stats .stat-box h2 .unit {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-left: 2px;
    font-weight: normal;
    position: relative;
    bottom: -0.2em;
}

/* Specific styling for experience stat to ensure centering */
#total-experience {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    width: 100%;
}

.stat-box p {
    margin: 10px 0 0;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.languages-chart h3 {
    color: var(--text-color);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.stats-grid-section {
    flex: 0.8;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.member-buttons.pc-only {
    display: block;
    text-align: center;
    padding-top: .5rem;
}

.languages-header.mobile-only {
    display: none;
}

@media (max-width: 1024px) {
    .member-buttons.pc-only {
        display: none;
    }

    .languages-header.mobile-only {
        display: block;
        text-align: center;
        padding-top: 1rem;
        border-top: 1px solid #eee;
    }

    .stats-grid-section {
        width: 100%;
        max-width: 600px;
        margin-bottom: 2rem;
    }
}

:root[data-theme="light"] {
    --border-color: rgba(0, 0, 0, 0.1);
    --text-color: #333;
    --text-secondary: #666;
}

:root[data-theme="dark"] {
    --border-color: rgba(255, 255, 255, 0.1);
    --text-color: #fff;
    --text-secondary: #aaa;
}

/* Add these styles for the More About Me button */
.view-more-widgets {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    margin: 1rem auto;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.view-more-widgets:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.view-more-widgets i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    margin: 0 auto;
}

.view-more-widgets:hover i {
    transform: translateY(2px);
}

/* Add styles for experience description indentation */
.experience-item .company {
    margin-left: 1.5rem;
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: -0.5rem;
    position: relative;
}

.experience-item .company::before {
    content: "•";
    position: absolute;
    left: -1rem;
    color: var(--text-secondary);
    opacity: 0.6;
    font-size: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
}

.experience-item .period {
    margin-left: 2.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: -0.25rem;
    opacity: 0.9;
}

.experience-item .description {
    margin-left: 1.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.experience-item .view-details-btn {
    margin-left: 1.5rem;
    font-size: 0.9rem;
    color: #ff3333;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.experience-item .view-details-btn:hover {
    opacity: 1;
    color: #cc0000;
}

.experience-item .view-details-btn i {
    margin-right: 0.5rem;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

/* Style for widget expand buttons */
.widget-card .expand-button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.7rem;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.widget-card .expand-button:hover {
    opacity: 1;
    color: var(--text-color);
}

.widget-card .expand-button i {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.widget-card .expand-button.expanded i {
    transform: rotate(180deg);
}

.widget-card .hidden-fields {
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Style for experience duration */
.experience-item .duration {
    color: var(--text-secondary);
    font-size: 0.85rem;
    opacity: 0.8;
    font-weight: normal;
    margin-left: 0.25rem;
}

/* Professional Footer Styles */
footer {
    padding: 2rem 0;
    position: relative;
    overflow: hidden;
}

.copyright {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    padding: 0 1rem;
    transition: all 0.3s ease;
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 0;
}

.copyright a {
    color: inherit;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
}

.copyright a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}

.copyright a:hover::after {
    width: 100%;
}

.copyright:hover {
    color: var(--text-color);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    footer {
        padding: 1.5rem 0;
    }

    .copyright {
        font-size: 0.85rem;
        padding-bottom: 15px;
    }
}

/* Add these professional design enhancements */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.widget-card, .experience-item, .project-card {
    transition: all 0.3s ease;
    border-radius: 12px;
    position: relative;
    background: var(--bg-color);
}

.widget-card:hover, .experience-item:hover, .project-card:hover {
    animation: float 3s ease-in-out infinite;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.section {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #ff6b6b var(--scroll), transparent 0);
    z-index: 1000;
}

:root {
    --h1-size: clamp(2rem, 5vw, 3.5rem);
    --h2-size: clamp(1.5rem, 4vw, 2.5rem);
    --h3-size: clamp(1.2rem, 3vw, 2rem);
    --body-size: clamp(0.9rem, 2vw, 1.1rem);
}

h2 { font-size: var(--h2-size); }
h3 { font-size: var(--h3-size); }
p { font-size: var(--body-size); }

/* Restore original greeting size */
.greeting {
    font-size: 1.5rem;
    font-weight: normal;
    opacity: 0.8;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* Style for name */
.hero-name {
    font-size: 3.5rem;
    font-weight: bold;
    color: #ff3333;
    margin: 0;
    line-height: 1.2;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff3333 50%, #cc0000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* View More Button Styles */
.view-more-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    margin: 1rem auto;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.view-more-btn:hover {
    opacity: 1;
}

.view-more-btn i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

/* Bounce Animation */
.bounce {
    animation: bounce 2s infinite;
}

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

/* Experience Section Styles - Professional Spacing */
.experience-item {
    padding: 1rem;
    margin-bottom: 1rem;
}

.experience-item h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.15rem;
    margin-left: 1rem;
}

.experience-item .company {
    margin-left: 2.5rem;
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: -0.3rem;
}

.experience-item .period {
    margin-left: 3.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: -0.2rem;
    opacity: 0.9;
}

.experience-item .description {
    margin-left: 2.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
    margin-top: 0.3rem;
    margin-bottom: 0.3rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.experience-item .view-details-btn {
    margin-left: 2.5rem;
    font-size: 0.9rem;
    color: #ff3333;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem 0;
    transition: all 0.3s ease;
    opacity: 0.8;
}

/* For multiple roles within same company */
.experience-item .role-item h4 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

/* Experience Section Styles - Connected Cards */
.experience-item {
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;  /* For positioning the connector */
}

/* Experience Card Connectors */
/* First card bullet point with color cycling */
.experience-item:first-child::before {
    content: '•';
    position: absolute;
    left: 2.65rem;
    top: 1.2rem;
    font-size: 24px;
    line-height: 1;
    animation: colorCycle 9s infinite;  /* Increased duration for smoother transitions */
    transform-origin: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 24px;
}

@keyframes colorCycle {
    0%, 28% {
        color: #ff3333; /* Red */
        opacity: 1;
    }
    30%, 31% {
        opacity: 0.2; /* Fade out */
    }
    33%, 61% {
        color: #28a745; /* Green */
        opacity: 1;
    }
    63%, 64% {
        opacity: 0.2; /* Fade out */
    }
    66%, 94% {
        color: #ffc107; /* Yellow */
        opacity: 1;
    }
    96%, 97% {
        opacity: 0.2; /* Fade out */
    }
    98%, 100% {
        color: #ff3333; /* Back to red */
        opacity: 1;
    }
}

/* Up arrows for other cards */
.experience-item:not(:first-child)::before {
    content: '▲';
    position: absolute;
    left: 2.65rem;
    top: 1.5rem;
    font-size: 12px;
    animation: fadeUpArrow 2s infinite;
    transform-origin: center;
}

/* Color the arrows in sequence */
.experience-item:nth-child(2)::before {
    color: #ff3333; /* Red */
}

.experience-item:nth-child(3)::before {
    color: #ffc107; /* Yellow */
}

.experience-item:nth-child(4)::before {
    color: #28a745; /* Green */
}

.experience-item:nth-child(5)::before {
    color: #ff3333; /* Red */
}

.experience-item:nth-child(6)::before {
    color: #ffc107; /* Yellow */
}

.experience-item:nth-child(7)::before {
    color: #28a745; /* Green */
}

/* Continue the pattern for more items if needed */
.experience-item:nth-child(8)::before {
    color: #ff3333;
}

.experience-item:nth-child(9)::before {
    color: #ffc107;
}

.experience-item:nth-child(10)::before {
    color: #28a745;
}

/* Remove the last card special dot section */

/* Connector line between cards */
.experience-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 3rem;
    bottom: -1rem;
    width: 2px;
    height: 1rem;
    background: linear-gradient(180deg, var(--border-color) 50%, transparent);
    animation: connectLine 1s ease forwards;
    transform-origin: top;
}

/* Arrow animation */
@keyframes fadeUpArrow {
    0% {
        transform: translateY(0);
        opacity: 0.4;
    }
    50% {
        transform: translateY(-3px);
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }
}

/* Animations */
@keyframes connectLine {
    from {
        transform: scaleY(0);
    }
    to {
        transform: scaleY(1);
    }
}

@keyframes pulseDot {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);  /* Yellow glow */
    }
    50% {
        box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.3);  /* Green glow */
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);  /* Back to yellow */
    }
}

/* Adjust existing margins to accommodate the timeline */
.experience-item h3 {
    margin-left: 3rem;
}

.experience-item .company {
    margin-left: 4.5rem;
}

.experience-item .period {
    margin-left: 5.5rem;
}

.experience-item .description {
    margin-left: 4.5rem;
}

.experience-item .view-details-btn {
    margin-left: 4.5rem;
}

/* Nested Roles Styling */
.role-item {
    position: relative;
    margin-left: 5.5rem;  /* Align with the main timeline */
    padding-left: 1rem;   /* Reduced padding */
}

/* Adjust nested role content spacing */
.role-item h4 {
    margin-bottom: 0.15rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
}

.role-item .period {
    margin-left: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.9;
}

.role-item .description {
    margin-left: 1rem;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-secondary);
}

/* Skills Icon Animation */
.skill-item {
    cursor: pointer;  /* Add pointer cursor */
    transition: all 0.3s ease;
}

.skill-item .skill-icon i {
    transition: all 0.3s ease;
}

.skill-item:hover .skill-icon i {
    animation: skillIconAnimation 0.5s ease;
    transform-origin: center;
    filter: drop-shadow(0 0 3px #ff3333);
}

@keyframes skillIconAnimation {
    0% {
        transform: scale(1) rotate(0);
    }
    25% {
        transform: scale(1.2) rotate(-5deg);
    }
    50% {
        transform: scale(1.2) rotate(5deg);
    }
    75% {
        transform: scale(1.1) rotate(-3deg);
    }
    100% {
        transform: scale(1) rotate(0);
    }
}

/* Hover effect for skill name */
.skill-item:hover {
    color: #ff3333;
}

.skill-item .fab {
    transition: all 0.3s ease;
}

.skill-item:hover .fab {
    color: #ff3333 !important;
}

/* Base proficiency badge styles */
.skill-item {
    position: relative;
    min-height: 70px;
    display: flex;
    align-items: flex-start; /* Align content to top */
    margin-bottom: 10px;
}

.proficiency-badge {
    position: absolute;
    right: 10px;
    bottom: -10px; /* Changed from top to bottom positioning */
    width: 100px !important;
    height: 45px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    background: transparent !important;
    -webkit-mask-image: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/8399/grunge.png');
    -webkit-mask-size: 944px 604px;
    -webkit-mask-position: 13rem 6rem;
    mix-blend-mode: multiply;
    z-index: 1;
    text-transform: uppercase !important;
    overflow: visible;
    font-family: 'Arial Black', 'Helvetica Bold', sans-serif;
    opacity: 0;
    transition: all 0.5s ease;
    transform: none !important; /* Remove any rotation */
}

/* Stamp handle */
.proficiency-badge::before {
    content: '';
    position: absolute;
    top: -50px;  /* Adjusted position */
    right: 45%;  /* Center the handle */
    width: 8px;  /* Thinner handle */
    height: 50px;
    background: linear-gradient(to right, #444, #666, #444);  /* Better handle look */
    border-radius: 2px;
    opacity: 0;
    transition: all 0.5s ease;
    transform-origin: bottom;
    transform: rotate(-15deg);
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);  /* Handle shadow */
}

/* Ink spreading effect */
.proficiency-badge::after {
    content: '';
    position: absolute;
    inset: -2px;
    border: 2px double;
    border-radius: 3px;
    opacity: 0;
    transition: all 0.5s ease;
    transform: scale(1.1);
}

/* Hover animations */
.skill-item:hover .proficiency-badge {
    opacity: 1;
    animation: stampDown 0.5s ease-out forwards;
}

.skill-item:hover .proficiency-badge::before {
    opacity: 1;
    animation: handlePress 0.5s ease-out forwards;
}

.skill-item:hover .proficiency-badge::after {
    opacity: 1;
    animation: inkSpread 0.5s ease-out forwards;
}

/* Exit animations */
@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: translateY(-50%) rotate(var(--rotation, -15deg));
    }
    100% {
        opacity: 0;
        transform: translateY(-50%) rotate(var(--rotation, -15deg));  /* Keep same rotation */
    }
}

@keyframes handleLift {
    0% {
        transform: rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: rotate(-15deg);
        opacity: 0;
    }
}

@keyframes inkFade {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.05);  /* Reduced scale change */
        opacity: 0;
    }
}

/* Proficiency Level Colors */
.proficiency-badge.beginner::before,
.proficiency-badge.beginner::after {
    border-color: #dc3545 !important;
}
.proficiency-badge.beginner span {
    color: #dc3545 !important;
}

.proficiency-badge.basic::before,
.proficiency-badge.basic::after {
    border-color: #fd7e14 !important;
}
.proficiency-badge.basic span {
    color: #fd7e14 !important;
}

.proficiency-badge.intermediate::before,
.proficiency-badge.intermediate::after {
    border-color: #17a2b8 !important;
}
.proficiency-badge.intermediate span {
    color: #17a2b8 !important;
}

.proficiency-badge.advanced::before,
.proficiency-badge.advanced::after {
    border-color: #28a745 !important;
}
.proficiency-badge.advanced span {
    color: #28a745 !important;
}

.proficiency-badge.expert::before,
.proficiency-badge.expert::after {
    border-color: #007bff !important;
}
.proficiency-badge.expert span {
    color: #007bff !important;
}

/* Section heading stamp effect */
.section-heading h2 {
    -webkit-mask-image: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/8399/grunge.png');
    -webkit-mask-size: 944px 604px;
    -webkit-mask-position: 13rem 6rem;
    mix-blend-mode: multiply;
    font-family: Arial, sans-serif;
    font-weight: 600;
    position: relative;
    display: inline-block;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
    background-size: 100%;
    -webkit-background-clip: text;
    background-clip: text;
    transition: all 0.3s ease;
}

/* Keep the existing section heading animations */
.section-heading {
    position: relative;
    text-align: center;
    margin-bottom: 3rem;
    overflow: visible;
    padding: 0 1rem;
}

/* Preserve existing hover effects if any */
.section-heading h2:hover::before,
.section-heading h2:hover::after {
    opacity: 0.5;
}

.certification-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.certification-title h3 {
    font-size: 1.1rem;  /* Reduced from default size to match experience role */
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
}

.certification-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.certification-icon i {
    font-size: 1.2rem;
    color: var(--text-color);  /* Use the default text color */
}

/* Remove the color variations */
.certification-card:nth-child(3n) .certification-icon,
.certification-card:nth-child(3n+1) .certification-icon,
.certification-card:nth-child(3n+2) .certification-icon {
    background: none;
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.certification-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease;
    border: 1px solid var(--border-color);
}

/* Light mode specific styles */
:root[data-theme="light"] .certification-card {
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Dark mode specific styles */
:root[data-theme="dark"] .certification-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.certification-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.desktop-only {
    display: none;
}

.mobile-cert-link {
    display: none;
}

@media (min-width: 768px) {
    .desktop-only {
        display: block;
    }
    .mobile-cert-link {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .desktop-only {
        display: none !important;
    }
    .mobile-cert-link {
        display: inline-flex !important;
        align-items: center;
        gap: 0.5rem;
        margin-top: 1rem;
    }
    .certification-buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
}

/* Chatbot mobile positioning */
@media (max-width: 768px) {
    .index-chatbot-widget {
        bottom: 100px; /* Increase spacing to avoid overlap */
        right: 20px;   /* Add some right margin */
    }
}

/* Additional adjustment for very small screens */
@media (max-width: 480px) {
    .index-chatbot-widget {
        bottom: 120px; /* Even more space on smaller screens */
        right: 15px;   /* Slightly closer to edge on small screens */
    }
}

/* Skill item base styles */
.skill-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.skill-name {
    font-size: 1rem;
    color: var(--text-color);
}

.proficiency-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

/* Mobile view adjustments */
@media (max-width: 768px) {
    .skill-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
    }

    .skill-name {
        font-size: 0.95rem;  /* Keep original text size */
    }

    .proficiency-badge {
        transform: none !important;
        margin-left: auto;
        font-size: 0.7rem;
        padding: 3px 8px;
    }
}

/* Remove tap highlight and improve mobile interactions */
* {
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

/* Specific styles for interactive elements */
button,
a,
.nav-links a,
.hamburger,
.section-toggle,
.index-chatbot-widget,
.index-quick-reply,
.cert-link,
.mobile-cert-link,
.skill-tag,
.project-card,
.blog-card {
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

/* Fix sidebar toggle appearance */
.section-toggle {
    cursor: default;
    pointer-events: none;
    opacity: 0.7;
}

/* Only enable pointer events when section is loaded */
.section.loaded .section-toggle {
    cursor: pointer;
    pointer-events: auto;
    opacity: 1;
}

/* Mobile certification card styles */
@media (max-width: 768px) {
    .certification-card {
        padding: 1rem;
        margin-bottom: 1rem;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 8px;
    }

    .certification-title {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
    }

    .certification-icon {
        font-size: 1rem;
    }

    .certification-title h3 {
        font-size: 0.95rem;
        font-weight: 600;
        margin: 0;
        line-height: 1.4;
    }

    .certification-org {
        font-size: 0.85rem;
        color: var(--secondary-text);
        margin-bottom: 4px;
    }

    .certification-date {
        font-size: 0.8rem;
        color: var(--secondary-text);
        opacity: 0.8;
    }

    .cert-link, .mobile-cert-link {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 0.85rem;
        color: var(--primary-color);
        text-decoration: none;
        margin-top: 8px;
    }

    .cert-link i, .mobile-cert-link i {
        font-size: 0.8rem;
    }
}

/* Core scrolling optimizations */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-overflow-scrolling: touch;
    overflow-y: scroll;
}

/* Performance optimizations for smooth scrolling */
.navbar,
.section,
.certification-card,
.project-card,
.blog-card,
.experience-card {
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
    will-change: transform;
}

/* Prevent content jumping during scroll */
main {
    overflow-x: hidden;
    position: relative;
}

/* Ensure smooth scrolling even on Safari */
@supports (-webkit-overflow-scrolling: touch) {
    body {
        -webkit-overflow-scrolling: touch;
    }
}

/* Blog filter dropdown styles */
.filter-select {
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
}

/* Dropdown options styling */
.filter-select option {
    background-color: var(--card-bg);
    color: var(--text-color);
    padding: 8px;
}

/* Dark mode specific styles */
:root[data-theme="dark"] .filter-select {
    background-color: var(--card-bg);
    color: var(--text-color);
    border-color: var(--border-color);
}

:root[data-theme="dark"] .filter-select option {
    background-color: var(--card-bg);
    color: var(--text-color);
}

/* Hover states */
.filter-select:hover {
    border-color: var(--primary-color);
}

/* Focus states */
.filter-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.1);
}

/* Minimal Blog Cards */
.blog-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 350px;
    margin: 0 auto;
}

.blog-card-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 2.8em;
}

/* Show preview text with 3 lines */
.blog-card-preview {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-top: auto;
}

.blog-card-category {
    color: var(--primary-color);
    font-weight: 500;
}

.blog-card-date {
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .blog-card-title {
        font-size: 1rem;
        height: 2.6em;
    }

    .blog-card-preview {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
    }

    .blog-card-meta {
        font-size: 0.8rem;
    }
}

/* Blog grid layout */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); /* Match project card width */
    gap: 2rem;
    padding: 1rem 0;
    max-width: 1200px; /* Match max-width with projects section if needed */
    margin: 0 auto;
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1rem;
        padding: 0.5rem;
    }
    
    .blog-card {
        min-height: 350px;
    }
}

/* Message Box Styles */
.message-box {
    position: fixed;
    top: 100px; /* Match the message box positioning */
    right: 20px; /* Position to the right */
    left: auto; /* Remove left positioning to align right */
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 0.95rem;
    z-index: 100000; /* Increase z-index to ensure visibility */
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease forwards;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 400px; /* Match the message box width */
    width: auto;
    margin: 0; /* Remove horizontal centering */
}

.message-box.success {
    background-color: #28a745;
    color: white;
    border-left: 4px solid #1e7e34;
}

.message-box.error {
    background-color: #dc3545;
    color: white;
    border-left: 4px solid #bd2130;
}

.message-box.info {
    background-color: #17a2b8;
    color: white;
    border-left: 4px solid #138496;
}

.message-box.warning {
    background-color: #ffc107;
    color: #000;
    border-left: 4px solid #d39e00;
}

.message-box i {
    font-size: 1.2rem;
}

.message-box .close-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    font-size: 1.1rem;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.message-box .close-btn:hover {
    opacity: 1;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

#messageContainer .message-box {
    pointer-events: auto; /* Re-enable interaction for messages */
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .message-box {
        top: 100px; /* Keep consistent with desktop */
        padding: 12px 20px;
        font-size: 0.9rem;
        position: fixed;
        right: 20px;
        left: auto;
        max-width: 400px;
    }
}

/* When virtual keyboard is likely open */
@media (max-height: 400px) {
    .message-box {
        top: 50px; /* Slightly higher when keyboard is open */
    }
    
    #messageContainer {
        top: 50px; /* Slightly higher when keyboard is open */
    }
}

/* Send Message Button Styles */
.contact-form button[type="submit"] {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff3333 50%, #cc0000 100%) !important;
    color: white !important;
    border: none !important;
    padding: 12px 25px !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    font-size: 1rem !important;
    box-shadow: 0 4px 15px rgba(255, 51, 51, 0.2) !important;
}

.contact-form button[type="submit"]:hover {
    background: linear-gradient(135deg, #ff8080 0%, #ff4444 50%, #ff1111 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(255, 51, 51, 0.3) !important;
}

.contact-form button[type="submit"]:disabled {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff3333 50%, #cc0000 100%) !important;
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Dark mode specific adjustments */
:root[data-theme="dark"] .contact-form button[type="submit"] {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff3333 50%, #cc0000 100%) !important;
    box-shadow: 0 4px 15px rgba(255, 51, 51, 0.3) !important;
}

:root[data-theme="dark"] .contact-form button[type="submit"]:hover {
    background: linear-gradient(135deg, #ff8080 0%, #ff4444 50%, #ff1111 100%) !important;
    box-shadow: 0 6px 20px rgba(255, 51, 51, 0.4) !important;
}

/* Animation styles for sending state */
.contact-form button[type="submit"] i {
    margin-right: 8px !important;
}

.contact-form button[type="submit"].sending {
    pointer-events: none !important;
    opacity: 0.8 !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .contact-form button[type="submit"] {
        padding: 10px 20px !important;
        font-size: 0.95rem !important;
    }
}



.combined-stats .stat-box {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    min-width: 140px;
    width: 140px;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
}


.combined-stats .stat-box h2 .unit {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-left: 2px;
    font-weight: normal;
    position: relative;
    bottom: -0.2em;
}

/* Specific styling for experience stat to ensure centering */
#total-experience {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    width: 100%;
}

.stat-box p {
    margin: 10px 0 0;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.languages-chart h3 {
    color: var(--text-color);
    margin-top: 1rem;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.stats-grid-section {
    flex: 0.8;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.member-buttons.pc-only {
    display: block;
    text-align: center;
    padding-top: .5rem;
}

.languages-header.mobile-only {
    display: none;
}

@media (max-width: 1024px) {
    .member-buttons.pc-only {
        display: none;
    }

    .languages-header.mobile-only {
        display: block;
        text-align: center;
        padding-top: 1rem;
        border-top: 1px solid #eee;
    }

    .stats-grid-section {
        width: 100%;
        max-width: 600px;
        margin-bottom: 2rem;
    }
}

:root[data-theme="light"] {
    --border-color: rgba(0, 0, 0, 0.1);
    --text-color: #333;
    --text-secondary: #666;
}

:root[data-theme="dark"] {
    --border-color: rgba(255, 255, 255, 0.1);
    --text-color: #fff;
    --text-secondary: #aaa;
}

/* Add these styles for the More About Me button */
.view-more-widgets {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    margin: 1rem auto;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.view-more-widgets:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.view-more-widgets i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    margin: 0 auto;
}

.view-more-widgets:hover i {
    transform: translateY(2px);
}

/* Add styles for experience description indentation */
.experience-item .company {
    margin-left: 1.5rem;
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: -0.5rem;
    position: relative;
}

.experience-item .company::before {
    content: "•";
    position: absolute;
    left: -1rem;
    color: var(--text-secondary);
    opacity: 0.6;
    font-size: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
}

.experience-item .period {
    margin-left: 2.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: -0.25rem;
    opacity: 0.9;
}

.experience-item .description {
    margin-left: 1.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.experience-item .view-details-btn {
    margin-left: 1.5rem;
    font-size: 0.9rem;
    color: #ff3333;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.experience-item .view-details-btn:hover {
    opacity: 1;
    color: #cc0000;
}

.experience-item .view-details-btn i {
    margin-right: 0.5rem;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

/* Style for widget expand buttons */
.widget-card .expand-button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.7rem;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.widget-card .expand-button:hover {
    opacity: 1;
    color: var(--text-color);
}

.widget-card .expand-button i {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.widget-card .expand-button.expanded i {
    transform: rotate(180deg);
}

.widget-card .hidden-fields {
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Style for experience duration */
.experience-item .duration {
    color: var(--text-secondary);
    font-size: 0.85rem;
    opacity: 0.8;
    font-weight: normal;
    margin-left: 0.25rem;
}

/* Professional Footer Styles */
footer {
    padding: 2rem 0;
    position: relative;
    overflow: hidden;
}

.copyright {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    padding: 0 1rem;
    transition: all 0.3s ease;
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 0;
}

.copyright a {
    color: inherit;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
}

.copyright a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}

.copyright a:hover::after {
    width: 100%;
}

.copyright:hover {
    color: var(--text-color);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    footer {
        padding: 1.5rem 0;
    }

    .copyright {
        font-size: 0.85rem;
        padding-bottom: 15px;
    }
}

/* Add these professional design enhancements */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.widget-card, .experience-item, .project-card {
    transition: all 0.3s ease;
    border-radius: 12px;
    position: relative;
    background: var(--bg-color);
}

.widget-card:hover, .experience-item:hover, .project-card:hover {
    animation: float 3s ease-in-out infinite;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.section {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #ff6b6b var(--scroll), transparent 0);
    z-index: 1000;
}

:root {
    --h1-size: clamp(2rem, 5vw, 3.5rem);
    --h2-size: clamp(1.5rem, 4vw, 2.5rem);
    --h3-size: clamp(1.2rem, 3vw, 2rem);
    --body-size: clamp(0.9rem, 2vw, 1.1rem);
}

h2 { font-size: var(--h2-size); }
h3 { font-size: var(--h3-size); }
p { font-size: var(--body-size); }

/* Restore original greeting size */
.greeting {
    font-size: 1.5rem;
    font-weight: normal;
    opacity: 0.8;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* Style for name */
.hero-name {
    font-size: 3.5rem;
    font-weight: bold;
    color: #ff3333;
    margin: 0;
    line-height: 1.2;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff3333 50%, #cc0000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* View More Button Styles */
.view-more-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    margin: 1rem auto;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.view-more-btn:hover {
    opacity: 1;
}

.view-more-btn i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

/* Bounce Animation */
.bounce {
    animation: bounce 2s infinite;
}

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

/* Experience Section Styles - Professional Spacing */
.experience-item {
    padding: 1rem;
    margin-bottom: 1rem;
}

.experience-item h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.15rem;
    margin-left: 1rem;
}

.experience-item .company {
    margin-left: 2.5rem;
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: -0.3rem;
}

.experience-item .period {
    margin-left: 3.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: -0.2rem;
    opacity: 0.9;
}

.experience-item .description {
    margin-left: 2.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
    margin-top: 0.3rem;
    margin-bottom: 0.3rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.experience-item .view-details-btn {
    margin-left: 2.5rem;
    font-size: 0.9rem;
    color: #ff3333;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem 0;
    transition: all 0.3s ease;
    opacity: 0.8;
}

/* For multiple roles within same company */
.experience-item .role-item h4 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

/* Experience Section Styles - Connected Cards */
.experience-item {
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;  /* For positioning the connector */
}

/* Experience Card Connectors */
/* First card bullet point with color cycling */
.experience-item:first-child::before {
    content: '•';
    position: absolute;
    left: 2.65rem;
    top: 1.2rem;
    font-size: 24px;
    line-height: 1;
    animation: colorCycle 9s infinite;  /* Increased duration for smoother transitions */
    transform-origin: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 24px;
}

@keyframes colorCycle {
    0%, 28% {
        color: #ff3333; /* Red */
        opacity: 1;
    }
    30%, 31% {
        opacity: 0.2; /* Fade out */
    }
    33%, 61% {
        color: #28a745; /* Green */
        opacity: 1;
    }
    63%, 64% {
        opacity: 0.2; /* Fade out */
    }
    66%, 94% {
        color: #ffc107; /* Yellow */
        opacity: 1;
    }
    96%, 97% {
        opacity: 0.2; /* Fade out */
    }
    98%, 100% {
        color: #ff3333; /* Back to red */
        opacity: 1;
    }
}

/* Up arrows for other cards */
.experience-item:not(:first-child)::before {
    content: '▲';
    position: absolute;
    left: 2.65rem;
    top: 1.5rem;
    font-size: 12px;
    animation: fadeUpArrow 2s infinite;
    transform-origin: center;
}

/* Color the arrows in sequence */
.experience-item:nth-child(2)::before {
    color: #ff3333; /* Red */
}

.experience-item:nth-child(3)::before {
    color: #ffc107; /* Yellow */
}

.experience-item:nth-child(4)::before {
    color: #28a745; /* Green */
}

.experience-item:nth-child(5)::before {
    color: #ff3333; /* Red */
}

.experience-item:nth-child(6)::before {
    color: #ffc107; /* Yellow */
}

.experience-item:nth-child(7)::before {
    color: #28a745; /* Green */
}

/* Continue the pattern for more items if needed */
.experience-item:nth-child(8)::before {
    color: #ff3333;
}

.experience-item:nth-child(9)::before {
    color: #ffc107;
}

.experience-item:nth-child(10)::before {
    color: #28a745;
}

/* Remove the last card special dot section */

/* Connector line between cards */
.experience-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 3rem;
    bottom: -1rem;
    width: 2px;
    height: 1rem;
    background: linear-gradient(180deg, var(--border-color) 50%, transparent);
    animation: connectLine 1s ease forwards;
    transform-origin: top;
}

/* Arrow animation */
@keyframes fadeUpArrow {
    0% {
        transform: translateY(0);
        opacity: 0.4;
    }
    50% {
        transform: translateY(-3px);
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }
}

/* Animations */
@keyframes connectLine {
    from {
        transform: scaleY(0);
    }
    to {
        transform: scaleY(1);
    }
}

@keyframes pulseDot {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);  /* Yellow glow */
    }
    50% {
        box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.3);  /* Green glow */
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);  /* Back to yellow */
    }
}

/* Adjust existing margins to accommodate the timeline */
.experience-item h3 {
    margin-left: 3rem;
}

.experience-item .company {
    margin-left: 4.5rem;
}

.experience-item .period {
    margin-left: 5.5rem;
}

.experience-item .description {
    margin-left: 4.5rem;
}

.experience-item .view-details-btn {
    margin-left: 4.5rem;
}

/* Nested Roles Styling */
.role-item {
    position: relative;
    margin-left: 5.5rem;  /* Align with the main timeline */
    padding-left: 1rem;   /* Reduced padding */
}

/* Adjust nested role content spacing */
.role-item h4 {
    margin-bottom: 0.15rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
}

.role-item .period {
    margin-left: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.9;
}

.role-item .description {
    margin-left: 1rem;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-secondary);
}

/* Skill item base styles */
.skill-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.skill-name {
    font-size: 1rem;
    color: var(--text-color);
}

.proficiency-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

/* Mobile view adjustments */
@media (max-width: 768px) {
    .skill-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
    }

    .skill-name {
        font-size: 0.95rem;  /* Keep original text size */
    }

    .proficiency-badge {
        transform: none !important;
        margin-left: auto;
        font-size: 0.7rem;
        padding: 3px 8px;
    }
}

/* Remove tap highlight and improve mobile interactions */
* {
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

/* Specific styles for interactive elements */
button,
a,
.nav-links a,
.hamburger,
.section-toggle,
.index-chatbot-widget,
.index-quick-reply,
.cert-link,
.mobile-cert-link,
.skill-tag,
.project-card,
.blog-card {
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
    outline: none;
    text-decoration: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

/* Fix sidebar toggle appearance */
.section-toggle {
    cursor: default;
    pointer-events: none;
    opacity: 0.7;
}

/* Only enable pointer events when section is loaded */
.section.loaded .section-toggle {
    cursor: pointer;
    pointer-events: auto;
    opacity: 1;
}

/* Mobile certification card styles */
@media (max-width: 768px) {
    .certification-card {
        padding: 1rem;
        margin-bottom: 1rem;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 8px;
    }

    .certification-title {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
    }

    .certification-icon {
        font-size: 1rem;
    }

    .certification-title h3 {
        font-size: 0.95rem;
        font-weight: 600;
        margin: 0;
        line-height: 1.4;
    }

    .certification-org {
        font-size: 0.85rem;
        color: var(--secondary-text);
        margin-bottom: 4px;
    }

    .certification-date {
        font-size: 0.8rem;
        color: var(--secondary-text);
        opacity: 0.8;
    }

    .cert-link, .mobile-cert-link {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 0.85rem;
        color: var(--primary-color);
        text-decoration: none;
        margin-top: 8px;
    }

    .cert-link i, .mobile-cert-link i {
        font-size: 0.8rem;
    }
}

/* Core scrolling optimizations */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-overflow-scrolling: touch;
    overflow-y: scroll;
}

/* Performance optimizations for smooth scrolling */
.navbar,
.section,
.certification-card,
.project-card,
.blog-card,
.experience-card {
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
    will-change: transform;
}

/* Prevent content jumping during scroll */
main {
    overflow-x: hidden;
    position: relative;
}

/* Ensure smooth scrolling even on Safari */
@supports (-webkit-overflow-scrolling: touch) {
    body {
        -webkit-overflow-scrolling: touch;
    }
}

/* Blog filter dropdown styles */
.filter-select {
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
}

/* Dropdown options styling */
.filter-select option {
    background-color: var(--card-bg);
    color: var(--text-color);
    padding: 8px;
}

/* Dark mode specific styles */
:root[data-theme="dark"] .filter-select {
    background-color: var(--card-bg);
    color: var(--text-color);
    border-color: var(--border-color);
}

:root[data-theme="dark"] .filter-select option {
    background-color: var(--card-bg);
    color: var(--text-color);
}

/* Hover states */
.filter-select:hover {
    border-color: var(--primary-color);
}

/* Focus states */
.filter-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.1);
}

/* Minimal Blog Cards */
.blog-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 350px;
    margin: 0 auto;
}

.blog-card-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 2.8em;
}

/* Show preview text with 3 lines */
.blog-card-preview {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-top: auto;
}

.blog-card-category {
    color: var(--primary-color);
    font-weight: 500;
}

.blog-card-date {
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .blog-card-title {
        font-size: 1rem;
        height: 2.6em;
    }

    .blog-card-preview {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
    }

    .blog-card-meta {
        font-size: 0.8rem;
    }
}

/* Blog grid layout */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); /* Match project card width */
    gap: 2rem;
    padding: 1rem 0;
    max-width: 1200px; /* Match max-width with projects section if needed */
    margin: 0 auto;
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1rem;
        padding: 0.5rem;
    }
    
    .blog-card {
        min-height: 350px;
    }
}

/* Message Box Styles */
.message-box {
    position: fixed;
    top: 100px; /* Match the message box positioning */
    right: 20px; /* Position to the right */
    left: auto; /* Remove left positioning to align right */
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 0.95rem;
    z-index: 100000; /* Increase z-index to ensure visibility */
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease forwards;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 400px; /* Match the message box width */
    width: auto;
    margin: 0; /* Remove horizontal centering */
}

.message-box.success {
    background-color: #28a745;
    color: white;
    border-left: 4px solid #1e7e34;
}

.message-box.error {
    background-color: #dc3545;
    color: white;
    border-left: 4px solid #bd2130;
}

.message-box.info {
    background-color: #17a2b8;
    color: white;
    border-left: 4px solid #138496;
}

.message-box.warning {
    background-color: #ffc107;
    color: #000;
    border-left: 4px solid #d39e00;
}

.message-box i {
    font-size: 1.2rem;
}

.message-box .close-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    font-size: 1.1rem;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.message-box .close-btn:hover {
    opacity: 1;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}


#messageContainer .message-box {
    pointer-events: auto; /* Re-enable interaction for messages */
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .message-box {
        top: 100px; /* Keep consistent with desktop */
        padding: 12px 20px;
        font-size: 0.9rem;
        position: fixed;
        right: 20px;
        left: auto;
        max-width: 60%; /* Reduce width to 60% for mobile phones */
    }
    
}

/* When virtual keyboard is likely open */
@media (max-height: 400px) {
    .message-box {
        top: 50px; /* Slightly higher when keyboard is open */
    }
    
    #messageContainer {
        top: 50px; /* Slightly higher when keyboard is open */
    }
}

/* Send Message Button Styles */
.contact-form button[type="submit"] {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff3333 50%, #cc0000 100%) !important;
    color: white !important;
    border: none !important;
    padding: 12px 25px !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    font-size: 1rem !important;
    box-shadow: 0 4px 15px rgba(255, 51, 51, 0.2) !important;
}

.contact-form button[type="submit"]:hover {
    background: linear-gradient(135deg, #ff8080 0%, #ff4444 50%, #ff1111 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(255, 51, 51, 0.3) !important;
}

.contact-form button[type="submit"]:disabled {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff3333 50%, #cc0000 100%) !important;
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Dark mode specific adjustments */
:root[data-theme="dark"] .contact-form button[type="submit"] {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff3333 50%, #cc0000 100%) !important;
    box-shadow: 0 4px 15px rgba(255, 51, 51, 0.3) !important;
}

:root[data-theme="dark"] .contact-form button[type="submit"]:hover {
    background: linear-gradient(135deg, #ff8080 0%, #ff4444 50%, #ff1111 100%) !important;
    box-shadow: 0 6px 20px rgba(255, 51, 51, 0.4) !important;
}

/* Animation styles for sending state */
.contact-form button[type="submit"] i {
    margin-right: 8px !important;
}

.contact-form button[type="submit"].sending {
    pointer-events: none !important;
    opacity: 0.8 !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .contact-form button[type="submit"] {
        padding: 10px 20px !important;
        font-size: 0.95rem !important;
    }
}


.combined-stats .stat-box {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    min-width: 140px;
    width: 140px;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
}


.combined-stats .stat-box h2 .unit {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-left: 2px;
    font-weight: normal;
    position: relative;
    bottom: -0.2em;
}

/* Specific styling for experience stat to ensure centering */
#total-experience {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    width: 100%;
}

.combined-stats .stat-box p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1rem;
    white-space: nowrap;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .combined-stats {
        flex-wrap: wrap;
        justify-content: center;
    }
    .combined-stats .stat-box {
        flex: 0 0 140px;
    }
}

@media (max-width: 768px) {
    .combined-stats {
        gap: 1rem;
    }
    .combined-stats .stat-box {
        flex: 0 0 calc(50% - 1rem);
        min-width: 130px;
    }
}

/* Add spacing after GitHub member section */
.member-buttons.pc-only {
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}



@media (max-width: 768px) {
    .combined-stats {
        gap: 1rem;
    }
}

.hobby-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.hobby-card i {
    font-size: 2rem;
    color: #ff3333;
    margin-bottom: 1rem;
}

.hobby-card h4 {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.hobby-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Languages Grid */
.languages-grid {
    display: grid;
    gap: 1.5rem;
}

.language-card {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.language-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.language-info h4 {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.proficiency-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.proficiency-level {
    height: 100%;
    background: linear-gradient(90deg, #ff3333, #ff6b6b);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.proficiency-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}




/* Alerts Popup - Updated for better mobile interaction */
#alertsPopup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998; /* Lower than loader z-index (9999) */
    opacity: 0;
    transition: opacity 0.3s ease;
/* Hobbies & Languages Section Styles */
    pointer-events: all !important; /* Changed from auto to all */
}

.alert-popup-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-color);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 20px;
    width: 90%;
    max-width: 500px;
    z-index: 9996; /* Lower than loader z-index (9999) */
    pointer-events: all !important; /* Changed from auto to all */
}

.alert-popup-timer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(0,0,0,0.1);
    z-index: 9995; /* Lower than loader z-index (9999) */
    pointer-events: none;
}

.timer-bar {
    height: 100%;
    background: #4169E1;
    padding: 2rem;
    transition: width linear;
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    .alert-popup-content {
        width: 85%;
        max-height: 80vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 15px;
        transform: translate(-50%, -50%) scale(1); /* Added scale transform */
        will-change: transform; /* Added for performance */
        -webkit-transform: translate3d(-50%, -50%, 0) scale(1); /* Added for iOS */
    }

    /* Ensure all interactive elements are clickable */
    .alert-popup-content *,
    .alert-message,
    .alert-message *,
    .close-alert,
    .close-alert * {
        pointer-events: all !important;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    /* Improve touch target size */
    .close-alert {
        padding: 10px;
        margin: -10px;
    }
}

/* Prevent scrolling on iOS */
body.popup-open {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: none;
    -webkit-overflow-scrolling: none;
}

/* Add these specific styles for alert message */
.alert-message {
    position: relative; /* Added */
    z-index: 9994; /* Lower than loader z-index (9999) */
    pointer-events: all !important; /* Added */
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border-radius: 8px;
    background: var(--bg-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.alert-message i {
    font-size: 1.5rem;
}

.alert-message.success i { color: #28a745; }
.alert-message.error i { color: #dc3545; }
.alert-message.warning i { color: #ffc107; }
.alert-message.info i { color: #17a2b8; }

.alert-message .close-alert {
    position: relative; /* Added */
    z-index: 9993; /* Lower than loader z-index (9999) */
    pointer-events: all !important; /* Added */
    margin-left: auto;
    border-radius: 10px;
    padding: 1.5rem;
    color: var(--text-color);

    padding: 5px;
    opacity: 0.7;
    transition: opacity 0.2s;
    color: #ff3333;
    margin-bottom: 1rem;
.alert-message .close-alert:hover {

}

/* Dark mode adjustments */
:root[data-theme="dark"] .alert-message {
    background: var(--bg-color);
    color: var(--text-color);
}

/* Replace the existing alert styles with these fixed versions */
.alerts-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9998; /* Lower than loader z-index (9999) */
}

.alert-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9997; /* Lower than loader z-index (9999) */
}

.alert-popup-content {
    position: fixed;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-color);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 400px;
    z-index: 9996; /* Lower than loader z-index (9999) */
}

.alert-message {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9995; /* Lower than loader z-index (9999) */
}

.alert-message i {
    font-size: 1.5rem;
}

.alert-message.success i { color: #28a745; }
.alert-message.error i { color: #dc3545; }
.alert-message.warning i { color: #ffc107; }
.alert-message.info i { color: #17a2b8; }

.alert-message .close-alert {
    position: relative;
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px;
    opacity: 0.7;
    transition: opacity 0.2s;
    z-index: 9994; /* Lower than loader z-index (9999) */
}

.alert-message .close-alert:hover {
    opacity: 1;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .alert-popup-content {
        width: 85%;
        padding: 15px;
    }

    .alert-message .close-alert {
        padding: 12px; /* Larger touch target */
    }

    /* Ensure clickability on mobile */
    .alert-popup-overlay,
    .alert-popup-content,
    .alert-message,
    .close-alert {
        touch-action: auto !important;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
}

/* Prevent background scrolling */
body.popup-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Replace the existing alert styles with these mobile-optimized versions */
.alerts-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9998; /* Lower than loader z-index (9999) */
    touch-action: none;
}

.alert-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9997; /* Lower than loader z-index (9999) */
    touch-action: none;
}

.alert-popup-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-color);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 400px;
    z-index: 9996; /* Lower than loader z-index (9999) */
    touch-action: manipulation;
}

.alert-message {
    position: relative;
        font-size: 1.5rem;
    }
    gap: 12px;
    z-index: 9995; /* Lower than loader z-index (9999) */
    touch-action: manipulation;
}

.alert-message .close-alert {
    position: relative;
    margin-left: auto;
    background: none;
    border: none;
        cursor: pointer;
    padding: 15px;
    opacity: 0.7;
    transition: opacity 0.2s;
    z-index: 9994; /* Lower than loader z-index (9999) */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    /* Increase touch target size */
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    .alert-popup-content {
        transform: translate(-50%, -50%) translateZ(0);
        -webkit-transform: translate(-50%, -50%) translateZ(0);
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
        width: 85%;
        padding: 20px;
        touch-action: manipulation;
    }

    .alert-message {
        padding: 0;
    }

    .alert-message .close-alert {
        padding: 15px;
        margin: -15px;
        touch-target-size: 44px;
    }

    /* Ensure elements are clickable */
    .alert-popup-overlay,
    .alert-popup-content,
    .alert-message,
    .close-alert {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        user-select: none;
        -webkit-user-select: none;
    }
}

/* Prevent scrolling */
body.popup-open {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 50%;
    touch-action: none;
    -webkit-overflow-scrolling: touch;
}

/* Alert Styles - Mobile Optimized */
.alerts-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998; /* Lower than loader z-index (9999) */
}

.alert-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9997; /* Lower than loader z-index (9999) */
}

.alert-popup-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-color);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 400px;
    z-index: 9996; /* Lower than loader z-index (9999) */
}

.alert-message {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 9995; /* Lower than loader z-index (9999) */
}

.alert-message i {
    font-size: 1.5rem;
}

.alert-message.success i { color: #28a745; }
.alert-message.error i { color: #dc3545; }
.alert-message.warning i { color: #ffc107; }
.alert-message.info i { color: #17a2b8; }

.alert-message .close-alert {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background: none;
    border: none;
        padding: 15px;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9994; /* Lower than loader z-index (9999) */
    opacity: 0.7;
    transition: opacity 0.2s;
}

.alert-message .close-alert:hover {
    opacity: 1;
}

/* Mobile Optimizations */
    .alert-popup-content {
        width: 85%;
        padding: 15px;
    }

    .alert-message,
    .alert-popup-overlay,
    .close-alert {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .alert-message .close-alert {
        width: 48px;
        height: 48px;
    }

/* Prevent Background Scroll */
body.popup-open {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Replace all existing alert styles with these */
.alerts-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000010; /* Increased base z-index */
}

.alert-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000011;
}

.alert-popup-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-color);
    padding: 20px;
/* Prevent scrolling on iOS */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 400px;
    z-index: 1000012;
}

.alert-message {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1000013;
}

.alert-message i {
    font-size: 1.5rem;
}

.alert-message.success i { color: #28a745; }
.alert-message.error i { color: #dc3545; }
.alert-message.warning i { color: #ffc107; }
.alert-message.info i { color: #17a2b8; }

.alert-message .close-alert {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000014;
    opacity: 0.7;
    transition: opacity 0.2s;
    -webkit-tap-highlight-color: transparent;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .alert-popup-content {
        width: 85%;
        padding: 15px;
    }

    .alert-message,
    .alert-popup-overlay,
    .close-alert {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .alert-message .close-alert {
        width: 48px;
        height: 48px;
    }

    /* Ensure clickable areas work on mobile */
    .clickable-areas-container a {
        z-index: 999999 !important; /* Keep below alerts but above other content */
        pointer-events: auto !important;
        touch-action: auto !important;
        cursor: pointer !important;
        -webkit-tap-highlight-color: transparent;
    }
}

/* Prevent Background Scroll */
body.popup-open {
    font-size: 1.5rem;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 5px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.alert-message .close-alert:hover {
    opacity: 1;
}

/* Dark mode adjustments */
:root[data-theme="dark"] .alert-message {
    background: var(--bg-color);
    color: var(--text-color);
}

/* Replace the existing alert styles with these fixed versions */
.alerts-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9998; /* Lower than loader z-index (9999) */
}

.alert-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9997; /* Lower than loader z-index (9999) */
}

.alert-popup-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-color);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 400px;
    z-index: 9996; /* Lower than loader z-index (9999) */
}

.alert-message {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9995; /* Lower than loader z-index (9999) */
}

.alert-message i {
    font-size: 1.5rem;
}

.alert-message.success i { color: #28a745; }
.alert-message.error i { color: #dc3545; }
.alert-message.warning i { color: #ffc107; }
.alert-message.info i { color: #17a2b8; }

.alert-message .close-alert {
    position: relative;
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px;
    opacity: 0.7;
    transition: opacity 0.2s;
    z-index: 9994; /* Lower than loader z-index (9999) */
}

.alert-message .close-alert:hover {
    opacity: 1;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .alert-popup-content {
        width: 85%;
        padding: 15px;
    }

    .alert-message .close-alert {
        padding: 12px; /* Larger touch target */
    }

    /* Ensure clickability on mobile */
    .alert-popup-overlay,
    .alert-popup-content,
    .alert-message,
    .close-alert {
        touch-action: auto !important;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
}

/* Prevent background scrolling */
body.popup-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Replace the existing alert styles with these mobile-optimized versions */
.alerts-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9998; /* Lower than loader z-index (9999) */
    touch-action: none;
}

.alert-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9997; /* Lower than loader z-index (9999) */
    touch-action: none;
}

.alert-popup-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-color);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 400px;
    z-index: 9996; /* Lower than loader z-index (9999) */
    touch-action: manipulation;
}

.alert-message {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9995; /* Lower than loader z-index (9999) */
    touch-action: manipulation;
}

.alert-message .close-alert {
    position: relative;
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 15px;
    opacity: 0.7;
    transition: opacity 0.2s;
    z-index: 9994; /* Lower than loader z-index (9999) */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    /* Increase touch target size */
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    .alert-popup-content {
        transform: translate(-50%, -50%) translateZ(0);
        -webkit-transform: translate(-50%, -50%) translateZ(0);
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
        width: 85%;
        padding: 20px;
        touch-action: manipulation;
    }

    .alert-message {
        padding: 0;
    }

    .alert-message .close-alert {
        padding: 15px;
        margin: -15px;
        touch-target-size: 44px;
    }

    /* Ensure elements are clickable */
    .alert-popup-overlay,
    .alert-popup-content,
    .alert-message,
    .close-alert {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        user-select: none;
        -webkit-user-select: none;
    }
}

/* Prevent scrolling */
body.popup-open {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: none;
    -webkit-overflow-scrolling: touch;
}

/* Alert Styles - Mobile Optimized */
.alerts-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998; /* Lower than loader z-index (9999) */
}

.alert-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000001;
}

.alert-popup-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-color);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 400px;
    z-index: 1000002;
}

.alert-message {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 9995; /* Lower than loader z-index (9999) */
}

.alert-message i {
    font-size: 1.5rem;
}

.alert-message.success i { color: #28a745; }
.alert-message.error i { color: #dc3545; }
.alert-message.warning i { color: #ffc107; }
.alert-message.info i { color: #17a2b8; }

.alert-message .close-alert {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9994; /* Lower than loader z-index (9999) */
    opacity: 0.7;
    transition: opacity 0.2s;
}

.alert-message .close-alert:hover {
    opacity: 1;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .alert-popup-content {
        width: 85%;
        padding: 15px;
    }

    .alert-message,
    .alert-popup-overlay,
    .close-alert {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .alert-message .close-alert {
        width: 48px;
        height: 48px;
    }
}

/* Prevent Background Scroll */
body.popup-open {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Replace all existing alert styles with these */
.alerts-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000010; /* Increased base z-index */
}

.alert-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000011;
}

.alert-popup-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-color);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 400px;
    z-index: 1000012;
}

.alert-message {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1000013;
}

.alert-message i {
    font-size: 1.5rem;
}

.alert-message.success i { color: #28a745; }
.alert-message.error i { color: #dc3545; }
.alert-message.warning i { color: #ffc107; }
.alert-message.info i { color: #17a2b8; }

.alert-message .close-alert {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000014;
    opacity: 0.7;
    transition: opacity 0.2s;
    -webkit-tap-highlight-color: transparent;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .alert-popup-content {
        width: 85%;
        padding: 15px;
    }

    .alert-message,
    .alert-popup-overlay,
    .close-alert {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .alert-message .close-alert {
        width: 48px;
        height: 48px;
    }

    /* Ensure clickable areas work on mobile */
    .clickable-areas-container a {
        z-index: 999999 !important; /* Keep below alerts but above other content */
        pointer-events: auto !important;
        touch-action: auto !important;
        cursor: pointer !important;
        -webkit-tap-highlight-color: transparent;
    }
}

/* Prevent Background Scroll */
body.popup-open {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
