* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.focus_grid-blog_item,
.focus_grid-blog_item:focus,
.focus_grid-item-content:focus {
    outline: none !important;
    border: none !important;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    color: #1a1a1a;
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    overflow-x: hidden;
}

/* Subtle Topographic Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(34, 197, 94, 0.09) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(168, 85, 247, 0.08) 0%, transparent 50%);
    z-index: -2;
}

/* Topographic Lines */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        /* Contour lines - more visible */
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 60px,
            rgba(99, 102, 241, 0.06) 60px,
            rgba(99, 102, 241, 0.06) 62px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 80px,
            rgba(34, 197, 94, 0.05) 80px,
            rgba(34, 197, 94, 0.05) 82px
        ),
        /* Organic flowing lines */
        repeating-radial-gradient(
            circle at 25% 25%,
            transparent,
            transparent 90px,
            rgba(99, 102, 241, 0.04) 90px,
            rgba(99, 102, 241, 0.04) 93px
        ),
        repeating-radial-gradient(
            circle at 75% 75%,
            transparent,
            transparent 120px,
            rgba(168, 85, 247, 0.035) 120px,
            rgba(168, 85, 247, 0.035) 123px
        );
    z-index: -1;
    opacity: 1;
}

/* CSS Variables - Perplexity-inspired */
:root {
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;   
    --spacing-md: 0.75rem;  
    --spacing-lg: 1rem;     
    --spacing-xl: 1.25rem;  
    --spacing-2xl: 1.5rem;  
    --spacing-3xl: 2rem;

    /* Perplexity-style Colors */
    --color-primary: #36CF99;
    --color-primary-hover: #2DB885;
    --color-text-primary: #1a1a1a;
    --color-text-secondary: #525252;
    --color-text-muted: #737373;
    --color-border: #e5e5e5;
    --color-border-light: #f5f5f5;
    --color-background: #fafafa;
    --color-card: #ffffff;
    --color-accent: #059669;

    /* Subtle shadows */
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* Border radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

/* Header Section */
.blog-header {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: var(--spacing-sm) 0 0 0;
    margin-bottom: 0;
    overflow: hidden;
}

.blog-header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-lg) var(--spacing-md) var(--spacing-xl) var(--spacing-md); 
    position: relative;
    z-index: 2;
    text-align: center;
}

.blog-header h1 {
    color: #36CF99;
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: var(--spacing-xl); /* Add top margin to h1 */
    margin-bottom: var(--spacing-xs);
    line-height: 1.2;
}

.blog-header p {
    color: #6B7280;
    font-size: 0.8rem;
    max-width: 90%;
    margin: 0 auto;
    line-height: 1.4;
    margin-bottom: var(--spacing-xs);
}

.header-wave-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15px;
    z-index: 1;
    overflow: hidden;
}

.header-wave-container svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: #36CF99;
    opacity: 0.8;
    transform: scaleY(1.5);
}

/* Only scale up on larger screens */
@media (min-width: 768px) {
    .blog-header {
        padding: var(--spacing-md) 0 0 0;
    }
    
    .blog-header h1 {
        font-size: 2.5rem;
    }
    
    .blog-header p {
        font-size: 1rem;
    }
    
    .header-wave-container {
        height: 60px;
    }
    
    .blog-header-content {
        padding-bottom: var(--spacing-sm);
    }
}

/* Container */
.focus_grid-container {
    background: transparent;
    padding: var(--spacing-3xl) 0;
    min-height: 100vh;
    position: relative;
    z-index: 5;
}

.focus_grid-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
}

/* Grid Layout - Wider Rectangle Cards */
.focus_grid-blog-listing {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: var(--spacing-2xl);
    width: 100%;
    justify-content: center;
}

.focus_grid-sizer,
.focus_grid-gutter-sizer {
    display: none; /* Not needed for CSS Grid */
}

/* Item Container */
.focus_grid-item {
    display: block;
    width: 100%;
    margin-bottom: 0;
}

.focus_grid-item-content {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Rectangle Card Design - Full Image with Overlay */
.focus_grid-blog_item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 280px; /* Shorter rectangular shape */
    transition: all 0.3s ease;
    box-shadow:
        0 4px 6px -1px rgb(0 0 0 / 0.1),
        0 2px 4px -2px rgb(0 0 0 / 0.1);
    cursor: pointer;
    display: block;
    text-decoration: none;
    color: inherit;
}

.focus_grid-blog_item:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow:
        0 20px 25px -5px rgb(0 0 0 / 0.15),
        0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Card Content - Remove inner title */
.focus_grid-blog_item_inner {
    display: none; /* Remove the overlay text completely */
}

/* Full Image Background */
.focus_grid-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    z-index: 1;
}

.focus_grid-blog_item:hover .focus_grid-image {
    transform: scale(1.05);
}

/* Image Overlay with Hover Text */
.focus_grid-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.1) 50%,
        rgba(0, 0, 0, 0.4) 100%
    );
    z-index: 2;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.focus_grid-blog_item:hover .focus_grid-image-overlay {
    background: linear-gradient(
        45deg,
        rgba(0, 0, 0, 0.5) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.6) 100%
    );
}

/* Hover Text */
.focus_grid-hover-text {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.focus_grid-blog_item:hover .focus_grid-hover-text {
    opacity: 1;
    transform: translateY(0);
}

/* Title Below Card */
.focus_grid-title-external {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text-primary);
    text-align: left;
    letter-spacing: -0.015em;
    line-height: 1.4;
    margin: var(--spacing-lg) 0 var(--spacing-sm) 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    transition: color 0.3s ease;
}

.focus_grid-blog_item:hover + .focus_grid-title-external {
    color: var(--color-text-primary);
}

/* Meta Information Below Card */
.focus_grid-meta-external {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 0.875rem;
    color: var(--color-text-muted);
    font-weight: 500;
    margin-bottom: var(--spacing-md);
}

/* Read More Button Instead of Tags */
.focus_grid-read-more {
    display: inline-block;
    background: var(--color-primary);
    color: white;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.focus_grid-read-more:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(54, 207, 153, 0.3);
}

/* Featured Article Section - Updated to match page background */
.featured-article-section {
    background: transparent;
    padding: var(--spacing-2xl) 0;
    margin-bottom: var(--spacing-2xl);
    position: relative;
    z-index: 10;
}

.featured-article-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
}

.featured-article-label {
    display: inline-block;
    background: var(--color-primary);
    color: white;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--spacing-lg);
}

.featured-article {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: center;
}

.featured-article-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.featured-article-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1.2;
    letter-spacing: -0.025em;
    margin: 0;
}

.featured-article-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.featured-article-title a:hover {
    color: var(--color-primary);
}

.featured-article-summary {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 0;
}

.featured-article-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-size: 0.875rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.featured-article-meta .focus_grid-read-time::before {
    content: '•';
    margin-right: var(--spacing-sm);
    color: var(--color-text-muted);
}

.featured-article-button {
    display: inline-flex;
    align-items: center;
    background: var(--color-primary);
    color: white;
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    align-self: flex-start;
}

.featured-article-button:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(54, 207, 153, 0.3);
}

.featured-article-image-container {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    aspect-ratio: 16/10;
    background: var(--color-border-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.featured-article-image-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.featured-article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.featured-article-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.05) 50%,
        rgba(0, 0, 0, 0.3) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.featured-article-image-container:hover .featured-article-overlay {
    opacity: 1;
    background: linear-gradient(
        45deg,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.2) 50%,
        rgba(0, 0, 0, 0.5) 100%
    );
}

.featured-article-hover-text {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.featured-article-image-container:hover .featured-article-hover-text {
    transform: translateY(0);
}

/* Responsive for Featured Article */
@media (max-width: 768px) {
    .featured-article {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

    .featured-article-title {
        font-size: 2rem;
    }

    .featured-article-summary {
        font-size: 1rem;
    }
}

.blog-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
}

.nav-pills {
    display: flex;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
}

.nav-pill {
    padding: var(--spacing-sm) var(--spacing-md);
    background: transparent;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-pill:hover,
.nav-pill.active {
    background: var(--color-text-primary);
    color: white;
    border-color: var(--color-text-primary);
}

/* Responsive Design - Even Grid */
@media (max-width: 640px) {

    .focus_grid-blog-listing {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .focus_grid-blog_item_inner {
        padding: var(--spacing-lg);
        gap: var(--spacing-md);
    }

    .focus_grid-title {
        font-size: 1.125rem;
    }

    .focus_grid-inner {
        padding: 0 var(--spacing-lg);
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .focus_grid-blog-listing {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xl);
    }

    .focus_grid-title {
        font-size: 1.25rem;
    }
}

@media (min-width: 1024px) {
    .focus_grid-blog-listing {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-xl);
    }
}

@media (min-width: 1400px) {
    .focus_grid-blog-listing {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1200px;
        margin: 0 auto;
    }
}

/* Loading animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.focus_grid-item {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}


/* Navigation Pills Mobile Fix */
@media (max-width: 640px) {
    .blog-nav-inner {
        padding: 0 var(--spacing-md);
    }
    
    .nav-pills {
        gap: var(--spacing-xs);
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: var(--spacing-xs);
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-pill {
        white-space: nowrap;
        flex-shrink: 0;
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.8rem;
    }
}

/* Full-Screen Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Loader remains the same but adjust positioning */
.loader {
  --background: linear-gradient(135deg, #23C4F8, #275EFE);
  --shadow: rgba(39, 94, 254, 0.28);
  --text: #6C7486;
  --page: rgba(255, 255, 255, 0.36);
  --page-fold: rgba(255, 255, 255, 0.52);
  --duration: 3s;
  width: 200px;
  height: 140px;
  position: relative;
}

/* Rest of your loader CSS remains the same... */
.loader:before, .loader:after {
  --r: -6deg;
  content: "";
  position: absolute;
  bottom: 8px;
  width: 120px;
  top: 80%;
  box-shadow: 0 16px 12px var(--shadow);
  transform: rotate(var(--r));
}

.loader:before {
  left: 4px;
}

.loader:after {
  --r: 6deg;
  right: 4px;
}

.loader div {
  width: 100%;
  height: 100%;
  border-radius: 13px;
  position: relative;
  z-index: 1;
  perspective: 600px;
  box-shadow: 0 4px 6px var(--shadow);
  background-image: var(--background);
}

.loader div ul {
  margin: 0;
  padding: 0;
  list-style: none;
  position: relative;
}

.loader div ul li {
  --r: 180deg;
  --o: 0;
  --c: var(--page);
  position: absolute;
  top: 10px;
  left: 10px;
  transform-origin: 100% 50%;
  color: var(--c);
  opacity: var(--o);
  transform: rotateY(var(--r));
  animation: var(--duration) ease infinite;
}

.loader div ul li:nth-child(2) {
  --c: var(--page-fold);
  animation-name: page-2;
}

.loader div ul li:nth-child(3) {
  --c: var(--page-fold);
  animation-name: page-3;
}

.loader div ul li:nth-child(4) {
  --c: var(--page-fold);
  animation-name: page-4;
}

.loader div ul li:nth-child(5) {
  --c: var(--page-fold);
  animation-name: page-5;
}

.loader div ul li svg {
  width: 90px;
  height: 120px;
  display: block;
}

.loader div ul li:first-child {
  --r: 0deg;
  --o: 1;
}

.loader div ul li:last-child {
  --o: 1;
}

.loader span {
  display: block;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 20px;
  text-align: center;
  color: var(--text);
  font-weight: 500;
  font-size: 1.1rem;
}

/* Keep all your keyframes the same */
@keyframes page-2 {
  0% { transform: rotateY(180deg); opacity: 0; }
  20% { opacity: 1; }
  35%, 100% { opacity: 0; }
  50%, 100% { transform: rotateY(0deg); }
}

@keyframes page-3 {
  15% { transform: rotateY(180deg); opacity: 0; }
  35% { opacity: 1; }
  50%, 100% { opacity: 0; }
  65%, 100% { transform: rotateY(0deg); }
}

@keyframes page-4 {
  30% { transform: rotateY(180deg); opacity: 0; }
  50% { opacity: 1; }
  65%, 100% { opacity: 0; }
  80%, 100% { transform: rotateY(0deg); }
}

@keyframes page-5 {
  45% { transform: rotateY(180deg); opacity: 0; }
  65% { opacity: 1; }
  80%, 100% { opacity: 0; }
  95%, 100% { transform: rotateY(0deg); }
}


/* Smaller wave for mobile */
.header-wave-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    z-index: 1;
    overflow: hidden;
}

.header-wave-container svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: #36CF99;
    opacity: 0.8;
}

/* Compact navigation */
.blog-nav {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: var(--spacing-md) 0;
    display: flex;
    justify-content: center; /* Center everything in the nav */
}

.blog-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    text-align: center; /* Additional centering */
}

/* Mobile nav tabs - horizontal scroll */
.nav-tabs {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center; /* Centers the buttons horizontally */
    align-items: center; /* Centers them vertically too */
    flex-wrap: wrap;
    width: 100%;
    margin: 0 auto;
}

.nav-tabs::-webkit-scrollbar {
    display: none;
}

.nav-tab {
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.85rem;
    font-weight: 500;
    color: #6B7280;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s ease;
    cursor: pointer;
}

.nav-tab.active,
.nav-tab:hover {
    background: #36CF99;
    color: white;
    border-color: #36CF99;
}

/* Featured article adjustments */
.featured-article {
    margin-top: var(--spacing-sm);
}


.focus_grid-item:nth-child(1) { animation-delay: 0.05s; }
.focus_grid-item:nth-child(2) { animation-delay: 0.1s; }
.focus_grid-item:nth-child(3) { animation-delay: 0.15s; }
.focus_grid-item:nth-child(4) { animation-delay: