@font-face {
    font-family: 'Inter';
    src: url('font/Inter-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Inter';
    src: url('font/Inter-Bold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    background: #f7f7f7;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    color: #222;
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

b, strong,
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
}

a {
    color: inherit;
    text-decoration: none;
}

header {
    min-height: 70px;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    row-gap: 16px;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    background: #f7f7f7;
}

header .logo {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    padding: 5px 15px;
    border-radius: 9999px;
    background: #222;
    color: #fff;
    transform: skewX(350deg);
    text-decoration: none;
}

footer {
    height: 70px;
    padding: 20px 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    border-top: 1px solid #e5e5e5;
    margin-top: auto;
}

footer a {
    text-decoration: underline;
    text-underline-offset: 5px;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    display: none !important;
}

.logo.hidden {
    opacity: 0;
    pointer-events: none;
}

.search {
    position: relative;
    pointer-events: none;
    margin-right: 10px;
}

.search svg {
    position: absolute;
    top: 8px;
    right: 9px;
    cursor: pointer;
}

.search input {
    padding-right: 30px;
    margin-bottom: 0;
    max-width: 240px;
    width: 100%;
    border-radius: 9999px;
    border: 1px solid #e5e5e5;
    background: #ffff;
    padding: 10px 15px;
    color: #222;
    outline: none;
    height: 32px;
}

.search input::placeholder {
    color: #8c8c8c;
}

.categories {
    display: flex;
    gap: 10px;
    row-gap: 5px;
    flex-wrap: wrap;
}

.category {
    border-radius: 9999px;
    border: 1px solid #e5e5e5;
    background: #ffff;
    font-size: 14px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    padding: 5px 15px;
}

.category.active {
    border-color: #222;
    background: #222;
    color: #fff;
}

.articles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 30px;
    box-sizing: content-box;
}

.article {
    border: 1px solid #e5e5e5;
    border-radius: 15px;
    padding: 10px;
    background: #fff;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.article h3 {
    margin: 0;
}

.article img {
    width: 200px;
    display: block;
    aspect-ratio: 1.5;
    object-fit: cover;
    border-radius: 7px;
    flex-shrink: 0;
}

.article:first-child {
    grid-row: 1 / 3;
    width: 100%;
    flex-direction: column;
}

.article:first-child img {
    width: 100%;
    aspect-ratio: 2.2;
}

.article:first-child h3 {
    padding: 0 8px;
}

.footer-links {
    display: flex;
    gap: 30px;
}

main {
    max-width: 660px;
    margin: 60px auto;
    border: 1px solid #e5e5e5;
    border-radius: 15px;
    padding: 10px 30px 30px;
    background: #fff;
}

main a {
    text-decoration: underline;
    text-underline-offset: 5px;
}

main img {
    max-width: 100%;
    margin: 1em auto;
    display: block;
}

main h1 {
    font-size: 1.5em;
    line-height: 1.3;
    margin-block-start: 0.67em;
    margin-block-end: 0.67em;
}

main h2 {
    font-size: 1.25em;
    line-height: 1.3;
    margin-block-start: 0.83em;
    margin-block-end: 0.83em;
}

main h3 {
    font-size: 1em;
    line-height: 1.3;
    margin-block-start: 0.83em;
    margin-block-end: 0.83em;
}

main p {
    margin-block-start: 1em;
    margin-block-end: 1em;
}

main ul, main ol {
    margin-block-start: 1em;
    margin-block-end: 1em;
    padding-inline-start: 40px;
}

main button, main .button {
    text-decoration: none;
    border: none;
    display: flex;
    padding: 12px 24px;
    background-color: #488aec;
    color: #ffffff;
    font-size: 1rem;
    line-height: 1rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    user-select: none;
    width: fit-content;
    min-width: 130px;
    margin: auto;
    box-shadow:
    0 4px 6px -1px #488aec31,
    0 2px 4px -1px #488aec17;
}

@media (max-width: 1100px)  {
    header {
        padding: 10px 16px;
        min-height: 60px;
        gap: 15px;
    }
    header .logo {
        font-size: 20px;
        padding: 5px 12px;
    }
    .categories {
        display: none;
    }
    .search {
        display: none;
    }
    .articles {
        grid-template-columns: 1fr;
        margin: 30px 16px 40px;
        padding: 0;
    }
    .article {
        flex-direction: column;
        gap: 10px;
    }
    .article img {
        width: 100%;
        aspect-ratio: 3 / 2 !important;
    }
    .article h3 {
        margin-bottom: 0.25em;
        padding: 0 8px;
    }
    footer {
        flex-direction: column;
        height: auto;
        text-align: center;
        gap: 20px;
        padding: 30px 16px;
    }
    .footer-links {
        font-size: 14px;
        gap: 15px;
    }
    .footer-links a {
        text-decoration: none;
    }
    main {
        margin: 30px 16px 40px;
        padding: 8px 16px 30px;
        max-width: 100%;
    }
    .logo.hidden {
        display: none;
    }
}