/* Common Styles for Portfolio */

@font-face {
    font-family: "FoundationOne";
    src: url("fonts/FoundationOne-Medium.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* Background Patterns - Standardized */
body {
    background: #ffffff;
    /* Clean white background like antigravity.google */
    background-image: none;
    /* Remove static patterns - particles will provide the effect */
}

.dark body {
    background: #101622;
    background-image: none;
    /* Clean background - particles will provide the effect */
}

.font-display {
    font-family: "Space Grotesk", "Inter", "system-ui", sans-serif;
}

.dotted-bg {
    background-color: #f5f5f7;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(0, 0, 0, 0.04) 1px, transparent 0),
        linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.9));
    background-size: 20px 20px, auto;
}

.dark .dotted-bg {
    background-color: #050712;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.06) 1px, transparent 0),
        linear-gradient(180deg, rgba(5, 7, 18, 0.9), rgba(5, 7, 18, 1));
}

/* Glassmorphism Effect - Standardized */
.glassmorphism {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .glassmorphism {
    background: rgba(26, 36, 55, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Glass Effect Alternative */
.glass-effect {
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .glass-effect {
    background-color: rgba(26, 36, 55, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Shadows */
.soft-shadow {
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

.dark .soft-shadow {
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Card Hover Effects */
.card-hover {
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.card-hover:hover {
    transform: perspective(1000px) rotateX(2deg) rotateY(-3deg) scale(1.02);
    box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.1);
}

.dark .card-hover:hover {
    box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.3);
}

/* Project Cards */
.project-card {
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    transform-style: preserve-3d;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.project-card:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(-5deg) scale(1.05);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.dark .project-card:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

/* Form Inputs */
.form-input {
    transition: all 0.2s ease-in-out;
}

.form-input:focus {
    box-shadow: 0 0 0 2px #2b6cee;
    border-color: #2b6cee;
}

/* Material Symbols */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    font-size: 20px;
}

.brand-title {
    font-family: "FoundationOne", "Space Grotesk", sans-serif;
    letter-spacing: 0.35em;
    text-transform: uppercase;
}

.dropdown-menu {
    width: min(22rem, 80vw);
    max-height: 22rem;
    border-radius: 1rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
    padding: 1rem;
    overflow-y: auto;
}

.dropdown-menu>a:first-child,
.dropdown-menu>a:nth-child(2),
.dropdown-menu>div[data-tools-menu] {
    grid-column: span 2;
}

.dropdown-menu [data-tools-menu] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.3rem;
    padding-top: 0.4rem;
}

/* Glass Tags */
.glass-tag {
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .glass-tag {
    background-color: rgba(30, 41, 59, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(51, 65, 85, 0.5);
}

/* Mobile Menu */
#mobileMenu {
    transition: all 0.3s ease-in-out;
}

/* Smooth transitions */
* {
    transition-property: background-color, border-color, color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #2b6cee;
    outline-offset: 2px;
}

/* Selection colors */
::selection {
    background-color: rgba(43, 108, 238, 0.2);
    color: #2b6cee;
}

[data-drop-zone].is-dragging {
    border-color: rgba(43, 108, 238, 0.5) !important;
    background-color: rgba(43, 108, 238, 0.05) !important;
}

/* Animation Container */
#particle-header-container {
    width: 100%;
    height: 55vh;
    /* Fixed height to ensure visibility */
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Background Pattern - Light Mode */
    background-color: #FDFDFD;
    background-image:
        radial-gradient(circle at 15% 15%, rgba(43, 108, 238, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 85% 85%, rgba(43, 108, 238, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 90% 10%, rgba(43, 108, 238, 0.08) 0%, transparent 25%);
    background-size: 100% 100%, 100% 100%, 16px 16px, 100% 100%;
    background-repeat: no-repeat, no-repeat, repeat, no-repeat;

    /* Blend with content below */
    -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    
    /* Mobile adjustments */
    height: 40vh;
}

/* Dark mode styles for particle container */
.dark #particle-header-container {
    background-color: #101622;
    background-image:
        radial-gradient(circle at 15% 15%, rgba(43, 108, 238, 0.15) 0%, transparent 30%),
        radial-gradient(circle at 85% 85%, rgba(43, 108, 238, 0.15) 0%, transparent 30%),
        radial-gradient(circle at 90% 10%, rgba(43, 108, 238, 0.12) 0%, transparent 25%);
    background-size: 100% 100%, 100% 100%, 16px 16px, 100% 100%;
    background-repeat: no-repeat, no-repeat, repeat, no-repeat;
}

/* Desktop: larger height */
@media (min-width: 768px) {
    #particle-header-container {
        height: 55vh;
    }
}

/* Tablet: medium height */
@media (min-width: 640px) and (max-width: 767px) {
    #particle-header-container {
        height: 45vh;
    }
}

#text-canvas {
    display: block;
    width: 100%;
    height: 100%;
}


/* Floating Animation for Icons */
@keyframes float-1 {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-15px) rotate(5deg);
    }
}

@keyframes float-2 {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(-5deg);
    }
}

.floating-icon-1 {
    animation: float-1 6s ease-in-out infinite;
}

.floating-icon-2 {
    animation: float-2 7s ease-in-out infinite;
    animation-delay: 1s;
    /* Offset animation */
}

@keyframes float-3 {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-18px) rotate(3deg);
    }
}

@keyframes float-4 {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-22px) rotate(-3deg);
    }
}

.floating-icon-3 {
    animation: float-3 6.5s ease-in-out infinite;
    animation-delay: 0.5s;
}

.floating-icon-4 {
    animation: float-4 7.5s ease-in-out infinite;
    animation-delay: 1.5s;
}

/* Mobile-specific adjustments for floating icons */
@media (max-width: 640px) {
    .hero-visual {
        max-width: 260px;
        min-height: 380px;
    }

    #character-image {
        max-width: 240px;
    }

    .hero-visual img:nth-of-type(1) {
        top: 10% !important;
        left: 4% !important;
        width: 52px !important;
        height: 52px !important;
    }

    .hero-visual img:nth-of-type(2) {
        top: 10% !important;
        right: 2% !important;
        width: 54px !important;
        height: 54px !important;
    }

    .hero-visual img:nth-of-type(3) {
        bottom: 8% !important;
        left: -3% !important;
        width: 50px !important;
        height: 50px !important;
    }

    .hero-visual img:nth-of-type(4) {
        bottom: 20% !important;
        right: -8% !important;
        width: 50px !important;
        height: 50px !important;
    }

    .hero-visual img:nth-of-type(5) {
        top: 40% !important;
        left: -5% !important;
        width: 46px !important;
        height: 46px !important;
    }

    .hero-visual img:nth-of-type(6) {
        top: 40% !important;
        right: -4% !important;
        width: 46px !important;
        height: 46px !important;
    }
}