@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

:root {
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --primary-color: #00f2ff;
    --text-color: #ffffff;
    --text-muted: #a0a0a0;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Dynamic Background Elements */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 242, 255, 0.1) 0%, transparent 60%),
        radial-gradient(circle, rgba(124, 58, 237, 0.1) 100%, transparent 60%);
    animation: backgroundMove 20s ease-in-out infinite;
    z-index: -1;
}

@keyframes backgroundMove {
    0% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-2%, -2%);
    }

    100% {
        transform: translate(0, 0);
    }
}

header {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px 0;
    text-align: center;
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    margin: 5px 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

nav {
    display: flex;
    justify-content: center;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid var(--glass-border);
}

nav a {
    color: var(--text-color);
    padding: 15px 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

nav a:hover {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.05);
    border-bottom-color: var(--primary-color);
}

.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    text-align: center;
}

.hero-text h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Bento Grid Layout - Gestalt Principles Applied */
.bento-grid {
    display: grid;
    /* Create a flexible grid that allows spanning */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    /* Proximity: Consistent spacing */
    padding: 20px 0;
    max-width: 1000px;
    margin: 0 auto;
}

.bento-item {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    /* Common Region */
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    /* Similarity: Consistent shapes */
    padding: 30px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Focal Point: Featured items span 2 columns on larger screens */
@media (min-width: 768px) {
    .bento-item.featured {
        grid-column: span 2;
        background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    }

    .bento-item.featured img {
        max-width: 240px;
        /* Slightly larger image for focal points */
    }
}

.bento-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: translateX(-100%);
    transition: 0.5s;
}

.bento-item:active {
    transform: scale(0.96);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.bento-item:hover {
    /* Optional: subtle desktop hover, or remove entirely if purely mobile feeling is desired */
    border-color: rgba(255, 255, 255, 0.2);
}

.bento-item img {
    width: 100%;
    max-width: 200px;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 15px rgba(0, 242, 255, 0.2));
    transition: transform 0.2s ease;
}

.bento-item:active img {
    transform: scale(0.95);
}

.bento-item h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
}

/* Footer */
footer {
    margin-top: 60px;
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (min-width: 1024px) {

    /* Vertical optimization for PC to prevent scrolling */
    .container {
        margin: 20px auto;
        /* Reduced from 40px */
    }

    .hero-text h2 {
        font-size: 2rem;
        margin-bottom: 5px;
    }

    .hero-text p {
        margin-bottom: 20px;
        /* Reduced from 40px */
    }

    .bento-grid {
        gap: 20px;
        padding: 10px 0;
    }

    .bento-item {
        padding: 20px;
        /* Reduced from 30px */
    }

    .bento-item img {
        max-width: 160px;
        /* Smaller images on PC to save space */
        margin-bottom: 10px;
    }

    .bento-item.featured img {
        max-width: 200px;
    }

    footer {
        margin-top: 30px;
        /* Reduced from 60px */
        padding: 15px 0;
    }
}

@media (max-width: 768px) {

    /* Mobile Vertical Optimization: Fit in one screen */
    .container {
        margin: 10px auto;
        padding: 0 15px;
    }

    header {
        padding: 10px 0;
    }

    header h1 {
        font-size: 1.4rem;
    }

    nav a {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .hero-text h2 {
        font-size: 1.2rem;
        margin-bottom: 5px;
    }

    .hero-text p {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }

    .bento-grid {
        /* Force 2 columns on mobile to save vertical space */
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0;
    }

    /* First item (Chatbot) spans full width for hierarchy */
    .bento-item.featured {
        grid-column: span 2;
    }

    .bento-item {
        padding: 15px;
        border-radius: 16px;
    }

    .bento-item img {
        max-width: 80px;
        /* Much smaller icons */
        margin-bottom: 5px;
    }

    .bento-item.featured img {
        max-width: 100px;
    }

    .bento-item h3 {
        font-size: 0.9rem;
    }

    footer {
        margin-top: 20px;
        padding: 10px 0;
        font-size: 0.75rem;
    }
}