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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    font-size: 16px;
}

/* Navigation */
.navbar {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 0.5rem 1rem; /* Reduced padding */
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 50px; /* Reduced height */
}

.nav-brand {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
}

.brand-logo {
    width: 32px; /* Reduced size */
    height: 32px;
    margin-right: 8px; /* Reduced margin */
    flex-shrink: 0;
}

.brand-text {
    font-size: 1.1rem; /* Reduced size */
    font-weight: 600;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 0.75rem; /* Reduced size */
    color: #6c757d;
    margin-top: 1px; /* Reduced margin */
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* Reduced gap */
    flex-shrink: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.25rem; /* Reduced gap */
    text-decoration: none;
    color: #6c757d;
    padding: 0.25rem 0.75rem; /* Reduced padding */
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
    font-size: 0.875rem; /* Reduced font size */
}

.nav-link:hover,
.nav-link.active {
    color: #007bff;
    background-color: #f8f9fa;
}

/* LinkedIn Subscribe Button */
.libutton {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.375rem 0.75rem;
    text-align: center;
    outline: none;
    text-decoration: none !important;
    color: #ffffff !important;
    height: 32px;
    border-radius: 16px;
    background-color: #0A66C2;
    font-family: "SF Pro Text", Helvetica, sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s;
    margin-left: 0.5rem;
}

.libutton:hover {
    background-color: #004182;
    color: #ffffff !important;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.25rem;
    gap: 3px;
}

.hamburger span {
    width: 20px;
    height: 2px;
    background-color: #333;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 0.5rem 1rem;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu .nav-link {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fa;
    justify-content: flex-start;
}

.mobile-menu .nav-link:last-child {
    border-bottom: none;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    background: none;
    border: 1px solid #dee2e6;
    padding: 0.25rem 0.75rem; /* Reduced padding */
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem; /* Reduced gap */
    font-size: 0.75rem; /* Reduced font size */
    transition: all 0.2s;
}

.dropdown-toggle:hover {
    background-color: #f8f9fa;
}

.dropdown-arrow {
    font-size: 0.625rem; /* Reduced size */
    transition: transform 0.2s;
}

.dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 250px;
    z-index: 1000;
    display: none;
    padding: 0.25rem 0; /* Reduced padding */
}

.dropdown.active .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* Reduced gap */
    padding: 0.5rem 0.75rem; /* Reduced padding */
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.site-icon {
    font-size: 1rem; /* Reduced size */
}

.site-info strong {
    font-size: 0.875rem; /* Reduced size */
    font-weight: 600;
}

.site-info small {
    font-size: 0.75rem; /* Reduced size */
    color: #6c757d;
}

/* Date Selector */
.date-selector {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 0.5rem 1rem; /* Reduced padding */
}

.date-info {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.75rem; /* Reduced gap */
}

.date-icon {
    font-size: 1rem; /* Reduced size */
    color: #6c757d;
}

.date-dropdown {
    padding: 0.25rem 0.5rem; /* Reduced padding */
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #fff;
    font-size: 0.875rem; /* Reduced font size */
    min-width: 200px;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem; /* Significantly reduced padding */
}

.newsletter-header {
    margin-bottom: 1rem; /* Reduced margin */
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem; /* Reduced gap */
    background: #d4edda;
    color: #155724;
    padding: 0.25rem 0.75rem; /* Reduced padding */
    border-radius: 20px;
    font-size: 0.75rem; /* Reduced font size */
    font-weight: 500;
}

.status-dot {
    width: 6px; /* Reduced size */
    height: 6px;
    background: #28a745;
    border-radius: 50%;
}

.newsletter-container {
    background: #fff;
    border-radius: 8px;
    padding: 1rem; /* Significantly reduced padding */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

/* Newsletter Content Styling - Minimal padding for imported HTML */
.newsletter-container h1,
.newsletter-container h2,
.newsletter-container h3,
.newsletter-container h4,
.newsletter-container h5,
.newsletter-container h6 {
    color: #212529 !important;
    font-weight: 600 !important;
    margin-top: 0.75rem !important; /* Reduced margin */
    margin-bottom: 0.5rem !important; /* Reduced margin */
    line-height: 1.3 !important;
}

.newsletter-container h1 {
    font-size: 1.75rem !important; /* Reduced size */
    border-bottom: 2px solid #e9ecef !important;
    padding-bottom: 0.25rem !important; /* Reduced padding */
}

.newsletter-container h2 {
    font-size: 1.375rem !important; /* Reduced size */
    border-bottom: 1px solid #e9ecef !important;
    padding-bottom: 0.25rem !important; /* Reduced padding */
}

.newsletter-container h3 {
    font-size: 1.125rem !important; /* Reduced size */
}

.newsletter-container h4 {
    font-size: 1rem !important;
}

.newsletter-container p {
    margin-bottom: 0.5rem !important; /* Reduced margin */
    line-height: 1.5 !important; /* Reduced line height */
    font-size: 0.9rem !important; /* Reduced font size */
}

.newsletter-container ul,
.newsletter-container ol {
    margin-bottom: 0.5rem !important; /* Reduced margin */
    padding-left: 1rem !important; /* Reduced padding */
}

.newsletter-container li {
    margin-bottom: 0.25rem !important; /* Reduced margin */
    line-height: 1.4 !important; /* Reduced line height */
}

.newsletter-container a {
    color: #007bff !important;
    text-decoration: none !important;
    word-break: break-word !important;
}

.newsletter-container a:hover {
    text-decoration: underline !important;
}

.newsletter-container strong,
.newsletter-container b {
    font-weight: 600 !important;
}

.newsletter-container code {
    background: #f8f9fa !important;
    padding: 0.1rem 0.3rem !important; /* Reduced padding */
    border-radius: 3px !important;
    font-size: 0.85rem !important; /* Reduced font size */
    word-break: break-word !important;
}

.newsletter-container pre {
    background: #f8f9fa !important;
    padding: 0.5rem !important; /* Reduced padding */
    border-radius: 6px !important;
    overflow-x: auto !important;
    margin-bottom: 0.5rem !important; /* Reduced margin */
    font-size: 0.85rem !important; /* Reduced font size */
}

.newsletter-container blockquote {
    border-left: 4px solid #007bff !important;
    padding-left: 0.75rem !important; /* Reduced padding */
    margin: 0.5rem 0 !important; /* Reduced margin */
    color: #6c757d !important;
}

.newsletter-container table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-bottom: 0.5rem !important; /* Reduced margin */
    overflow-x: auto !important;
    display: block !important;
    white-space: nowrap !important;
    font-size: 0.85rem !important; /* Reduced font size */
}

.newsletter-container th,
.newsletter-container td {
    border: 1px solid #dee2e6 !important;
    padding: 0.25rem !important; /* Reduced padding */
    text-align: left !important;
}

.newsletter-container th {
    background: #f8f9fa !important;
    font-weight: 600 !important;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 2rem 1rem; /* Reduced padding */
}

.loading-spinner {
    width: 32px; /* Reduced size */
    height: 32px;
    border: 3px solid #f3f3f3; /* Reduced border */
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 0.5rem; /* Reduced margin */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Archive Styles */
.archive-header {
    text-align: center;
    margin-bottom: 1.5rem; /* Reduced margin */
}

.archive-header h1 {
    font-size: 2rem; /* Reduced size */
    margin-bottom: 0.5rem; /* Reduced margin */
    color: #333;
}

.archive-filters {
    display: flex;
    gap: 0.75rem; /* Reduced gap */
    margin-bottom: 1rem; /* Reduced margin */
    justify-content: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem; /* Reduced gap */
}

.filter-group label {
    font-weight: 500;
    color: #6c757d;
    font-size: 0.875rem; /* Reduced font size */
}

.filter-group select {
    padding: 0.25rem 0.75rem; /* Reduced padding */
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #fff;
    min-width: 120px; /* Reduced width */
    font-size: 0.875rem; /* Reduced font size */
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Reduced min width */
    gap: 1rem; /* Reduced gap */
}

.newsletter-card {
    background: #fff;
    border-radius: 8px;
    padding: 1rem; /* Reduced padding */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.newsletter-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.latest-badge {
    position: absolute;
    top: -6px; /* Reduced offset */
    right: 0.75rem; /* Reduced offset */
    background: #007bff;
    color: #fff;
    padding: 0.125rem 0.5rem; /* Reduced padding */
    border-radius: 10px; /* Reduced radius */
    font-size: 0.625rem; /* Reduced font size */
    font-weight: 600;
}

.newsletter-date {
    color: #6c757d;
    font-size: 0.75rem; /* Reduced font size */
    margin-bottom: 0.25rem; /* Reduced margin */
}

.newsletter-title {
    font-size: 1.1rem; /* Reduced font size */
    font-weight: 600;
    margin-bottom: 0.5rem; /* Reduced margin */
    color: #333;
    line-height: 1.3;
}

.newsletter-description {
    color: #6c757d;
    margin-bottom: 0.75rem; /* Reduced margin */
    line-height: 1.4; /* Reduced line height */
    font-size: 0.875rem; /* Reduced font size */
}

.newsletter-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem; /* Reduced gap */
    font-size: 0.875rem; /* Reduced font size */
}

.newsletter-link:hover {
    text-decoration: underline;
}

/* Section Brain Icons */
.section-brain-icon {
    width: 14px; /* Reduced size */
    height: 14px;
    display: inline-block;
    vertical-align: middle;
    margin: 0 1px; /* Reduced margin */
}

/* Footer */
.footer {
    background: #343a40;
    color: #fff;
    text-align: center;
    padding: 1rem; /* Reduced padding */
    margin-top: 2rem; /* Reduced margin */
}

.footer-content p {
    margin-bottom: 0.25rem; /* Reduced margin */
    font-size: 0.875rem; /* Reduced font size */
}

.footer-link {
    color: #adb5bd;
    text-decoration: none;
}

.footer-link:hover {
    color: #fff;
    text-decoration: underline;
}

/* Error and No Results Messages */
.no-newsletters,
.error-message,
.no-results {
    text-align: center;
    padding: 1.5rem 1rem; /* Reduced padding */
    color: #6c757d;
}

.no-newsletters h3,
.error-message h3,
.no-results h3 {
    color: #333;
    margin-bottom: 0.5rem; /* Reduced margin */
    font-size: 1.125rem; /* Reduced font size */
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    /* Show hamburger menu, hide regular nav links */
    .hamburger {
        display: flex;
    }
    
    .nav-links {
        display: none;
    }
    
    /* Mobile LinkedIn button in mobile menu */
    .mobile-subscribe {
        margin-top: 0.5rem;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        height: 36px;
        border-radius: 18px;
        align-self: center;
        width: 180px;
    }
    
    .navbar {
        padding: 0.5rem 1rem;
        min-height: 45px; /* Further reduced for mobile */
        position: relative;
    }
    
    .brand-text {
        font-size: 1rem;
    }
    
    .brand-subtitle {
        font-size: 0.7rem;
    }
    
    .brand-logo {
        width: 28px;
        height: 28px;
        margin-right: 6px;
    }
    
    .date-selector {
        padding: 0.5rem 1rem;
    }
    
    .date-dropdown {
        min-width: 180px;
        font-size: 0.8rem;
    }
    
    .main-content {
        padding: 0.75rem;
    }
    
    .newsletter-container {
        padding: 0.75rem;
    }
    
    .newsletter-container h1 {
        font-size: 1.5rem !important;
    }
    
    .newsletter-container h2 {
        font-size: 1.25rem !important;
    }
    
    .newsletter-container h3 {
        font-size: 1.1rem !important;
    }
    
    .newsletter-container p {
        font-size: 0.875rem !important;
    }
    
    .archive-header h1 {
        font-size: 1.75rem;
    }
    
    .archive-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .newsletter-card {
        padding: 0.75rem;
    }
    
    .newsletter-title {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    /* Extra small phones - even more compact */
    .navbar {
        padding: 0.375rem 0.75rem;
        min-height: 40px;
    }
    
    .brand-text {
        font-size: 0.9rem;
    }
    
    .brand-subtitle {
        display: none; /* Hide subtitle on very small screens */
    }
    
    .brand-logo {
        width: 24px;
        height: 24px;
        margin-right: 4px;
    }
    
    .main-content {
        padding: 0.5rem;
    }
    
    .newsletter-container {
        padding: 0.5rem;
    }
    
    .newsletter-container h1 {
        font-size: 1.25rem !important;
    }
    
    .newsletter-container h2 {
        font-size: 1.125rem !important;
    }
    
    .newsletter-container p {
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
    }
    
    .archive-header {
        margin-bottom: 1rem;
    }
    
    .archive-header h1 {
        font-size: 1.5rem;
    }
    
    .archive-filters {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .filter-group {
        width: 100%;
        max-width: 200px;
    }
    
    .filter-group select {
        width: 100%;
    }
    
    .newsletter-card {
        padding: 0.5rem;
    }
    
    .newsletter-title {
        font-size: 0.95rem;
    }
    
    .newsletter-description {
        font-size: 0.8rem;
    }
}

/* Landscape phone orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .navbar {
        min-height: 40px;
    }
    
    .mobile-menu {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
        padding: 0.25rem 1rem;
    }
    
    .mobile-menu .nav-link {
        border-bottom: none;
        padding: 0.25rem 0.5rem;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .brand-logo,
    .section-brain-icon {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print styles */
@media print {
    .navbar,
    .date-selector,
    .footer {
        display: none;
    }
    
    .main-content {
        padding: 0;
        max-width: none;
    }
    
    .newsletter-container {
        box-shadow: none;
        border: 1px solid #ddd;
        padding: 0.5rem;
    }
}

