/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    line-height: 1.4;
    font-size: var(--font-size-sm);
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img,
video {
    max-width: 100%;
    display: block;
}

/* Layout Utilities */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: -1px;
}

/* Profile Section (for Index) */
.profile {
    padding: 30px 0;
    display: flex;
    align-items: center;
    gap: 40px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: var(--border-color);
    overflow: hidden;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info h1 {
    font-size: 28px;
    font-weight: 300;
    margin-bottom: 10px;
}

.profile-stats {
    display: flex;
    gap: 40px;
    margin-bottom: 15px;
    font-size: 16px;
}

.profile-bio p {
    font-size: 16px;
}

.profile-bio strong {
    font-weight: var(--font-weight-bold);
    display: block;
}

/* Grid Layout */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap);
    padding-bottom: 50px;
}

.post-item {
    aspect-ratio: 1;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    background-color: var(--border-color);
}

.post-item img,
.post-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-speed);
}

.post-item:hover .post-overlay {
    opacity: 1;
}

.post-overlay {
    position: absolute;
    inset: 0;
    background: var(--overlay-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    color: white;
    font-weight: bold;
    gap: 20px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .profile {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 20px 0;
    }

    .profile-image {
        width: 80px;
        height: 80px;
    }

    .profile-stats {
        justify-content: center;
        gap: 20px;
        font-size: 14px;
    }

    .posts-grid {
        gap: 3px;
    }
}