/* ========================================
   PERSONAL HELL — Instagram Parody Styles
   ======================================== */

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0a0a0a;
    --surface: #111111;
    --border: #1e1e1e;
    --text-primary: #e8e8e8;
    --text-secondary: #8e8e8e;
    --accent: #d62828;
    --accent-glow: rgba(214, 40, 40, 0.4);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text-primary);
    font-family: var(--font);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =====================
   TOP NAVIGATION BAR
   ===================== */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.site-wordmark {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: -0.3px;
    transition: opacity 0.2s ease;
}

.site-wordmark:hover {
    opacity: 0.8;
}

/* Don't Talk To Me Button */
.dont-talk-btn {
    display: inline-block;
    padding: 8px 18px;
    background: var(--accent);
    color: #ffffff;
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    text-transform: lowercase;
    letter-spacing: 0.3px;
    animation: pulsate 2s ease-in-out infinite;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dont-talk-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--accent-glow);
    animation-play-state: paused;
}

@keyframes pulsate {
    0%, 100% {
        box-shadow: 0 0 0px var(--accent-glow);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 18px var(--accent-glow), 0 0 40px rgba(214, 40, 40, 0.15);
        transform: scale(1.03);
    }
}

/* =====================
   PROFILE PAGE
   ===================== */
.profile-page {
    max-width: 620px;
    margin: 0 auto;
    padding: 0 16px;
}

/* =====================
   PROFILE HEADER
   ===================== */
.profile-header {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 30px 0 16px;
}

.profile-pic-wrapper {
    flex-shrink: 0;
    width: 110px;
    height: 110px;
    position: relative;
}

/* Shadow layer */
.profile-pic-wrapper::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    animation: ringGlow 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

/* Circular border overlay */
.profile-pic-wrapper::after {
    content: '';
    position: absolute;
    inset: -6px; /* expands slightly outside to nestle the image */
    border-radius: 50%;
    border: 3px solid transparent;
    background: linear-gradient(135deg, var(--accent), #8b0000, var(--accent)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    z-index: 2;
}

@keyframes ringGlow {
    0%, 100% {
        box-shadow: 0 0 0px var(--accent-glow);
    }
    50% {
        box-shadow: 0 0 20px var(--accent-glow);
    }
}

.profile-pic {
    width: 100%;
    height: 100%;
    border-radius: 9px;
    object-fit: contain;
    display: block;
    background: transparent;
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-name {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.profile-stats {
    display: flex;
    gap: 20px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    min-height: 38px;
}

.stat-number {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-number.following-text {
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* =====================
   BIO SECTION
   ===================== */
.profile-bio {
    padding: 8px 0 20px;
    border-bottom: 1px solid var(--border);
}

.bio-text {
    font-size: 0.88rem;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 4px;
}

.bio-email {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.bio-email:hover {
    opacity: 0.75;
    text-decoration: underline;
}

/* =====================
   GRID TABS
   ===================== */
.grid-tabs {
    display: flex;
    justify-content: center;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.grid-tab {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 14px 40px;
    cursor: pointer;
    transition: color 0.2s ease;
    position: relative;
}

.grid-tab.active {
    color: var(--text-primary);
}

.grid-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--text-primary);
}

.grid-tab:hover {
    color: var(--text-primary);
}

/* =====================
   POSTS GRID
   ===================== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    padding: 3px 0;
    min-height: 200px;
}

.grid-item {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    cursor: pointer;
    background: var(--surface);
}

.grid-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.25s ease;
}

.grid-item:hover::after {
    background: rgba(0, 0, 0, 0.3);
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.grid-item:hover img {
    transform: scale(1.04);
}

/* Hover overlay with post title */
.grid-item .grid-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

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

.grid-overlay span {
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    padding: 4px 10px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
    max-width: 90%;
    line-height: 1.3;
}

/* Empty grid state */
.grid-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    text-align: center;
    gap: 8px;
}

.grid-empty h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
}

.grid-empty p {
    font-size: 0.85rem;
    opacity: 0.6;
}

/* =====================
   FOOTER
   ===================== */
.profile-footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    border-top: 1px solid var(--border);
    margin-top: 40px;
}

/* =====================
   LOADING SKELETON
   ===================== */
.skeleton {
    background: linear-gradient(90deg, var(--surface) 25%, #1a1a1a 50%, var(--surface) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 0;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =====================
   FADE IN ANIMATION
   ===================== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-header {
    animation: fadeUp 0.5s ease-out both;
}

.profile-bio {
    animation: fadeUp 0.5s ease-out 0.1s both;
}

.grid-tabs {
    animation: fadeUp 0.5s ease-out 0.2s both;
}

.posts-grid {
    animation: fadeUp 0.5s ease-out 0.3s both;
}

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 520px) {
    .profile-header {
        gap: 16px;
        padding: 20px 0 12px;
    }

    .profile-pic-wrapper {
        width: 80px;
        height: 80px;
    }

    .profile-name {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }

    .profile-stats {
        gap: 14px;
    }

    .stat-number {
        font-size: 0.95rem;
    }

    .stat-label {
        font-size: 0.68rem;
    }

    .posts-grid {
        gap: 2px;
    }

    .top-bar {
        padding: 12px 14px;
    }

    .site-wordmark {
        font-size: 1rem;
    }

    .dont-talk-btn {
        font-size: 0.72rem;
        padding: 7px 14px;
    }
}

/* ========================================
   SUBPAGE STYLES (kept for other pages)
   ======================================== */

/* Page top bar layout */
.page-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    width: 100%;
}

/* Page container for subpages */
.page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-title {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
    text-transform: lowercase;
    letter-spacing: 1px;
}

.page-logo {
    max-width: 300px;
    height: auto;
    filter: drop-shadow(0 0 20px var(--accent-glow));
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
}

.page-logo:hover {
    filter: drop-shadow(0 0 30px var(--accent-glow)) brightness(1.1);
    transform: scale(1.02);
}

.back-button {
    display: inline-block;
    color: #ffffff;
    text-decoration: none;
    padding: 10px 20px;
    border: 1px solid var(--accent);
    border-radius: 5px;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-transform: lowercase;
}

.back-button:hover {
    background-color: var(--accent);
    color: #000000;
    transform: translateY(-2px);
}

/* Contact page styling */
.contact-content {
    text-align: center;
    line-height: 1.8;
}

.contact-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.email-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 1.3rem;
    padding: 10px;
    border: 1px solid var(--accent);
    border-radius: 5px;
    display: inline-block;
    margin: 1rem 0;
    transition: all 0.3s ease;
}

.email-link:hover {
    background-color: var(--accent);
    color: #000000;
    transform: scale(1.05);
}

/* About page styling */
.about-image {
    max-width: 100%;
    height: auto;
    margin-bottom: 2rem;
    border-radius: 8px;
    filter: drop-shadow(0 0 15px var(--accent-glow));
}

.about-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #cccccc;
    text-align: justify;
}

@media (min-width: 768px) {
    .page-title {
        font-size: 3rem;
    }
    
    .page-logo {
        max-width: 350px;
    }
}

/* =====================
   SOUNDCLOUD EMBED (shared post layout — matches off the deepend)
   ===================== */
.play-row {
    text-align: center;
    margin: 0 0 0.85rem 0;
}

.embed-before-comments {
    margin: 2.5rem 0 0 0;
    text-align: center;
}

.soundcloud-embed {
    border-radius: 12px;
    margin: 0 auto;
    max-width: 100%;
    box-shadow: 0 8px 30px rgba(253, 107, 103, 0.2);
}

/* =====================
   SOUNDTRACK BUTTON (SoundCloud — CSS hover only; no JS mouseover/mouseout)
   ===================== */
.sc-soundtrack-btn {
    display: inline-block;
    background-color: transparent;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-family: ui-monospace, 'Cascadia Code', 'Courier New', monospace;
    font-size: 1rem;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.sc-soundtrack-btn:focus:not(:focus-visible) {
    outline: none;
}

.sc-soundtrack-btn:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

/* Hell / coral accent (#fd6b67) — unmotivated, off the deepend */
.sc-soundtrack-btn--coral {
    border: 2px solid #fd6b67;
    color: #fd6b67;
}

.sc-soundtrack-btn--coral:hover {
    background-color: #fd6b67;
    color: #000000;
    box-shadow: 0 6px 22px rgba(253, 107, 103, 0.35);
}

.sc-soundtrack-btn--coral:active {
    box-shadow: 0 3px 12px rgba(253, 107, 103, 0.25);
}

/* Site accent — things that spoke to me */
.sc-soundtrack-btn--accent {
    border: 2px solid var(--accent, #d62828);
    color: var(--accent, #d62828);
}

.sc-soundtrack-btn--accent:hover {
    background-color: var(--accent, #d62828);
    color: #000000;
    box-shadow: 0 6px 22px rgba(214, 40, 40, 0.35);
}

.sc-soundtrack-btn--accent:active {
    box-shadow: 0 3px 12px rgba(214, 40, 40, 0.25);
}
