:root {
    --primary-bg: #ffffff;
    --primary-text: #111827;
    --secondary-bg: #fef2f2;
    --secondary-text: #4b5563;
    --accent-color: #dc2626;
    --accent-text: #ffffff;
    --border-color: #fee2e2;
    --font-family: 'Plus Jakarta Sans', sans-serif;
    --headings-weight: 700;
    --body-weight: 400;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-weight: var(--body-weight);
    background-color: var(--primary-bg);
    color: var(--primary-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a,
a:hover,
a:focus {
    text-decoration: none;
    color: inherit;
    outline: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

img {
    max-width: 100%;
    display: block;
    height: auto;
}

ul,
ol {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: var(--headings-weight);
    line-height: 1.25;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

input:focus,
textarea:focus,
select:focus,
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    h1 {
        font-size: clamp(1.8rem, 5.5vw, 2.4rem);
    }

    h2 {
        font-size: clamp(1.5rem, 4.5vw, 1.85rem);
    }

    h3 {
        font-size: clamp(1.25rem, 3.8vw, 1.5rem);
    }

    h4 {
        font-size: clamp(1.1rem, 3vw, 1.25rem);
    }

    h5,
    h6 {
        font-size: 1rem;
    }

    .break-word-mobile {
        word-break: break-all;
        overflow-wrap: break-word;
    }
}

/* ===== header ===== */
#header {
    overflow-x: hidden;
}

.js-mobile-menu-overlay {
    background-color: var(--primary-bg);
}

/* ===== hero ===== */
#hero {
    background-color: var(--primary-bg);
    color: var(--primary-text);
    overflow-x: hidden;
}

.hero-badge {
    background-color: var(--secondary-bg);
    color: var(--accent-color);
    border: 1px solid var(--border-color);
}

.hero-title {
    color: var(--primary-text);
    hyphens: auto;
}

.hero-desc {
    color: var(--secondary-text);
}

.hero-cta {
    background-color: var(--accent-color);
    color: var(--accent-text);
    transition: all 0.3s ease-in-out;
}

.hero-cta:hover {
    opacity: 0.95;
    transform: translateY(-2px);
}

/* ===== featured_article ===== */
#featured {
    overflow-x: hidden;
}

#featured p {
    color: var(--secondary-text);
}

#featured h2,
#featured h3 {
    color: var(--primary-text);
}

#featured .js-progress-bar {
    transition: width 0.1s ease-out;
}

/* ===== latest_posts ===== */
.latest-posts-section {
    --primary-bg: #ffffff;
    --primary-text: #111827;
    --secondary-bg: #fef2f2;
    --secondary-text: #4b5563;
    --accent-color: #dc2626;
    --accent-text: #ffffff;
    --border-color: #fee2e2;
}

.latest-posts-heading {
    font-size: 16px;
    line-height: 1.2;
    hyphens: auto;
}

@media (min-width: 768px) {
    .latest-posts-heading {
        font-size: 32px;
        line-height: 1.3;
    }
}

.post-card-title {
    font-size: 14px;
    line-height: 1.2;
    hyphens: auto;
}

@media (min-width: 768px) {
    .post-card-title {
        font-size: 20px;
        line-height: 1.3;
    }
}

/* ===== articles_grid ===== */
.js-liked i {
    color: var(--accent-color) !important;
}

.js-liked span {
    color: var(--accent-color) !important;
}

button:focus-visible {
    outline: 2px solid var(--accent-color);
    border-radius: 4px;
}

/* ===== popular_posts ===== */
#popular {
    overflow-x: hidden;
}

#popular .hyphens-auto {
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
}

#popular .active-like {
    color: var(--accent-color) !important;
}

#popular .active-like i {
    color: var(--accent-color) !important;
}

/* ===== about_author ===== */
.hyphens-auto {
    hyphens: auto;
    -webkit-hyphens: auto;
}

/* ===== contact_form ===== */
#contact {
    position: relative;
    overflow-x: hidden;
}

.contact-heading {
    font-size: 1rem;
}

@media (min-width: 768px) {
    .contact-heading {
        font-size: 2rem;
    }
}

.contact-subheading {
    line-height: 1.6;
}

input.js-input::placeholder,
textarea.js-input::placeholder {
    color: #9ca3af;
}

.focus-active {
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}

/* ===== footer ===== */
#footer {
    background-color: var(--primary-bg);
    color: var(--primary-text);
    overflow-x: hidden;
}

#footer a {
    transition: color 0.2s ease-in-out;
}

#footer a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}