:root {
    --primary-color: #ffffff;
    --hover-color: #ffffff;
    --bg-color: #000;
    --text-color: #fff;
    --section-bg: rgba(17, 17, 17, 0.7);
    --skill-bg: rgba(34, 34, 34, 0.8);
    --spacing-unit: 1rem;
    --border-radius: 12px;
    --transition-speed: 0.3s;
}

/* Base styles */
body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    background-image: linear-gradient(45deg, #000 0%, #111 100%);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

/* Reset link styles */
a {
    color: var(--text-color) !important;
    text-decoration: none;
}

a:visited {
    color: var(--text-color) !important;
}

a:link {
    color: var(--text-color) !important;
}

/* Layout */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
    min-height: 100vh;
    text-align: center;
}

/* Sections - Card Overlay Style - Redesigned */
.section,
html body .section,
html body section.section,
section[id$="-section"],
html body section[id$="-section"] {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(0.9) !important;
    margin: 0 !important;
    padding: 0 !important;
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.98) 0%, rgba(0, 0, 0, 0.99) 100%) !important;
    backdrop-filter: blur(30px) saturate(150%) !important;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 28px !important;
    box-shadow: 
        0 30px 90px rgba(0, 0, 0, 0.95),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 0 60px rgba(255, 255, 255, 0.08),
        0 10px 40px rgba(0, 0, 0, 0.8) !important;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: 2000 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    max-width: 750px !important;
    width: calc(100% - 4rem) !important;
    max-height: 70vh !important;
    min-height: auto !important;
}

.section.active,
html body .section.active,
html body section.section.active,
section[id$="-section"].active,
html body section[id$="-section"].active {
    opacity: 1 !important;
    transform: translate(-50%, -50%) scale(1) !important;
    pointer-events: auto !important;
}

.section:hover, .section-active {
    box-shadow: 
        0 35px 100px rgba(0, 0, 0, 0.95),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset,
        0 0 80px rgba(255, 255, 255, 0.15),
        0 15px 50px rgba(0, 0, 0, 0.9) !important;
}

/* Backdrop overlay - Enhanced */
.section::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(20, 20, 20, 0.7) 0%, rgba(0, 0, 0, 0.92) 100%);
    backdrop-filter: blur(12px) brightness(0.7);
    z-index: -1;
    animation: fadeInBackdrop 0.3s ease;
}

@keyframes fadeInBackdrop {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Section headers - Redesigned */
.section-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 0;
    gap: 1rem;
    padding: 1.75rem 2rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px 28px 0 0;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    flex-shrink: 0;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 2rem, rgba(255, 255, 255, 0.3) 50%, transparent calc(100% - 2rem));
    border-radius: 1px;
}

.section .section-header {
    display: flex;
    align-items: center;
}

.section .section-header .section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.06) 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    font-size: 1.3rem !important;
    color: var(--primary-color) !important;
    text-shadow: 0 0 25px rgba(255, 255, 255, 0.6), 0 2px 4px rgba(0, 0, 0, 0.3);
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.4));
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.section .section-header .section-icon:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.1) 100%);
    transform: scale(1.05);
}

.section h2 {
    font-size: 1.4rem !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    letter-spacing: -0.8px !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    margin: 0 !important;
}

/* Close button for sections - Redesigned */
.close-section-btn {
    position: absolute;
    top: 1.75rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2001;
    backdrop-filter: blur(10px);
}

.close-section-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3), 0 4px 8px rgba(0, 0, 0, 0.3);
}

.close-section-btn:active {
    transform: scale(0.9) rotate(90deg);
}

/* Section content wrapper */
.section-content-wrapper {
    max-width: 100%;
    width: 100%;
    margin: 0;
    text-align: left;
    padding: 1.5rem 2rem;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.section-content-wrapper::-webkit-scrollbar {
    width: 6px;
}

.section-content-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.section-content-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.section-content-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.section .book-list,
.section .projects-grid {
    margin-top: 1rem;
}

/* Book List - Clean Minimal Design - Redesigned */
.section .book-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 100%;
}

.section .book-list li {
    font-size: 0.975rem;
    line-height: 1.6;
    padding: 1rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    position: relative;
    overflow: visible;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.section .book-list li:last-child {
    border-bottom: none;
}

.section .book-list li::before {
    content: "→";
    color: rgba(255, 255, 255, 0.4);
    font-weight: normal;
    font-size: 1rem;
    opacity: 0.6;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.section .book-list li:hover {
    color: #ffffff;
    padding-left: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
}

.section .book-list li:hover::before {
    opacity: 1;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Tinkering Links */
.tinkering-link {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none !important;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    display: inline;
}

.tinkering-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.4));
    transition: width 0.3s ease;
}

.tinkering-link:hover {
    color: #ffffff !important;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

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

/* Projects Grid - Clean Minimal Design - Redesigned */
.section .projects-grid {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    text-align: left;
    width: 100%;
    max-width: 100%;
}

.section .project {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: visible !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-bottom: 1.75rem !important;
}

.section .project:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

.section .project:hover {
    border-bottom-color: rgba(255, 255, 255, 0.15) !important;
    padding-left: 0.5rem;
    background: rgba(255, 255, 255, 0.02) !important;
}

.section .project h3 {
    color: #ffffff !important;
    font-size: 1.125rem !important;
    margin: 0 0 0.625rem 0 !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    letter-spacing: -0.5px;
}

.section .project h3 a {
    color: #ffffff !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    display: inline-block;
    position: relative;
}

.section .project h3 a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.4));
    transition: width 0.3s ease;
}

.section .project h3 a:hover {
    color: var(--primary-color) !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.section .project h3 a:hover::after {
    width: 100%;
}

.section .project p {
    color: rgba(255, 255, 255, 0.65) !important;
    font-size: 0.9rem !important;
    line-height: 1.6 !important;
    margin: 0 !important;
    font-weight: 400;
}

/* Typography */
h1, h2, h3 {
    color: var(--text-color) !important;
    margin: 0;
    font-weight: 600;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.8rem;
}

h3 {
    font-size: 1.2rem;
    margin-top: var(--spacing-unit);
}

.tagline {
    color: var(--text-color) !important;
    font-size: 1.2rem;
    margin: 0.5rem 0 1.5rem;
}

/* Header section */
.profile-header {
    text-align: center;
    padding: 4rem 0 2rem 0;
    margin: 0 auto;
    position: relative;
    max-width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Header when popup is active */
.profile-header.popup-active {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1500;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    margin: 0;
    height: 120px;
    justify-content: center;
}

.profile-header.popup-active .model-container {
    margin: 0;
}

.profile-header.popup-active #profile-model-container {
    width: 80px;
    height: 80px;
}

.profile-header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    width: 100%;
    text-align: center;
}

/* 3D Model Container */
.model-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    margin-top: 2rem;
}

#profile-model-container {
    width: 400px;
    height: 400px;
    --poster-color: transparent;
    border-radius: 0;
    border: none;
    background-color: transparent;
    display: block;
    position: relative;
    transform: none;
    left: auto;
}

#profile-model-container:hover {
    transform: none;
    box-shadow: none;
}

/* Icon Navigation */
.icon-navigation {
    display: block;
    text-align: center;
    margin: 3rem auto;
    padding: 0;
    width: 100%;
    white-space: nowrap;
}

.icon-section {
    display: inline-block;
    width: 80px;
    height: 80px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 22%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    margin: 0 2rem;
    text-align: center;
    line-height: 80px;
    white-space: normal;
}

.icon-section:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.icon-section .section-icon {
    font-size: 2.5rem;
    color: var(--primary-color) !important;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
    display: inline-block;
    vertical-align: middle;
    line-height: normal;
}

.icon-section:hover .section-icon {
    text-shadow: 0 0 25px rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

.icon-section.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: var(--primary-color);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
}

.icon-section.active .section-icon {
    text-shadow: 0 0 30px rgba(255, 255, 255, 1);
}

/* Social links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.social-links a {
    color: var(--primary-color);
    font-size: 1.8rem;
    transition: color 0.8s ease, transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), text-shadow 0.8s ease;
    position: relative;
    display: inline-block;
    padding: 0.3rem;
}

.social-links a:hover {
    color: var(--hover-color);
    transform: translateY(-4px) scale(1.03);
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

/* Remove the underline effect completely */
.social-links a::before {
    display: none;
}

/* Override to remove underline effect from social icons */
.social-links a.model-link::after {
    display: none;
}

/* Grid layout */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.grid-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.grid-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

/* Tags and Lists */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: var(--spacing-unit) 0;
}

.tag {
    background: var(--skill-bg);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all var(--transition-speed) ease;
    cursor: default;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.tag:hover {
    background: var(--primary-color);
    color: var(--bg-color);
    transform: translateY(-2px);
}

/* Lists */
.model-list, .coding-list, .book-list {
    list-style: none;
    padding-left: 0;
    margin: var(--spacing-unit) 0;
}

.model-list li, .coding-list li, .book-list li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    transition: transform var(--transition-speed) ease, color var(--transition-speed) ease;
}

.model-list li::before, .coding-list li::before, .book-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--text-color) !important;
    transition: transform var(--transition-speed) ease, color var(--transition-speed) ease;
}

.book-list li:hover {
    transform: translateX(3px);
    color: var(--text-color) !important;
}

.book-list li:hover::before {
    transform: translateX(2px);
    color: var(--text-color) !important;
}

/* Ensure all links in coding section have consistent styling */
.coding-list li a {
    color: var(--text-color) !important;
    text-decoration: none !important;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Projects section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.project {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.project:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.project h3 {
    margin-bottom: 0.8rem;
}

.project p {
    margin-bottom: 1rem;
    color: var(--text-color);
    opacity: 0.9;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: var(--skill-bg);
    transition: all var(--transition-speed) ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-link:hover {
    background: var(--primary-color);
    color: var(--bg-color);
    transform: translateY(-2px);
}

/* Model links */
a.model-link,
a.model-link:visited,
a.model-link:link {
    color: var(--text-color) !important;
    text-decoration: none !important;
    position: relative;
    font-weight: 500;
    padding: 0 2px;
    transition: color var(--transition-speed) ease, text-shadow var(--transition-speed) ease;
}

a.model-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: var(--text-color);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform var(--transition-speed) ease;
}

a.model-link:hover {
    color: var(--text-color) !important;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

a.model-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Specific override for coding list links to maintain backward compatibility */
.coding-list li a.model-link,
.coding-list li a.model-link:visited {
    /* Inherits from general a.model-link */
}

.coding-list li a.model-link::after {
    /* Inherits from general a.model-link::after */
}

.coding-list li a.model-link:hover {
    /* Inherits from general a.model-link:hover */
}

.coding-list li a.model-link:hover::after {
    /* Inherits from general a.model-link:hover::after */
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .profile-header {
        padding: 2rem 0;
        width: 100%;
        min-height: 50vh;
    }
    
    .profile-header.popup-active {
        height: 80px;
        padding: 0.5rem 0;
    }
    
    .profile-header.popup-active #profile-model-container {
        width: 60px;
        height: 60px;
    }
    
    .profile-header h1 {
        font-size: 2.5rem;
    }
    
    #profile-model-container {
        width: 300px;
        height: 300px;
        transform: none;
        left: auto;
    }
    
    .icon-navigation {
        gap: 2rem;
        margin: 1rem auto;
        padding: 1rem 0;
        width: 100%;
        max-width: 95%;
    }
    
    .icon-section {
        width: 48px !important;
        height: 48px !important;
    }
    
    .icon-section .section-icon {
        font-size: 1.5rem !important;
    }
    
    .section {
        max-width: 620px !important;
        width: calc(100% - 2rem) !important;
        max-height: 80vh !important;
        top: 50% !important;
        transform: translate(-50%, -50%) scale(0.9) !important;
    }
    
    .section.active {
        transform: translate(-50%, -50%) scale(1) !important;
    }
    
    .close-section-btn {
        top: 1rem !important;
        right: 1rem !important;
        width: 32px !important;
        height: 32px !important;
        font-size: 0.9rem !important;
    }
    
    .section-content-wrapper {
        padding: 1.25rem;
    }
    
    .section h2 {
        font-size: 1.35rem !important;
    }
    
    .section .section-header {
        padding: 1.25rem 1.5rem;
        gap: 0.875rem;
    }
    
    .section .section-header .section-icon {
        width: 44px !important;
        height: 44px !important;
        font-size: 1.2rem !important;
    }
    
    .section .book-list {
        gap: 0.625rem;
    }
    
    .section .book-list li {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }
    
    .section .projects-grid {
        gap: 0.875rem;
    }
    
    .section .project {
        padding: 1.25rem !important;
    }
    
    .section .project h3 {
        font-size: 1.05rem !important;
    }
    
    .section .project p {
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
    }
    
    .profile-image {
        width: 150px;
        height: 150px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .grid-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .tags {
        gap: 0.5rem;
    }
    
    .tag {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .social-links {
        gap: 1.5rem;
    }
    
    .social-links a {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .social-links i {
        font-size: 1.2rem;
    }
    
    .x-icon {
        width: 1.2rem;
        height: 1.2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .project {
        padding: 1.25rem;
    }
    
    .project-link {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 480px) {
    .profile-header {
        padding: 1.5rem 0;
        width: 100%;
    }
    
    .profile-header h1 {
        font-size: 2rem;
    }
    
    #profile-model-container {
        width: 250px;
        height: 250px;
        transform: none;
        left: auto;
    }
}

/* Dark mode optimization */
@media (prefers-color-scheme: dark) {
    :root {
        --section-bg: rgba(17, 17, 17, 0.7);
        --skill-bg: rgba(34, 34, 34, 0.8);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

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

/* Blog Section Styles */
.blog-posts {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
}

.blog-post {
    background: rgba(25, 25, 25, 0.8);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Add transition class for smooth animations */
.blog-post.transitioning {
    transition: all 0.3s ease-in-out;
    z-index: 1001; /* Ensure it's above everything during transition */
}

.blog-post:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
}

.blog-title {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--text-color) !important;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
}

.blog-date::before {
    content: "\f073";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 0.5rem;
}

.blog-tags::before {
    content: "\f02c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 0.5rem;
}

.blog-preview {
    display: block;
}

.blog-content {
    display: none;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 1rem;
}

/* Expanded state */
.blog-post.expanded {
    background: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(10px);
    cursor: auto;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    z-index: 1001;
    position: fixed;
    max-height: 100vh;
}

.blog-post.expanded .blog-content {
    display: block;
    animation: fadeIn 0.3s ease;
    max-width: 1200px;
    margin: 0 auto;
}

.blog-post.expanded .blog-preview {
    display: none;
}

.blog-close {
    text-align: center;
    margin-top: 2rem;
}

.close-button {
    background: var(--primary-color);
    color: #000;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition-speed) ease;
}

.close-button:hover {
    background: var(--hover-color);
}

.blog-post h4 {
    color: var(--text-color) !important;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.blog-post ul {
    padding-left: 1.5rem;
}

.blog-post pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
}

.blog-post code {
    font-family: 'Courier New', Courier, monospace;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Overlay for when blog post is expanded */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile Responsive Styles for Blog */
@media (max-width: 768px) {
    .blog-post.expanded {
        padding: 1.5rem;
    }
    
    .blog-post.expanded .blog-content {
        max-width: 100%;
    }
    
    .blog-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .blog-post.expanded {
        padding: 1rem;
    }
}

/* Force icon navigation positioning - override any conflicting styles */
body .container .icon-navigation,
html body .container .icon-navigation,
html body div.container .icon-navigation {
    position: fixed !important;
    bottom: 20vh !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 4rem !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    z-index: 100 !important;
}

body .container .icon-navigation .icon-section {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 56px !important;
    height: 56px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    border-radius: 22% !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid transparent !important;
    position: relative !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
}

body .container .icon-navigation .icon-section:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: var(--primary-color) !important;
    transform: scale(1.15) !important;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.5) !important;
}

body .container .icon-navigation .icon-section:active {
    transform: scale(0.95) !important;
}

body .container .icon-navigation .icon-section .section-icon {
    font-size: 1.75rem !important;
    color: var(--primary-color) !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5) !important;
    transition: all 0.3s ease !important;
}

body .container .icon-navigation .icon-section:hover .section-icon {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8) !important;
    transform: scale(1.1) !important;
} 