/* Bento Grid - Compact & Dynamic */
:root {
    --bg-color: #050505;
    /* Deepest black */
    --card-bg: rgba(20, 20, 20, 0.6);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #eee;
    --text-secondary: #888;
    --accent: #fff;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --grid-gap: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-heading);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    overflow-x: hidden;
    position: relative;
}

/* Background Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Behind everything */
    pointer-events: none;
    /* Let clicks pass through */
}

/* The Main Grid container */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto auto auto;
    gap: var(--grid-gap);
    max-width: 1000px;
    width: 100%;
    z-index: 1;
    /* Above canvas */
}

/* Common Card Styles */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Dynamic Spotlight Effect (handled by JS) */
.card::before {
    content: '';
    position: absolute;
    top: var(--y, -100px);
    left: var(--x, -100px);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover::before {
    opacity: 1;
}

/* Typography Inside Cards */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
}

p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.highlight {
    color: var(--text-primary);
    font-weight: 500;
}

/* SPECIFIC CARD LAYOUTS */

/* 1. Hero Profile (Top Left, 2x2) */
.card-profile {
    grid-column: span 2;
    grid-row: span 2;
    justify-content: space-between;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    width: fit-content;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 8px #00ff88;
}

/* 2. The Big Flex (Top Right, 2x1) */
.card-story {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.8), rgba(20, 20, 20, 0.6));
}

.big-number {
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    margin-bottom: 4px;
}

/* 3. Tech Stack / Roles (Middle Right, 1x1) */
.card-roles {
    grid-column: span 1;
}

/* 4. Socials (Middle Right, 1x1) */
.card-socials {
    grid-column: span 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: var(--text-secondary);
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.brand-pill svg,
.brand-pill img {
    width: 20px;
    height: 20px;
    fill: currentColor;
    object-fit: contain;
    border-radius: 2px;
    font-size: 0;
    /* Hides alt text if image breaks */
    display: block;
}

/* 'Read' Button Pill */
.read-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 1rem;
    width: fit-content;
}

.read-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
    border-color: rgba(255, 255, 255, 0.2);
}

.read-btn .arrow {
    transition: transform 0.2s ease;
}

.read-btn:hover .arrow {
    transform: translateX(2px);
}

/* Certification Highlight */
.cert-wrapper {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cert-badge {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 255, 136, 0.05);
    /* Subtle green tint for "Verified" vibe */
    border: 1px solid rgba(0, 255, 136, 0.2);
    padding: 10px 14px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cert-badge:hover {
    background: rgba(0, 255, 136, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.1);
}

.cert-info h4 {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.cert-info p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.cert-action {
    color: #00ff88;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 5. Hall of Fame (Bottom Row, 4x1) */
.card-hof {
    grid-column: span 4;
}

.hof-grid {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 10px;
}

.brand-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #aaa;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 16px;
    border-radius: 12px;
    flex: 1;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.brand-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .bento-grid {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    body {
        padding: 16px;
        align-items: flex-start;
        /* Allow scrolling from top */
    }

    .card {
        padding: 20px;
    }

    h1 {
        font-size: 2rem;
    }

    .big-number {
        font-size: 2.5rem;
    }

    /* Make Hall of Fame 2x2 on mobile */
    .hof-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .brand-pill {
        justify-content: center;
        /* Center content in pill */
        padding: 12px;
    }

    /* Adjust skills gap */
    .card-profile div[style*="display: flex"] {
        gap: 6px;
    }

    /* Ensure background helps readability on small screens */
    #bg-canvas {
        opacity: 0.6;
    }
}