:root {
    --bg-color: #f5f5f7;
    --card-bg: #ffffff;
    --text-color: #1d1d1f;
    --text-secondary: #86868b;
    --hover-bg: #f0f0f0;
    --font-main: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

.container {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto;
    gap: 1.5rem;
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border-radius: 24px;
    padding: 2rem;
    transition: transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 0.3s ease;
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.card:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* Profile Card (Spans full width on mobile, 2 cols on desktop) */
.profile-card {
    grid-column: span 4;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 2rem;
    padding: 3rem;
}

.profile-image-container {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.profile-image-placeholder,
.profile-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #86868b;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-name {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.profile-handle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: -0.2rem;
}

.profile-bio {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Link Cards */
.link-card {
    grid-column: span 2;
    /* 2 columns wide by default */
    aspect-ratio: 1.5 / 1;
    gap: 1rem;
}

.link-icon {
    font-size: 3.125rem;
}

.link-icon-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.link-text {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Specific Card Colors/Gradients (Optional - keeping it minimal for now, but adding subtle tints) */
/* .twitter { background: linear-gradient(135deg, #1d1d1f 0%, #1DA1F2 200%); } */

/* Footer */
.site-footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 1rem;
}

.footer-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--text-color);
    text-decoration: underline;
}

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

    .profile-card {
        grid-column: span 1;
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }

    .profile-name {
        font-size: 1.8rem;
        /* Reduced from 2.5rem */
        word-wrap: break-word;
        /* Ensure it breaks if absolutely necessary, but size should prevent it */
    }

    .link-card {
        grid-column: span 1;
        aspect-ratio: auto;
        padding: 2rem;
        flex-direction: row;
        justify-content: flex-start;
    }

    .link-text {
        font-size: 1rem;
        /* Reduced from 1.2rem */
    }

    .link-icon-img {
        width: 40px;
        /* Reduced from 50px */
        height: 40px;
    }

    .link-icon {
        font-size: 1.5rem;
    }
}

/* Maintenance Banner */
.maintenance-banner {
    width: 100%;
    background-color: #007aff;
    color: white;
    text-align: center;
    padding: 1rem;
    font-weight: 500;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.maintenance-banner.hidden {
    display: none;
}

/* Adjust container to not be hidden behind fixed banner when active */
body.maintenance-active {
    padding-top: 80px;
    /* Adjust based on banner height */
}

/* Announcement Card */
.announcement-card {
    grid-column: span 4;
    background-color: #1d1d1f;
    color: #f5f5f7;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 2.5rem;
    text-align: left;
}

.announcement-card.hidden {
    display: none;
}

.announcement-content h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.announcement-content p {
    color: #86868b;
    font-size: 1rem;
}

.announcement-button {
    background-color: #007aff;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 980px;
    /* Pill shape */
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.announcement-button:hover {
    background-color: #0071e3;
}

@media (max-width: 600px) {
    .announcement-card {
        grid-column: span 1;
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
}

/* Modal Styles */
.modal {
    display: flex;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: 24px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.95) translateY(10px);
        opacity: 0;
    }

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

.close-modal {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--text-color);
    text-decoration: none;
}

.qr-container {
    margin: 1.5rem 0;
    background: white;
    padding: 1rem;
    border-radius: 16px;
    display: inline-block;
}

.qr-code-img {
    width: 200px;
    height: 200px;
    object-fit: contain;
}

.qr-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
}