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

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --background: #0a0a0f;
    --card: #1a1a24;
    --border: #2a2a3a;
    --text: #f8f8f8;
    --text-muted: #a0a0b0;
    --gradient: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

#header.scrolled {
    background: rgba(26, 26, 36, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 18px;
}

.logo img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.nav-desktop {
    display: none;
    gap: 8px;
}

.nav-desktop a {
    padding: 8px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-desktop a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(20px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu nav {
    display: flex;
    flex-direction: column;
    gap: 24px;
    text-align: center;
}

.mobile-link {
    font-size: 24px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.mobile-link:hover {
    color: var(--text);
}

.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 999px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 0 80px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 100px 100px;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-logo {
    width: 160px;
    height: 160px;
    margin: 0 auto 32px;
    position: relative;
}

.hero-logo::before {
    content: '';
    position: absolute;
    inset: -20px;
    background: var(--gradient);
    filter: blur(40px);
    opacity: 0.3;
    animation: pulse 4s ease-in-out infinite;
}

.hero-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.hero h1 {
    font-size: clamp(32px, 8vw, 64px);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-bottom: 80px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    background: rgba(59, 130, 246, 0.05);
}

.stat-number {
    font-size: 40px;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
}

.scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--text-muted);
    border-radius: 999px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.scroll-wheel {
    width: 4px;
    height: 8px;
    background: var(--primary);
    border-radius: 999px;
    animation: scroll 2s ease-in-out infinite;
}

section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-header h2 {
    font-size: clamp(32px, 6vw, 48px);
    font-weight: 700;
    margin-bottom: 16px;
}

.section-header p {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.project-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px;
    transition: all 0.3s;
    position: relative;
}

.project-card.active {
    background: rgba(59, 130, 246, 0.05);
    border: 2px solid #3b82f6;
}

.project-card.active:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

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

.project-header h3 {
    font-size: 28px;
    margin-bottom: 8px;
}

.project-title-with-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.project-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
    margin-top: -2px;
}

.chrpcm-title {
    color: #ffffff;
    font-size: 28px;
    margin-bottom: 0;
    line-height: 1;
}

.project-subtitle {
    font-size: 18px;
    color: var(--text-muted);
}

.badge-active, .badge-upcoming {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    margin: 8px 0;
}

.badge-active {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.badge-upcoming {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

.project-description {
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.6;
}

.project-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stat-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.stat-box svg {
    color: var(--primary);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.stat-name {
    font-size: 12px;
    color: var(--text-muted);
}

.project-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.feature-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

.feature-tag svg {
    color: var(--primary);
}

.carousel-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 60px;
}

.carousel-content {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 48px;
    min-height: 350px;
    position: relative;
}

.tool-card {
    display: none;
}

.tool-card.active {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    animation: fadeIn 0.5s;
}

.tool-link-btn {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s;
    z-index: 10;
}

.tool-link-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
}

.tool-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.tool-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    filter: blur(20px);
    opacity: 0.6;
    animation: pulse 3s ease-in-out infinite;
}

.tool-icon svg {
    position: relative;
    z-index: 1;
    color: white;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8))
            drop-shadow(0 0 16px rgba(255, 255, 255, 0.6))
            drop-shadow(0 0 24px rgba(255, 255, 255, 0.4));
    animation: neonPulse 2s ease-in-out infinite;
}

.tool-content h3 {
    font-size: 28px;
    margin-bottom: 16px;
}

.tool-content p {
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.6;
}

.tool-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.tool-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
}

.tool-feature::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.carousel-btn.prev {
    left: 0;
}

.carousel-btn.next {
    right: 0;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-dot.active {
    width: 32px;
    border-radius: 999px;
    background: var(--primary);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 16/9;
    isolation: isolate;
}

.gallery-item.featured {
    grid-column: span 2;
    grid-row: span 2;
    aspect-ratio: 1;
}

.gallery-item.wide {
    grid-column: span 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
    display: block;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 50%, transparent 100%);
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-text {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    z-index: 10;
}

.gallery-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.gallery-modal.active {
    display: flex;
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.modal-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-nav.prev {
    left: 32px;
}

.modal-nav.next {
    right: 32px;
}

#modalImage {
    max-width: 90vw;
    max-height: 70vh;
    border-radius: 16px;
    object-fit: contain;
}

.modal-dots {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.modal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s;
}

.modal-dot.active {
    width: 32px;
    border-radius: 999px;
    background: var(--primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px;
    text-align: center;
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    background: rgba(59, 130, 246, 0.05);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    border-radius: 16px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

.cta {
    background: var(--card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

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

.cta h2 {
    font-size: clamp(32px, 6vw, 48px);
    margin-bottom: 16px;
}

.cta p {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.footer {
    background: var(--card);
    border-top: 1px solid var(--border);
    padding: 64px 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 48px;
    margin-bottom: 48px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-weight: 600;
    font-size: 18px;
}

.footer-logo img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.footer-brand p {
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-links h4 {
    margin-bottom: 16px;
    color: var(--primary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 12px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text);
}

.footer-bottom {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 14px;
}

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

@keyframes neonPulse {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8))
                drop-shadow(0 0 16px rgba(255, 255, 255, 0.6))
                drop-shadow(0 0 24px rgba(255, 255, 255, 0.4));
    }
    50% {
        filter: drop-shadow(0 0 12px rgba(255, 255, 255, 1))
                drop-shadow(0 0 24px rgba(255, 255, 255, 0.8))
                drop-shadow(0 0 36px rgba(255, 255, 255, 0.6));
    }
}

@keyframes scroll {
    0%, 100% {
        opacity: 0.5;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(8px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 768px) {
    .nav-desktop {
        display: flex;
    }
    
    .menu-toggle {
        display: none;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 767px) {
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons .btn-large {
        width: 100%;
    }
    
    .carousel-container {
        padding: 0 20px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
    }
    
    .tool-card.active {
        flex-direction: column;
    }
    
    .modal-nav {
        width: 40px;
        height: 40px;
    }
    
    .modal-nav.prev {
        left: 16px;
    }
    
    .modal-nav.next {
        right: 16px;
    }
}
