/**
 * Warm Dark Theme - Professional Design
 */

/* ===== Reset & Variables ===== */
:root {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-card: #1e2a4a;
    --bg-hover: #253a5a;
    --text-primary: #e8e6e3;
    --text-secondary: #c4c1b9;
    --text-muted: #9a968c;
    --accent-gold: #c9a959;
    --accent-gold-light: #e8d5b7;
    --accent-taupe: #d4a373;
    --border-color: rgba(201, 169, 89, 0.2);
    --shadow-color: rgba(0, 0, 0, 0.4);
    --radius: 12px;
    --transition: 0.3s ease;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-serif: Georgia, 'Times New Roman', serif;
    --max-width: 900px;
}

/* ===== Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    transition: background var(--transition), color var(--transition);
}

a {
    color: var(--accent-gold);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-gold-light);
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1em;
    color: var(--text-secondary);
}

/* ===== Header ===== */
.site-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
}

/* Line 1: Title - full width */
.header-brand {
    width: 100%;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-gold);
    letter-spacing: -0.5px;
}

.site-title:hover {
    color: var(--accent-gold-light);
}

/* Line 2: Menu (left) + Controls (right) - same line */
.header-nav-wrapper {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    flex: 1;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.3rem 0;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--accent-gold);
    border-bottom-color: var(--accent-gold);
}

/* Controls - pushed to the right */
.header-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-left: auto;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.theme-toggle:hover {
    background: var(--bg-hover);
    border-color: var(--accent-gold);
}

.language-selector {
    position: relative;
}

.lang-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all var(--transition);
}

.lang-toggle:hover {
    background: var(--bg-hover);
    border-color: var(--accent-gold);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.5rem 0;
    min-width: 120px;
    display: none;
    list-style: none;
    box-shadow: 0 8px 24px var(--shadow-color);
}

.lang-dropdown.active {
    display: block;
}

.lang-dropdown li a {
    display: block;
    padding: 0.4rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all var(--transition);
}

.lang-dropdown li a:hover {
    background: var(--bg-hover);
    color: var(--accent-gold);
}
/* ===== Responsive: Controls move to Line 3 on mobile ===== */
@media (max-width: 480px) {
    .header-nav-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .header-nav {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .nav-menu {
        justify-content: center;
        gap: 0.8rem;
    }
    
    .nav-link {
        font-size: 0.85rem;
    }
    
    .header-controls {
        width: 100%;
        justify-content: center;
        padding-top: 0.3rem;
        border-top: 1px solid var(--border-color);
    }
    
    .lang-toggle {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }
    
    .theme-toggle {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
}
/* ===== Main Content ===== */
.main-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 1.5rem;
    min-height: 70vh;
}

/* ===== Homepage ===== */
.home-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.profile-section {
    display: flex;
    gap: 3rem;
    align-items: center;
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.profile-image {
    flex-shrink: 0;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--accent-gold);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-text {
    flex: 1;
}

.profile-text h1 {
    font-size: 2rem;
    color: var(--accent-gold);
    margin-bottom: 0.25rem;
}

.profile-text .bio {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: all var(--transition);
}

.social-link:hover {
    background: var(--bg-hover);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    transform: translateY(-2px);
}

.social-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* CTA Section */
.cta-section {
    text-align: center;
}

.cta-button {
    display: inline-block;
    padding: 0.8rem 2.5rem;
    background: var(--accent-gold);
    color: var(--bg-primary);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1.05rem;
    transition: all var(--transition);
}

.cta-button:hover {
    background: var(--accent-gold-light);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(201, 169, 89, 0.3);
}

/* ===== Articles Page ===== */
.articles-container {
    padding: 1rem 0;
}

.page-title {
    font-size: 2.25rem;
    color: var(--accent-gold);
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.articles-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Article Card */
.article-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    transition: all var(--transition);
}

.article-card:hover {
    border-color: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--shadow-color);
}

.article-link {
    display: block;
    padding: 1.5rem;
}

.article-card-inner {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.article-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.article-date {
    color: var(--text-muted);
}

.article-category {
    color: var(--accent-gold);
    font-weight: 500;
}

.article-stats {
    margin-left: auto;
    color: var(--text-muted);
}

.article-title {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin: 0;
}

.article-title:hover {
    color: var(--accent-gold);
}

.article-excerpt {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.95rem;
}

.read-more {
    color: var(--accent-gold);
    font-weight: 500;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* ===== Single Article ===== */
.single-article {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
}

.article-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.article-header h1 {
    font-size: 2.25rem;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.article-header .article-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.article-body {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-secondary);
}

.article-body h2,
.article-body h3 {
    color: var(--text-primary);
    margin-top: 2rem;
}

.article-body ul,
.article-body ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.article-body li {
    margin-bottom: 0.5rem;
}

.article-body blockquote {
    border-left: 3px solid var(--accent-gold);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-style: italic;
}

.article-body code {
    background: var(--bg-primary);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.article-body pre {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--radius);
    overflow-x: auto;
    border: 1px solid var(--border-color);
}

/* Original Source Link */
.original-source {
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    background: var(--bg-primary);
    border-radius: var(--radius);
    border-left: 3px solid var(--accent-gold);
}

.original-source p {
    margin: 0 0 0.3rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.original-link {
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.original-link:hover {
    color: var(--accent-gold-light);
    text-decoration: underline;
}

/* Share Section */
.share-section {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.share-title {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.share-buttons {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition);
    background: transparent;
}

.share-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    transform: translateY(-2px);
}

.share-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.share-count {
    font-weight: 600;
    color: var(--accent-gold);
}

/* Article Stats */
.article-stats-bar {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.stat-item strong {
    color: var(--text-primary);
}

/* Article Navigation */
.article-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    gap: 1rem;
    flex-wrap: wrap;
}

.article-navigation a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-decoration: none;
    transition: all var(--transition);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
}

.article-navigation a:hover {
    color: var(--accent-gold);
    border-color: var(--border-color);
    background: var(--bg-hover);
}

.article-navigation .nav-prev,
.article-navigation .nav-next {
    display: flex;
    flex-direction: column;
    max-width: 200px;
}

.article-navigation .nav-prev span,
.article-navigation .nav-next span {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-navigation .nav-all {
    color: var(--accent-gold);
    font-weight: 600;
}

.article-navigation .nav-all:hover {
    background: var(--accent-gold);
    color: var(--bg-primary);
}

/* Related Articles */
.related-articles {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.related-title {
    font-size: 1.1rem;
    color: var(--accent-gold);
    margin-bottom: 1rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.related-item {
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    transition: all var(--transition);
}

.related-item:hover {
    border-color: var(--accent-gold);
}

.related-item h4 {
    font-size: 0.95rem;
    margin: 0;
}

.related-item h4 a {
    color: var(--text-secondary);
}

.related-item h4 a:hover {
    color: var(--accent-gold);
}

/* ===== No Articles ===== */
.no-articles {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-muted);
}

/* ===== Overlay Box ===== */
.overlay-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    background: rgba(26, 26, 46, 0.85);
    backdrop-filter: blur(8px);
    opacity: 1;
    transition: all 0.3s ease;
}

.overlay-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2.5rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 24px 64px var(--shadow-color);
}

.overlay-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition);
    padding: 0.25rem 0.5rem;
}

.overlay-close:hover {
    color: var(--accent-gold);
    transform: rotate(90deg);
}

.overlay-title {
    font-size: 1.5rem;
    color: var(--accent-gold);
    margin-bottom: 1.5rem;
    text-align: center;
}

.overlay-articles {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.overlay-article {
    background: var(--bg-card);
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    transition: all var(--transition);
}

.overlay-article:hover {
    border-color: var(--accent-gold);
    transform: translateX(4px);
}

.overlay-article-link {
    display: block;
}

.overlay-article-link h3 {
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
}

.overlay-article-link h3:hover {
    color: var(--accent-gold);
}

.overlay-article-link p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.overlay-footer {
    margin-top: 1.5rem;
    text-align: center;
}

.overlay-view-all {
    display: inline-block;
    color: var(--accent-gold);
    font-weight: 500;
    transition: all var(--transition);
}

.overlay-view-all:hover {
    color: var(--accent-gold-light);
    transform: translateX(4px);
}

/* ===== Footer ===== */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 2rem;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--accent-gold);
}

/* ============================================
   VISITOR COUNT
   ============================================ */
.visitor-count {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 0.3rem 0.8rem;
    background: var(--bg-primary);
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.footer-link {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color var(--transition);
}

.footer-link:hover {
    color: var(--accent-gold);
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: stretch;
        gap: 0.8rem;
    }
    
    .header-brand {
        text-align: center;
    }
    
    .header-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-menu {
        justify-content: center;
        gap: 1rem;
    }
    
    .header-controls {
        margin-left: 0;
    }
    
    .profile-section {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .profile-image {
        width: 120px;
        height: 120px;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .article-meta {
        flex-wrap: wrap;
    }
    
    .article-stats {
        margin-left: 0;
    }
    
    .single-article {
        padding: 1.5rem;
    }
    
    .article-header h1 {
        font-size: 1.6rem;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .overlay-box {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .article-stats-bar {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .share-buttons {
        gap: 0.5rem;
    }
    
    .share-btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
    
    .article-navigation {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .article-navigation .nav-prev,
    .article-navigation .nav-next {
        max-width: 100%;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-right {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Mobile - Controls move to Line 3 only on very small screens */
@media (max-width: 480px) {
    .header-nav {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .nav-menu {
        gap: 0.8rem;
    }
    
    .nav-link {
        font-size: 0.85rem;
    }
    
    .header-controls {
        width: 100%;
        justify-content: center;
        padding-top: 0.3rem;
        border-top: 1px solid var(--border-color);
    }
    
    .lang-toggle {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }
    
    .theme-toggle {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .profile-text h1 {
        font-size: 1.5rem;
    }
    
    .profile-text .bio {
        font-size: 0.95rem;
    }
    
    .cta-button {
        padding: 0.6rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .article-title {
        font-size: 1.1rem;
    }
    
    .article-card {
        padding: 0.8rem;
    }
}