/*
Theme Name: Chiragh Baloch Official
Theme URI: https://chiraghbaloch.com
Author: Chiragh Baloch
Author URI: https://chiraghbaloch.com
Description: Ultra-fast standalone portal theme inspired by authentic Balochi Chader & Doch textiles. Includes built-in WordPress admin settings panel.
Version: 1.1.0
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: chiragh-portal
*/

:root {
    --bg: #07090e;
    --bg-card: rgba(18, 22, 33, 0.65);
    --bg-card-hover: rgba(28, 34, 50, 0.85);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(225, 29, 72, 0.35);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-sub: #64748b;
    --accent: #38bdf8;
    
    /* Authentic Balochi Palette */
    --baloch-red: #dc2626;
    --baloch-crimson: #e11d48;
    --baloch-green: #16a34a;
    --baloch-blue: #2563eb;
    --baloch-gold: #f59e0b;
    --baloch-white: #f8fafc;
    
    --radius-lg: 14px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.55;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* Subtle Balochi Doch Background Rosette Watermark */
body::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 650px;
    height: 650px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cpath d='M60 5 L75 45 L115 60 L75 75 L60 115 L45 75 L5 60 L45 45 Z' fill='none' stroke='rgba(225,29,72,0.025)' stroke-width='1.5'/%3E%3Ccircle cx='60' cy='60' r='18' fill='none' stroke='rgba(37,99,235,0.025)' stroke-width='1.5'/%3E%3Cpolygon points='60,25 68,52 95,60 68,68 60,95 52,68 25,60 52,52' fill='none' stroke='rgba(22,163,74,0.025)' stroke-width='1'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    pointer-events: none;
    z-index: 0;
}

/* Balochi Top Woven Ribbon (Classic Chader Stripe) */
.balochi-woven-top-ribbon {
    width: 100%;
    height: 4px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    background: repeating-linear-gradient(
        90deg,
        #dc2626 0px, #dc2626 12px,
        #16a34a 12px, #16a34a 20px,
        #2563eb 20px, #2563eb 28px,
        #f8fafc 28px, #f8fafc 32px,
        #07090e 32px, #07090e 48px
    );
    box-shadow: 0 1px 8px rgba(220, 38, 38, 0.4);
}

/* Main Container */
.app-container {
    width: 100%;
    max-width: 580px;
    padding: 1.5rem 1rem 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* Balochi Chader Hero Banner */
.balochi-chader-banner {
    width: 100%;
    height: 145px;
    border-radius: var(--radius-lg);
    background-size: cover;
    background-position: center 30%;
    position: relative;
    overflow: hidden;
    margin-bottom: -46px; /* Profile avatar sits on top */
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7);
}
.balochi-chader-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(7, 9, 14, 0.15) 0%, rgba(7, 9, 14, 0.88) 100%);
}

/* Chader Woven Bottom Fringe Accent */
.balochi-fringe-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: repeating-linear-gradient(
        90deg,
        #dc2626 0px, #dc2626 8px,
        #16a34a 8px, #16a34a 14px,
        #2563eb 14px, #2563eb 20px,
        #f8fafc 20px, #f8fafc 23px,
        #07090e 23px, #07090e 35px
    );
    z-index: 2;
}

/* Profile Header */
.profile-header {
    text-align: center;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 3;
}
.profile-avatar-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 0.85rem;
}
.profile-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg);
    outline: 2px solid var(--baloch-crimson);
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.35), 0 8px 24px rgba(0, 0, 0, 0.85);
    display: block;
}
.profile-avatar-wrap::after {
    /* Subtle cultural mirror glint */
    content: '';
    position: absolute;
    top: 4px;
    right: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
    pointer-events: none;
}
.profile-name-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 0.2rem;
}
.profile-name {
    font-size: 1.45rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}
.verified-icon {
    width: 16px;
    height: 16px;
    color: var(--accent);
    display: inline-flex;
    flex-shrink: 0;
}
.profile-bio {
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 0.15rem;
}
.profile-loc {
    color: var(--baloch-gold);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* Balochi Doch Geometric Divider Ribbon */
.balochi-doch-divider {
    width: 100%;
    height: 10px;
    margin: 1.25rem 0 1.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='10' viewBox='0 0 24 10'%3E%3Cpolygon points='12,1 23,5 12,9 1,5' fill='none' stroke='%23e11d48' stroke-width='1.2'/%3E%3Ccircle cx='12' cy='5' r='1.8' fill='%23f59e0b'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-position: center;
    opacity: 0.45;
}

/* Segmented Navigation Switcher */
.section-nav-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 1.85rem;
    position: relative;
    z-index: 10;
}
.section-nav-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(18, 22, 33, 0.7);
    border: 1px solid var(--border);
    padding: 4px;
    border-radius: 9999px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.nav-btn {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 500;
    padding: 7px 18px;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
    white-space: nowrap;
    letter-spacing: -0.01em;
    line-height: 1.2;
    text-transform: none !important;
    user-select: none;
    -webkit-user-select: none;
}
.nav-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}
.nav-btn.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #1f2536 0%, #121622 100%) !important;
    font-weight: 600 !important;
    border: 1px solid rgba(225, 29, 72, 0.4) !important;
    box-shadow: 0 2px 14px rgba(225, 29, 72, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

/* Sections Viewport */
.sections-viewport {
    width: 100%;
    position: relative;
    min-height: 400px;
}
.section-view {
    width: 100%;
    display: none;
    opacity: 0;
}
.section-view.is-active.slide-right {
    display: block;
    animation: cbSwipeFromRight 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.section-view.is-active.slide-left {
    display: block;
    animation: cbSwipeFromLeft 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes cbSwipeFromRight {
    0% { opacity: 0; transform: translateX(18px); }
    100% { opacity: 1; transform: translateX(0); }
}
@keyframes cbSwipeFromLeft {
    0% { opacity: 0; transform: translateX(-18px); }
    100% { opacity: 1; transform: translateX(0); }
}

/* Featured In (Press Section) */
.featured-section {
    width: 100%;
    margin-bottom: 2rem;
    padding: 1.15rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.featured-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #dc2626 0%, #16a34a 33%, #2563eb 66%, #f8fafc 100%);
    opacity: 0.35;
}
.featured-header {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-sub);
    margin-bottom: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.featured-header::before,
.featured-header::after {
    content: '';
    height: 1px;
    width: 25px;
    background: var(--border);
}
.featured-logos-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.25rem 1.4rem;
}
.featured-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.65;
    transition: var(--transition);
    filter: grayscale(100%) brightness(1.2);
    text-decoration: none;
}
.featured-logo-link:hover {
    opacity: 1;
    filter: grayscale(0%) brightness(1.4);
    transform: scale(1.06);
}
.featured-logo-link img {
    height: 18px;
    max-width: 95px;
    object-fit: contain;
    display: block;
}

/* Category Filter Tabs */
.filter-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}
.filter-container::-webkit-scrollbar { display: none; }
.filter-tab {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    text-transform: none !important;
}
.filter-tab:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.filter-tab.active {
    color: #fff;
    background: rgba(225, 29, 72, 0.18);
    border-color: rgba(225, 29, 72, 0.45);
    font-weight: 600;
}

/* Links List with Balochi Stitched Accent */
.links-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}
.link-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.62rem 0.95rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.link-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1.5px;
    background: linear-gradient(90deg, #dc2626 0%, #16a34a 33%, #2563eb 66%, #f8fafc 100%);
    opacity: 0.2;
    transition: opacity 0.22s ease;
}
.link-row:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-1.5px);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}
.link-row:hover::before {
    opacity: 0.85;
}
.link-row.is-hidden { display: none !important; }
.link-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.link-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
    flex-shrink: 0;
}
.link-row:hover .link-icon { color: #fff; }
.link-icon svg { width: 100%; height: 100%; fill: currentColor; }
.link-text {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}
.link-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.01em;
}
.link-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.link-chevron {
    color: var(--text-sub);
    width: 14px;
    height: 14px;
    transition: var(--transition);
}
.link-row:hover .link-chevron {
    color: var(--text-main);
    transform: translateX(2px);
}

/* Biography Styles */
.bio-prose {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}
.bio-prose::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #dc2626 0%, #16a34a 33%, #2563eb 66%, #f8fafc 100%);
    opacity: 0.35;
}
.bio-prose h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.4rem;
}
.bio-prose .bio-subtitle {
    color: var(--baloch-gold);
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 1.25rem;
}
.bio-prose h3 {
    font-size: 0.98rem;
    font-weight: 700;
    color: #fff;
    margin: 1.25rem 0 0.35rem;
}
.bio-prose p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.85rem;
}

/* Projects & Stickers */
.project-cards-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.project-item-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.1rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.project-item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1.5px;
    background: linear-gradient(90deg, #dc2626 0%, #16a34a 33%, #2563eb 66%, #f8fafc 100%);
    opacity: 0.2;
    transition: opacity 0.22s ease;
}
.project-item-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-1.5px);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}
.project-item-card:hover::before { opacity: 0.85; }
.project-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.project-item-logo {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}
.project-item-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.project-item-badge {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--baloch-gold);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.project-item-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.2rem;
}
.project-item-desc {
    color: var(--text-muted);
    font-size: 0.84rem;
    line-height: 1.5;
    margin-bottom: 0.65rem;
}
.project-item-link {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Stickers Sub-section */
.stickers-sub-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
}
.stickers-sub-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #dc2626 0%, #16a34a 33%, #2563eb 66%, #f8fafc 100%);
    opacity: 0.35;
}
.stickers-sub-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.2rem;
}
.stickers-sub-desc {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-bottom: 1rem;
}
.stickers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.65rem;
}
.sticker-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 0.6rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.sticker-card img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    margin-bottom: 0.4rem;
}
.sticker-card h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.1rem;
}
.sticker-card span {
    font-size: 0.7rem;
    color: var(--baloch-gold);
    margin-bottom: 0.65rem;
}
.sticker-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.4rem 0.4rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}
.sticker-btn:hover { background: rgba(225, 29, 72, 0.35); }

/* Books Styles */
.book-slide-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.35rem;
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1.25rem;
    align-items: start;
    margin-bottom: 1.25rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.book-slide-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1.5px;
    background: linear-gradient(90deg, #dc2626 0%, #16a34a 33%, #2563eb 66%, #f8fafc 100%);
    opacity: 0.2;
}
.book-slide-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-1.5px);
}
.book-slide-card:hover::before { opacity: 0.85; }
.book-slide-cover {
    width: 100%;
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
}
.book-slide-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.2rem;
    line-height: 1.3;
}
.book-slide-sub {
    font-size: 0.82rem;
    color: var(--baloch-gold);
    margin-bottom: 0.5rem;
}
.book-slide-desc {
    color: var(--text-muted);
    font-size: 0.84rem;
    line-height: 1.55;
    margin-bottom: 0.85rem;
}
.btn-amazon-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #ff9900;
    color: #111;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.45rem 0.95rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: var(--transition);
}
.btn-amazon-pill:hover {
    background: #ffaa22;
    transform: translateY(-1px);
}

/* Footer with Balochi Fringe Tassels */
.portal-footer {
    text-align: center;
    padding: 2rem 1rem 1.5rem;
    color: var(--text-sub);
    font-size: 0.76rem;
    width: 100%;
    margin-top: auto;
    position: relative;
}
.footer-chader-tassels {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 1.25rem;
    opacity: 0.6;
}
.tassel-thread {
    width: 2px;
    height: 16px;
    border-radius: 1px;
}
.tassel-thread:nth-child(4n+1) { background: #dc2626; height: 18px; }
.tassel-thread:nth-child(4n+2) { background: #16a34a; height: 14px; }
.tassel-thread:nth-child(4n+3) { background: #2563eb; height: 20px; }
.tassel-thread:nth-child(4n+4) { background: #f8fafc; height: 15px; }

.portal-footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}
.portal-footer a:hover { color: #fff; }

@media (max-width: 480px) {
    .app-container { padding: 0.85rem 0.85rem 3rem; }
    .balochi-chader-banner { height: 125px; margin-bottom: -40px; }
    .profile-avatar { width: 80px; height: 80px; }
    .section-nav-wrapper { margin-bottom: 1.4rem; }
    .section-nav-menu { gap: 4px; padding: 3px; }
    .nav-btn { font-size: 0.78rem; padding: 6px 12px; }
    .link-row { padding: 0.55rem 0.75rem; }
    .link-text { flex-direction: column; gap: 0; }
    .link-subtitle { font-size: 0.7rem; }
    .featured-logos-grid { gap: 1rem 1.1rem; }
    .featured-logo-link img { height: 16px; max-width: 80px; }
    .book-slide-card { grid-template-columns: 1fr; text-align: center; }
    .book-slide-cover { width: 110px; margin: 0 auto; }
}
