/* --- VARIABLES & BASIC SETUP --- */
:root {
    --bg-color: #000000;
    --primary-purple: #a37dfd;
    --secondary-purple: #7957d5;
    --text-light: #e0e0e0;
    --text-dark: #8a8a8a; /* Slightly brightened for better readability */
    --border-color: rgba(163, 125, 253, 0.2);
}

body {
    background-color: var(--bg-color);
    color: var(--text-light);
    font-family: 'Poppins', sans-serif;
    margin: 0;
    overflow-x: hidden;
    background-image: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(163, 125, 253, 0.08), transparent 25vw);
    transition: background 0.2s ease-out;
}

.container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.font-heading {
    font-family: 'Poppins', sans-serif;
}

.highlight-text {
    color: var(--primary-purple);
}

/* --- MAIN CONTENT & HERO --- */
.main-content {
    padding-top: 100px;
    padding-bottom: 3rem;
    position: relative;
    z-index: 10;
}

.hero-section {
    text-align: center;
    margin-bottom: 4rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    font-family: 'Exo 2', sans-serif;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    min-height: 58px; /* Prevents layout shift */
}

.subtitle {
    font-size: 1.5rem;
    font-family: 'Poppins', sans-serif;
    margin-top: 0.5rem;
    color: var(--primary-purple);
}

.hero-description {
    margin-top: 1rem;
}

/* --- BLOG GRID & CARDS --- */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

.blog-card {
    background: linear-gradient(to bottom right, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.1));
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    transition: all 0.4s ease-out;
    overflow: hidden;
    position: relative;
    padding: 1.5rem;
}

.blog-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(163, 125, 253, 0.8);
    box-shadow: 0 20px 50px -15px rgba(163, 125, 253, 0.2);
}

.card-content {
    transition: opacity 0.4s ease;
    opacity: 0.9;
}

.blog-card:hover .card-content {
    opacity: 1;
}

.glow-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(163, 125, 253, 0.2), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.blog-card:hover .glow-effect {
    opacity: 1;
}

.featured-tag {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-purple);
}

.card-title-large {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-family: 'Poppins', sans-serif;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-family: 'Poppins', sans-serif;
}

.card-excerpt {
    margin-bottom: 1rem;
    color: var(--text-dark);
    line-height: 1.6;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.author-name {
    font-weight: 500;
}

.read-time {
    font-size: 0.875rem;
}

/* --- NEWSLETTER & FOOTER --- */
.newsletter-section {
    margin-top: 6rem;
    padding: 2rem;
    border-radius: 0.75rem;
    text-align: center;
    border: 1px solid var(--border-color);
    background: linear-gradient(to bottom right, rgba(163, 125, 253, 0.05), rgba(0, 0, 0, 0.1));
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.newsletter-title {
    font-size: 1.875rem;
    font-weight: 900;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
}

.newsletter-subtitle {
    max-width: 42rem;
    margin: 1rem auto 2rem;
    color: var(--text-dark);
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 32rem;
    margin: 0 auto;
}

.email-input {
    flex-grow: 1;
    padding: 0.75rem;
    border-radius: 0.375rem;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    color: var(--text-light);
}

.email-input:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 15px var(--border-color);
}

.submit-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    transition: all 0.3s ease;
    background: var(--primary-purple);
    color: var(--bg-color);
    border: none;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(163, 125, 253, 0.5);
}

.submit-btn:hover {
    background: var(--secondary-purple);
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(163, 125, 253, 0.8);
}
.footer-logo {
  height: 100px;
  margin-bottom: 15px;
  display: block;
  margin-left: 50px;
}

.footer-heading {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 20px;
    font-family: 'Poppins', sans-serif;
}

/* --- SCROLL ANIMATIONS --- */
.scroll-reveal {
    opacity: 0;
    transition: opacity 1s cubic-bezier(0.5, 0, 0, 1), transform 1s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-card {
    transform: perspective(1000px) rotateX(-45deg) translateY(100px);
}

.reveal-card.visible {
    opacity: 1;
    transform: perspective(1000px) rotateX(0) translateY(0);
}

.reveal-fade-up {
    transform: translateY(50px);
}

.reveal-fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title span {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s ease forwards;
}

/* --- RESPONSIVE DESIGN --- */
@media (min-width: 640px) {
    /* sm */
    .newsletter-form {
        flex-direction: row;
    }

    .email-input {
        text-align: left;
    }
}

@media (min-width: 768px) {
    /* md */
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-title {
        font-size: 4.5rem;
        min-height: 86px;
    }

    .subtitle {
        font-size: 1.875rem;
    }

    .newsletter-title {
        font-size: 2.25rem;
    }
}

@media (min-width: 1024px) {
    /* lg */
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .featured-card {
        grid-column: span 2 / span 2;
    }
}