@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

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

:root {
    --bg-primary: #0a0a0f;
    --bg-card: #111116;
    --bg-card-hover: #16161d;
    --text-primary: #f5f5f7;
    --text-secondary: #8a8a93;
    --text-muted: #5a5a63;
    --accent: #e8b4a0;
    --accent-secondary: #a0c4e8;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --radius: 20px;
    --radius-sm: 12px;
}

@media (prefers-color-scheme: light) {
    :root {
        --bg-primary: #f0f0f3;
        --bg-card: #ffffff;
        --bg-card-hover: #fafafa;
        --text-primary: #111116;
        --text-secondary: #5a5a63;
        --text-muted: #8a8a93;
        --accent: #c4785c;
        --accent-secondary: #5c8cc4;
        --border: rgba(0, 0, 0, 0.06);
        --border-hover: rgba(0, 0, 0, 0.12);
    }
}

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
    line-height: 1.6;
}

.bento-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(120px, auto);
    gap: 16px;
}

.bento-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all 0.3s ease;
    animation: card-appear 0.6s ease-out both;
}

.bento-card:nth-child(1) { animation-delay: 0s; }
.bento-card:nth-child(2) { animation-delay: 0.1s; }
.bento-card:nth-child(3) { animation-delay: 0.15s; }
.bento-card:nth-child(4) { animation-delay: 0.2s; }
.bento-card:nth-child(5) { animation-delay: 0.25s; }

@keyframes card-appear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bento-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
}

.card-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* Intro card - full width */
.card-intro {
    grid-column: span 4;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-intro h1 {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
    line-height: 1.1;
}

.name-accent {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-intro .role {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.card-intro .bio {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 480px;
    margin-bottom: 28px;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-links a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.social-links a:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: var(--bg-primary);
}

.contact-links {
    display: flex;
    gap: 20px;
    margin-top: 16px;
}

.contact-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.contact-links a:hover {
    color: var(--text-primary);
}

/* Featured project - full width */
.card-featured {
    grid-column: span 4;
    position: relative;
    overflow: hidden;
}

.card-featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
}

.card-featured h2 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.card-featured h2 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.card-featured h2 a:hover {
    color: var(--accent);
}

.card-featured .tagline {
    font-size: 15px;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 12px;
}

.card-featured .description {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 600px;
    margin-bottom: 20px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.tag {
    background: var(--bg-primary);
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--border);
}

.cta {
    display: inline-block;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    padding: 12px 24px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.cta:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-primary);
}

/* Skills cards */
.card-skills {
    grid-column: span 1;
}

.skill-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skill-list span {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Infrastructure card */
.card-infra {
    grid-column: span 1;
}

.card-infra .skill-list {
    gap: 6px;
}

.card-infra .skill-list span {
    font-size: 14px;
}

/* Responsive */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-intro {
        grid-column: span 2;
    }

    .card-intro h1 {
        font-size: 32px;
    }

    .card-featured {
        grid-column: span 2;
    }

    .card-skills,
    .card-infra {
        grid-column: span 1;
    }
}

@media (max-width: 600px) {
    .bento-container {
        padding: 20px 16px;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .bento-card {
        padding: 24px;
        border-radius: 16px;
    }

    .card-intro,
    .card-featured,
    .card-skills,
    .card-infra {
        grid-column: span 1;
    }

    .card-intro h1 {
        font-size: 28px;
    }

    .card-intro .bio {
        font-size: 14px;
    }

    .card-featured h2 {
        font-size: 22px;
    }

    .social-links {
        flex-direction: column;
    }

    .social-links a {
        text-align: center;
    }

    .contact-links {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }

    .card-quote blockquote {
        font-size: 16px;
    }
}
