:root {
    /* Dark Grey Scale Palette - Premium Flat Look */
    --bg-main: #121212;
    /* Deep Dark Background */
    --bg-element: #1e1e1e;
    /* Lighter Dark Grey for cards */
    --text-primary: #e0e0e0;
    /* Off-White for contrast */
    --text-secondary: #a0a0a0;
    /* Medium Grey */
    --border-color: #333333;
    /* Dark border */

    /* Accents - Retained but vivid against dark */
    --accent-ghost: #ff6b6b;
    --accent-openwebui: #48dbfb;
    --accent-comfy: #a29bfe;
    --accent-wiki: #55efc4;
    --accent-gitea: #fab1a0;
    /* Soft Orange */
    --accent-prefect: #ffeaa7;
    /* Soft Yellow */
    --accent-n8n: #ff9f43;
    /* Orange for n8n */
    --accent-drone: #54a0ff;
    /* Blue for Drone */

    --font-heading: 'Kanit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    font-family: var(--font-body);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Central Logo Section */
.logo-container {
    text-align: center;
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    animation: fadeInDown 0.8s ease forwards;
}

.main-logo {
    width: 80px;
    height: 80px;
    color: var(--text-primary);
}

.brand-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.2em;
    color: var(--text-primary);
    text-transform: uppercase;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Container */
.container {
    width: 100%;
    max-width: 1400px;
    /* Wide layout */
    display: flex;
    justify-content: center;
}

/* Bento Grid / Flex Layout */
.bento-grid {
    display: flex;
    gap: 1rem;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}

/* Card Styling - Flat & Layered */
.card {
    background-color: var(--bg-element);
    border: 1px solid var(--border-color);
    /* Subtle border for definition */
    border-radius: 4px;
    /* Slightly squarer for "tech/brutalist" feel, or 12px for modern */
    padding: 2rem;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;

    flex: 1;
    min-width: 220px;
    height: 60vh;
    min-height: 400px;

    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    /* Darker shadow for dark mode */
}

.card:hover {
    background-color: #2a2a2a;
    /* Slightly lighter dark on hover */
    transform: translateY(-5px);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.4);
    /* Deep black shadow */
    border-color: #444;
}

/* Spotlight Effect via JS */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--x, 50%) var(--y, 50%),
            rgba(255, 255, 255, 0.06),
            transparent 40%);
    z-index: 3;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.card:hover::before {
    opacity: 1;
}

/* Time Display */
.time-display {
    font-family: var(--font-body);
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
    opacity: 0.8;
}

/* Border Accent Top - Flat Design Touch */
.ghost {
    border-top: 6px solid var(--accent-ghost);
}

.openwebui {
    border-top: 6px solid var(--accent-openwebui);
}

.comfyui {
    border-top: 6px solid var(--accent-comfy);
}

.wiki {
    border-top: 6px solid var(--accent-wiki);
}

.gitea {
    border-top: 6px solid var(--accent-gitea);
}

.prefect {
    border-top: 6px solid var(--accent-prefect);
}

.n8n {
    border-top: 6px solid var(--accent-n8n);
}

.drone {
    border-top: 6px solid var(--accent-drone);
}

.card-content {
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Header inside card */
.icon-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.icon-header i {
    width: 32px;
    height: 32px;
    opacity: 0.9;
}

.service-id {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 3rem;
    line-height: 0.8;
    color: rgba(255, 255, 255, 0.05);
    /* White transparent for dark mode */
}

.card:hover .service-id {
    color: rgba(255, 255, 255, 0.1);
}

/* Text Content */
.text-content h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.text-content p {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Background Images - Artistic Oil Paintings */
.bg-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.15;
    /* Visibility of the painting */
    z-index: 1;
    transition: all 0.5s ease;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: grayscale(80%) contrast(1.2) brightness(0.6);
    /* Muted by default */
}

/* Specific Images */
.ghost .bg-icon {
    background-image: url('assets/ghost.png');
}

.openwebui .bg-icon {
    background-image: url('assets/openwebui.png');
}

.comfyui .bg-icon {
    background-image: url('assets/comfyui.png');
}

.wiki .bg-icon {
    background-image: url('assets/wiki.png');
}

.gitea .bg-icon {
    background-image: url('assets/gitea.png');
}

.prefect .bg-icon {
    background-image: url('assets/prefect.png');
}

.n8n .bg-icon {
    background-image: url('assets/n8n.png');
}

.drone .bg-icon {
    background-image: url('assets/drone.png');
}

/* On hover, bring color back */
.card:hover .bg-icon {
    opacity: 0.4;
    /* Brighter on hover */
    filter: grayscale(0%) contrast(1.1) brightness(1);
    /* Full color */
    transform: scale(1.05);
    /* Gentle zoom */
}


@media (max-width: 900px) {
    .bento-grid {
        flex-direction: column;
        align-items: center;
        /* Stack vertically on mobile */
    }

    .card {
        width: 100%;
        min-height: 250px;
        height: auto;
    }
}

/* Footer */
.footer {
    margin-top: 4rem;
    text-align: center;
    padding: 2rem;
    width: 100%;
    max-width: 1400px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.social-links a {
    color: var(--text-secondary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-element);
    border: 1px solid var(--border-color);
}

.social-links a:hover {
    color: var(--text-primary);
    background: #2a2a2a;
    border-color: #444;
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.social-links a i {
    width: 20px;
    height: 20px;
}

.copyright {
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.7;
    letter-spacing: 0.05em;
}