@font-face {
    font-family: 'Sofia Sans Extra Condensed';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('font.woff2') format('woff2');
}

:root {
    --background-color: #ffffff;
    --text-color: #000000;
    --toggle-bg: #e0e0e0;
    --toggle-circle: #ffffff;
    --toggle-border: #cccccc;
}

[data-theme="dark"] {
    --background-color: #000000;
    --text-color: #f0f0f0;
    --toggle-bg: #555555;
    --toggle-circle: #000000;
    --toggle-border: #666666;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Sofia Sans Extra Condensed', sans-serif;
    transition: background-color 0.3s, color 0.3s;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

header {
    padding: 20px;
    display: flex;
    justify-content: flex-end;
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    z-index: 10;
}

.toggle-container {
    display: flex;
    align-items: center;
}

.theme-toggle {
    position: relative;
    width: 50px;
    height: 26px;
    border-radius: 15px;
    background-color: var(--toggle-bg);
    border: 1px solid var(--toggle-border);
    cursor: pointer;
    transition: background-color 0.3s;
    margin: 0 10px;
}

.toggle-circle {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--toggle-circle);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
}

[data-theme="dark"] .toggle-circle {
    transform: translateX(24px);
}

.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 25px;
    transform: translateX(-24px);
}

.logo {
    height: 120px;
    width: auto;
    transform-origin: center center;
}

@keyframes logoSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin {
    animation: logoSpin 0.8s ease-in-out;
}

/* Particle animation styles */
.particle {
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
    z-index: -1; /* Place under logo */
    will-change: transform, opacity, left, top; /* Performance optimization */
    filter: blur(0.2px); /* Reduced blur for performance */
    box-shadow: 0 0 1px rgba(255, 19, 79, 0.2), 0 0 1px rgba(251, 49, 49, 0.2); /* Reduced glow for performance */
}

/* Particle batch container - for better performance with many particles */
.particle-batch {
    contain: strict; /* Improve performance by containing repaints */
    position: fixed; /* Ensure it's fixed relative to viewport */
}

@keyframes particleFade {
    0% {
        opacity: 0.8;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0);
    }
}

.brand-name {
    font-size: 115px;
    font-weight: 600;
    letter-spacing: 1px;
}

@keyframes textReveal {
    0% {
        opacity: 0;
        transform: translateX(100px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.text-reveal {
    animation: textReveal 0.8s ease-in-out forwards;
}

.hidden-text {
    opacity: 0;
}

.theme-icon {
    width: 24px;
    height: 24px;
    fill: var(--text-color);
    cursor: pointer;
}

.social-container {
    display: flex;
    align-items: center;
    gap: 10px;
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    transition: all 0.3s ease;
}

.social-icon {
    width: 24px;
    height: 24px;
    fill: var(--text-color);
    cursor: pointer;
    background-color: var(--toggle-bg);
    border-radius: 50%;
    padding: 12px;
    transition: background-color 0.3s;
    box-sizing: content-box;
}

.social-icon:hover {
    background-color: var(--toggle-border);
}

.social-icon path {
    transition: transform 0.3s;
    transform-origin: center center;
}

.social-icon:hover path {
    transform: scale(1.1);
}

/* Email button styles */
.email-container {
    position: relative;
    display: inline-block;
}

.email-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background-color: var(--toggle-bg);
    border-radius: 24px;
    transition: width 0.3s ease, background-color 0.3s;
    overflow: hidden;
    width: 48px;
    height: 48px;
    cursor: pointer;
    padding: 0;
    box-sizing: content-box;
    position: relative;
}

.email-button.expanded {
    width: 210px;
}

.email-button:hover {
    background-color: var(--toggle-border);
}

.email-button .social-icon {
    min-width: 24px;
    min-height: 24px;
    background-color: transparent;
    padding: 12px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.email-text {
    white-space: nowrap;
    padding-left: 5px;
    margin-right: 5px;
    opacity: 0;
    transition: opacity 0.2s ease 0.1s;
    color: var(--text-color);
    font-family: 'Sofia Sans Extra Condensed', sans-serif;
    font-size: 20px;
    font-weight: 600;
    text-decoration: none;
    position: relative;
    z-index: 1;
}

.email-button.expanded .email-text {
    opacity: 1;
}

/* Copy icon styles */
.copy-icon {
    width: 16px;
    height: 16px;
    fill: var(--text-color);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s, fill 0.4s ease;
    margin-left: 5px;
}

.email-button.expanded .copy-icon {
    opacity: 0.6;
}

.copy-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

.copy-icon.copied {
    fill: #4CAF50;
}

/* Media queries */
@media (max-width: 768px) {
    .logo {
        height: 90px;
    }
    
    .brand-name {
        font-size: 81px;
    }

    .logo-container {
        gap: 20px;
        transform: translateX(-18px);
    }
    
    /* Ensure particles are even more optimized on smaller screens */
    .particle {
        filter: none; /* Remove blur on mobile for better performance */
        box-shadow: none; /* Remove shadows on mobile for better performance */
    }
    
    .social-container {
        position: fixed !important;
        top: auto !important;
        bottom: 20px !important;
        left: 20px !important;
        z-index: 100 !important;
    }
}

@media (max-width: 480px) {
    .logo {
        height: 70px;
    }
    
    .brand-name {
        font-size: 65px;
    }

    .logo-container {
        gap: 15px;
        transform: translateX(-14px);
    }

    .theme-toggle {
        margin: 0 5px;
    }
    
    .theme-icon {
        width: 20px;
        height: 20px;
    }
    
    .social-container {
        position: fixed !important;
        top: auto !important;
        bottom: 20px !important;
        left: 15px !important;
        z-index: 100 !important;
        gap: 8px;
    }
    
    .social-icon {
        padding: 10px;
    }
    
    .email-button.expanded {
        width: 190px !important;
    }
    
    .email-text {
        font-size: 18px !important;
        padding-left: 2px;
        margin-right: 2px;
    }
    
    .copy-icon {
        width: 14px;
        height: 14px;
        margin-left: 2px;
    }
}
