/*
This stylesheet is heavily inspired by / stolen from Gwern's blog
Please visit https://gwern.net/ for the original stylesheet (and some incredible content).
*/

/* Font Face Declaration */
@font-face {
    font-family: "Goudy Initialen Regular";
    src: url("fonts/goudy-initialen.regular.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Basic CSS Variables */
:root {
    --GW-serif-font-stack: "Source Serif 4", "Apple Garamond", "Baskerville", "Libre Baskerville", "Droid Serif", "Times New Roman", "Times", serif, "Noto Emoji", "Quivira";
    --GW-sans-serif-font-stack: "Source Sans 3", "Lucida Sans Unicode", "Helvetica", "Trebuchet MS", sans-serif, "Noto Emoji", "Quivira";
    --GW-body-text-font-size: 20px;
    --GW-body-max-width: 935px;
    --GW-body-side-padding: 20px;
    --GW-body-background-color: #fff;
    --GW-body-text-color: #000;
    --GW-body-link-color: #000;
    --GW-body-link-hover-color: #551a8b;
    --GW-body-link-visited-color: #000;
    --GW-H2-border-color: #ccc;
    
    --base-font-size: var(--GW-body-text-font-size);
    --background-color: var(--GW-body-background-color);
}

@media all and (max-width: 649px) {
    :root {
        --GW-body-text-font-size: 18px;
        --GW-body-side-padding: 16px;
    }
}

/* Body styles */
body {
    background-color: var(--background-color);
    color: var(--GW-body-text-color);
    font-family: var(--GW-serif-font-stack);
    font-size: var(--base-font-size);
    max-width: var(--GW-body-max-width);
    padding: 0 var(--GW-body-side-padding);
    line-height: 1.6;
}

/* Article and header */
article {
    margin: 2em 0;
}

header h1 {
    font-size: 2.5em;
    margin: 1em 0 0.5em 0;
    text-align: center;
}

header h2 {
    font-size: 1.5em;
    margin: 1em 0 0.5em 0;
    text-align: center;
    margin-top: -20px;
    color: #666;
    font-weight: 400;
    line-height: 1em;
}

.section-break {
    display: block;
    margin: 1em auto;
    max-width: 500px;
    width: 100%;
    height: auto;
    padding-bottom: 50px;
}

/* markdownBody container */
.markdownBody {
    --base-block-spacing: 0.25em;
    --text-indent: 1.75em;
    --text-alignment: justify;
    --text-hyphenation: auto;
    --line-height: 1.60;
    position: relative;
}

/* TLDR paragraph styling */
.tldr {
    text-indent: 0 !important;
    font-style: italic;
    padding-bottom: 2em;
    font-family: 'Poppins', sans-serif;
    font-size: 0.8em;
}

.tldr em {
    font-weight: bold;
}

/* Final CTA Section */
.final-cta {
    padding: 4rem 0;
    margin: 3rem 0;
    text-align: center;
    border-radius: 8px;
}

.final-cta .container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}


.final-cta .cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.final-cta .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
    min-width: 0;
}

.final-cta .btn i {
    font-size: 1rem;
}

.final-cta .btn-primary {
    background-color: #555555;
    color: white !important;
}

.final-cta .btn-primary:hover {
    background-color: #ff6b35;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.4);
    color: white !important;
}

.final-cta .btn-secondary {
    background-color: transparent;
    color: #667eea !important;
    border: 2px solid #667eea !important;
}

.final-cta .btn-secondary:hover {
    background-color: #667eea !important;
    color: white !important;
    transform: translateY(-2px);
}

/* Mobile responsive for CTA */
@media (max-width: 768px) {
    .final-cta {
        padding: 3rem 0;
        margin: 2rem 0;
    }
    
    .final-cta h2 {
        font-size: 2rem;
    }
    
    .final-cta p {
        font-size: 1.1rem;
    }
    
    .final-cta .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .final-cta .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
        text-align: center;
        padding: 1rem 1.5rem;
    }
    
    .final-cta .btn i {
        flex-shrink: 0;
    }
}
/* 
@media all and (max-width: 649px) {
    .markdownBody {
        --line-height: 1.45;
        --text-alignment: left;
    }
} */

@media all and (max-width: 999px) {
    .markdownBody {
        --line-height: 1.50;
    }
}

@media all and (max-width: 1199px) {
    .markdownBody {
        --line-height: 1.55;
    }
}

/* Block spacing */
.markdownBody .block {
    margin-top: calc(var(--base-block-spacing) * var(--bsm));
}

/* Paragraphs */
.markdownBody p {
    -webkit-hyphens: var(--text-hyphenation);
    hyphens: var(--text-hyphenation);
    text-align: var(--text-alignment);
    line-height: var(--line-height);
    margin: 1em 0;
}

.markdownBody p:not(.first-graf) {
    text-indent: var(--text-indent);
}

.markdownBody p * {
    text-indent: 0em;
}

/* First paragraph special styling */
.markdownBody p.first-graf {
    text-indent: 0;
}

/* Drop cap for first paragraph */
.markdownBody p.first-graf:first-letter {
    float: left;
    font-size: 4.5em;
    line-height: 0.8;
    padding-top: 0.1em;
    padding-right: 0.15em;
    padding-left: 0.05em;
    margin-top: 0.05em;
    font-family: "Goudy Initialen Regular", serif;
    font-weight: normal;
    font-style: normal;
}

/* Headings */
.heading {
    display: flow-root;
    margin: 0;
    position: relative;
    line-height: 1;
}

@media all and (min-width: 1180px) {
    .heading {
        margin-left: calc(-1 * var(--base-font-size));
    }
}

/* H1 headings */
section.level1 > .heading {
    text-align: right;
    font-weight: 600;
    font-variant-caps: small-caps;
    letter-spacing: -0.75px;
    padding: 0 0.05em 0.025em calc(1.25 * var(--base-font-size));
    margin-bottom: 0.5em;
}

section > img {
    width: 100%;
}

section > .image-caption {
    text-align: center;
    font-style: italic;
    margin-bottom: 10px;
    margin-top: 40px;
}

section > .image-source {
    text-align: center;
    font-style: italic;
    margin-top: 0px;
    font-size: 0.75em;
}

@media all and (max-width: 1179px) {
    section.level1 > .heading {
        font-size: 1.75em;
    }
}

@media all and (min-width: 1180px) {
    section.level1 > .heading {
        font-size: 2em;
    }
}

section.level1 > .heading em {
    font-variant-caps: normal;
}

section.level1 > .heading em:last-child {
    padding-right: 0.075em;
}

/* Section styles */
section.level1 {
    margin: 2em 0;
}

/* Links */
.markdownBody a {
    color: var(--GW-body-link-color);
    text-decoration: underline dotted;
}

.markdownBody a:hover {
    color: var(--GW-body-link-hover-color);
}

.markdownBody a:visited {
    color: var(--GW-body-link-visited-color);
}

.markdownBody a:visited:hover {
    color: var(--GW-body-link-hover-color);
}

/* Emphasis */
em {
    font-style: italic;
}

strong {
    font-weight: bold;
}

/* Ensure visited links look the same as unvisited links */
a:visited {
    color: inherit;
}

/* Research Images Carousel Styling */
.research-images-swiper {
    width: 100%;
    position: relative;
}

.research-images-swiper .swiper-slide {
    text-align: center;
}

.research-images-swiper .swiper-button-next,
.research-images-swiper .swiper-button-prev {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 10;
}

.research-images-swiper .swiper-slide {
    text-align: center;
}

.research-images-swiper img {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    display: block;
}

.markdownBody .research-images-swiper .image-caption {
    margin-bottom: 1em !important;
    color: #333 !important;
    text-align: center !important;
    margin-top: 0 !important;
    font-style: italic !important;
}

.markdownBody .research-images-swiper .image-source {
    font-size: 0.8em !important;
    color: #666 !important;
    margin-top: 1em !important;
    line-height: 1.4 !important;
    text-align: center !important;
    margin-bottom: 0 !important;
}

.markdownBody .research-images-swiper .image-source a {
    font-size: 1em !important;
    color: #666 !important;
    margin-top: 1em !important;
    line-height: 1.4 !important;
    text-align: center !important;
    margin-bottom: 0 !important;
}

/* Override markdownBody link styles for carousel sources */
/*
.research-images-swiper .image-source a {
    color: #666 !important;
    text-decoration: none !important;
}

.research-images-swiper .image-source a:visited {
    color: #666 !important;
    text-decoration: none !important;
}

.research-images-swiper .image-source a:hover {
    color: #ff6b35 !important;
    text-decoration: underline !important;
}
*/
/* Swiper navigation and pagination */
.swiper-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    position: relative;
}

.swiper-pagination {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    margin: 0 !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .swiper-controls {
        gap: 6px;
        margin-top: 15px;
    }
}

/* Override Swiper CSS conflicts with responsive layout */
@media all and (max-width: 1199px) {
    .markdownBody .research-images-swiper {
        width: 100% !important;
        max-width: 800px !important;
        margin: 0 auto !important;
        overflow: visible !important;
    }
    
    .markdownBody .research-images-swiper .swiper-wrapper {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .markdownBody .research-images-swiper .swiper-slide {
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media all and (max-width: 799px) {
    .markdownBody .research-images-swiper {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 15px !important;
        box-sizing: border-box !important;
    }
    
    .markdownBody .research-images-swiper .swiper-wrapper {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .markdownBody .research-images-swiper .swiper-slide {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* CTA Button Styling */
.cta-container {
    text-align: center;
    margin: 2em 0;
}

.cta-button {
    display: inline-block;
    background-color: #333;
    color: white !important;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.cta-button:hover {
    background-color: #e55a2b;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.4);
}

.cta-button:visited {
    color: white !important;
}

