/* --- Base tokens and theming --- */
:root {
    --md-primary: #3366e2;
    --md-on-primary: #ffffff;
    --md-surface: #fdfdfd;
    --md-on-surface: #1c1b1f;
    --md-surface-container: #f0f2f8;
    --md-outline: #6e7894;
    --md-chip-bg: #dde4f2;
    --md-chip-color: #334366;
    --md-line-color: #c3c5d8;
    --md-seconday-color: #4a5b9a;
    --font-display: system-ui, sans-serif;
    --shape-radius: 16px;
    --elevation-1: 0 1px 3px rgba(0, 0, 0, 0.1);
}
[data-theme="dark"] {
    --md-primary: #3366e2;
    --md-on-primary: #fff;
    --md-surface: #121212;
    --md-on-surface: #e6e1e3;
    --md-surface-container: #1e1e1e;
    --md-outline: #858ba0;
    --md-chip-bg: #2b2e3a;
    --md-chip-color: #e4e7f0;
    --md-line-color: #33343e;
}

*, *::before, *::after {
    box-sizing: border-box;
}
body {
    margin: 0;
    font-family: var(--font-display);
    background-color: var(--md-surface);
    color: var(--md-on-surface);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
header {
    background-color: var(--md-primary);
    color: var(--md-on-primary);
    height: 64px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: var(--elevation-1);
}

@media (max-width: 480px) {
    header {
        padding: 0 24px;
    }
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}
.header-title {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    flex: 1;
}

@media (max-width: 480px) {
    .header-title {
        font-size: 1rem;
    }
}

.icon {
    width: 24px;
    height: 24px;
    fill: var(--md-on-primary);
    cursor: pointer;
}
.theme-button {
    width: 36px;
    height: 36px;
    border: 1px solid var(--md-on-primary);
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    color: var(--md-on-primary); /* Makes SVG respond to theme */
}

.theme-button:hover {
    background-color: var(--md-seconday-color);
    border-color: var(--md-on-primary);
}

.theme-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}


.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 24px 16px;
    max-width: 100%;
    margin: auto;
    min-height: 544px;
}

.hero-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 56px;
    border-radius: var(--shape-radius);
    background: var(--md-surface-container);
}

.hero-image {
    width: 100%;
    height: 544px;
    overflow: hidden;
    border-radius: var(--shape-radius);
}

.hero-text h1 {
    font-size: 2.5rem;
    font-weight: 500;
    margin-bottom: 16px;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--md-outline);
}

.card-meta img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: var(--shape-radius);
    transition: transform 0.3s ease;
}

.hero-image:hover img {
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
    }
    .hero-text {
        padding: 0 48px 24px 48px;
    }
    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-image {
        height: unset;
    }

    .hero-image img {
        height: 60vw;
    }
}

@media (max-width: 600px) {
    .hero-text {
        padding: 0 32px 24px 32px;
    }

    .hero-text h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .hero-text {
        padding: 0 24px 24px 24px;
    }

    .hero-text h1 {
        font-size: 1.4rem;
    }

    .hero-image img {
        height: 70vw;
    }
}

main {
    max-width: 1200px;
    margin: 32px auto;
    padding: 0 16px;
    width: 100%;
}

.article-body {
    padding: 20px 0;
}

.article-body h1,
.article-body h2 {
    margin-top: 1.5rem;
    font-weight: 600;
}

.article-body h2 {
    width: 100%;
    font-weight: 500;
    max-width: 600px;
    font-size: 3rem;
    margin-bottom: 32px;
    color: var(--md-on-surface);

}

.article-body p {
    font-size:1rem;
    font-weight: 300;
    margin: 1rem 0;
    line-height: 1.4rem;
    width: 85%
}

@media (max-width: 480px) {

    .article-body p {
        width: 100%
    }
}

.article-body p.intro {
    font-size: 1.8rem;
    font-weight: 200;
    padding-bottom: 36px;
}

.article-body h2.intro {
    width: 100%;
    font-weight: 500;
    max-width: 600px;
    font-size: 3.5rem;
    margin-bottom: 48px;
    color: var(--md-on-surface);
}

@media (max-width: 760px) {
    .article-body h2.intro {
        font-size: 3rem;
        margin-bottom: 24px;
    }
}

@media (max-width: 600px) {
    .article-body h2.intro {
        font-size: 2.8rem;
        margin-bottom: 32px;
    }
}

@media (max-width: 480px) {
    .article-body h2.intro {
        font-size: 2.4rem;
        margin-bottom: 24px;
    }
}

.blog-entry {
    padding: 16px 0 48px 0;
}

.blog-entry h3 {
    width: 100%;
    font-weight: 500;
    max-width: 600px;
    font-size: 3rem;
    margin-bottom: 32px;
}

@media (max-width: 600px) {
    .blog-entry h3 {
        font-size: 2.4rem;
        margin-bottom: 24px;
    }
}

@media (max-width: 480px) {
    .blog-entry h3 {
        font-size: 2rem;
    }
}

img.blog-img {
    width: 100%;
    height: 45vw;
    max-height: 600px;
    object-fit: cover;
    display: block;
    margin: 48px 0 24px 0;
    border-radius: var(--shape-radius);
    transition: transform 0.3s ease;
}

img.blog-img:hover {
    transform: scale(1.02);
}

@media (max-width: 600px) {

    img.blog-img {
        height: 55vw;
    }
}

@media (max-width: 480px) {

    img.blog-img {
        height: 60vw;
    }
}

.card {
    background: var(--md-surface-container);
    border-radius: var(--shape-radius);
    box-shadow: var(--elevation-1);
    overflow: hidden;
    margin-bottom: 32px;
    animation: slide-up 0.4s ease;
}
.card-content {
    padding: 20px;
}
.comment {
    padding: 16px 0;
    border-top: 1px solid var(--md-line-color);
}
.comment:first-child {
    border-top: none;
}
.reply {
    margin-left: 40px;
    margin-top: 12px;
}
footer {
    background: var(--md-surface-container);
    color: var(--md-outline);
    padding: 32px 16px;
    text-align: center;
    font-size: 0.85rem;
}
footer nav a {
    color: var(--md-outline);
    margin: 0 12px;
    text-decoration: none;
    transition: color 0.3s ease;
}
footer nav a:hover {
    color: var(--md-primary);
}
footer .socials {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 12px 0;
}
footer .socials svg {
    width: 20px;
    height: 20px;
    fill: var(--md-outline);
    transition: fill 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}
footer .socials svg:hover {
    fill: var(--md-primary);
    transform: scale(1.2);
}

.responsive-video {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    margin: 48px 0 24px 0;
    border-radius: var(--shape-radius);
}

.responsive-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

img.banner {
    display: block;
    float: none;
    max-width: 332px;
    width: 100%;
    padding: 0 16px;
    margin: 24px auto 0 auto;
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}