:root {
    --bg-color: #050520;
    /* Navy Blue */
    --card-bg: #1a1a1a;
    --text-color: #ffffff;
    --accent-color: #00f2ff;
    --accent-secondary: #ff0055;
    --font-main: 'Zen Kaku Gothic New', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow: hidden;
    /* Prevent scrolling */
    height: 100vh;
    /* Full viewport height */
    display: flex;
    flex-direction: column;
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 50% 50%, #1a1a2e 0%, #000000 100%);
    opacity: 0.8;
}

/* Hero Section - Compact */
.hero {
    position: relative;
    flex: 0 0 auto;
    /* Don't grow, stay compact */
    padding: 4vh 0 2vh 0;
    /* Vertical padding based on viewport height */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 2;
}

.hero-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-background {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #000000, #1a1a2e, #2d002d);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), var(--bg-color));
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Site Title - Clean & Large */
.site-title {
    font-size: 4rem;
    /* Slightly smaller than 5rem to fit better */
    font-weight: 700;
    margin-bottom: 5px;
    color: #fff;
    letter-spacing: 0.1em;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    /* Clean drop shadow */
}

.site-subtitle {
    font-size: 1.2rem;
    color: #ccc;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* Main Container - Centered Grid */
.container {
    flex: 1;
    /* Take remaining space */
    display: flex;
    align-items: center;
    /* Center vertically */
    justify-content: center;
    /* Center horizontally */
    padding: 0 40px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Force 4 columns on desktop */
    gap: 25px;
    width: 100%;
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 30px 20px;
    text-decoration: none;
    color: var(--text-color);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease-out, box-shadow 0.3s ease, border-color 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 280px;
    /* Fixed height for consistency */

    /* Animation Init */
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.card:nth-child(1) {
    animation-delay: 0.1s;
}

.card:nth-child(2) {
    animation-delay: 0.2s;
}

.card:nth-child(3) {
    animation-delay: 0.3s;
}

.card:nth-child(4) {
    animation-delay: 0.4s;
}

.card:hover {
    box-shadow: 0 15px 30px rgba(0, 242, 255, 0.15);
    border-color: var(--accent-color);
    transform: translateY(-5px);
}

.card-content {
    z-index: 2;
    transform: translateZ(20px);
}

.card h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.card p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 15px;
}

.card-icon {
    font-size: 2.5rem;
    margin-top: 5px;
    transition: transform 0.3s ease;
    transform: translateZ(30px);
}

.card:hover .card-icon {
    transform: scale(1.2) rotate(5deg);
}

.card-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 242, 255, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s ease;
    pointer-events: none;
}

.card:hover .card-glow {
    transform: translate(-50%, -50%) scale(1);
}

.card-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.preview-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease;
}

.preview-image.active {
    opacity: 0.4;
}

.card:hover .preview-image.active {
    opacity: 0.6;
    transform: scale(1.1);
    transition: opacity 0.5s ease, transform 6s ease;
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.8));
    z-index: 1;
    pointer-events: none;
}

/* Footer - Minimal */
footer {
    text-align: center;
    padding: 10px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
    position: absolute;
    bottom: 0;
    width: 100%;
    pointer-events: none;
    /* Let clicks pass through if needed */
}

/* Responsive */
@media (max-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2x2 on tablets */
        max-width: 700px;
    }

    .card {
        height: 220px;
    }
}

@media (max-width: 768px) {
    body {
        overflow-y: auto;
        /* Allow scrolling on mobile */
        height: auto;
        display: block;
    }

    .hero {
        padding: 60px 0 30px 0;
    }

    .site-title {
        font-size: 2.5rem;
    }

    .container {
        padding: 0 20px 40px 20px;
        display: block;
    }

    .card-grid {
        grid-template-columns: 1fr;
        /* Stack on mobile */
        gap: 20px;
    }

    .card {
        height: 200px;
    }

    footer {
        position: relative;
        padding: 20px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}