/* ==========================================================================
   kikilesendric.rs - Modern Dark Pop-Rock Design System (V3 Perfect Alignment)
   ========================================================================== */

:root {
    --bg-dark: #08080a;
    --bg-card: #121216;
    --bg-card-hover: #1a1a20;
    --bg-header: #0c0c0f;
    --border-color: #24242e;
    --border-highlight: #383848;

    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    --accent-red: #e50914;
    --accent-red-hover: #ff1e27;
    --accent-glow: rgba(229, 9, 20, 0.25);
    
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-quote: 'Lora', Georgia, serif;
    
    --container-max: 1200px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-subtle: 0 4px 20px rgba(0,0,0,0.5);
    --shadow-red-glow: 0 4px 30px rgba(229, 9, 20, 0.2);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-secondary);
    font-family: var(--font-body);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography Utility */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

.text-accent {
    color: var(--accent-red);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 999px;
    background: rgba(229, 9, 20, 0.15);
    color: var(--accent-red);
    border: 1px solid rgba(229, 9, 20, 0.3);
}

/* Header Masthead */
.site-header {
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.masthead-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem 0;
}

.site-logo {
    font-family: var(--font-heading);
    font-size: 2.1rem;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-logo span {
    color: var(--accent-red);
}

.site-tagline {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: -2px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after, .nav-link:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-red);
    box-shadow: 0 0 10px var(--accent-red);
}

/* Mobile Nav Toggle */
.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 4.5rem 0 3.5rem;
    background: radial-gradient(circle at 80% 20%, rgba(229, 9, 20, 0.08) 0%, transparent 60%);
    border-bottom: 1px solid var(--border-color);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.25rem;
    line-height: 1.1;
    margin-bottom: 1.25rem;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-quote-box {
    background-color: #121217;
    border-left: 4px solid var(--accent-red);
    padding: 1.5rem 1.75rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin-top: 2rem;
    margin-bottom: 2.25rem;
    font-family: var(--font-quote);
    font-size: 1.15rem;
    font-style: italic;
    color: #f8fafc;
    line-height: 1.65;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.hero-image-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-red-glow);
    border: 1px solid var(--border-highlight);
    background-color: #000000;
}

.hero-image-wrapper img {
    width: 100%;
    height: auto;
    max-height: 560px;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.hero-image-wrapper:hover img {
    transform: scale(1.015);
}

.photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95), transparent);
    padding: 1.75rem 1.25rem 0.85rem;
    font-size: 0.825rem;
    color: var(--text-muted);
    text-align: right;
    font-weight: 500;
}

/* Section Formatting (CLEAN ALIGNMENT - NO OVERLAP) */
.section-padding {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.section-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.75rem;
    margin-bottom: 2.75rem;
}

.section-title {
    font-size: 2.25rem;
    color: var(--text-primary);
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.title-accent-line {
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--accent-red);
    box-shadow: 0 0 10px var(--accent-red);
    margin-top: 0.75rem;
    margin-bottom: 1.5rem;
    border-radius: 2px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-top: 0.5rem;
    line-height: 1.6;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.75rem;
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.85rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.card:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--accent-red);
    transform: translateY(-4px);
    box-shadow: var(--shadow-subtle);
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.card-title {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.card-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-link {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-red);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.card-link i {
    transition: transform 0.2s ease;
}

.card-link:hover i {
    transform: translateX(4px);
}

/* Article Content Layout & Styling */
.article-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 3.5rem 1.5rem 5rem;
}

.article-header {
    margin-bottom: 3rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2.25rem;
}

.article-header h1 {
    font-size: 2.75rem;
    margin: 1rem 0;
}

.article-meta-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.article-body {
    font-size: 1.1rem;
    color: #e2e8f0;
    line-height: 1.85;
}

.article-body h2 {
    font-size: 1.85rem;
    margin: 2.75rem 0 1.25rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.65rem;
}

.article-body h3 {
    font-size: 1.4rem;
    margin: 2.25rem 0 1rem;
    color: var(--text-primary);
}

.article-body p {
    margin-bottom: 1.65rem;
}

/* Markdown Summary Table Styling */
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2.5rem 0;
    font-size: 0.95rem;
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.article-body th {
    background-color: #16161e;
    color: var(--text-primary);
    text-align: left;
    padding: 1.1rem 1.25rem;
    border-bottom: 2px solid var(--accent-red);
    font-family: var(--font-heading);
    font-size: 1rem;

}

.article-body td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.article-body tr:last-child td {
    border-bottom: none;
}

.article-body tr:hover td {
    background-color: rgba(255,255,255,0.02);
}

/* Refined Tracklist Styling */
.article-body ol {
    list-style: none;
    counter-reset: track-counter;
    padding: 0;
    margin: 2rem 0;
}

.article-body ol li {
    counter-increment: track-counter;
    position: relative;
    padding: 0.9rem 1.25rem 0.9rem 3.25rem;
    margin-bottom: 0.6rem;
    background-color: #121217;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 1.05rem;
    color: var(--text-primary);
    transition: border-color 0.2s ease;
}

.article-body ol li:hover {
    border-color: var(--accent-red);
}

.article-body ol li::before {
    content: counter(track-counter, decimal-leading-zero);
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-red);
    font-weight: 800;
    font-family: var(--font-heading);
    font-size: 0.95rem;
}

.article-body ul {
    margin: 1.5rem 0 1.5rem 1.75rem;
}

.article-body li {
    margin-bottom: 0.6rem;
}

.article-body blockquote {
    background-color: #121217;
    border-left: 4px solid var(--accent-red);
    padding: 1.5rem 1.75rem;
    margin: 2.25rem 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-family: var(--font-quote);
    font-size: 1.2rem;
    color: #f8fafc;
    line-height: 1.7;
}

.article-body pre {
    background-color: #0d0d11;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    margin: 2.25rem 0;
    overflow-x: auto;
    font-family: var(--font-quote);
    font-size: 1.05rem;
    line-height: 1.8;
    color: #f1f5f9;
}

/* Footer & Partner Links */
.support-partners-section {
    background-color: #060608;
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 0;
}

.support-partners-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    text-align: center;
}

.support-partners-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem 1.25rem;
    font-size: 0.875rem;
}

.support-link {
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.support-link:hover {
    color: var(--accent-red);
}

.support-separator {
    color: var(--border-highlight);
}

.site-footer {
    background-color: #040405;
    border-top: 1px solid var(--border-color);
    padding: 4.5rem 0 2.25rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 3.5rem;
}

.footer-brand h2 {
    font-size: 1.85rem;
    margin-bottom: 1rem;
}

.footer-brand h2 span {
    color: var(--accent-red);
}

.footer-brand p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.65;
}

.footer-title {
    font-size: 1.1rem;
    margin-bottom: 1.35rem;
    color: var(--text-primary);
}

.footer-links-list {
    list-style: none;
}

.footer-links-list li {
    margin-bottom: 0.7rem;
}

.footer-links-list a {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-links-list a:hover {
    color: var(--text-primary);
}

.social-links-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.social-btn:hover {
    background-color: var(--accent-red);
    color: #ffffff;
    border-color: var(--accent-red);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Search Input */
.search-box-wrapper {
    margin-bottom: 2.5rem;
}

.search-input {
    width: 100%;
    padding: 1.1rem 1.35rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-body);
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-red);
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.2);
}

/* Responsive Rules */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-header);
        flex-direction: column;
        padding: 1.5rem;
        border-bottom: 1px solid var(--border-color);
    }
    
    .site-nav.active {
        display: flex;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .hero-content h1 {
        font-size: 2.25rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Timeline Styles */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 40px auto;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: var(--border-color);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 20px 40px;
    box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
}

.timeline-item::after {
    content: '';
    position: absolute;
    top: 25px;
    right: -8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-red);
    border: 3px solid var(--bg-card);
    z-index: 1;
}

.timeline-item:nth-child(even)::after {
    left: -8px;
}

.timeline-year {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-red);
    margin-bottom: 8px;
}

.timeline-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.timeline-text a {
    color: var(--text-color);
    text-decoration: underline;
}

.timeline-text a:hover {
    color: var(--accent-red);
}

@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 50px;
        padding-right: 0;
        text-align: left !important;
    }
    .timeline-item:nth-child(even) {
        left: 0;
    }
    .timeline-item::after {
        left: 12px !important;
        right: auto !important;
    }
}

/* Custom Formula Box and Table Title Styles */
.creator-formula-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    margin: 35px auto;
    max-width: 650px;
    text-align: center;
    box-shadow: var(--shadow-subtle);
}

.formula-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--accent-red);
    margin-top: 0;
    margin-bottom: 24px;
    text-transform: uppercase;
}

.formula-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.formula-step {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-color);
}

.formula-operator {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-red);
    line-height: 1;
}

.formula-result {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    background: rgba(229, 9, 20, 0.08);
    border: 1px dashed var(--accent-red);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    margin-top: 5px;
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.05);
}

.quote-header {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--accent-red);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.table-section-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin-top: 30px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-left: 3px solid var(--accent-red);
    padding-left: 12px;
}

/* Global Mobile Overflow Fix */
html, body {
    overflow-x: hidden;
    width: 100%;
}

/* Underline Links in Body Texts */
.article-body p a, 
.article-body li a,
.timeline-text a {
    text-decoration: underline;
    text-decoration-color: var(--accent-red);
    text-underline-offset: 3px;
    color: #ffffff;
}

.article-body p a:hover, 
.article-body li a:hover,
.timeline-text a:hover {
    color: var(--accent-red);
    text-decoration-color: #ffffff;
}

/* Responsive Table Scroll Fix */
.article-body table, 
table {
    display: block;
    width: 100% !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Mobile Layout Cards Grid Collapse and Safe Side Spacing */
@media (max-width: 768px) {
    /* Prevent elements from sitting flush against the screen edge */
    .container, 
    .site-header .container, 
    .hero-section .container,
    .article-container {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }
    
    /* Collapse cards-grid layout to single column stack */
    .cards-grid {
        grid-template-columns: 1fr !important;
    }
    .cards-grid .card, 
    .card {
        grid-column: auto !important;
    }
    
    /* Ensure article meta tags (date, time, chars) wrap as unified block units */
    .article-meta-bar {
        flex-wrap: wrap !important;
        gap: 0.85rem 1.25rem !important;
        justify-content: center !important;
    }
    .article-meta-bar span {
        white-space: nowrap !important;
    }
    
    /* Adjust text size on smaller viewports */
    .article-container h1 {
        font-size: 2.15rem !important;
        line-height: 1.2 !important;
    }
    
    .hero-content h1 {
        font-size: 2.25rem !important;
    }
}




