/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #000000;
    --secondary-color: #ffffff;
    --gray-color: #9c9c9c;
    --light-gray: #f5f5f5;
    --accent-color: #667eea;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark theme */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #ffffff;
        --secondary-color: #0a0a0a;
        --gray-color: #a0a0a0;
        --light-gray: #1a1a1a;
        --nav-bg: rgba(10, 10, 10, 0.95);
    }
}

/* Light theme override */
[data-theme="light"] {
    --primary-color: #000000 !important;
    --secondary-color: #ffffff !important;
    --gray-color: #9c9c9c !important;
    --light-gray: #f5f5f5 !important;
    --nav-bg: rgba(255, 255, 255, 0.95) !important;
}

/* Dark theme override */
[data-theme="dark"] {
    --primary-color: #ffffff !important;
    --secondary-color: #0a0a0a !important;
    --gray-color: #a0a0a0 !important;
    --light-gray: #1a1a1a !important;
    --nav-bg: rgba(10, 10, 10, 0.95) !important;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--primary-color);
    background-color: var(--secondary-color);
    overflow-x: hidden;
}



/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    height: auto;
    min-height: 80px;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    height: 80px;
    box-sizing: border-box;
}

.nav-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary-color);
}

.logo-svg {
    height: 50px;
    width: auto;
    transition: var(--transition);
}

.logo-svg:hover {
    opacity: 0.8;
}

.logo-light {
    display: block;
}

.logo-dark {
    display: none;
}

[data-theme="dark"] .logo-light {
    display: none;
}

[data-theme="dark"] .logo-dark {
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: var(--transition);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

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

.nav-menu a.active {
    color: var(--accent-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    color: var(--primary-color);
    transition: var(--transition);
    position: relative;
}

.theme-toggle:hover {
    background: var(--light-gray);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    transition: var(--transition);
}

.sun-icon {
    display: block;
}

.moon-icon {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

[data-theme="dark"] .sun-icon {
    display: none;
}

[data-theme="dark"] .moon-icon {
    display: block;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn:hover::before {
    left: 0;
}

.btn:hover {
    color: var(--secondary-color);
}

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

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

.btn-primary:hover {
    color: var(--accent-color);
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: var(--secondary-color);
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-content {
    z-index: 2;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 6rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
}

.hero-line {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 1s ease forwards;
    margin-bottom: 0.2rem;
}

.hero-line:nth-child(2) {
    animation-delay: 0.2s;
}

.hero-line:nth-child(3) {
    animation-delay: 0.4s;
}

.hero-line:nth-child(4) {
    animation-delay: 0.6s;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--gray-color);
    margin-bottom: 3rem;
    max-width: 500px;
    opacity: 1;
    animation: fadeInUp 1s ease 0.8s forwards;
}

.hero-description .highlight {
    color: var(--primary-color);
    font-weight: 700;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    opacity: 1;
    animation: fadeInUp 1s ease 1s forwards;
}

.hero-visual {
    height: 600px;
    position: relative;
}

#hero-canvas {
    width: 100%;
    height: 100%;
    opacity: 1;
    animation: fadeIn 1s ease 1.2s forwards;
}



/* Sections */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--gray-color);
    max-width: 600px;
    margin: 0 auto;
}



/* Footer */
.footer {
    background: var(--primary-color);
    color: var(--secondary-color);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
}

.footer-logo-svg {
    height: 40px;
    width: auto;
    transition: var(--transition);
}

.footer-logo-light {
    display: block;
}

.footer-logo-dark {
    display: none;
}

[data-theme="dark"] .footer-logo-light {
    display: none;
}

[data-theme="dark"] .footer-logo-dark {
    display: block;
}

.footer-logo-svg:hover {
    opacity: 0.8;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

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

.footer-social {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.footer-social a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.footer-social a:hover {
    color: var(--gray-color);
    transform: translateY(-2px);
}

.footer-social svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #333;
}

.footer-bottom p {
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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



/* Responsive Design */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-visual {
        height: 400px;
        order: -1;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-actions {
        gap: 0.5rem;
    }
    
    .theme-toggle {
        padding: 0.4rem;
    }
    
    .theme-toggle svg {
        width: 18px;
        height: 18px;
    }
    
    .hero {
        padding: 1rem 0;
    }
    
    .hero-container {
        gap: 2rem;
        padding: 0 2rem;
    }
    
    .hero-title {
        font-size: 3rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-description {
        margin-bottom: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        margin-bottom: 2rem;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .btn {
        width: 100%;
        text-align: center;
        max-width: 300px;
    }
    
    /* Footer Tablet Spacing */
    .footer {
        padding: 3.5rem 0 1.5rem;
    }
    
    .footer-social {
        margin-top: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .nav-container {
        padding: 1rem 1.5rem;
    }
    
    .hero {
        padding: 1rem 0;
    }
    
    .hero-container {
        padding: 0 1.5rem;
        gap: 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 0.8rem;
    }
    
    .hero-description {
        margin-bottom: 1.2rem;
        font-size: 1.1rem;
    }
    
    .hero-cta {
        gap: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .service-item {
        padding: 2rem 1rem;
    }
    
    /* Footer Mobile Spacing */
    .footer {
        padding: 4rem 0 2rem;
    }
    
    .footer-content {
        gap: 2rem;
        margin-bottom: 2.5rem;
    }
    
    .footer-bottom {
        padding-top: 2.5rem;
        margin-top: 1rem;
    }
    
    .footer-social {
        gap: 2rem;
        margin-top: 1.5rem;
    }
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
}

.tech-loader {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0 auto 2rem;
}

.loader-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid transparent;
    border-top: 2px solid var(--accent-color);
    border-right: 2px solid var(--accent-color);
    border-radius: 50%;
    animation: techSpin 1s linear infinite;
}

.loader-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: var(--accent-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: techPulse 1.5s ease-in-out infinite;
}

.loading-text {
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    font-family: 'Courier New', monospace;
}

.loading-subtext {
    color: var(--gray-color);
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 1px;
    opacity: 0.7;
    animation: subtextFade 2s ease-in-out infinite;
}

/* Loading Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes techSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes techPulse {
    0%, 100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

@keyframes subtextFade {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 0.4;
    }
}

/* Disable transitions during theme switching */
.no-transitions *,
.no-transitions *::before,
.no-transitions *::after {
    transition: none !important;
    animation: none !important;
}

/* Smooth scrolling and performance optimizations */
@media (prefers-reduced-motion: reduce) {
    *,
    ::before,
    ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
} 