/* 
   --------------------------------------------------------------------------
   BLOG DESIGN SYSTEM — LIGHT MODE PREMIUM THEME (2026)
   Style: Clean, Minimalist, Content-First, Professional Light
   -------------------------------------------------------------------------- 
*/

:root {
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-alt: #f1f5f9;
    --bg-code: #1e293b;
    --border-light: rgba(15, 23, 42, 0.08);
    --border-hover: rgba(99, 102, 241, 0.35);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --accent-primary: #4f46e5;
    --accent-hover: #6366f1;
    --accent-subtle: rgba(79, 70, 229, 0.08);
    --gradient-hero: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%);
    --gradient-text: linear-gradient(135deg, #4f46e5, #7c3aed, #2563eb);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.12);
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --radius-md: 12px;
    --radius-lg: 16px;
}

/* --------------------------------------------------------------------------
   BASE
   -------------------------------------------------------------------------- */

body {
    background: var(--bg-body);
    color: var(--text-primary);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

a { transition: all 0.2s ease; }

/* --------------------------------------------------------------------------
   HERO SECTION
   -------------------------------------------------------------------------- */
.hero-section {
    position: relative;
    padding: 7rem 0 4.5rem;
    overflow: hidden;
    background: var(--gradient-hero);
    border-bottom: 1px solid var(--border-light);
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(79, 70, 229, 0.06), transparent 40%),
        radial-gradient(circle at 80% 60%, rgba(37, 99, 235, 0.04), transparent 35%);
    pointer-events: none;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 18px;
    background: var(--accent-subtle);
    color: var(--accent-primary);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(79, 70, 229, 0.12);
}

.hero-title,
.gradient-title {
    font-size: clamp(2.8rem, 5vw, 4.2rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: var(--gradient-text);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* --------------------------------------------------------------------------
   BLOG CARD GRID
   -------------------------------------------------------------------------- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
    padding: 3rem 0;
}

.article-card,
.blog-card,
.blog-post-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: var(--shadow-sm);
    transform: translateY(16px);
    opacity: 0;
    transition: opacity 0.45s ease, transform 0.45s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.article-card.is-visible,
.blog-card.is-visible,
.blog-post-item.is-visible {
    transform: translateY(0);
    opacity: 1;
}

.article-card:hover,
.blog-card:hover,
.blog-post-item:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg);
}

/* Card Image */
.card-image-wrapper {
    position: relative;
    padding-top: 56.25%;
    overflow: hidden;
    background-color: var(--bg-surface-alt);
}

.card-image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(15, 23, 42, 0.4) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.03;
    pointer-events: none;
}

.card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease-out);
}

.article-card:hover .card-image { transform: scale(1.05); }

/* Card Content */
.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.meta-dot {
    width: 4px;
    height: 4px;
    background: var(--text-muted);
    border-radius: 50%;
}

.category-tag {
    color: var(--accent-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-heading {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.35;
    color: var(--text-primary);
}

.card-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

/* Card Footer */
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
    margin-top: auto;
}

.author-block {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--bg-surface);
    box-shadow: 0 0 0 1px var(--border-light);
}

.author-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

.read-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s ease;
}

.article-card:hover .read-link { gap: 8px; }

/* --------------------------------------------------------------------------
   NAVBAR
   -------------------------------------------------------------------------- */
.navbar-premium {
    background: rgba(248, 250, 252, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.nav-link { color: var(--text-secondary) !important; }
.nav-link:hover { color: var(--text-primary) !important; }

.nav-link.active {
    color: var(--accent-primary) !important;
    font-weight: 600;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-primary);
    border-radius: 2px;
}

/* --------------------------------------------------------------------------
   ARTICLE PAGE
   -------------------------------------------------------------------------- */
.article-header {
    text-align: center;
    padding: 4rem 0 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.article-body {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

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

.article-content h2,
.article-content h3,
.article-content h4 {
    color: var(--text-primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.article-content p,
.article-content li {
    color: var(--text-secondary);
    line-height: 1.75;
}

.article-title,
.section-title {
    color: var(--text-primary);
}

/* Code Blocks */
pre, code { font-family: var(--font-mono); }

.code-block-wrapper {
    background: var(--bg-code);
    border-radius: var(--radius-md);
    margin: 2rem 0;
    position: relative;
    border: 1px solid rgba(30, 41, 59, 0.8);
    overflow: hidden;
    color: #e2e8f0;
    padding: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.6;
    box-shadow: var(--shadow-md);
}

/* Tables */
.table-premium {
    width: 100%;
    margin: 2rem 0;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.table-premium th {
    background: var(--bg-surface-alt);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.table-premium td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   CONTENT SECTIONS (used in article pages)
   -------------------------------------------------------------------------- */
.content-section,
.toc-card,
.metric-card,
.result-card,
.architecture-section,
.section-card,
.timeline-content {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.content-section:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

/* Highlight Boxes */
.pro-tip,
.highlight-box,
.fact-box,
.insight-card {
    background: var(--accent-subtle);
    border-left: 3px solid var(--accent-primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   SHARE BUTTONS
   -------------------------------------------------------------------------- */
.share-buttons-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 1rem;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    background: var(--bg-surface);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1.1rem;
    text-decoration: none;
}

.share-btn:hover {
    border-color: var(--border-hover);
    color: var(--accent-hover);
    box-shadow: var(--shadow-sm);
}

.share-btn.linkedin:hover { background: #0077b5; color: white; border-color: #0077b5; }
.share-btn.twitter:hover { background: #1da1f2; color: white; border-color: #1da1f2; }
.share-btn.whatsapp:hover { background: #25d366; color: white; border-color: #25d366; }
.share-btn.copy-link:hover { background: var(--accent-primary); color: white; border-color: var(--accent-primary); }

/* Small share buttons (inside cards) */
.share-btn-sm {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    position: relative;
    z-index: 2;
}

.share-btn-sm:hover {
    background: var(--accent-subtle);
    color: var(--accent-primary);
    transform: none;
    box-shadow: none;
}

/* --------------------------------------------------------------------------
   UTILITY CLASSES
   -------------------------------------------------------------------------- */
.meta-accent { color: var(--accent-primary); }
.text-muted { color: var(--text-muted) !important; }
.section-divider { border-color: var(--border-light); }

.card-footer,
.article-footer {
    border-color: var(--border-light);
}

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .hero-section { padding: 5.5rem 0 3rem; }
    .hero-title { font-size: 2.4rem; }
    .blog-grid { grid-template-columns: 1fr; gap: 1.25rem; }
    .card-content { padding: 1.15rem; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2rem; }
    .card-heading { font-size: 1.15rem; }
}

/* --------------------------------------------------------------------------
   REDUCED MOTION
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .article-card,
    .blog-card,
    .blog-post-item {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
