/* blogstyle.css - Professional Blog Article Design */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --primary-blue: #1e40af;
    --primary-orange: #dc2626;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --border-color: #e5e7eb;
    
    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --line-height: 1.7;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-lg: 0.75rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    
    /* Transitions */
    --transition: all 0.2s ease-in-out;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: var(--line-height);
    color: var(--text-primary);
    background: var(--bg-secondary);
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Container */
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Header & Navigation */
header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
  
    top: 0;
    z-index: 50;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: inherit;
}

.logo b:first-child {
    color: var(--primary-blue);
}

.logo b:last-child {
    color: var(--primary-orange);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--space-lg);
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-blue);
    background: rgba(30, 64, 175, 0.05);
}

/* Main Content */
main {
    padding: var(--space-2xl) 0;
}

main h1 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-xl);
    color: var(--text-primary);
    text-align: center;
    letter-spacing: -0.02em;
}

/* Article Content */
section {
    margin-bottom: var(--space-2xl);
    background: var(--bg-primary);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-blue);
}

section h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
    position: relative;
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--border-color);
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-blue);
}

section p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    text-align: justify;
}

section p:last-child {
    margin-bottom: 0;
}

/* Special Section Styling */
#introduction {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.02) 0%, var(--bg-primary) 100%);
    border-left-color: var(--primary-blue);
}

#conclusion {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.02) 0%, var(--bg-primary) 100%);
    border-left-color: #10b981;
    margin-bottom: var(--space-xl);
}

#conclusion h2 {
    color: #10b981;
}

#conclusion h2::after {
    background: #10b981;
}

/* Application Sections */
#application1 { border-left-color: #ef4444; }
#application2 { border-left-color: #10b981; }
#application3 { border-left-color: #8b5cf6; }
#application4 { border-left-color: #f59e0b; }
#application5 { border-left-color: #06b6d4; }

#application1 h2::after { background: #ef4444; }
#application2 h2::after { background: #10b981; }
#application3 h2::after { background: #8b5cf6; }
#application4 h2::after { background: #f59e0b; }
#application5 h2::after { background: #06b6d4; }

/* Text Styling */
.highlight {
    background: linear-gradient(120deg, rgba(30, 64, 175, 0.1) 0%, rgba(30, 64, 175, 0.1) 100%);
    padding: 0.125rem 0.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: var(--primary-blue);
}

strong {
    color: var(--primary-blue);
    font-weight: 600;
}

/* Lists */
section ul,
section ol {
    margin: var(--space-md) 0;
    padding-left: var(--space-lg);
}

section ul li,
section ol li {
    margin-bottom: var(--space-xs);
    color: var(--text-secondary);
}

section ol {
    counter-reset: list-counter;
}

section ol li {
    counter-increment: list-counter;
}

section ol li::marker {
    font-weight: 600;
    color: var(--primary-blue);
}

/* Footer */
footer {
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: var(--space-lg) 0;
    margin-top: var(--space-2xl);
}

footer .container {
    text-align: center;
    padding: 0 var(--space-md);
}

footer p {
    color: #9ca3af;
    font-size: 0.9rem;
}

/* Reading Enhancements */
main {
    max-width: 100%;
}

/* Links */
a {
    color: var(--primary-blue);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

a:hover {
    border-bottom-color: var(--primary-blue);
    color: var(--primary-blue);
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: var(--space-md);
        padding: var(--space-sm) var(--space-md);
    }

    .nav-links {
        gap: var(--space-md);
        justify-content: center;
    }

    .container {
        padding: 0 var(--space-sm);
    }

    main {
        padding: var(--space-xl) 0;
    }

    main h1 {
        font-size: 2rem;
        text-align: left;
        margin-bottom: var(--space-lg);
    }

    section {
        padding: var(--space-lg);
        margin-bottom: var(--space-lg);
        border-radius: var(--radius-sm);
    }

    section h2 {
        font-size: 1.5rem;
    }

    section p {
        font-size: 1rem;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: var(--space-sm);
    }

    .logo {
        font-size: 1.25rem;
        text-align: center;
    }

    .nav-links {
        flex-direction: column;
        gap: var(--space-sm);
    }

    main h1 {
        font-size: 1.75rem;
    }

    section {
        padding: var(--space-md);
        margin-bottom: var(--space-md);
    }

    section h2 {
        font-size: 1.25rem;
    }

    section p {
        line-height: 1.6;
        font-size: 0.95rem;
    }

    .container {
        padding: 0 var(--space-xs);
    }
}

/* Print Styles */
@media print {
    body {
        background: white !important;
        color: black !important;
    }
    
    header, footer {
        display: none;
    }
    
    main {
        padding: 0;
        max-width: none;
    }
    
    section {
        box-shadow: none !important;
        border: none !important;
        margin-bottom: 1.5rem;
        page-break-inside: avoid;
        background: white !important;
    }
    
    section h2 {
        border-bottom: 1px solid #000;
    }
    
    section h2::after {
        background: #000;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

a:focus,
button:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-secondary);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-primary);
}

/* Selection Styles */
::selection {
    background: var(--primary-blue);
    color: white;
}

::-moz-selection {
    background: var(--primary-blue);
    color: white;
}

/* Typography Improvements */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
}

h1 { font-size: 2.5rem; margin-bottom: var(--space-xl); }
h2 { font-size: 1.75rem; margin-bottom: var(--space-lg); }
h3 { font-size: 1.25rem; margin-bottom: var(--space-md); }

p {
    margin-bottom: var(--space-md);
}

/* Reading Mode */
@media (min-width: 769px) {
    .container {
        max-width: 680px;
    }
    
    main {
        padding: var(--space-2xl) 0;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --text-light: #9ca3af;
        --bg-primary: #1f2937;
        --bg-secondary: #111827;
        --border-color: #374151;
    }
    
    body {
        background: var(--bg-secondary);
    }
    
    header {
        background: var(--bg-primary);
        border-bottom-color: var(--border-color);
    }
    
    .navbar a {
        color: var(--text-primary);
    }
    
    section {
        background: var(--bg-primary);
        border-left-color: var(--primary-blue);
    }
    
    section h2 {
        color: var(--text-primary);
        border-bottom-color: var(--border-color);
    }
}