body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background:
        repeating-linear-gradient(45deg, rgba(0,0,0,0.04) 0px, rgba(0,0,0,0.04) 1px, transparent 1px, transparent 15px),
        repeating-linear-gradient(-45deg, rgba(0,0,0,0.04) 0px, rgba(0,0,0,0.04) 1px, transparent 1px, transparent 15px);
    background-color: #ffb299;
    position: relative;
}


.site-header {
    position: fixed;
    top: var(--spacing-md);
    left: var(--spacing-md);
    z-index: 100;
    background: none;
    border: none;
    border-bottom: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.site-logo {
    height: 64px;
    width: auto;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    background: transparent;
    cursor: pointer;
}

.site-logo:hover {
    transform: scale(1.05);
}



.hero {
    text-align: center;
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
}

.ameba-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    margin-bottom: 0.25rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 3rem;
    letter-spacing: -0.05em;
}

.ameba-logo .am {
    color: var(--accent-orange);
}

.ameba-logo .eb {
    color: var(--text-primary);
}

.ameba-logo .a {
    color: #93c5fd;
    margin-left: -0.1rem;
    animation: neon-blink 2s infinite;
}

@keyframes neon-blink {
    0%, 50% {
        opacity: 1;
        color: #93c5fd;
        text-shadow: 0 0 8px #93c5fd, 0 0 16px #60a5fa, 0 0 24px #3b82f6;
    }
    51%, 100% {
        opacity: 0.4;
        color: #9ca3af;
        text-shadow: none;
    }
}

.tagline {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0;
    margin-bottom: var(--spacing-lg);
    letter-spacing: 0.02em;
    font-weight: 400;
}

.projects {
    background-color: transparent;
    padding-top: 0;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--spacing-md);
    max-width: 1000px;
    margin: 0 auto;
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
}

.project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    text-decoration: none;
    color: var(--text-primary);
    aspect-ratio: 1;
    width: 100%;
    grid-column: span 2;
}

/* Center the bottom row: 2 cards centered under 3 */
.project-card:nth-child(4) {
    grid-column: 2 / 4;
}

.project-card:nth-child(5) {
    grid-column: 4 / 6;
}

.project-card:hover {
    transform: translateY(-6px) scale(1.02);
    background: rgba(255, 255, 255, 0.35);
    box-shadow:
        0 16px 48px rgba(255, 107, 53, 0.15),
        0 8px 24px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border-color: rgba(255, 255, 255, 0.5);
}


.app-icon {
    width: 120px;
    height: 120px;
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.app-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 27px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.project-card:hover .app-icon-img {
    transform: scale(1.08);
}


.project-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.project-content h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
    font-weight: 700;
    color: var(--text-primary);
}

.project-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0;
    line-height: 1.4;
}

.os-badges {
    position: absolute;
    bottom: var(--spacing-sm);
    right: var(--spacing-sm);
    display: flex;
    gap: 0.25rem;
}

.badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-ios,
.badge-macos {
    background: rgba(0, 0, 0, 0.6);
    color: white;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.new-badge {
    position: absolute;
    top: var(--spacing-sm);
    left: var(--spacing-sm);
    background: var(--accent-orange);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

/* Entrance animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ameba-logo {
    animation: fadeInUp 0.6s ease-out 0.1s both, neon-blink 2s infinite;
}

/* Override the neon-blink on .ameba-logo itself — it's on .a child */
.ameba-logo {
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.tagline {
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.project-card:nth-child(1) { animation: fadeInUp 0.6s ease-out 0.5s both; }
.project-card:nth-child(2) { animation: fadeInUp 0.6s ease-out 0.65s both; }
.project-card:nth-child(3) { animation: fadeInUp 0.6s ease-out 0.8s both; }
.project-card:nth-child(4) { animation: fadeInUp 0.6s ease-out 0.95s both; }
.project-card:nth-child(5) { animation: fadeInUp 0.6s ease-out 1.1s both; }

.contact {
    animation: fadeInUp 0.6s ease-out 1.3s both;
}

@media (prefers-reduced-motion: reduce) {
    .ameba-logo,
    .tagline,
    .project-card,
    .contact {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .ameba-logo .a {
        animation: none;
        opacity: 1;
        color: #93c5fd;
        text-shadow: 0 0 8px #93c5fd, 0 0 16px #60a5fa, 0 0 24px #3b82f6;
    }

    .app-icon-img {
        transition: none;
    }

    .project-card {
        transition: none;
    }
}

/* Contact section */
.contact {
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-md);
    margin-top: var(--spacing-lg);
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 178, 153, 0.15));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 24px;
}

.contact h2 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.contact p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.contact-btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border: 2px solid var(--accent-orange);
    border-radius: 12px;
    color: var(--accent-orange);
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-btn:hover {
    background: var(--accent-orange);
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.3);
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding: var(--spacing-md);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

footer p {
    margin-bottom: 0.5rem;
}

footer p:last-child {
    margin-bottom: 0;
}

footer .github-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

footer .github-link:hover {
    color: var(--text-primary);
}

footer .github-icon {
    width: 18px;
    height: 18px;
}

@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    .project-card,
    .project-card:nth-child(4),
    .project-card:nth-child(5) {
        grid-column: span 1;
    }

    .ameba-logo {
        font-size: 1.5rem;
    }


    .app-icon {
        width: 120px;
        height: 120px;
    }

    .project-content h3 {
        font-size: 1.25rem;
    }

    .project-content p {
        font-size: 0.875rem;
    }

    .badge {
        font-size: 0.625rem;
        padding: 0.2rem 0.6rem;
    }
}
