/* Substack Page Specific Styles */

:root {
  --substack-primary: #FF6719; /* Substack orange */
  --substack-secondary: #FFF7F3; /* Light cream */
  --substack-accent: #FFB88C; /* Peach */
  --substack-dark: #2C2C2C; /* Dark gray */
  --substack-white: #FFFFFF;
  --substack-gradient-start: #FF6719;
  --substack-gradient-end: #FF8C42;
}

.substack-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 5%;
}

/* Substack Profile Button */
.substack-profile-link {
    text-align: center;
    margin: 2rem 0;
}

.substack-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--substack-gradient-start) 0%, var(--substack-gradient-end) 100%);
    color: white;
    padding: 0.9rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(255, 103, 25, 0.3);
}

.substack-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 103, 25, 0.4);
}

.substack-button svg {
    flex-shrink: 0;
}

/* Loading and Error States */
.loading, .error {
    text-align: center;
    padding: 3rem;
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
}

.error {
    color: #d32f2f;
    background-color: #ffebee;
    border-radius: 8px;
    margin: 2rem auto;
    max-width: 600px;
}

/* Summary Stats Grid */
.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0 3rem 0;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.stat-value {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--substack-primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* Additional Stats */
.additional-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0 3rem 0;
}

.additional-stats .stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.stat-detail {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    text-align: center;
}

/* Section Title */
.section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
    margin: 3rem 0 2rem 0;
    color: #333;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.post-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
    border-left: 4px solid var(--substack-primary);
}

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

.post-header {
    margin-bottom: 1rem;
}

.post-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 1rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.post-date {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.date-icon {
    font-size: 1rem;
}

.post-snippet {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.category-tag {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
    background: linear-gradient(135deg, var(--substack-secondary) 0%, var(--substack-accent) 100%);
    color: var(--substack-dark);
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.view-post-link {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--substack-primary);
    font-weight: 600;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .summary-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .additional-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .post-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .summary-stats {
        grid-template-columns: 1fr;
    }

    .additional-stats {
        grid-template-columns: 1fr;
    }

    .substack-container {
        padding: 1rem 3%;
    }

    .post-card {
        padding: 1.5rem;
    }
}
