:root {
    --header-bg: #0f172a;
    --header-bg-soft: #1e293b;
    --text-main: #f8fafc;
    --text-soft: #cbd5e1;
    --accent: #38bdf8;
    --font-base: Verdana, Geneva, Tahoma, sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
}

body {
    font-family: var(--font-base);
    color: #334155;
    line-height: 1.55;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
li,
label,
th,
td,
small,
button,
input,
textarea,
select {
    font-family: var(--font-base);
}

.page-main {
    width: min(1100px, 100% - 32px);
    margin: 16px auto 0;
}

.section-title {
    width: fit-content;
    margin: 8px auto 18px;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #0f172a;
    position: relative;
    padding-bottom: 8px;
}

.section-title::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 58%;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #38bdf8, #0ea5e9);
}

.page-title {
    margin: 6px 0 8px;
    font-size: 1.45rem;
    color: #0f172a;
}

.page-subtitle,
.section-heading {
    color: #0f172a;
}

.page-main img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.field-label {
    display: inline-block;
    margin-bottom: 4px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
}

.field-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.92rem;
    background-color: #ffffff;
}

.field-control[type="file"] {
    padding: 8px;
}

textarea.field-control {
    resize: vertical;
}

.field-control:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
    outline: none;
}

.btn-primary {
    border: 1px solid #0284c7;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #f8fafc;
    font-size: 0.92rem;
    font-weight: 700;
    border-radius: 8px;
    padding: 9px 14px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-primary:hover,
.btn-primary:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(2, 132, 199, 0.25);
    filter: brightness(1.04);
    outline: none;
}

.site-header {
    background: linear-gradient(135deg, var(--header-bg), var(--header-bg-soft));
    border-bottom: 2px solid var(--accent);
    padding: 10px 16px;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    color: var(--text-main);
    text-decoration: none;
    text-align: left;
}

.brand-logo {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.7);
}

.brand h1 {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.2;
}

.main-nav {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--text-soft);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 6px 10px;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
    background-color: rgba(56, 189, 248, 0.2);
    color: var(--text-main);
}

.post-cards-grid {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
}

.post-card-link {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.post-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    border: 1px solid #d5dee8;
    border-radius: 12px;
    padding: 12px;
    background-color: #ffffff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.post-card-link:hover .post-card,
.post-card-link:focus-visible .post-card {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.post-card-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.post-card-content h3 {
    margin: 0 0 8px;
    color: #0f172a;
}

.post-card-content p {
    margin: 0;
    color: #334155;
}

.post-meta {
    margin-top: auto;
    padding: 8px 10px;
    border-left: 3px solid var(--accent);
    background-color: #f1f5f9;
    border-radius: 6px;
}

.post-meta small {
    display: block;
    color: #0f172a;
    line-height: 1.45;
}

.post-card-image-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
}

.post-card-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
}

.post-card-cta {
    align-self: flex-start;
    margin-top: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #075985;
    background: linear-gradient(135deg, #bae6fd, #e0f2fe);
    border: 1px solid #7dd3fc;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease;
}

.post-card-link:hover .post-card-cta,
.post-card-link:focus-visible .post-card-cta {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(14, 116, 144, 0.24);
    animation: ctaPulse 1s ease-in-out infinite alternate;
}

@keyframes ctaPulse {
    from {
        filter: brightness(1);
    }
    to {
        filter: brightness(1.08);
    }
}

.form-section {
    margin-top: 22px;
}

.form-layout {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: start;
}

.form-card {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 18px;
    border: 1px solid #d5dee8;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

.form-empty {
    min-height: 100%;
}

.form-card h2 {
    margin: 0 0 14px;
    font-size: 1.2rem;
    color: #0f172a;
}

.post-form {
    display: grid;
    gap: 12px;
}

.form-row {
    display: grid;
    gap: 6px;
}

.form-actions {
    margin-top: 2px;
}

.content-card {
    width: 100%;
    padding: 18px;
    border: 1px solid #d5dee8;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

.about-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 18px;
    align-items: start;
}

.about-figure {
    margin: 0;
}

.about-figure figcaption {
    margin-top: 8px;
    font-weight: 700;
    color: #0f172a;
}

.contact-section {
    margin-top: 10px;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 16px;
    align-items: start;
}

.contact-form {
    display: grid;
    gap: 10px;
}

.contact-media {
    display: flex;
    justify-content: center;
    align-items: center;
}

.post-article {
    margin-bottom: 14px;
}

.topic-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 18px;
    align-items: start;
}

.topic-media {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.comparison-section {
    margin-top: 14px;
}

.comparison-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.comparison-item {
    padding: 10px 12px;
    border: 1px solid #dbe5f0;
    border-radius: 10px;
    background-color: #f8fafc;
}

.item-heading {
    margin: 0 0 6px;
    color: #0f172a;
    font-size: 0.95rem;
}

.comparison-item p {
    margin: 0 0 4px;
    font-size: 0.9rem;
}

.comparison-item p:last-child {
    margin-bottom: 0;
}

.article-meta {
    margin: 14px 0 0;
    padding: 8px 10px;
    border-left: 3px solid var(--accent);
    background-color: #f1f5f9;
    border-radius: 6px;
}

.site-footer {
    background: linear-gradient(135deg, var(--header-bg-soft), var(--header-bg));
    border-top: 2px solid var(--accent);
    padding: 10px 16px;
    margin-top: 20px;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-soft);
    text-decoration: none;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.footer-link:hover,
.footer-link:focus-visible,
.footer-link.is-active {
    background-color: rgba(56, 189, 248, 0.2);
    color: var(--text-main);
}

.footer-note {
    margin: 0;
    color: var(--text-main);
    font-size: 0.9rem;
    text-align: center;
}

@media (max-width: 640px) {
    .brand h1 {
        font-size: 1rem;
    }

    .brand-logo {
        width: 42px;
        height: 42px;
    }

    .header-inner {
        justify-content: space-between;
    }

    .main-nav {
        justify-content: center;
    }

    .post-cards-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .form-layout {
        grid-template-columns: 1fr;
    }

    .form-empty {
        display: none;
    }

    .about-card,
    .contact-layout,
    .topic-layout,
    .comparison-list {
        grid-template-columns: 1fr;
    }

    .post-card-link {
        width: 90%;
        max-width: 90%;
        margin: 0 auto;
    }

    .post-card-image {
        width: 100%;
        max-width: 100%;
        max-height: none;
    }

    .footer-inner {
        justify-content: center;
    }
}

@media (min-width: 641px) and (max-width: 980px) {
    .post-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form-layout {
        grid-template-columns: 1fr;
    }

    .form-empty {
        display: none;
    }

    .about-card,
    .contact-layout,
    .topic-layout,
    .comparison-list {
        grid-template-columns: 1fr;
    }
}

