:root {
    --primary-blue: #0284c7;
    --deep-blue: #0f172a;
    --sky-blue: #38bdf8;
    --light-blue-tint: #f0f9ff;
    --pure-white: #ffffff;
    --border-color: #e2e8f0;
    --text-primary-dark: #0f172a;
    --text-secondary-muted: #475569;
    --text-light: #ffffff;
    --text-light-muted: #94a3b8;
}

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

html {
    scroll-behavior: smooth;
    font-family: 'Inter', sans-serif;
    background-color: var(--pure-white);
    color: var(--text-primary-dark);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    background-color: var(--pure-white);
    color: var(--text-primary-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1.25;
}

ul,
ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

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

:focus-visible {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    h1 {
        font-size: clamp(1.75rem, 5vw, 2.25rem);
    }

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

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

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

    h5 {
        font-size: clamp(1rem, 2.5vw, 1.1rem);
    }

    .url-string,
    .email-string,
    .code-string {
        word-break: break-all;
        font-size: 0.9em;
    }
}

.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--deep-blue);
    color: var(--text-light);
    border-top: 1px solid rgba(226, 232, 240, 0.2);
    z-index: 99999;
    padding: 1rem 1.25rem;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.25);
}

.cookie-consent-container {
    max-width: 1200px;
    margin: 0 auto;
}

.cookie-consent-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
}

@media (min-width: 768px) {
    .cookie-consent-content {
        flex-direction: row;
        align-items: center;
        gap: 2rem;
    }
}

.cookie-consent-text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-light-muted);
}

.cookie-consent-link {
    color: var(--sky-blue);
    text-decoration: underline;
}

.cookie-consent-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.cookie-btn-accept {
    background-color: var(--primary-blue);
    color: var(--pure-white);
}

.cookie-btn-customize {
    background-color: transparent;
    color: var(--text-light);
    border: 1px solid var(--border-color);
}

.cookie-consent-modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    padding: 1rem;
}

.cookie-consent-modal {
    background-color: var(--pure-white);
    color: var(--text-primary-dark);
    max-width: 520px;
    width: 100%;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.cookie-consent-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.cookie-consent-modal-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
}

.cookie-modal-close-btn {
    font-size: 1.5rem;
    line-height: 1;
    color: var(--text-secondary-muted);
}

.cookie-consent-modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.cookie-consent-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-consent-option-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cookie-consent-option-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.cookie-consent-option-desc {
    font-size: 0.825rem;
    color: var(--text-secondary-muted);
}

.cookie-toggle-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--primary-blue);
    cursor: pointer;
}

.cookie-consent-modal-footer {
    padding: 1rem 1.5rem;
    background-color: var(--light-blue-tint);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

/* ===== header_section ===== */
html {
    scroll-behavior: smooth;
}

#header {
    overflow: hidden;
}

.mobile-menu-overlay.open {
    display: flex !important;
}

/* ===== hero_section ===== */
#hero {
    overflow: hidden;
}

#hero * {
    box-sizing: border-box;
}

/* ===== latest_posts_section ===== */
#latest-posts {
    hyphens: auto;
}

#latest-posts .js-open-modal:focus,
#latest-posts .js-close-modal:focus {
    outline: 2px solid #0284c7;
    outline-offset: 2px;
}

/* ===== main_article_section ===== */
#main-article {
    overflow: hidden;
}

#main-article figure img {
    width: 100%;
    object-fit: cover;
}

/* ===== dna_and_genes_section ===== */
#dna-and-genes {
    overflow: hidden;
}

#dna-and-genes .js-edu-card {
    will-change: transform, box-shadow;
}

#dna-and-genes .js-edu-card:hover {
    transform: translateY(-4px);
}

/* ===== heredity_section ===== */
#heredity {
    hyphens: auto;
}

#heredity h2 {
    line-height: 1.25;
}

/* ===== genetic_tests_section ===== */
#genetic-tests {
    hyphens: auto;
    word-break: break-word;
}

#genetic-tests article {
    min-height: 100%;
}

/* ===== popular_genetics_section ===== */
#popular-genetics {
    word-break: normal;
    hyphens: auto;
}

#popular-genetics .container {
    width: 100%;
}

/* ===== research_discoveries_section ===== */
#research-discoveries {
    overflow: hidden;
}

#research-discoveries article {
    hyphens: auto;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

#research-discoveries article:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -10px rgba(15, 23, 42, 0.1);
}

#research-discoveries .js-open-research-modal:focus,
#research-discoveries .js-close-research-modal:focus {
    outline: 2px solid #0284c7;
    outline-offset: 2px;
}

/* ===== newsletter_section ===== */
#newsletter {
    overflow: hidden;
    hyphens: auto;
}

#newsletter input::placeholder {
    color: var(--text-light-muted, #94a3b8);
    opacity: 1;
}

#newsletter input:focus {
    border-color: var(--primary-blue, #0284c7);
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

/* ===== footer ===== */
#footer {
    overflow: hidden;
}

#footer a {
    text-decoration: none;
}
