/* ===================================================================
   V6 DESIGN SYSTEM - "ICONIC" THEME
   Philosophy: Clean, spacious, with iconic typography for structure.
   =================================================================== */
:root {
    /* Color Palette: Refined Emerald Green */
    --primary-500: #10b981; /* Main Accent */
    --primary-600: #059669; /* Links & Hover */
    --primary-100: #d1fae5; /* Light Highlight */
    --primary-50:  #f0fdf4; /* Subtle Background */
    
    --gray-900: #1f2937; /* Deepest Text (for high contrast) */
    --gray-800: #2d3748; /* Main Heading Text */
    --gray-700: #4a5568; /* Body Text */
    --gray-500: #6b7280; /* Meta Information */
    --gray-200: #e5e7eb; /* Subtle Borders */
    --gray-100: #f3f4f6; /* Section Backgrounds */
    --gray-50:  #f9fafb;  /* Page Background */

    --surface-bg: #ffffff;
    
    /* Fluid Typography - Refined for Elegance */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --fs-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    /* H1 is smaller and more elegant */
    --fs-h1: clamp(2.25rem, 1.75rem + 2.5vw, 3.25rem); 
    --fs-h2: clamp(1.75rem, 1.5rem + 1.25vw, 2.5rem);
    --fs-h3: clamp(1.4rem, 1.2rem + 1vw, 1.75rem);
    --lh-base: 1.8; /* Increased for better readability */
    --lh-heading: 1.3;

    /* Shadows - Softer & More Subtle */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.04);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.06), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.07), 0 4px 6px -4px rgb(0 0 0 / 0.06);
    --shadow-focus: 0 0 0 3px var(--primary-100);

    /* Radii & Transitions */
    --radius-md: 0.375rem; /* 6px */
    --radius-lg: 0.5rem;   /* 8px */
    --radius-xl: 0.75rem;  /* 12px */
    --radius-full: 9999px;
    --transition-base: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================================================
   Global Styles
   =================================================================== */
body {
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    line-height: var(--lh-base);
    background-color: var(--surface-bg);
    color: var(--gray-700);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Aurora effect - more subtle now */
body::before {
    content: '';
    position: fixed;
    top: -40vh;
    left: -30vw;
    width: 160vw;
    height: 160vh;
    background: radial-gradient(circle at 20% 30%, var(--primary-50), transparent 40%),
                radial-gradient(circle at 80% 70%, #ecfeff, transparent 45%); /* Lighter Cyan */
    filter: blur(140px);
    opacity: 0.35;
    z-index: -1;
    transform: translateZ(0); /* GPU acceleration */
}

a {
    color: var(--primary-600);
    text-decoration: none;
    transition: var(--transition-base);
    font-weight: 500;
}
a:hover { color: var(--primary-500); }

h1, h2, h3, h4, h5, h6 { 
    font-weight: 700; 
    color: var(--gray-800); 
    line-height: var(--lh-heading); 
    letter-spacing: -0.02em;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

/* ===================================================================
   HEADER (Glassmorphism Effect)
   =================================================================== */
.main-header {
    background-color: rgba(255, 255, 255, 0.75);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--gray-200);
}

.site-header__logo-img { height: 40px; width: auto; }

/* ===================================================================
   BLOG: ARTICLE PAGE
   =================================================================== */
.article-header-section {
    padding: 3rem 0 2rem 0;
    text-align: center;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem 2rem;
    color: var(--gray-500);
    margin-top: 2rem;
    font-size: 0.9rem;
}
.article-meta .meta-item { display: flex; align-items: center; }
.article-meta a { color: var(--gray-500); font-weight: 500; }
.article-meta a:hover { color: var(--primary-600); }

.badge-category {
    background-color: var(--primary-50);
    color: var(--primary-600);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.4em 1em;
    border-radius: var(--radius-full);
    transition: var(--transition-base);
}
.badge-category:hover {
    background-color: var(--primary-100);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px -2px rgb(16 185 129 / 0.2);
}

.article-content {
    max-width: 75ch;
    margin: 1rem auto 0 auto;
}

/* Clean headings with generous spacing, no background highlight */
.article-content h2 {
    display: block;
    background: none;
    padding: 0;
    margin-top: 3.5em;
    margin-bottom: 1.5em;
}


/* Styles for Headings with Icons */
.h2-with-icon {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 4rem;
    margin-bottom: 2rem;
}

.h2-with-icon .icon-wrapper {
    flex-shrink: 0;
    width: 45px;
    height: 45px;
    background-color: var(--primary-50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.h2-with-icon i {
    color: var(--primary-600);
    font-size: 1.25rem;
}

.h2-with-icon h2 {
    margin: 0;
}

/* Additional class for headings with a separator line */
.h2-separator {
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--gray-200);
}

/* Animated underline for links */
.article-content a {
    background-image: linear-gradient(to right, var(--primary-500), var(--primary-500));
    background-position: 0 102%;
    background-repeat: no-repeat;
    background-size: 0% 2px;
    transition: background-size .3s;
}
.article-content a:hover { background-size: 100% 2px; }

.article-content figure { margin: 1rem 0; }
.article-content img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.article-content blockquote {
    margin: 2.5em 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--primary-100);
    background-color: var(--primary-50);
    font-style: italic;
    color: var(--gray-800);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.article-content pre {
    background-color: #1e293b;
    color: #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 2.5rem 0;
    box-shadow: var(--shadow-md);
    border: 1px solid #334155;
    overflow-x: auto;
    font-size: 0.9em;
}
.article-content pre code { font-family: 'Fira Code', 'JetBrains Mono', monospace; }

/* ===================================================================
   COMPONENTS
   =================================================================== */
.share-card {
    background-color: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    text-align: center;
}
.share-card .share-title { font-weight: 600; color: var(--gray-800); }

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}
.share-btn {
    background-color: transparent;
    border: 1px solid var(--gray-200);
    color: var(--gray-500);
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: var(--transition-base);
}
.share-btn:hover {
    background-color: var(--primary-500);
    border-color: var(--primary-500);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.share-btn.copy-success {
    background-color: var(--primary-600);
    border-color: var(--primary-600);
    color: #fff;
}

.breadcrumb { font-weight: 500;font-size: small; }
.breadcrumb-item a { color: var(--gray-500); }
.breadcrumb-item a:hover { color: var(--gray-900); }
.breadcrumb-item + .breadcrumb-item::before { content: '›'; margin: 0 0.75rem; color: var(--gray-300); }

/* ===================================================================
   FOOTER
   =================================================================== */
.main-footer {
    background-color: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    color: var(--gray-500);
    padding: 4rem 0;
    margin-top: 5rem;
}
.main-footer h6 { color: var(--gray-900); font-weight: 600; }

/* ===================================================================
   Animations
   =================================================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.article-header-section, .article-content, .article-content > *, footer {
    opacity: 0;
    animation: fadeInUp 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 0.2s;
}

/* Staggered delay for content paragraphs */
.article-content > *:nth-child(2) { animation-delay: 0.3s; }
.article-content > *:nth-child(3) { animation-delay: 0.4s; }
.article-content > *:nth-child(4) { animation-delay: 0.5s; }
.article-content > *:nth-child(5) { animation-delay: 0.6s; }

@media (max-width: 767.98px) {
   .site-header__logo-img { max-height: 30px; }
   .article-header-section { padding-top: 1rem; }
}