* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    overflow-x: hidden;
    background-color: #0a0a0a;
    color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: manipulation;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Background Canvas */
#backgroundCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    transition: opacity 0.5s ease;
    touch-action: none; /* Allow touch interactions with particles */
    -webkit-user-select: none;
    user-select: none;
}

/* Hide background particles when contact section is visible */
header.contact-visible ~ main #backgroundCanvas {
    opacity: 0.2;
}

/* Icon Size Selector */
.icon-size-selector {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.icon-size-selector.show {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.size-selector-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 300;
    color: #ffffff;
    text-align: center;
}

.size-selector-content p {
    margin: 0 0 2rem 0;
    font-size: 0.9rem;
    color: #aaaaaa;
    text-align: center;
}

.size-options {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.size-option {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    min-width: 90px;
}

.size-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px);
}

.size-option.active {
    background: rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.6);
}

.size-preview {
    font-size: 2rem;
    transition: font-size 0.3s ease;
}

.size-option:hover .size-preview {
    transform: scale(1.1);
}

.size-1 { font-size: 1.5rem; }
.size-2 { font-size: 2rem; }
.size-3 { font-size: 2.5rem; }
.size-4 { font-size: 3rem; }
.size-5 { font-size: 3.5rem; }

.size-label {
    font-size: 0.85rem;
    color: #cccccc;
    font-weight: 400;
}

/* Light mode for size selector */
body.light-mode .icon-size-selector {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(0, 0, 0, 0.2);
}

body.light-mode .size-selector-content h4 {
    color: #1a1a1a;
}

body.light-mode .size-selector-content p {
    color: #666666;
}

body.light-mode .size-option {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.2);
}

body.light-mode .size-option:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.4);
}

body.light-mode .size-option.active {
    background: rgba(74, 144, 226, 0.2);
    border-color: rgba(74, 144, 226, 0.6);
}

body.light-mode .size-label {
    color: #666666;
}

/* Size variations for social icons when contact visible */
/* Size 1 - Small (50px) */
header.contact-visible.icon-size-1 .social-link {
    width: 50px;
    height: 50px;
}
header.contact-visible.icon-size-1 .social-link svg {
    width: 24px;
    height: 24px;
}

/* Size 2 - Medium (60px) */
header.contact-visible.icon-size-2 .social-link {
    width: 60px;
    height: 60px;
}
header.contact-visible.icon-size-2 .social-link svg {
    width: 30px;
    height: 30px;
}

/* Size 3 - Large (70px) - Default */
header.contact-visible.icon-size-3 .social-link {
    width: 70px;
    height: 70px;
}
header.contact-visible.icon-size-3 .social-link svg {
    width: 36px;
    height: 36px;
}

/* Size 4 - Extra Large (80px) */
header.contact-visible.icon-size-4 .social-link {
    width: 80px;
    height: 80px;
}
header.contact-visible.icon-size-4 .social-link svg {
    width: 42px;
    height: 42px;
}

/* Size 5 - Huge (90px) */
header.contact-visible.icon-size-5 .social-link {
    width: 90px;
    height: 90px;
}
header.contact-visible.icon-size-5 .social-link svg {
    width: 48px;
    height: 48px;
}

/* Mobile adjustments for enlarged social icons */
@media (max-width: 768px) {
    header.contact-visible {
        padding: 1rem 2%;
    }
    
    header.contact-visible .social-links {
        gap: 0.5rem;
    }
    
    /* Reduce icon sizes on mobile to prevent overflow */
    header.contact-visible.icon-size-1 .social-link {
        width: 40px;
        height: 40px;
    }
    header.contact-visible.icon-size-1 .social-link svg {
        width: 20px;
        height: 20px;
    }
    
    header.contact-visible.icon-size-2 .social-link {
        width: 48px;
        height: 48px;
    }
    header.contact-visible.icon-size-2 .social-link svg {
        width: 24px;
        height: 24px;
    }
    
    header.contact-visible.icon-size-3 .social-link {
        width: 56px;
        height: 56px;
    }
    header.contact-visible.icon-size-3 .social-link svg {
        width: 28px;
        height: 28px;
    }
    
    header.contact-visible.icon-size-4 .social-link {
        width: 64px;
        height: 64px;
    }
    header.contact-visible.icon-size-4 .social-link svg {
        width: 32px;
        height: 32px;
    }
    
    header.contact-visible.icon-size-5 .social-link {
        width: 72px;
        height: 72px;
    }
    header.contact-visible.icon-size-5 .social-link svg {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    header.contact-visible {
        padding: 0.8rem 1.5%;
    }
    
    header.contact-visible .social-links {
        gap: 0.4rem;
    }
    
    /* Further reduce icon sizes on very small screens */
    header.contact-visible.icon-size-1 .social-link {
        width: 36px;
        height: 36px;
    }
    header.contact-visible.icon-size-1 .social-link svg {
        width: 18px;
        height: 18px;
    }
    
    header.contact-visible.icon-size-2 .social-link {
        width: 42px;
        height: 42px;
    }
    header.contact-visible.icon-size-2 .social-link svg {
        width: 21px;
        height: 21px;
    }
    
    header.contact-visible.icon-size-3 .social-link {
        width: 48px;
        height: 48px;
    }
    header.contact-visible.icon-size-3 .social-link svg {
        width: 24px;
        height: 24px;
    }
    
    header.contact-visible.icon-size-4 .social-link {
        width: 54px;
        height: 54px;
    }
    header.contact-visible.icon-size-4 .social-link svg {
        width: 27px;
        height: 27px;
    }
    
    header.contact-visible.icon-size-5 .social-link {
        width: 60px;
        height: 60px;
    }
    header.contact-visible.icon-size-5 .social-link svg {
        width: 30px;
        height: 30px;
    }
}

/* Content Overlay */
.content {
    position: relative;
    z-index: 2;
    min-height: 100vh;
}

/* Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 5%;
    z-index: 1000;
    transition: all 0.3s ease;
    background: transparent;
}

header.scrolled {
    padding: 1.5rem 5%;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Adjust header padding when contact visible to accommodate larger icons */
header.contact-visible {
    padding: 1.5rem 3%;
}

/* Ensure social links container doesn't overflow */
header.contact-visible .social-links {
    gap: 0.8rem;
    margin-right: 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    width: 100%;
    overflow: visible;
}

/* Ensure nav items don't cause overflow when icons are enlarged */
header.contact-visible nav {
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: #ffffff;
    transition: text-shadow 0.3s ease;
    cursor: default;
}

.logo:hover {
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.3), 0 0 8px rgba(255, 255, 255, 0.2);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 3rem;
}

.nav-links a {
    color: #cccccc;
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    padding: 0.5rem;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #ffffff;
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: #ffffff;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.3), 0 0 6px rgba(255, 255, 255, 0.2);
}

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

.nav-links a.active {
    color: #ffffff;
}

/* Theme Toggle - Integrated Design */
.theme-toggle {
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-right: 1rem;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    position: relative;
    padding: 0;
    opacity: 0.7;
}

.theme-toggle:hover {
    opacity: 1;
    transform: scale(1.1) rotate(15deg);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-icon {
    width: 22px;
    height: 22px;
    stroke: #cccccc;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.1));
}

.theme-toggle:hover .theme-icon {
    stroke: #ffffff;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
}

.moon-icon {
    opacity: 1;
    transform: rotate(0deg);
}

.sun-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.8);
}

body.light-mode .moon-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0.8);
}

body.light-mode .sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

body.light-mode .theme-icon {
    stroke: #666666;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.1));
}

body.light-mode .theme-toggle:hover .theme-icon {
    stroke: #1a1a1a;
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.2));
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: nowrap;
    overflow: visible;
}

.social-link {
    color: #cccccc;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    flex-shrink: 0;
    position: relative;
}

/* Dark mode styling for enlarged social icons (sizes controlled by icon-size-1 through icon-size-5 classes) */
header.contact-visible .social-link {
    border-width: 2.5px;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

header.contact-visible .social-link svg {
    stroke-width: 2;
}

/* Hover effect for enlarged social icons in dark mode */
header.contact-visible .social-link:hover {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.4);
}

header.contact-visible .social-link:hover svg {
    stroke: #000000;
}

.social-link:hover {
    color: #ffffff;
    border-color: #ffffff;
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.social-link:hover svg {
    stroke: #000000;
}

.social-link svg {
    width: 20px;
    height: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    stroke: currentColor;
    stroke-width: 1.5;
}

/* Main Content */
main {
    position: relative;
    z-index: 2;
}

/* Full Screen Sections */
.full-screen-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 5% 5rem;
    position: relative;
}

/* Hero Section */
.hero {
    text-align: center;
    max-width: 1200px;
    width: 100%;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    padding-top: 8rem; /* Push content down to avoid social icon overlap */
}

.hero-title {
    font-size: 6rem;
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff 0%, #cccccc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: filter 0.3s ease;
    cursor: default;
}

/* Dynamic glow when cursor light is near - Dark Mode */
.hero-title.glow-active {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4)) 
            drop-shadow(0 0 15px rgba(255, 255, 255, 0.3))
            drop-shadow(0 0 25px rgba(255, 255, 255, 0.2));
}

/* Dynamic glow when cursor light is near - Light Mode */
body.light-mode .hero-title.glow-active {
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.3)) 
            drop-shadow(0 0 15px rgba(0, 0, 0, 0.2))
            drop-shadow(0 0 25px rgba(0, 0, 0, 0.15));
}

.hero-title:hover {
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3)) drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #aaaaaa;
    margin-bottom: 3rem;
    letter-spacing: 0.5px;
    font-weight: 300;
    line-height: 1.6;
    transition: text-shadow 0.3s ease, color 0.3s ease;
    cursor: default;
}

/* Dynamic glow when cursor light is near - Dark Mode */
.hero-subtitle.glow-active {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5), 
                 0 0 18px rgba(255, 255, 255, 0.4),
                 0 0 28px rgba(255, 255, 255, 0.3);
}

/* Dynamic glow when cursor light is near - Light Mode */
body.light-mode .hero-subtitle.glow-active {
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.4), 
                 0 0 18px rgba(0, 0, 0, 0.3),
                 0 0 28px rgba(0, 0, 0, 0.25);
}

.hero-subtitle:hover {
    color: #ffffff;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.3), 0 0 8px rgba(255, 255, 255, 0.2);
}

.cta-button {
    padding: 1rem 3rem;
    font-size: 1rem;
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
    cursor: pointer;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    font-weight: 500;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Dynamic glow when cursor light is near - Dark Mode */
.cta-button.glow-active {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5), 
                0 0 25px rgba(255, 255, 255, 0.4),
                0 0 35px rgba(255, 255, 255, 0.3);
}

/* Dynamic glow when cursor light is near - Light Mode */
body.light-mode .cta-button.glow-active {
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3), 
                0 0 25px rgba(0, 0, 0, 0.25),
                0 0 35px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    background-color: #ffffff;
    color: #0a0a0a;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2), 0 0 10px rgba(255, 255, 255, 0.15);
    text-shadow: 0 0 3px rgba(10, 10, 10, 0.15);
}

/* Scroll Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Section Content */
.section-content {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.section-title {
    font-size: 4.5rem;
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 4rem;
    letter-spacing: -0.5px;
    text-align: center;
    color: #ffffff;
    transition: text-shadow 0.3s ease;
    cursor: default;
}

.section-title:hover {
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3), 0 0 10px rgba(255, 255, 255, 0.2);
}

/* Features Section */
.features-section {
    background: transparent;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.feature-card {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.feature-card:hover {
    transform: translateY(-10px);
    background: rgba(25, 25, 25, 0.98);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(255, 255, 255, 0.4),
        0 0 60px rgba(255, 255, 255, 0.3),
        0 0 90px rgba(255, 255, 255, 0.2);
}

.feature-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.feature-image .placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #666;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.feature-text {
    padding: 2.5rem;
}

.feature-text h3 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: #ffffff;
    letter-spacing: -0.5px;
    transition: text-shadow 0.3s ease;
    cursor: default;
}

.feature-text h3:hover {
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.3), 0 0 8px rgba(255, 255, 255, 0.2);
}

.feature-text p {
    font-size: 1.1rem;
    color: #aaaaaa;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    transition: text-shadow 0.3s ease, color 0.3s ease;
    cursor: default;
}

.feature-text p:hover {
    color: #ffffff;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.3), 0 0 6px rgba(255, 255, 255, 0.2);
}

.feature-tag {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.85rem;
    color: #cccccc;
    letter-spacing: 1px;
}

/* About Section */
.about-section {
    background: transparent;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    padding: 0 2rem;
}

.about-text {
    font-size: 1.3rem;
    color: #cccccc;
    line-height: 2;
    font-weight: 300;
    transition: all 0.3s ease;
    cursor: default;
    margin: 0 auto;
    text-align: left;
    letter-spacing: 0.5px;
    word-spacing: 1px;
    max-width: 100%;
    padding: 3rem 3.5rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.about-text:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

/* Contact Section */
.contact-section {
    background: transparent;
}

.contact-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.contact-text {
    font-size: 1.3rem;
    color: #aaaaaa;
    margin-bottom: 3rem;
    font-weight: 300;
    transition: text-shadow 0.3s ease, color 0.3s ease;
    cursor: default;
}

.contact-text:hover {
    color: #ffffff;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.3), 0 0 8px rgba(255, 255, 255, 0.2);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    margin-top: 2rem;
}

.contact-link {
    font-size: 1.4rem;
    color: #ffffff;
    text-decoration: none;
    padding: 1.2rem 2.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    font-weight: 400;
    letter-spacing: 0.5px;
    min-width: 300px;
    text-align: center;
    cursor: pointer;
}

.contact-link:hover {
    background: #ffffff;
    border-color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3);
    color: #000000;
    text-shadow: none;
}

.contact-link:active {
    transform: translateY(-1px);
}

/* QR Code Button Below Project Image */
.qr-code-btn-bottom {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    margin: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.qr-code-btn-bottom:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.qr-code-btn-bottom:active {
    transform: translateY(0);
}

.qr-code-btn-bottom .qr-icon {
    width: 32px;
    height: 32px;
    fill: #ffffff;
    stroke: none;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.qr-code-btn-bottom:hover .qr-icon {
    transform: scale(1.1);
}

.qr-code-btn-bottom span {
    color: #cccccc;
    font-size: 0.95rem;
    font-weight: 400;
    transition: color 0.3s ease;
}

.qr-code-btn-bottom:hover span {
    color: #ffffff;
}

/* QR Code Modal */
.qr-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.qr-modal.active {
    display: flex;
    opacity: 1;
}

.qr-modal-content {
    background: rgba(30, 30, 30, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 3rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.qr-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.qr-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.qr-close-btn svg {
    width: 20px;
    height: 20px;
    stroke: #ffffff;
}

.qr-modal-content h3 {
    font-size: 2rem;
    font-weight: 300;
    color: #ffffff;
    margin: 0 0 2rem 0;
}

.qr-modal-image-container {
    background: #ffffff;
    padding: 2rem;
    border-radius: 16px;
    display: inline-block;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.3),
                0 0 80px rgba(255, 255, 255, 0.2),
                0 8px 32px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.3s ease;
}

.qr-modal-image-container:hover {
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.4),
                0 0 100px rgba(255, 255, 255, 0.3),
                0 12px 40px rgba(0, 0, 0, 0.4);
}

.qr-modal-image-container img {
    display: block;
    max-width: 300px;
    width: 100%;
    height: auto;
}

.qr-modal-instruction {
    font-size: 1.1rem;
    color: #aaaaaa;
    margin: 0 0 1.5rem 0;
    font-weight: 300;
}

.qr-visit-btn {
    background: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 12px;
    padding: 1rem 2rem;
    color: #000000;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.qr-visit-btn:hover {
    background: #f0f0f0;
    border-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.4);
}

.qr-visit-btn:active {
    transform: translateY(0);
}

.qr-visit-btn svg {
    width: 20px;
    height: 20px;
    stroke: #000000;
}

/* Light Mode QR Modal */
body.light-mode .qr-modal {
    background: rgba(255, 255, 255, 0.95);
}

body.light-mode .qr-modal-content {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(0, 0, 0, 0.2);
}

body.light-mode .qr-modal-content h3 {
    color: #1a1a1a;
}

body.light-mode .qr-modal-image-container {
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.2),
                0 0 80px rgba(0, 0, 0, 0.15),
                0 8px 32px rgba(0, 0, 0, 0.25);
}

body.light-mode .qr-modal-image-container:hover {
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.25),
                0 0 100px rgba(0, 0, 0, 0.2),
                0 12px 40px rgba(0, 0, 0, 0.3);
}

body.light-mode .qr-modal-instruction {
    color: #666666;
}

body.light-mode .qr-close-btn {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
}

body.light-mode .qr-close-btn:hover {
    background: rgba(0, 0, 0, 0.2);
}

body.light-mode .qr-close-btn svg {
    stroke: #1a1a1a;
}

body.light-mode .qr-code-btn-bottom {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .qr-code-btn-bottom:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

body.light-mode .qr-code-btn-bottom .qr-icon {
    fill: #1a1a1a;
}

body.light-mode .qr-code-btn-bottom span {
    color: #666666;
}

body.light-mode .qr-code-btn-bottom:hover span {
    color: #1a1a1a;
}

body.light-mode .qr-visit-btn {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.light-mode .qr-visit-btn:hover {
    background: #2a2a2a;
    border-color: #2a2a2a;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

body.light-mode .qr-visit-btn svg {
    stroke: #ffffff;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 4.5rem;
    }
    
    .section-title {
        font-size: 3.5rem;
    }
    
    .feature-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        gap: 1.5rem;
        font-size: 0.85rem;
    }
    
    .social-links {
        gap: 1rem;
    }
    
    .social-link {
        width: 36px;
        height: 36px;
    }
    
    .social-link svg {
        width: 18px;
        height: 18px;
    }
    
    .hero-content {
        padding-top: 6rem; /* Reduce padding on tablets but maintain clearance */
    }
    
    .hero-title {
        font-size: 3rem;
        line-height: 1.1;
        letter-spacing: -0.5px;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        padding: 0 1rem;
    }
    
    .section-title {
        font-size: 2.5rem;
        margin-bottom: 2.5rem;
        padding: 0 1rem;
    }
    
    .full-screen-section {
        padding: 5rem 4% 3rem;
        min-height: auto;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 2rem;
    }
    
    .feature-card {
        border-radius: 15px;
    }
    
    .feature-text {
        padding: 2rem 1.5rem;
    }
    
    .feature-text h3 {
        font-size: 1.75rem;
    }
    
    .feature-text p {
        font-size: 1rem;
    }
    
    .feature-image {
        height: 250px;
    }
    
    .about-content {
        max-width: 100%;
        padding: 0 1.5rem;
    }
    
    .about-text {
        font-size: 1.1rem;
        line-height: 1.8;
        padding: 2.5rem 2rem;
    }
    
    .contact-content {
        padding: 0 1.5rem;
    }
    
    .contact-text {
        font-size: 1.1rem;
    }
    
    .contact-link {
        font-size: 1.2rem;
        padding: 0.9rem 1.8rem;
    }
    
    .cta-button {
        padding: 0.9rem 2.5rem;
        font-size: 0.95rem;
    }
    
    header {
        padding: 1.5rem 4%;
    }
    
    header.scrolled {
        padding: 1rem 4%;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .theme-toggle {
        width: 30px;
        height: 30px;
        margin-right: 0.8rem;
    }
    
    .theme-icon {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    nav {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .social-links {
        gap: 0.8rem;
        margin-left: auto;
    }
    
    .social-link {
        width: 32px;
        height: 32px;
    }
    
    .social-link svg {
        width: 16px;
        height: 16px;
    }
    
    .hero-content {
        padding-top: 5rem; /* Maintain clearance on mobile */
    }
    
    .hero-title {
        font-size: 2rem !important;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 0.85rem !important;
        padding: 0 0.5rem;
    }
    
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
        padding: 0 0.5rem;
    }
    
    .full-screen-section {
        padding: 4rem 3% 2.5rem;
    }
    
    .cta-button {
        font-size: 0.9rem;
        padding: 0.8rem 2rem;
    }
    
    .feature-text {
        padding: 1.5rem 1rem;
    }
    
    .feature-text h3 {
        font-size: 1.3rem;
    }
    
    .feature-text p {
        font-size: 0.85rem;
    }
    
    .feature-image {
        height: 200px;
    }
    
    .about-content {
        padding: 0 1rem;
    }
    
    .about-text {
        font-size: 0.9rem;
        line-height: 1.7;
        padding: 2rem 1.5rem;
    }
    
    .contact-content {
        padding: 0 1rem;
    }
    
    .contact-text {
        font-size: 0.9rem;
    }
    
    .contact-link {
        font-size: 1.1rem;
        padding: 0.8rem 1.5rem;
    }
    
    .cta-button {
        padding: 0.8rem 2rem;
        font-size: 0.9rem;
    }
    
    .logo {
        font-size: 1.1rem;
        letter-spacing: 2px;
    }
    
    .theme-toggle {
        width: 28px;
        height: 28px;
        margin-right: 0.5rem;
    }
    
    .theme-icon {
        width: 16px;
        height: 16px;
    }
    
    header {
        padding: 1rem 3%;
    }
    
    header.scrolled {
        padding: 0.8rem 3%;
    }
}

/* Interactive Booklet Styles */
.booklet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.booklet-overlay.active {
    opacity: 1;
    visibility: visible;
}

.booklet-container {
    position: relative;
    max-width: 1200px;
    width: 90%;
    height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.close-booklet {
    position: absolute;
    top: -50px;
    right: 0;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.close-booklet:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
    transform: rotate(90deg);
}

.booklet-book {
    position: relative;
    width: 1000px;
    height: 600px;
    perspective: 2500px;
    margin-bottom: 40px;
    transform-style: preserve-3d;
    display: flex;
}

/* Left page (static - shows flipped content) */
.booklet-book::before {
    content: '';
    position: absolute;
    left: 0;
    width: 50%;
    height: 100%;
    background: #f8f8f8;
    border-radius: 8px 0 0 8px;
    box-shadow: 
        3px 0 20px rgba(0, 0, 0, 0.2),
        0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 0;
}

/* Center binding shadow */
.booklet-book::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.2),
        rgba(0, 0, 0, 0.1),
        rgba(0, 0, 0, 0.2)
    );
    z-index: 50;
    pointer-events: none;
}

.booklet-page {
    position: absolute;
    width: 50%;
    height: 100%;
    right: 0;
    background: #ffffff;
    border-radius: 0 8px 8px 0;
    box-shadow: 
        -3px 0 20px rgba(0, 0, 0, 0.2),
        0 20px 60px rgba(0, 0, 0, 0.3);
    transform-origin: left center;
    transform-style: preserve-3d;
    transition: transform 1s ease;
    backface-visibility: hidden;
}

/* Pages that haven't been flipped yet - on the right side */
.booklet-page {
    transform: rotateY(0deg);
    z-index: auto;
}

/* Pages being flipped */
.booklet-page.flipping {
    z-index: 100;
    transition: transform 1s cubic-bezier(0.65, 0.05, 0.36, 1);
}

/* Flipped pages - stacked on the left */
.booklet-page.flipped {
    transform: rotateY(-180deg);
    border-radius: 8px 0 0 8px;
    box-shadow: 
        3px 0 20px rgba(0, 0, 0, 0.2),
        0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Add gradient shadow during flip */
.booklet-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.1) 0%,
        transparent 10%,
        transparent 90%,
        rgba(0, 0, 0, 0.05) 100%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    border-radius: inherit;
}

.booklet-page.flipping::before {
    opacity: 1;
}

/* Back side of the page */
.booklet-page::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f8f8f8;
    backface-visibility: visible;
    transform: rotateY(180deg);
    border-radius: inherit;
}

.page-content {
    padding: 60px;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
    border-radius: inherit;
    box-sizing: border-box;
}

.page-cover {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #ffffff;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    height: 100%;
}

/* First page covers full book */
.booklet-page[data-page="1"] {
    width: 100% !important;
    border-radius: 8px !important;
    right: auto !important;
    left: 0 !important;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(0, 0, 0, 0.2) !important;
}

/* When cover is flipped, it should be on the left */
.booklet-page[data-page="1"].flipped {
    width: 50% !important;
    border-radius: 8px 0 0 8px !important;
    right: auto !important;
    left: 0 !important;
}

.page-cover h1 {
    font-size: 4rem;
    font-weight: 300;
    letter-spacing: 3px;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.page-cover p {
    font-size: 1.5rem;
    color: #aaaaaa;
    letter-spacing: 2px;
}

.page-back {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    color: #ffffff;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.page-back h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.page-back .contact-info {
    margin-top: 2rem;
    font-size: 1.1rem;
    color: #aaaaaa;
}

.page-back .contact-info p {
    margin: 0.5rem 0;
}

.page-number {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 3rem;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.1);
}

.page-content h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: #1a1a1a;
}

.project-image {
    width: 100%;
    height: 250px;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.project-details {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
    color: #333;
}

.project-details strong {
    color: #1a1a1a;
    font-weight: 600;
}

.project-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
}

/* Navigation */
.booklet-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 600px;
    gap: 2rem;
}

.nav-btn {
    padding: 0.8rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-size: 1rem;
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #ffffff;
    transform: translateY(-2px);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.nav-btn:disabled:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: none;
}

.page-indicator {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    letter-spacing: 1px;
}

/* Responsive Booklet */
@media (max-width: 1200px) {
    .booklet-book {
        width: 900px;
        height: 540px;
    }
}

@media (max-width: 1024px) {
    .booklet-book {
        width: 800px;
        height: 480px;
    }
    
    .page-content {
        padding: 40px;
    }
    
    .page-cover h1 {
        font-size: 3rem;
    }
    
    .page-content h2 {
        font-size: 2rem;
    }
    
    .project-image {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .booklet-book {
        width: 95%;
        height: 60vh;
        max-width: 600px;
    }
    
    .page-content {
        padding: 30px;
    }
    
    .page-cover h1 {
        font-size: 2.5rem;
    }
    
    .page-cover p {
        font-size: 1.2rem;
    }
    
    .page-content h2 {
        font-size: 1.8rem;
    }
    
    .project-image {
        height: 150px;
    }
    
    .page-number {
        font-size: 2rem;
        top: 20px;
        right: 20px;
    }
    
    .project-details,
    .project-description {
        font-size: 0.9rem;
    }
    
    .booklet-nav {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .nav-btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .page-indicator {
        width: 100%;
        text-align: center;
        order: -1;
    }
}

@media (max-width: 480px) {
    .close-booklet {
        top: -40px;
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .booklet-book {
        height: 60vh;
        max-width: 95%;
    }
    
    .booklet-container {
        width: 95%;
        height: 75vh;
    }
    
    .page-content {
        padding: 20px 15px;
    }
    
    .page-cover h1 {
        font-size: 2rem;
    }
    
    .page-cover p {
        font-size: 1rem;
    }
    
    .page-content h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .project-image {
        height: 120px;
        margin-bottom: 1rem;
    }
    
    .page-number {
        font-size: 1.5rem;
        top: 15px;
        right: 15px;
    }
    
    .nav-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        min-width: 80px;
    }
    
    .page-indicator {
        font-size: 0.9rem;
    }
}

/* ============================================
   LIGHT MODE STYLES
   ============================================ */

body.light-mode {
    background-color: #f5f5f5;
    color: #1a1a1a;
}

body.light-mode #backgroundCanvas {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

/* Hide background particles in light mode when contact section is visible */
body.light-mode header.contact-visible ~ main #backgroundCanvas {
    opacity: 0.3;
}

body.light-mode header.scrolled {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .logo {
    color: #1a1a1a;
}

body.light-mode .logo:hover {
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.3), 0 0 8px rgba(0, 0, 0, 0.2);
}

body.light-mode .nav-links a {
    color: #666666;
}

body.light-mode .nav-links a:hover,
body.light-mode .nav-links a.active {
    color: #1a1a1a;
}

body.light-mode .nav-links a:hover {
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.3), 0 0 6px rgba(0, 0, 0, 0.2);
}

body.light-mode .nav-links a::after {
    background-color: #1a1a1a;
}

body.light-mode .social-link {
    color: #666666;
    border-color: rgba(0, 0, 0, 0.2);
    background: rgba(0, 0, 0, 0.05);
}

body.light-mode .social-link:hover {
    color: #1a1a1a;
    border-color: #1a1a1a;
    background: #1a1a1a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.light-mode .social-link:hover svg {
    stroke: #ffffff;
}

/* Light mode styling for enlarged social icons (sizes controlled by icon-size-1 through icon-size-5 classes) */
body.light-mode header.contact-visible .social-link {
    border-color: rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.15);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Hover effect for enlarged social icons in light mode */
body.light-mode header.contact-visible .social-link:hover {
    background: #1a1a1a;
    border-color: #1a1a1a;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

body.light-mode header.contact-visible .social-link:hover svg {
    stroke: #ffffff;
}

/* Hero section background fix for light mode */
body.light-mode .hero {
    background: transparent !important;
    box-shadow: none !important;
}

body.light-mode .hero-content {
    background: transparent !important;
    box-shadow: none !important;
}

body.light-mode .hero::before,
body.light-mode .hero::after,
body.light-mode .hero-content::before,
body.light-mode .hero-content::after {
    display: none !important;
    background: none !important;
    box-shadow: none !important;
}

body.light-mode .full-screen-section.hero {
    background: transparent !important;
}

body.light-mode .content {
    background: transparent !important;
}

body.light-mode main {
    background: transparent !important;
}

body.light-mode .hero-title {
    background: linear-gradient(135deg, #1a1a1a 0%, #666666 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

body.light-mode .hero-title:hover {
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 10px rgba(0, 0, 0, 0.2));
}

body.light-mode .hero-subtitle {
    color: #666666 !important;
}

body.light-mode .hero-subtitle:hover {
    color: #1a1a1a;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.3), 0 0 8px rgba(0, 0, 0, 0.2);
}

body.light-mode .cta-button {
    color: #1a1a1a;
    border-color: #1a1a1a;
}

body.light-mode .cta-button:hover {
    background-color: #1a1a1a;
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 0 0 10px rgba(0, 0, 0, 0.15);
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.3);
}

body.light-mode .section-title {
    color: #1a1a1a;
}

body.light-mode .section-title:hover {
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.3), 0 0 10px rgba(0, 0, 0, 0.2);
}

body.light-mode .features-section {
    background: transparent;
}

body.light-mode .feature-card {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
}

body.light-mode .feature-card:hover {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.25) !important;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 0 30px rgba(0, 0, 0, 0.3),
        0 0 60px rgba(0, 0, 0, 0.2),
        0 0 90px rgba(0, 0, 0, 0.1) !important;
}

body.light-mode .feature-image {
    background: rgba(0, 0, 0, 0.05) !important;
}

body.light-mode .feature-image .placeholder-image {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.02) 100%) !important;
    color: #999 !important;
}

body.light-mode .feature-text h3 {
    color: #1a1a1a !important;
}

body.light-mode .feature-text h3:hover {
    color: #1a1a1a !important;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.3), 0 0 8px rgba(0, 0, 0, 0.2);
}

body.light-mode .feature-text p {
    color: #666666 !important;
}

body.light-mode .feature-text p:hover {
    color: #1a1a1a !important;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.3), 0 0 6px rgba(0, 0, 0, 0.2);
}

body.light-mode .feature-tag {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
    color: #666666;
}

body.light-mode .about-section {
    background: transparent;
}

body.light-mode .about-text {
    color: #666666;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

body.light-mode .about-text:hover {
    color: #1a1a1a;
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

body.light-mode .contact-section {
    background: transparent;
}

body.light-mode .contact-text {
    color: #666666;
}

body.light-mode .contact-text:hover {
    color: #1a1a1a;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.3), 0 0 8px rgba(0, 0, 0, 0.2);
}

body.light-mode .contact-link {
    color: #1a1a1a;
    border-color: rgba(0, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.05);
}

body.light-mode .contact-link:hover {
    background: #1a1a1a;
    border-color: #1a1a1a;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    color: #ffffff;
    text-shadow: none;
}

/* Fix hover states that turn text white */
body.light-mode .hero-subtitle:hover {
    color: #1a1a1a !important;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.3), 0 0 8px rgba(0, 0, 0, 0.2);
}

body.light-mode .feature-text p:hover {
    color: #1a1a1a !important;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.3), 0 0 6px rgba(0, 0, 0, 0.2);
}


body.light-mode .contact-text:hover {
    color: #1a1a1a !important;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.3), 0 0 8px rgba(0, 0, 0, 0.2);
}

/* Ensure feature tag is visible */
body.light-mode .feature-tag {
    color: #666666 !important;
}

/* Fix any remaining white text issues */
body.light-mode .placeholder-image {
    color: #999999 !important;
}

/* ============================================
   PDF FLIPBOOK STYLES
   ============================================ */

.pdf-flipbook {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 3000px;
    perspective-origin: center center;
}

/* Book container for better 3D effect */
#pdfBook {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    perspective: 3000px;
}

.pdf-flipbook-page {
    position: absolute;
    background: #ffffff;
    transform-origin: left center;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    overflow: hidden;
    backface-visibility: hidden;
    will-change: transform;
    /* Enhanced shadows for 3D effect */
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.15),
        0 8px 40px rgba(0, 0, 0, 0.1),
        inset -1px 0 0 rgba(0, 0, 0, 0.05);
}

/* Realistic page shadow when flipping */
.pdf-flipbook-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.02) 50%,
        rgba(0, 0, 0, 0.1) 100%
    );
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
    z-index: 1;
}

.pdf-flipbook-page.flipping::before {
    opacity: 1;
}

/* Flipped state - page on the left */
.pdf-flipbook-page.flipped {
    transform: rotateY(-180deg);
    box-shadow: 
        -4px 0 20px rgba(0, 0, 0, 0.15),
        -8px 0 40px rgba(0, 0, 0, 0.1),
        inset 1px 0 0 rgba(0, 0, 0, 0.05);
}

/* Active flipping animation */
.pdf-flipbook-page.flipping {
    transform: rotateY(-180deg);
    z-index: 1000;
    box-shadow: 
        0 10px 60px rgba(0, 0, 0, 0.3),
        0 20px 100px rgba(0, 0, 0, 0.2),
        -10px 0 40px rgba(0, 0, 0, 0.15);
}

.pdf-flipbook-page img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* Page faces for 3D effect */
.page-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.page-front {
    transform: rotateY(0deg);
}

.page-back {
    transform: rotateY(180deg);
    background: #f5f5f5;
}

.pdf-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 1.2rem;
    text-align: center;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.7);
    padding: 2rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.pdf-loading div {
    margin-bottom: 0.5rem;
}

/* PDF Flipbook responsive */
@media (max-width: 768px) {
    .pdf-flipbook-page {
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    }
    
    .pdf-loading {
        font-size: 1rem;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .pdf-loading {
        font-size: 0.9rem;
        padding: 1rem;
    }
}

/* ============================================
   PORTFOLIO OVERLAY & FLIPBOOK
   ============================================ */

.portfolio-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-overlay.active {
    display: flex;
    opacity: 1;
}

/* Hide background canvas when portfolio is open */
.portfolio-overlay.active ~ .content #backgroundCanvas {
    display: none;
}

.portfolio-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
}

.portfolio-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

.portfolio-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg);
}

.portfolio-close-btn svg {
    width: 24px;
    height: 24px;
}

/* Portfolio Flipbook */
.portfolio-flipbook {
    margin: 0 auto;
    box-shadow: 0 0 80px rgba(255, 255, 255, 0.35), 
                0 0 140px rgba(255, 255, 255, 0.25),
                0 15px 60px rgba(0, 0, 0, 0.5);
    background: #ffffff;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                height 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                margin 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 100%;
    max-height: calc(100vh - 180px);
    object-fit: contain;
}

/* Turn.js creates a wrapper that affects centering */
.portfolio-flipbook .turn-page {
    background: #ffffff;
}

.portfolio-flipbook-page {
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.portfolio-flipbook-page img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Portfolio Toolbar */
.portfolio-toolbar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(230, 230, 230, 0.98);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 60px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
    z-index: 10002;
    border: 1px solid rgba(0, 0, 0, 0.08);
    max-width: calc(100% - 40px);
}

.portfolio-toolbar-btn {
    background: rgba(255, 255, 255, 0.8);
    border: none;
    color: #333333;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.portfolio-toolbar-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transform: scale(1.05);
}

.portfolio-toolbar-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.portfolio-toolbar-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

/* Portfolio Theme Toggle Icons */
.portfolio-theme-icon {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Show sun in dark mode, moon in light mode */
body:not(.light-mode) .portfolio-sun-icon {
    display: none;
}

body:not(.light-mode) .portfolio-moon-icon {
    display: block;
}

body.light-mode .portfolio-sun-icon {
    display: block;
}

body.light-mode .portfolio-moon-icon {
    display: none;
}

.portfolio-toolbar-divider {
    width: 1px;
    height: 28px;
    background: rgba(0, 0, 0, 0.15);
    margin: 0 6px;
}

.portfolio-page-indicator {
    color: #666666;
    font-size: 15px;
    font-weight: 400;
    padding: 0 12px;
    white-space: nowrap;
    min-width: 90px; /* Increased to accommodate double-digit page numbers */
    text-align: center;
}

.portfolio-page-indicator strong {
    font-weight: 700;
}

/* Dark Theme for Portfolio (default) */
.portfolio-overlay:not(.light-theme) .portfolio-toolbar {
    background: rgba(60, 60, 60, 0.98);
    border-color: rgba(255, 255, 255, 0.1);
}

.portfolio-overlay:not(.light-theme) .portfolio-toolbar-btn {
    background: rgba(80, 80, 80, 0.8);
    color: #ffffff;
}

.portfolio-overlay:not(.light-theme) .portfolio-toolbar-btn:hover:not(:disabled) {
    background: rgba(100, 100, 100, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.portfolio-overlay:not(.light-theme) .portfolio-toolbar-divider {
    background: rgba(255, 255, 255, 0.2);
}

.portfolio-overlay:not(.light-theme) .portfolio-page-indicator {
    color: rgba(255, 255, 255, 0.7) !important;
}

.portfolio-overlay:not(.light-theme) .portfolio-page-indicator strong {
    color: #ffffff !important;
    font-weight: 700;
}

/* Light Theme for Portfolio */
.portfolio-overlay.light-theme {
    background: #ffffff;
}

.portfolio-overlay.light-theme .portfolio-flipbook {
    box-shadow: 0 15px 70px rgba(0, 0, 0, 0.35),
                0 8px 40px rgba(0, 0, 0, 0.25);
}

.portfolio-overlay.light-theme .portfolio-close-btn {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.3);
    color: #000000;
}

.portfolio-overlay.light-theme .portfolio-close-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(0, 0, 0, 0.5);
}

.portfolio-overlay.light-theme .portfolio-toolbar {
    background: rgba(230, 230, 230, 0.98);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
}

.portfolio-overlay.light-theme .portfolio-toolbar-btn {
    background: rgba(255, 255, 255, 0.8);
    color: #333333;
}

.portfolio-overlay.light-theme .portfolio-toolbar-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.portfolio-overlay.light-theme .portfolio-toolbar-divider {
    background: rgba(0, 0, 0, 0.15);
}

.portfolio-overlay.light-theme .portfolio-page-indicator {
    color: #666666 !important;
}

.portfolio-overlay.light-theme .portfolio-page-indicator strong {
    color: #000000 !important;
    font-weight: 700;
}

/* Portfolio Grid View */
.portfolio-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    padding: 30px;
    max-width: 1200px;
    max-height: 75vh;
    overflow-y: auto;
    margin: 0 auto;
}

.portfolio-grid-item {
    position: relative;
    background: #ffffff;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 160px;
    margin: 0 auto;
}

.portfolio-grid-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.portfolio-grid-item img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 8.5 / 11;
    object-fit: contain;
    background: #f5f5f5;
}

.portfolio-grid-page-number {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

/* Grid view scrollbar */
.portfolio-grid-container::-webkit-scrollbar {
    width: 10px;
}

.portfolio-grid-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

.portfolio-grid-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

.portfolio-grid-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* Light theme grid */
.portfolio-overlay.light-theme .portfolio-grid-item {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.portfolio-overlay.light-theme .portfolio-grid-item:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Portfolio Upload Section (when no portfolio) */
.portfolio-upload-section {
    text-align: center;
    color: #ffffff;
    padding: 3rem;
    max-width: 600px;
}

.portfolio-upload-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.portfolio-upload-section p {
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .portfolio-container {
        padding: 10px;
        width: 100%;
        height: 100%;
    }
    
    .portfolio-flipbook {
        max-height: calc(100vh - 140px) !important;
        max-width: calc(100vw - 20px) !important;
    }
    
    .portfolio-toolbar {
        bottom: 10px;
        padding: 8px 12px;
        gap: 4px;
        max-width: calc(100% - 20px);
    }
    
    .portfolio-toolbar-btn {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }
    
    .portfolio-toolbar-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .portfolio-page-indicator {
        font-size: 11px;
        padding: 0 6px;
        min-width: 70px;
    }
    
    .portfolio-close-btn {
        width: 40px;
        height: 40px;
        top: 10px;
        right: 10px;
    }
    
    .portfolio-grid-container {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 12px;
        padding: 20px;
        max-height: calc(100vh - 120px);
    }
    
    .portfolio-grid-item {
        max-width: 130px;
    }
}

@media (max-width: 480px) {
    .portfolio-container {
        padding: 5px;
    }
    
    .portfolio-flipbook {
        max-height: calc(100vh - 120px) !important;
        max-width: calc(100vw - 10px) !important;
    }
    
    .portfolio-toolbar {
        bottom: 8px;
        padding: 6px 10px;
        gap: 3px;
        max-width: calc(100% - 16px);
    }
    
    .portfolio-toolbar-btn {
        width: 28px;
        height: 28px;
        min-width: 28px;
    }
    
    .portfolio-toolbar-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .portfolio-page-indicator {
        font-size: 10px;
        padding: 0 4px;
        min-width: 60px;
    }
    
    .portfolio-close-btn {
        width: 36px;
        height: 36px;
        top: 8px;
        right: 8px;
    }
    
    .portfolio-grid-container {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 10px;
        padding: 15px;
        max-height: calc(100vh - 100px);
    }
    
    .portfolio-grid-item {
        max-width: 110px;
    }
    
    .portfolio-grid-page-number {
        font-size: 10px;
        padding: 2px 6px;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 896px) and (max-height: 414px) and (orientation: landscape) {
    .portfolio-container {
        padding: 5px;
    }
    
    .portfolio-flipbook {
        max-height: calc(100vh - 100px) !important;
        max-width: calc(100vw - 10px) !important;
    }
    
    .portfolio-toolbar {
        bottom: 5px;
        padding: 4px 8px;
        gap: 2px;
    }
    
    .portfolio-toolbar-btn {
        width: 26px;
        height: 26px;
        min-width: 26px;
    }
    
    .portfolio-toolbar-btn svg {
        width: 12px;
        height: 12px;
    }
    
    .portfolio-page-indicator {
        font-size: 9px;
        padding: 0 4px;
        min-width: 55px;
    }
    
    .portfolio-close-btn {
        width: 32px;
        height: 32px;
        top: 5px;
        right: 5px;
    }
}

