/* ==========================================================================
   instagram profile — from Figma "Create Scrollable Layout" + "Generate HTML_CSS_JS Code"
   minimally adapted for dark mode to match site theme
   ========================================================================== */

/* --- about me page: two-column layout --- */

.aboutme-page {
    max-width: 1200px;
    padding: 1rem 2rem 4rem;
}

.aboutme-layout {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.aboutme-text {
    flex: 1;
    min-width: 0;
    position: sticky;
    top: 2rem;
}

.aboutme-bio,
.aboutme-contact {
    font-size: 0.85rem;
    line-height: 1.8;
    color: #a1a1aa;
    margin-bottom: 1.25rem;
}

.aboutme-contact a {
    color: #60a5fa;
    text-decoration: none;
    transition: opacity 200ms;
}

.aboutme-contact a:hover {
    opacity: 0.7;
}

.aboutme-ig {
    flex-shrink: 0;
    width: 470px;
}

/* --- scrollable profile layout (from Figma styles.css) --- */

.ig-container {
    max-width: 470px;
    background-color: #000;
    position: relative;
    overflow-y: auto;
    padding-bottom: 2rem;
    border: 1px solid #262626;
    border-radius: 8px;
}

.ig-container::-webkit-scrollbar {
    width: 0;
    display: none;
}

.ig-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Header */
.ig-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid #262626;
}

.back-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.username-header {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    text-transform: none;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.icon-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

/* Profile Section */
.profile-section {
    display: flex;
    padding: 16px 16px 0;
    gap: 20px;
}

.profile-image-wrapper {
    flex-shrink: 0;
}

.profile-image {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    padding: 3px;
}

.profile-image img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #000;
}

.stats {
    flex: 1;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-top: 12px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
    color: #fff;
}

.stat-label {
    font-size: 13px;
    color: #fff;
}

/* Bio Section */
.bio-section {
    padding: 12px 16px 8px;
}

.display-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    color: #fff;
}

.category {
    font-size: 12px;
    color: #737373;
    margin-bottom: 6px;
}

.bio-text {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 6px;
    color: #fff;
}

/* Action Buttons */
.ig-action-buttons {
    display: flex;
    gap: 6px;
    padding: 8px 12px 16px;
}

.ig-action-btn {
    flex: 1;
    background: #262626;
    color: #fff;
    border: none;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    text-transform: none;
}

/* Story Highlights */
.ig-highlights {
    display: flex;
    gap: 16px;
    padding: 4px 16px 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.ig-highlights::-webkit-scrollbar {
    display: none;
}

.highlight-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.highlight-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1px solid #363636;
    padding: 2px;
    overflow: hidden;
}

.highlight-circle img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.highlight-label {
    font-size: 12px;
    color: #fff;
    text-align: center;
    text-transform: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    border-top: 1px solid #262626;
    border-bottom: 1px solid #262626;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #737373;
    border-bottom: 1px solid transparent;
}

.tab-btn.active {
    color: #fff;
    border-bottom-color: #fff;
}

/* Photo Grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
}

.grid-item {
    aspect-ratio: 1;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: #1a1a1a;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 200ms;
}

.grid-item:hover img {
    opacity: 0.85;
}

/* --- post popup overlay (from Figma "Generate HTML_CSS_JS Code", dark-adapted) --- */

.post-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 250ms, visibility 250ms;
    padding: 1.5rem;
    cursor: pointer;
}

.post-overlay.open {
    opacity: 1;
    visibility: visible;
}

.post-overlay-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 200ms;
    z-index: 10;
}

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

.post-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 200ms, background 200ms;
    z-index: 10;
}

.post-nav-arrow:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.25);
}

.post-nav-prev {
    left: calc(50% - 310px);
}

.post-nav-next {
    right: calc(50% - 310px);
}

.post-nav-arrow.hidden {
    display: none;
}

/* Post Container (from Figma, dark-adapted) */
.post-container {
    background: #1a1a1a;
    width: 470px;
    max-width: 100%;
    border: 1px solid #333;
    border-radius: 8px;
    cursor: default;
    overflow: hidden;
    max-height: 90vh;
    overflow-y: auto;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.post-container::-webkit-scrollbar {
    width: 0;
    display: none;
}

/* Post Header */
.post-header {
    height: 48px;
    display: flex;
    align-items: center;
    padding: 0 12px 0 10px;
    border-bottom: 0.5px solid #333;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.story-ring {
    width: 34px;
    height: 34px;
    position: relative;
    flex-shrink: 0;
}

.story-gradient {
    position: absolute;
    inset: 0;
}

.avatar-container {
    position: absolute;
    inset: 8.82%;
    border-radius: 100px;
    overflow: hidden;
    border: 0.5px solid #333;
}

.avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details {
    display: flex;
    align-items: center;
    padding-left: 8px;
}

.post-username {
    font-size: 13px;
    font-weight: 600;
    color: #e5e5e5;
    letter-spacing: 0.13px;
    padding-bottom: 2px;
    text-transform: none;
}

.verified-badge {
    width: 16px;
    height: 16px;
    margin-left: 2px;
}

.options-button {
    width: 24px;
    height: 24px;
    position: relative;
    cursor: pointer;
}

/* Post Image */
.post-image {
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    position: relative;
}

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

/* Post Details */
.post-details {
    background: #1a1a1a;
    padding: 0 12px 16px 12px;
}

/* Action Bar */
.action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
}

.actions-left {
    display: flex;
    gap: 12px;
    align-items: center;
}

.action-item {
    display: flex;
    gap: 4px;
    align-items: center;
    cursor: pointer;
}

.action-icon {
    width: 24px;
    height: 24px;
    position: relative;
}

.action-count {
    font-size: 12px;
    font-weight: 600;
    color: #e5e5e5;
    letter-spacing: 0.24px;
    text-transform: none;
}

.save-button {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

/* Likes Section */
.likes-section {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 4px 0;
}

.avatars {
    display: flex;
    align-items: center;
    padding-right: 5px;
}

.liker-avatar {
    width: 16px;
    height: 16px;
    border-radius: 100px;
    border: 2px solid #1a1a1a;
    margin-right: -5px;
    overflow: hidden;
}

.liker-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.likes-text {
    font-size: 13px;
    color: #e5e5e5;
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
    text-transform: none;
}

.likes-text .regular {
    font-weight: 400;
    letter-spacing: 0.26px;
}

.likes-text .semibold {
    font-weight: 600;
    letter-spacing: 0.13px;
}

/* Description */
.post-description {
    padding: 4px 0 6px 0;
    font-size: 13px;
    text-transform: none;
}

.description-line {
    display: flex;
    gap: 4px;
    line-height: 1.4;
}

.description-line .post-username {
    font-weight: 600;
    color: #e5e5e5;
    letter-spacing: 0.13px;
    font-size: 13px;
}

.description-line .text {
    font-weight: 400;
    color: #a1a1aa;
    letter-spacing: 0.26px;
    flex: 1;
}

.hashtag {
    color: #60a5fa;
}

/* Timestamp */
.post-timestamp {
    font-size: 11px;
    font-weight: 400;
    color: #737373;
    letter-spacing: 0.33px;
    padding-top: 4px;
    text-transform: none;
}

/* Dark mode SVG icon colors */
.post-container .icon {
    fill: #e5e5e5;
}

.post-container .icon-stroke {
    stroke: #e5e5e5;
    fill: none;
}

.post-container .like-icon.liked {
    fill: #FF0034;
}

.post-container .options-button svg circle {
    fill: #e5e5e5;
}

/* --- responsive --- */

@media (max-width: 960px) {
    .aboutme-layout {
        flex-direction: column;
    }

    .aboutme-text {
        position: static;
    }

    .aboutme-ig {
        width: 100%;
        max-width: 470px;
    }

    .aboutme-page {
        padding: 1rem 1.25rem 4rem;
    }
}

@media (max-width: 500px) {
    .ig-container {
        max-width: 100%;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .post-container {
        width: 100%;
        border-radius: 0;
        max-height: 95vh;
    }

    .post-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .post-nav-arrow {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .post-nav-prev {
        left: 0.75rem;
    }

    .post-nav-next {
        right: 0.75rem;
    }
}

@media (max-width: 380px) {
    .profile-image {
        width: 72px;
        height: 72px;
    }

    .highlight-circle {
        width: 50px;
        height: 50px;
    }
}

/* active states (from Figma) */
.ig-container button:active {
    opacity: 0.7;
}
