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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #1A1A24;
    color: #4A4A5A;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    line-height: 1.65;
    overflow-x: hidden;
    position: relative;
}

/* Background Static Noise */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' seed='2'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: -1;
    opacity: 0;
    animation: noise-pulse 0.2s infinite;
}

@keyframes noise-pulse {
    0%, 50%, 100% { opacity: 0.01; }
    25% { opacity: 0.03; }
}

/* Main Container */
main {
    width: 100%;
    min-height: 100vh;
    padding: 40px;
    animation: canvas-fade 1000ms ease-out forwards;
}

@keyframes canvas-fade {
    from {
        background-color: #000000;
    }
    to {
        background-color: #1A1A24;
    }
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 100%;
}

/* Base Card Styles */
.card {
    border-radius: 8px;
    padding: 30px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    animation: card-entrance 0.4s ease-out backwards;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

@keyframes card-entrance {
    from {
        opacity: 0;
        transform: translateY(20px) translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateX(0);
    }
}

/* Stagger animations for cards */
.card:nth-child(1) { animation-delay: 0ms; }
.card:nth-child(2) { animation-delay: 50ms; }
.card:nth-child(3) { animation-delay: 100ms; }
.card:nth-child(4) { animation-delay: 150ms; }
.card:nth-child(5) { animation-delay: 200ms; }
.card:nth-child(6) { animation-delay: 250ms; }
.card:nth-child(7) { animation-delay: 300ms; }
.card:nth-child(8) { animation-delay: 350ms; }
.card:nth-child(9) { animation-delay: 400ms; }
.card:nth-child(10) { animation-delay: 450ms; }
.card:nth-child(11) { animation-delay: 500ms; }
.card:nth-child(12) { animation-delay: 550ms; }
.card:nth-child(13) { animation-delay: 600ms; }
.card:nth-child(14) { animation-delay: 650ms; }
.card:nth-child(15) { animation-delay: 700ms; }
.card:nth-child(16) { animation-delay: 750ms; }
.card:nth-child(17) { animation-delay: 800ms; }

/* Profile Cards */
.profile-card {
    background-color: #F0EBE3;
    color: #2C2C3A;
    animation: profile-entrance 0.4s ease-out backwards, glitch-shift 8s 2s infinite;
}

@keyframes profile-entrance {
    from {
        opacity: 0;
        transform: translateY(20px) translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateX(0);
    }
}

@keyframes glitch-shift {
    0%, 95% {
        transform: translate(0, 0);
    }
    96% {
        transform: translate(3px, 1px);
    }
    100% {
        transform: translate(0, 0);
    }
}

.profile-card:nth-child(1) { animation-delay: 0ms, 2s; }
.profile-card:nth-child(2) { animation-delay: 50ms, 2.5s; }
.profile-card:nth-child(3) { animation-delay: 100ms, 3s; }
.profile-card:nth-child(4) { animation-delay: 150ms, 3.5s; }

.avatar {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
}

.avatar svg {
    width: 100%;
    height: 100%;
}

.card-title {
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #2C2C3A;
    margin-bottom: 8px;
    text-align: center;
    transition: all 0.1s ease-out;
}

.profile-card:hover .card-title {
    text-shadow: 2px 0 #E8734A, -2px 0 #3BB8A8;
}

.specialty {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    color: #8A8A9A;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 15px;
}

.bio {
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.65;
    color: #4A4A5A;
    text-align: center;
}

/* Event Cards */
.event-card {
    background-color: #2C2C3A;
    color: #F0EBE3;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 280px;
    perspective: 1000px;
    transform-style: preserve-3d;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.event-date {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #3BB8A8;
    margin-bottom: 12px;
    transition: all 0.1s ease-out;
}

.event-card:hover .event-date {
    text-shadow: 2px 0 #E8734A, -2px 0 #3BB8A8;
}

.event-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: #F0EBE3;
    margin-bottom: 10px;
    transition: all 0.1s ease-out;
}

.event-card:hover .event-title {
    text-shadow: 2px 0 #E8734A, -2px 0 #3BB8A8;
}

.event-location {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: #8A8A9A;
    text-transform: uppercase;
}

/* Event Card Tilt Effect */
.event-card {
    cursor: pointer;
}

/* Gallery Cards */
.gallery-card {
    background-color: #2C2C3A;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 260px;
    position: relative;
}

.tool-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    z-index: 2;
    position: relative;
}

.bokeh {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    pointer-events: none;
}

.bokeh-circle {
    position: absolute;
    opacity: 0.1;
    filter: blur(8px);
}

/* Quote Cards */
.quote-card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    text-align: center;
    padding: 40px 30px;
}

.quote-coral {
    background-color: #E8734A;
    color: #F0EBE3;
}

.quote-teal {
    background-color: #3BB8A8;
    color: #F0EBE3;
}

.quote-text {
    font-family: 'Sora', sans-serif;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 300;
    font-style: italic;
    line-height: 1.5;
    color: #F0EBE3;
    transition: all 0.1s ease-out;
}

.quote-card:hover .quote-text {
    text-shadow: 2px 0 rgba(255, 255, 255, 0.3), -2px 0 rgba(0, 0, 0, 0.3);
}

/* Glitch Cards */
.glitch-card {
    background: linear-gradient(135deg, #2C2C3A 0%, #1A1A24 100%);
    min-height: 40px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.glitch-content {
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        #E8734A 0%,
        #3BB8A8 25%,
        #D4D44A 50%,
        #E8734A 75%,
        #3BB8A8 100%
    );
    background-size: 400% 100%;
    animation: glitch-bands 2s linear infinite;
    opacity: 0.6;
    clip-path: inset(0 0 0 0);
}

@keyframes glitch-bands {
    0% {
        background-position: 0% 0;
        clip-path: inset(0 0 85% 0);
    }
    25% {
        background-position: 100% 0;
        clip-path: inset(35% 0 45% 0);
    }
    50% {
        background-position: 0% 0;
        clip-path: inset(70% 0 15% 0);
    }
    75% {
        background-position: 100% 0;
        clip-path: inset(40% 0 40% 0);
    }
    100% {
        background-position: 0% 0;
        clip-path: inset(0 0 85% 0);
    }
}

/* Call Card */
.call-card {
    background-color: #F0EBE3;
    color: #2C2C3A;
    border: 3px double #2C2C3A;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    position: relative;
    box-shadow: inset 0 0 0 1px #F0EBE3;
}

.call-card::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    bottom: 6px;
    border: 1px solid #2C2C3A;
    pointer-events: none;
}

.call-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #2C2C3A;
    margin-bottom: 15px;
    text-align: center;
    position: relative;
    z-index: 1;
    transition: all 0.1s ease-out;
}

.call-card:hover .call-title {
    text-shadow: 2px 0 #E8734A, -2px 0 #3BB8A8;
}

.call-tagline {
    font-family: 'Sora', sans-serif;
    font-size: 1.2rem;
    font-weight: 300;
    font-style: italic;
    color: #2C2C3A;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* Cursor Trail */
.cursor-trail {
    position: fixed;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #F0EBE3;
    pointer-events: none;
    mix-blend-mode: difference;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease-out;
    top: -15px;
    left: -15px;
}

.cursor-trail.active {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    main {
        padding: 20px;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .card {
        padding: 20px;
    }

    .glitch-card {
        min-height: 40px;
    }

    .event-card {
        perspective: none;
        transform-style: initial;
    }

    .cursor-trail {
        display: none;
    }

    .card-title {
        font-size: 1.4rem;
    }

    .quote-text {
        font-size: 1.2rem;
    }

    .call-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    main {
        padding: 15px;
    }

    .card {
        padding: 15px;
        border-radius: 6px;
    }

    .card-grid {
        gap: 12px;
    }

    .avatar {
        width: 80px;
        height: 80px;
        margin-bottom: 15px;
    }

    .card-title {
        font-size: 1.2rem;
    }

    .bio {
        font-size: 0.8rem;
    }

    .quote-text {
        font-size: 1rem;
        padding: 20px;
    }

    .call-title {
        font-size: 1.5rem;
    }

    .call-tagline {
        font-size: 1rem;
    }

    .event-date {
        font-size: 1.2rem;
    }

    .event-title {
        font-size: 1.1rem;
    }
}

/* No Touch Devices - Keep tilt and cursor effects */
@media (hover: hover) and (pointer: fine) {
    .event-card {
        perspective: 1000px;
        transform-style: preserve-3d;
    }

    .cursor-trail {
        display: block;
    }
}
