/* COMPLETE CARGO CSS INTEGRATION - Add this entire file to Settings > Design > CSS */

/* Video background - only on homepage */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    overflow: hidden;
}

.background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    object-position: center;
    z-index: -3;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
    pointer-events: none;
}

.video-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #000, #111, #000);
    display: none;
}

/* Hide video background on non-homepage pages */
body:not(.home) .video-background,
body:not(.index) .video-background,
body:not(.front-page) .video-background {
    display: none !important;
}

/* ========== SITEWIDE FONT SETTINGS ========== */

/* Apply Inter font to body and most text elements */
body,
p,
a,
li,
span,
div,
.project-title,
.page-title,
.text,
.content {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-weight: 300;
    letter-spacing: 0.01em;
    line-height: 1.5;
}

/* Apply Inter to headings */
h1,
h2,
h3,
h4,
h5,
h6,
.heading,
.section-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.3;
}

/* Specific weight adjustments */
.project-title,
.page-title,
h1 {
    font-weight: 500;
}

/* Global link styling - all links get blue color, underline, and external arrow */
a {
    color: #4A90E2 !important;
    text-decoration: underline !important;
    transition: all 0.3s ease;
    position: relative;
}

/* Add external arrow to all links */
a::after {
    content: '↗';
    font-size: 0.8em;
    color: #4A90E2;
    margin-left: 4px;
    transition: color 0.3s ease;
}

/* Hover effects for all links */
a:hover {
    color: #2E78D2 !important;
    text-decoration: underline !important;
}

a:hover::after {
    color: #2E78D2;
}

/* Navigation links override - keep original styling in menu */
.nav-link {
    color: #fff !important;
    text-decoration: none !important;
}

.nav-link::after {
    content: '';
    margin-left: 0;
}

/* External navigation links keep their arrow */
.nav-link.external::after {
    content: '↗';
    font-size: 0.8rem;
    color: #666;
    margin-left: 6px;
    transition: color 0.3s ease;
}

.nav-link.external:hover::after {
    color: #fff;
}

/* Ensure consistent text rendering */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ========== NAVIGATION STYLES ========== */

/* Navigation-specific reset (only for nav elements) */
.nav-overlay,
.nav-overlay *,
.menu-toggle,
.menu-toggle * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Menu toggle button */
.menu-toggle {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 1001;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    transition: transform 0.3s ease;
    font-family: inherit;
}

.menu-toggle:hover {
    transform: scale(1.1);
}

.menu-icon {
    display: block;
    width: 24px;
    height: 2px;
    background: #f61cee;
    position: relative;
    transition: all 0.3s ease;
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: #f61cee;
    transition: all 0.3s ease;
}

.menu-icon::before {
    top: -8px;
}

.menu-icon::after {
    top: 8px;
}

/* Menu toggle animation when active */
.menu-toggle.active .menu-icon {
    background: transparent;
}

.menu-toggle.active .menu-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.menu-toggle.active .menu-icon::after {
    transform: rotate(-45deg);
    top: 0;
}

/* Navigation overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #fff;
    line-height: 1.5;
}

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

.nav-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 60px;
    padding: 80px 40px 40px;
    max-width: 1200px;
    margin: 0 auto;
    height: 100vh;
    overflow-y: auto;
    align-content: start;
}

/* Navigation sections */
.nav-section {
    margin-bottom: 40px;
}

.nav-heading {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #999;
    margin-bottom: 20px;
    text-transform: lowercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}

.nav-list {
    list-style: none;
}

.nav-list li {
    margin-bottom: 12px;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 300;
    letter-spacing: 0.01em;
    line-height: 1.4;
    transition: all 0.3s ease;
    display: block;
    padding: 6px 0;
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 1px;
    background: #fff;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #fff;
    transform: translateX(16px);
    font-weight: 400;
}

.nav-link:hover::before {
    width: 12px;
}

/* Special styling for release date */
.release-date {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
    margin-left: 8px;
}

/* External link indicator */
.nav-link.external::after {
    content: '↗';
    font-size: 0.8rem;
    color: #666;
    margin-left: 6px;
    transition: color 0.3s ease;
}

.nav-link.external:hover::after {
    color: #fff;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .menu-toggle {
        top: 20px;
        right: 20px;
    }
    
    .nav-content {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 60px 20px 20px;
    }
    
    .nav-heading {
        font-size: 1rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .nav-content {
        padding: 60px 16px 16px;
    }
    
    .nav-link {
        font-size: 0.85rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .nav-overlay,
    .nav-link,
    .menu-toggle,
    .menu-icon,
    .menu-icon::before,
    .menu-icon::after {
        transition: none;
    }
}

/* Focus states for accessibility */
.menu-toggle:focus,
.nav-link:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .nav-overlay {
        background: #000;
    }
    
    .nav-heading {
        color: #ccc;
    }
}

/* Ripple animation for JavaScript */
@keyframes ripple {
    to {
        transform: scale(2);
        opacity: 0;
    }
}
