:root {
    --bg-color: #16191C;
    --text-primary: #DBDBDB;
    --text-secondary: #8E8E8E;
    --text-titles: #EFEFEF;
    --card-stroke: #8E8E8E;
    --card-hover: rgba(255, 255, 255, 0.05);
    --glow-color: rgba(0, 123, 255, 0.12);
    --header-bg: rgba(22, 25, 28, 0.8);
}

[data-theme="light"] {
    --bg-color: #FFFFFF;
    --text-primary: #000000;
    --text-secondary: #555555;
    --text-titles: #000000;
    --card-stroke: #CCCCCC;
    --card-hover: rgba(0, 0, 0, 0.03);
    --glow-color: rgba(0, 80, 255, 0.06);
    --header-bg: rgba(255, 255, 255, 0.8);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
a, a:visited { color: inherit; text-decoration: none; }

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    transition: background 0.3s ease;
    overflow-x: hidden;
}

/* Mouse Glow */
.glow-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), var(--glow-color) 0%, transparent 20%);
    z-index: 10;
}

/* Main Header */
.main-header {
    width: 100%; height: 80px; position: fixed; top: 0;
    background: var(--header-bg); backdrop-filter: blur(8px);
    z-index: 1000; display: flex; justify-content: center;
}
.header-inner { width: 1100px; display: flex; justify-content: space-between; align-items: center; }

/* Contact Button */
.contact-btn { 
    border: 1px solid var(--text-secondary); 
    border-radius: 5px; padding: 8px 16px; 
    display: flex; align-items: center; gap: 8px; 
    color: var(--text-primary); transition: 0.3s ease;
}
.contact-btn:hover {
    background-color: var(--text-primary);
    color: var(--bg-color);
    border-color: var(--text-primary);
}

/* Layout Grid */
.container { max-width: 1200px; margin: 140px auto 100px; padding: 0 40px; position: relative; z-index: 20; }
.layout-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 150px; }

/* Sidebar */
.sidebar { position: sticky; top: 140px; height: calc(100vh - 200px); display: flex; flex-direction: column; justify-content: space-between; }
.avatar-img { width: 120px; height: 120px; border-radius: 110px; object-fit: cover; margin-bottom: 30px; }
.sidebar-name { font-size: 42px; font-weight: 700; margin-bottom: 30px; color: var(--text-primary); }
.sidebar-role { font-size: 24px; margin-bottom: 30px; color: var(--text-primary); }
.sidebar-bio { font-size: 14px; color: var(--text-secondary); margin-bottom: 30px; line-height: 1.5; }

/* Badges */
.competencies-wrapper { display: flex; flex-wrap: wrap; gap: 10px; }
.comp-badge {
    font-size: 13px; color: var(--text-secondary); 
    border: 1px solid var(--text-secondary);
    padding: 7px 13px; border-radius: 3px; display: inline-block;
}

/* Socials */
.social-links { display: flex; gap: 15px; }
.social-box { 
    width: 50px; height: 50px; border-radius: 5px; 
    display: flex; align-items: center; justify-content: center; 
    background: rgba(142, 142, 142, 0.1); transition: 0.3s;
}
.social-box:hover {
    background-color: var(--text-primary);
    transform: translateY(-5px);
}
.social-box:hover .social-icon-img { filter: invert(1); }
.social-icon-img { width: 30px; height: 30px; opacity: 0.7; transition: 0.3s; }

/* Project Cards */
.project-card { 
    border: 1px solid var(--card-stroke); border-radius: 15px; 
    overflow: hidden; margin-bottom: 50px; transition: 0.3s; cursor: pointer;
}
.project-card:hover { background: var(--card-hover); border-color: rgba(0, 123, 255, 0.3); }
.project-image-container { height: 315px; overflow: hidden; }
.card-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.project-card:hover .card-img { transform: scale(1.05); }
.project-details { padding: 30px; }
.project-tags { display: flex; gap: 10px; margin-bottom: 30px; }
.project-title { font-size: 24px; font-weight: 600; margin-bottom: 30px; color: var(--text-titles); }
.project-description { font-size: 14px; color: var(--text-titles); margin-bottom: 30px; }
.learn-more-link { font-size: 12px; color: var(--text-secondary); }

/* Navigation Dropdown */
.projects-dropdown { position: relative; }
.projects-dropdown:hover .projects-menu { display: block; }
.projects-menu {
    display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    background: var(--bg-color); border: 1px solid var(--card-stroke); border-radius: 5px; min-width: 180px;
}
.projects-menu a { display: block; padding: 10px 20px; font-size: 14px; color: var(--text-primary); transition: 0.2s; }
.projects-menu a:hover { background: var(--card-hover); }

/* --- OVERLAY STYLES --- */
.overlay-backdrop {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: none; 
    padding: 40px 20px;
    overflow: hidden;
}
.overlay-content {
    background: var(--bg-color);
    max-width: 1000px;
    height: 90vh;
    margin: 0 auto;
    border-radius: 20px;
    border: 1px solid var(--card-stroke);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.overlay-sticky-tab {
    position: sticky;
    top: 0;
    background: var(--header-bg);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--card-stroke);
    padding: 20px 30px;
    z-index: 10;
}
.tab-inner { display: flex; justify-content: space-between; align-items: center; gap: 30px; }
#overlay-title { font-size: 20px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 1; }
.tab-actions { display: flex; gap: 20px; align-items: center; flex-shrink: 0; }

.live-btn {
    --brand-color: var(--text-secondary);
    background: transparent;
    color: var(--brand-color) !important;
    border: 1px solid var(--brand-color);
    padding: 10px 22px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-block;
}
.live-btn:hover {
    background: var(--brand-color);
    color: var(--bg-color) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.overlay-body { 
    padding: 60px 10%; 
    overflow-y: auto; 
    flex-grow: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(142, 142, 142, 0.3) transparent;
}
.overlay-body::-webkit-scrollbar { width: 6px; }
.overlay-body::-webkit-scrollbar-thumb { background: rgba(142, 142, 142, 0.3); border-radius: 10px; }

.overlay-header { margin-bottom: 40px; }
.overlay-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 30px; }
.stat-item h4 { font-size: 11px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; }
.stat-item p { font-size: 15px; }
.overlay-divider { border: 0; border-top: 1px solid var(--card-stroke); margin: 40px 0; opacity: 0.3; }

.close-overlay {
    background: transparent;
    border: 1px solid var(--card-stroke);
    color: var(--text-primary);
    width: 36px; height: 36px;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.close-overlay:hover { background: var(--card-hover); border-color: var(--text-primary); transform: scale(1.05); }

/* --- BRANDING TABS (NEW) --- */
.branding-tabs {
    border: 1px solid var(--card-stroke);
    border-radius: 10px;
    padding: 24px;
    margin: 30px 0;
    background: rgba(255, 255, 255, 0.02);
}
.tab-buttons {
    display: flex;
    gap: 15px;
    border-bottom: 1px solid rgba(142, 142, 142, 0.2);
    margin-bottom: 25px;
    padding-bottom: 5px;
    
    /* New properties for mobile fix */
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    scrollbar-width: none; /* Hides scrollbar on Firefox */
}

/* Optional: Hides scrollbar on Chrome/Safari for a cleaner look */
.tab-buttons::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    /* Ensure buttons don't shrink when the container is tight */
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 10px 5px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: 0.3s;
    position: relative;
}
.tab-btn:hover, .tab-btn.active { color: var(--text-primary); }
.tab-btn.active::after {
    content: ''; position: absolute; bottom: -6px; left: 0;
    width: 100%; height: 2px; background: var(--brand-color, #F6B600);
}
.tab-content { display: none; }
.tab-content.active { display: block; animation: tabFadeIn 0.4s ease; }

@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- IMAGE & CONTENT BLOCKS --- */
.image-space { 
    width: 100%; background: #16191c; 
    border-radius: 10px; margin: 30px 0; overflow: hidden;
}
.image-space img { width: 100%; height: auto; display: block; }
.project-text-block { margin-bottom: 60px;}
.project-text-block h3 { margin-bottom: 15px; color: var(--text-titles); }
.project-text-block p { line-height: 1.7; color: var(--text-primary); margin-bottom: 20px; }
.custom-indent { padding-left: 40px; margin-bottom: 20px; }

/* --- RESPONSIVE & MOBILE THUMBNAILS --- */
.mobile-img { display: none; }

@media (max-width: 920px) {
    .header-inner { margin: 0 20px; width: calc(100% - 40px); }
    .layout-grid { grid-template-columns: 1fr; gap: 60px; }
    .sidebar { position: static; height: auto; }
}

@media (max-width: 768px) {
    .desktop-img { display: none; }
    .mobile-img { display: block; width: 100%; height: 100%; object-fit: cover; }
    .overlay-stats-grid { grid-template-columns: 1fr; }
    .overlay-body { padding: 40px 20px; }
    .tab-inner { gap: 10px; }
    #overlay-title { font-size: 16px; }
}
