html {
    scroll-padding-top: 150px;
}

body {
    padding-top: 100px;
}

header {
    background: var(--aurora-glass-background);
    padding: 40px;
    text-align: center;
    border-bottom: 1px solid var(--aurora-white-a10);
    position: relative;
    z-index: 2;
    border-radius: 20px 20px 0 0;

    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(ellipse at top, var(--aurora-primary-a10) 0%, transparent 70%);
        pointer-events: none;
    }
}

footer {
    background: var(--aurora-surface-subtle);
    text-align: center;
    padding: 20px;
    font-size: 0.9em;
    border-top: 1px solid var(--aurora-white-a10);
    position: relative;
    z-index: 2;
    border-radius: 0 0 20px 20px;

    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg,
            transparent 0%,
            var(--aurora-white-a15) 50%,
            transparent 100%);
    }

    & p {
        margin: auto !important;
    }
}

.menu-post-item,
.feature-list {
    & h4 {
        background: none;
        padding-bottom: 0;
        margin-top: 0;
        margin-bottom: 8px;
        font-size: 1em;

        &:after {
            max-height: 0;
            background: none;
        }
    }
}

#articles {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 0;
    max-width: 100%;

    @media (min-width: 768px) {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2rem;
    }
}

.blog-overview-card {
    border: 1px solid var(--aurora-black-a10);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: var(--aurora-card-shadow);
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 400px;
    background: var(--aurora-glass-background);

    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg,
            transparent 0%,
            var(--aurora-white-a20) 50%,
            transparent 100%);
        border-radius: 16px 16px 0 0;
    }

    &:hover {
        transform: translateY(-4px);
        box-shadow:
            0 8px 32px var(--aurora-black-a30),
            0 0 0 1px var(--aurora-primary-a20),
            inset 0 1px 0 var(--aurora-black-a05);
        border-color: var(--aurora-primary-a30);

        & .title {
            color: var(--aurora-primary-a90);
        }

        & .read-more {
            color: var(--aurora-primary);
            transform: translateX(2px);
            filter: none;

            & svg {
                transform: translateX(3px);
            }
        }
    }

    & .post-image {
        height: 140px;
        background: linear-gradient(135deg,
            var(--aurora-white-a03) 0%,
            var(--aurora-white-a01) 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        border-bottom: 1px solid var(--aurora-white-a10);
        position: relative;
        overflow: hidden;

        &::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background:
                radial-gradient(circle at 30% 30%, var(--aurora-primary-a05) 0%, transparent 70%),
                linear-gradient(45deg,
                    transparent 25%,
                    var(--aurora-white-a02) 25%,
                    var(--aurora-white-a02) 50%,
                    transparent 50%,
                    transparent 75%,
                    var(--aurora-white-a02) 75%);
            background-size: 20px 20px;
            opacity: 0.3;
        }

        & img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
            border: none;
            filter: opacity(0.75);
        }

        & .category {
            background: var(--aurora-primary-a15);
            color: var(--aurora-primary);
            padding: 0.25rem 0.6rem;
            border-radius: 0 0 16px 0;
            font-size: 0.7rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.02em;
            position: absolute;
            left: 0;
            top: 0;
            z-index: 2;
            font-family: 'SourceCodePro', Menlo, Consolas, "Courier New", monospace;
        }

        @media (width <= 768px) {
            height: 120px;
        }

        @media (width <= 480px) {
            height: 100px;
        }
    }

    & .image-placeholder {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        position: relative;
        z-index: 1;
    }

    & .placeholder-icon {
        width: 32px;
        height: 32px;
        color: var(--aurora-white-a40);
        stroke-width: 1.5;
    }

    & .post-content {
        padding: 1.5rem;
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        position: relative;

        &::before {
            content: '';
            position: absolute;
            inset: 0;
            background: radial-gradient(ellipse 250% 100% at 50% 0%, var(--aurora-white-a04) 0%, var(--aurora-white-a02) 50%, transparent 100%);
            pointer-events: none;
            z-index: 1;
        }

        & .date {
            font-size: 0.8rem;
            color: var(--aurora-white-a60);
            font-weight: 500;
            margin-bottom: 0.5rem;
            display: block;
            text-align: start;
            font-family: 'SourceCodePro', Menlo, Consolas, "Courier New", monospace;
        }

        @media (width <= 768px) {
            padding: 1.2rem;
            gap: 0.8rem;
        }

        @media (width <= 480px) {
            padding: 1rem;
            gap: 0.7rem;
        }
    }

    & .title {
        margin: 0;
        font-size: 1.2rem;
        font-weight: 600;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        word-break: break-word;
        color: var(--aurora-white-a95);
        transition: all 0.2s ease;
        text-align: start;

        &::after {
            display: none;
        }

        @media (width <= 768px) {
            font-size: 1.1rem;
        }

        @media (width <= 480px) {
            font-size: 1rem;
        }
    }

    & .excerpt {
        color: var(--aurora-white-a70);
        line-height: 1.5;
        font-size: 0.9rem;
        margin: 0;
        flex: 1;
        text-align: start;

        @media (width <= 768px) {
            font-size: 0.85rem;
        }

        @media (width <= 480px) {
            font-size: 0.8rem;
        }
    }

    & .tags {
        display: flex;
        gap: 0.4rem;
        flex-wrap: wrap;
        margin-top: auto;
        font-family: 'SourceCodePro', Menlo, Consolas, "Courier New", monospace;
        font-size: 0.7rem;
        font-weight: 500;
    }

    & .tag {
        background: transparent;
        color: var(--aurora-white-a60);
        padding: 0.3rem 0.6rem;
        border-radius: 6px;
        border: 1px solid var(--aurora-white-a10);
        transition: all 0.2s ease;

        @media (width <= 480px) {
            font-size: 0.65rem;
            padding: 0.25rem 0.5rem;
        }
    }

    & .read-more {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        color: var(--aurora-primary-a90);
        text-decoration: none;
        font-size: 0.85rem;
        font-weight: 500;
        margin-top: 1rem;
        padding: 0.5rem 0;
        transition: all 0.2s ease;
        background: none;
        -webkit-background-clip: unset;
        -webkit-text-fill-color: unset;
        background-clip: unset;

        &::after {
            display: none;
        }

        & svg {
            width: 16px;
            height: 16px;
            transition: transform 0.2s ease;
        }
    }

    & .post-meta {
        @media (width <= 480px) {
            font-size: 0.75rem;
        }
    }

    @media (width <= 768px) {
        min-height: 280px;
    }

    @media (width <= 480px) {
        min-height: 260px;
    }
}

.error-message {
    text-align: center;
    color: var(--aurora-grey);
    font-style: italic;
    padding: 2rem;
}

.blog-search-container {
    margin-bottom: 2rem;
    position: sticky;
    top: 80px;
    z-index: 10;
    border-radius: 16px;
    padding: 0;
    border: 1px solid var(--aurora-black-a10);
    box-shadow: var(--aurora-glass-pattern);
    font-family: 'SourceCodePro', Menlo, Consolas, "Courier New", monospace;

    &::before {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: 16px;
        background: radial-gradient(ellipse 250% 100% at 50% 0%, var(--aurora-white-a04) 0%, var(--aurora-white-a02) 50%, transparent 100%);
        pointer-events: none;
        z-index: 1;
    }
}

.search-bar {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--aurora-glass-background);
    border: 1px solid var(--aurora-black-a10);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;

    &:focus-within {
        border-color: var(--aurora-primary-a50);
        box-shadow: var(--aurora-focus-ring-lg);
    }
}

.search-icon {
    width: 20px;
    height: 20px;
    color: var(--aurora-white-a50);
    margin-right: 0.75rem;
    stroke-width: 2;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--aurora-white-a90);
    font-size: 1rem;
    font-family: inherit;

    &::placeholder {
        color: var(--aurora-white-a50);
    }
}

.search-clear {
    background: transparent;
    border: none;
    padding: 0.25rem;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    margin-left: 0.5rem;

    &.visible {
        opacity: 1;
        visibility: visible;
    }

    &:hover {
        background: var(--aurora-white-a10);
    }
}

.clear-icon {
    width: 16px;
    height: 16px;
    color: var(--aurora-white-a60);
    stroke-width: 2;
}

.filter-toggle {
    background: transparent;
    border: none;
    padding: 0.25rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 0.5rem;

    &:hover {
        background: var(--aurora-white-a10);
    }

    &.active {
        background: var(--aurora-primary-a15);

        & .filter-icon {
            color: var(--aurora-primary);
        }
    }
}

.filter-icon {
    width: 16px;
    height: 16px;
    color: var(--aurora-white-a60);
    stroke-width: 2;
    transition: color 0.2s ease;
}

.filter-section {
    margin: 0;
    padding: 1rem;

    &.hidden {
        display: none;
    }

    @media (width <= 768px) {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
    }
}

.filter-group {
    margin-bottom: 1rem;

    @media (width <= 768px) {
        margin-bottom: 0.75rem;
    }
}

.filter-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--aurora-white-a80);
    margin-bottom: 0.5rem;
    font-family: 'SourceCodePro', Menlo, Consolas, "Courier New", monospace;
}

.category-filters,
.tag-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-button {
    background: var(--aurora-glass-background);
    border: 1px solid var(--aurora-black-a10);
    color: var(--aurora-white-a70);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'SourceCodePro', Menlo, Consolas, "Courier New", monospace;
    letter-spacing: 0.02em;

    &:hover {
        background: var(--aurora-white-a10);
        border-color: var(--aurora-primary-a30);
        color: var(--aurora-white-a90);
    }

    &.active {
        background: var(--aurora-primary-a15);
        border-color: var(--aurora-primary-a50);
        color: var(--aurora-primary);
    }

    &.category {
        font-weight: 700;
    }

    &.tag::before {
        content: '#';
        opacity: 0.7;
    }

    @media (width <= 768px) {
        padding: 0.35rem 0.6rem;
        font-size: 0.7rem;
    }
}

.clear-filters {
    background: transparent;
    border: 1px solid var(--aurora-white-a20);
    color: var(--aurora-white-a60);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;

    &:hover {
        background: var(--aurora-white-a10);
        border-color: var(--aurora-white-a40);
        color: var(--aurora-white-a90);
    }

    &:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    @media (width <= 768px) {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
}