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

:root {
    --bg-color: #FFFFFF;
    --text-primary: #1A1A1A;
    --text-secondary: #737373;
    --border-color: #EFEFEF;
    --link-color: #00376B;
    --radius-lg: 24px;
    --radius-md: 16px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --btn-bg: #F2F2F2;
    --btn-hover: #E5E5E5;
}

body.dark-mode {
    --bg-color: #121212;
    --text-primary: #FAFAFA;
    --text-secondary: #A0A0A0;
    --border-color: #2A2A2A;
    --link-color: #4DA6FF;
    --btn-bg: #222222;
    --btn-hover: #333333;
}

body {
    background: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    margin: 0; padding: 0;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s, color 0.3s;
}

.main-container {
    max-width: 935px;
    margin: 0 auto;
    padding: 0 20px 60px 20px;
}

/* Header */
.top-bar {
    max-width: 935px;
    margin: 0 auto;
    padding: 60px 20px 30px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-weight: 800;
    font-size: 28px;
    letter-spacing: -0.05em;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.logo:hover { transform: scale(1.05) rotate(-3deg); }

.header-right { display: flex; align-items: center; gap: 20px; }
.subtle-link { 
    color: var(--text-secondary); font-size: 13px; font-weight: 500; 
    text-decoration: none; opacity: 0.7; transition: opacity 0.2s; 
}
.subtle-link:hover { opacity: 1; }
#themeToggle { 
    background: none; border: none; font-size: 22px; 
    color: var(--text-primary); cursor: pointer; padding: 0;
    display: flex; justify-content: center; align-items: center;
}

/* Profile Section */
.profile-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    margin-bottom: 30px; /* Reduced space */
}
.avatar-container {
    position: relative;
    width: 175px; height: 175px;
    flex-shrink: 0;
}
.avatar-story-ring {
    position: absolute;
    width: 195px; height: 195px;
    top: -10px; left: -10px;
    z-index: 0;
    transform: rotate(-90deg);
}
.avatar-story-ring circle {
    stroke-dasharray: 588;
    stroke-dashoffset: 588;
}
.avatar-slider {
    width: 175px; height: 175px;
    border-radius: 50%;
    position: relative;
    z-index: 1;
}
.avatar-slider img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border-radius: 50%;
    object-fit: cover;
    opacity: 0; transition: opacity 0.8s ease;
}
.avatar-slider img.active { opacity: 1; }

.profile-info {
    max-width: 450px;
    flex: 1;
}

.bio { margin-bottom: 24px; }
.username { font-size: 28px; font-weight: 600; margin: 0 0 8px 0; color: var(--text-primary); }
.job { font-weight: 600; margin-bottom: 8px; font-size: 15px; color: var(--text-primary); }
.desc { color: var(--text-secondary); line-height: 1.5; font-size: 15px; margin-bottom: 12px; }
.learn-more { color: var(--link-color); text-decoration: none; font-weight: 600; cursor: pointer; }

/* Contact Actions (Email | Phone) */
.contact-actions {
    display: flex; gap: 12px;
    width: 100%;
}
.action-btn-wrapper {
    flex: 1;
    margin: 0 !important;
}
.action-btn {
    width: 100% !important;
    background: var(--btn-bg) !important;
    color: var(--text-primary) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    height: 40px !important;
    border-radius: 8px !important;
    display: flex !important; justify-content: center !important; align-items: center !important;
    transition: background 0.2s !important;
    padding: 0 !important;
}
.action-btn:hover { background: var(--btn-hover) !important; }

/* Stories */
.stories {
    display: flex; justify-content: center; gap: 30px;
    margin-bottom: 20px; padding: 20px 0;
    overflow-x: auto; flex-wrap: nowrap;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.stories::-webkit-scrollbar { display: none; }
.story-item {
    display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer;
    transition: transform 0.2s; flex-shrink: 0;
}
.story-item:hover { transform: scale(1.05); }
.story-ring {
    width: 76px; height: 76px; border-radius: 50%; padding: 3px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    display: flex; justify-content: center; align-items: center;
}
.story-ring.seen { background: var(--border-color); }
.story-ring img {
    width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid var(--bg-color);
}
.story-item span { font-size: 12px; font-weight: 500; color: var(--text-primary); }

/* Filters / Tabs */
.filters {
    display: flex; justify-content: center; gap: 16px;
    border-top: 1px solid var(--border-color); 
    padding-top: 20px; margin-bottom: 20px; 
    overflow-x: auto; flex-wrap: nowrap;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.filters::-webkit-scrollbar { display: none; }
.filter-btn {
    background: transparent; border: none; padding: 10px 20px; border-radius: 99px;
    font-size: 14px; font-weight: 500; cursor: pointer; color: var(--text-secondary);
    display: flex; align-items: center; gap: 8px; transition: all 0.3s var(--ease);
    flex-shrink: 0;
}
.filter-btn i { font-size: 18px; }
.filter-btn:hover { color: var(--text-primary); }
.filter-btn.active { color: var(--text-primary); font-weight: 600; }

/* Bento Grid */
.bento-grid { margin-bottom: 60px; }
.bento-grid .wp-block-post-template {
    display: grid !important; grid-template-columns: repeat(3, 1fr) !important; gap: 16px !important;
    padding: 0; list-style: none; margin: 0;
}
.bento-grid .wp-block-post-template > li {
    display: contents;
}
.grid-item {
    background: var(--btn-bg); border-radius: var(--radius-md); overflow: hidden; position: relative;
    text-decoration: none; color: var(--text-primary); aspect-ratio: 1/1; 
    display: flex; flex-direction: column; justify-content: center; align-items: center; cursor: pointer;
    transition: transform 0.4s var(--ease);
}
.grid-item:hover { transform: scale(1.02); }
.grid-item.large { grid-column: span 2; aspect-ratio: 2/1; }
.grid-item.tall { grid-row: span 2; aspect-ratio: 1/2; }

/* Post Visibility Logic (Draft/Hidden) */
.grid-item.draft { display: none !important; }

.grid-image { width: 100%; height: 100%; object-fit: cover; }
.grid-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,0.4); color: white;
    display: flex; justify-content: center; align-items: center;
    font-size: 16px; font-weight: 600; opacity: 0; transition: opacity 0.3s;
}
.grid-item:hover .grid-overlay { opacity: 1; }

.content-card {
    padding: 30px; box-sizing: border-box; text-align: left; width: 100%; height: 100%;
    display: flex; flex-direction: column; justify-content: space-between;
}
.content-card.orange { background: #E4704B; color: #111; }
.content-card.blue { background: #A9C6E2; color: #111; }
.content-card h3 { font-size: 20px; margin: 0; }
.content-card p { font-size: 14px; margin: 10px 0; opacity: 0.8; }

/* Footer */
.site-footer {
    display: flex; flex-direction: column; align-items: center; gap: 16px;
    padding: 30px 0; color: var(--text-secondary); font-size: 14px;
    border-top: none; /* Removed line as requested */
}
.footer-links {
    display: flex; gap: 24px; font-weight: 500; margin-bottom: 8px;
}
.footer-links a {
    color: var(--text-secondary); text-decoration: none; transition: color 0.2s;
}
.footer-links a:hover { color: var(--text-primary); }

.socials { display: flex; gap: 16px; font-size: 20px; }
.socials a { color: var(--text-secondary); transition: color 0.2s; text-decoration: none; }
.socials a:hover { color: var(--text-primary); }

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
    .main-container { padding: 0 0 20px 0; } 
    .top-bar { padding: 20px 16px; }
    .profile-section { flex-direction: column; text-align: center; gap: 24px; padding: 0 16px; margin-bottom: 30px;}
    .contact-actions { width: 100%; justify-content: center; }
    
    .filters, .stories {
        justify-content: flex-start;
        padding-left: 16px; padding-right: 16px;
    }
    .bento-grid { padding: 0 16px; }
    .bento-grid .wp-block-post-template { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
    .grid-item.large { grid-column: span 2; aspect-ratio: 2/1; }
    .grid-item.tall { grid-row: span 1; aspect-ratio: 1/1; }
    
    .site-footer { padding: 20px 16px; }
}

/* Modals */
.story-modal, .post-modal {
    position: fixed; inset: 0; z-index: 10000;
    display: none; align-items: center; justify-content: center; opacity: 0;
}
.story-modal.active, .post-modal.active { display: flex; }

.story-modal { background: #111; flex-direction: column; user-select: none; }
.story-close {
    position: absolute; top: 20px; right: 20px; color: white; font-size: 30px;
    cursor: pointer; z-index: 10001; background: none; border: none;
}
.story-play-pause {
    position: absolute; top: 20px; right: 70px; color: white; font-size: 30px;
    cursor: pointer; z-index: 10001; background: none; border: none;
    display: flex; justify-content: center; align-items: center;
}
.story-progress {
    position: absolute; top: 20px; left: 20px; right: 120px; height: 3px;
    background: rgba(255,255,255,0.3); border-radius: 3px; overflow: hidden;
}
.story-progress-bar { width: 0%; height: 100%; background: white; }
.story-image-container { max-width: 90%; max-height: 80vh; border-radius: 16px; overflow: hidden; }
.story-image-container img { width: 100%; height: 100%; object-fit: contain; }

/* Avatar Cloud */
.avatar-cloud-container {
    position: relative; width: 300px; height: 300px;
    display: flex; justify-content: center; align-items: center; margin: auto;
}
.cloud-img {
    position: absolute; border-radius: 50%; object-fit: cover;
    border: 4px solid var(--bg-color); box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.3s; cursor: pointer;
}
.cloud-img:hover { transform: scale(1.05); z-index: 10 !important; }
.img-1 { width: 160px; height: 160px; top: 20px; left: 20px; z-index: 3; }
.img-2 { width: 120px; height: 120px; bottom: 20px; right: 20px; z-index: 2; }
.img-3 { width: 100px; height: 100px; top: 50px; right: -10px; z-index: 1; }

.post-modal-backdrop {
    position: absolute; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px);
}
.post-close {
    position: absolute; top: 20px; right: 20px; color: var(--text-primary); font-size: 30px;
    background: none; border: none; cursor: pointer; z-index: 10001;
    mix-blend-mode: difference; color: white; /* Ensures close button is always visible */
}
.post-modal-content {
    position: relative; z-index: 10001; background: var(--bg-color); display: flex; max-width: 900px;
    width: 90%; height: 80vh; border-radius: 8px; overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
.post-modal-image {
    flex: 1.5; background: var(--btn-bg); display: flex; justify-content: center; align-items: center; overflow: hidden;
}
.post-modal-image img { width: 100%; height: 100%; object-fit: contain; }
.post-modal-details {
    flex: 1; padding: 24px; display: flex; flex-direction: column; border-left: 1px solid var(--border-color);
}
.post-author {
    display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border-color);
}
.post-author img { width: 32px; height: 32px; border-radius: 50%; }
.post-modal-details h2 { margin: 0 0 12px 0; font-size: 20px; }
.post-modal-details p { color: var(--text-secondary); line-height: 1.5; }

@media (max-width: 768px) {
    .post-modal-content { flex-direction: column; height: 90vh; overflow-y: auto; }
    .post-modal-image { flex: none; height: 300px; }
    .post-modal-details { flex: none; height: auto; border-left: none; border-top: 1px solid var(--border-color); }
}
