@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Sedgwick+Ave+Display&display=swap');

:root {
    --bg-black-900: #f2f2f2;
    --bg-black-100: #fdf9ff;
    --bg-black-50: #e8dfec;
    
    /* WCAG AA text tokens (> 4.5:1 contrast against light backgrounds) */
    --text-black-900: #25233a;
    --text-black-700: #3f3d56;

    /* Primary accent color */
    --skin-color: #ec1839;
}

body {
    margin: 0;
    padding: 0;
    line-height: 1.5;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    outline: none;
    text-decoration: none;
    box-sizing: border-box;
}

::before, ::after {
    box-sizing: border-box;
}

ul {
    list-style: none;
}

/* ==========================================================================
   Accessibility: Skip Link, Focus Indicators & Motion Preferences
   ========================================================================== */

/* Skip to Content link (Keyboard accessible) */
.skip-link {
    position: absolute;
    top: -80px;
    left: 20px;
    background: var(--skin-color);
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 0 0 8px 8px;
    font-size: 14px;
    font-weight: 600;
    z-index: 100000;
    transition: top 0.2s ease-in-out;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.skip-link:focus,
.skip-link:focus-visible {
    top: 0;
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

/* Accessible Keyboard Focus Indicators */
:focus {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--skin-color) !important;
    outline-offset: 3px !important;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
.filter-btn:focus-visible,
.blog-filter-btn:focus-visible,
.color-dot:focus-visible,
.nav-pos-btn:focus-visible {
    outline: 2px solid var(--skin-color) !important;
    outline-offset: 3px !important;
}

/* Respect OS Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   Structural Elements
   ========================================================================== */

main, nav, aside, article, header, section, footer {
    display: block;
}

.hidden {
    display: none !important;
}

.main-content {
    padding-left: 270px;
}

.padd-15 {
    padding-left: 15px;
    padding-right: 15px;
}

.container {
    max-width: 1100px;
    width: 100%;
    margin: auto;
}

.section .container {
    padding-top: 60px;
    padding-bottom: 70px;
}

.section-title {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 40px;
    font-weight: 700;
    color: var(--text-black-900);
    position: relative;
}

.section-title h2::before {
    content: '';
    position: absolute;
    width: 50px;
    height: 5px;
    background: var(--skin-color);
    top: 100%;
    left: 0;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 5px;
    background: var(--skin-color);
    top: 100%;
    left: 0;
    margin-top: 8px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -15px;
    margin-right: -15px;
    position: relative;
}

.btn {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    padding: 12px 35px;
    color: white;
    border-radius: 40px;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    text-transform: capitalize;
    background: var(--skin-color);
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-3px);
}

.shadow-dark {
    box-shadow: 0 0 20px rgba(48, 46, 77, 0.15);
}

/* ===== Style Switcher Panel ===== */
.style-switcher {
    position: fixed;
    right: 0;
    top: 60px;
    padding: 20px;
    width: 220px;
    border: 1px solid var(--bg-black-50);
    background: var(--bg-black-100);
    z-index: 101;
    border-radius: 10px 0 0 10px;
    transition: all 0.3s ease;
    transform: translateX(100%);
}

.style-switcher.open {
    transform: translateX(0);
}

.style-switcher-toggler {
    position: absolute;
    height: 40px;
    width: 40px;
    text-align: center;
    background: var(--bg-black-100);
    color: var(--text-black-900);
    border: 1px solid var(--bg-black-50);
    border-right: none;
    right: 100%;
    top: 0;
    cursor: pointer;
    border-radius: 8px 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.style-switcher h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-black-900);
    margin-bottom: 15px;
    border-bottom: 1px solid var(--bg-black-50);
    padding-bottom: 5px;
}

.switcher-item {
    margin-bottom: 18px;
}

.switcher-item label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-black-700);
    margin-bottom: 8px;
}

.style-switcher .colors {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.style-switcher .colors .color-dot {
    display: inline-block;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid transparent;
}

.style-switcher .colors .color-dot:hover {
    transform: scale(1.15);
}

.style-switcher .colors .color-dot.active {
    box-shadow: 0 0 0 2px var(--bg-black-100), 0 0 0 4px var(--skin-color);
    transform: scale(1.1);
}

.nav-position-options {
    display: flex;
    gap: 8px;
}

.nav-pos-btn {
    flex: 1;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--bg-black-50);
    background: var(--bg-black-900);
    color: var(--text-black-900);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-pos-btn.active, .nav-pos-btn:hover {
    background: var(--skin-color);
    color: #ffffff;
    border-color: var(--skin-color);
}

.day-night {
    height: 35px;
    width: 35px;
    background: var(--bg-black-900);
    border: 1px solid var(--bg-black-50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--skin-color);
    font-size: 16px;
}

/* ===== Right Sidebar Alignment Rules ===== */
body.aside-right .aside {
    left: auto;
    right: 0;
    border-right: none;
    border-left: 1px solid var(--bg-black-50);
}

body.aside-right .main-content {
    padding-left: 0;
    padding-right: 270px;
}

body.aside-right .footer {
    padding-left: 0;
}

/* ===== Dark Theme Variables Overrides ===== */
body.dark {
    --bg-black-900: #151515;
    --bg-black-100: #222222;
    --bg-black-50: #393939;
    --text-black-900: #ffffff;
    --text-black-700: #e8e8e8;
}

body.dark .featured-project-wrap .title,
body.dark .featured-content h4,
body.dark .featured-content .featured-desc,
body.dark .featured-content .project-challenge,
body.dark .featured-article-wrap .title,
body.dark .featured-blog-content h4 {
    color: var(--text-black-900) !important;
}

body.dark .featured-content .featured-desc,
body.dark .featured-content .project-challenge,
body.dark .featured-blog-content p,
body.dark .featured-blog-content .article-meta,
body.dark .featured-blog-content .post-date,
body.dark .featured-blog-content .read-time {
    color: var(--text-black-700) !important;
}

body.dark .featured-tag {
    background: rgba(236, 24, 57, 0.2);
    color: var(--skin-color);
    border: 1px solid var(--skin-color);
}

body.dark .featured-blog-content .article-tags .tag {
    background: var(--bg-black-50);
    color: var(--text-black-900);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ================== Section Display & Entrance Transitions ================== */
.section {
    min-height: 100vh;
    background: var(--bg-black-900);
    padding: 0 30px;
    width: 100%;
    box-sizing: border-box;
}

.section.hidden {
    display: none !important;
}

.section.active {
    display: block;
    animation: sectionFadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.section.active .section-title,
.section.active .about-content,
.section.active .stat-card,
.section.active .timeline-item,
.section.active .certificate-card,
.section.active .roadmap-step,
.section.active .category-box,
.section.active .project-card,
.section.active .blog-card,
.section.active .form-container,
.section.active .info-card {
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.section.active .section-title { animation-delay: 0.05s; }
.section.active .stat-card:nth-child(1), .section.active .project-item:nth-child(1), .section.active .blog-item:nth-child(1) { animation-delay: 0.1s; }
.section.active .stat-card:nth-child(2), .section.active .project-item:nth-child(2), .section.active .blog-item:nth-child(2) { animation-delay: 0.18s; }
.section.active .stat-card:nth-child(3), .section.active .project-item:nth-child(3), .section.active .blog-item:nth-child(3) { animation-delay: 0.26s; }
.section.active .stat-card:nth-child(4), .section.active .project-item:nth-child(4), .section.active .blog-item:nth-child(4) { animation-delay: 0.34s; }

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

.section.active .progress-bar {
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}