@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
    color-scheme: light dark;

    --primary: #1e293b;
    --accent: #0EA5E9;

    --background: #FFFFFF;
    --surface: #F8FAFC;
    --text: #0F172A;
    --text-muted: #64748B;
    --border: #E2E8F0;

    --font-sans: 'Outfit', sans-serif;
    --font-serif: 'Playfair Display', serif;

    --container: 1200px;
    --header-height: 90px;

}




@media (prefers-color-scheme: dark) {
    :root {
        --background: #0F172A;

        --surface: #1E293B;

        --text: #F8FAFC;

        --text-muted: #94A3B8;
        --border: #334155;
    }
}


[data-theme="dark"] {
    --background: #0B1120;
    --surface: #1E293B;
    --text: #F8FAFC;
    --text-muted: #94A3B8;
    --border: #334155;
}


[data-theme="dark"] select option {
    background-color: var(--surface);
    color: var(--text);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;

    width: 100%;
}

html {
    overflow-x: hidden;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

img {
    max-width: 100%;
    display: block;
}


header {
    height: var(--header-height);
    position: fixed;
    top: 0;

    left: 0;
    width: 100%;

    max-width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;

    padding: 0 20px;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.9);

    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid var(--border);
}


@media (prefers-color-scheme: dark) {
    header.scrolled {
        background: rgba(15, 23, 42, 0.9);

        border-bottom: 1px solid var(--border);
    }


    header.scrolled nav a {
        color: var(--text) !important;
    }
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}


.logo {
    display: block;
    height: 75px;

    display: flex;
    align-items: center;
}

.logo-img {
    height: 100%;
    width: auto;
    object-fit: contain;
    transition: opacity 0.3s ease;
}


nav ul {
    display: flex;
    gap: 32px;
    list-style: none;
}

nav a {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    color: var(--text);

}

nav a:hover {
    color: var(--accent) !important;
}


.hero-slider-container {
    position: relative;
    height: 100vh;
    min-height: 700px;
    overflow: hidden;
    background: #000;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out, visibility 1s;
    z-index: 0;
    display: flex;
    align-items: flex-end;
    padding-bottom: 100px;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}


.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 110%;

    z-index: -1;
    top: -5%;

    transition: transform 0.1s linear;

}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1);

}


.hero-slide.active .hero-content {
    opacity: 1;
    transform: translateY(0);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.85) 90%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;

    text-align: center;

    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 1, 0.3, 1);
    transition-delay: 0.3s;
}

.hero-content h1 {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 20px;
    margin-top: 10px;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-content .category-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: white;
    margin-bottom: 12px;
}

.hero-meta {
    display: flex;
    justify-content: center;

    gap: 12px;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
}


.slider-dots {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 10;
}

.dot {
    width: 4px;
    height: 30px;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 2px;
}

.dot.active,
.dot:hover {
    background: var(--accent);
    height: 50px;
}


@media (max-width: 768px) {
    .slider-dots {
        flex-direction: row;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        top: auto;
        bottom: 30px;
    }

    .dot {
        width: 30px;
        height: 4px;
    }

    .dot.active,
    .dot:hover {
        width: 50px;
        height: 4px;
    }

    .hero-slide {
        padding-bottom: 70px;
        align-items: flex-end;
    }
}


section {
    padding: 80px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
}

.section-header h2 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
}

.section-header .view-all {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
}

.card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card-image {
    aspect-ratio: 16/10;
    border-radius: 8px;
    overflow: hidden;
    background: var(--border);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-category {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    display: block;
}

.card h3 {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    margin-bottom: 12px;
    line-height: 1.3;
}

.card p {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


body.focus-mode {
    background: var(--background);

    color: var(--text);
}

/* Focus Mode Toolbar */
.focus-toolbar {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    padding: 8px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.toolbar-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 8px;
}

.focus-tool-btn {
    background: transparent;
    border: none;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.focus-tool-btn:hover {
    background: var(--border);
}

.toolbar-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
    margin: 0 4px;
}

.focus-exit-btn {
    border-radius: 50px;
    padding: 10px 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    margin: 0;
}

@media (max-width: 768px) {
    .focus-toolbar {
        bottom: 20px;
        right: 50%;
        transform: translateX(50%);
        width: 90vw;
        max-width: 400px;
        justify-content: space-between;
    }

    .exit-text {
        display: none;
    }

    .focus-exit-btn {
        padding: 10px 16px;
    }
}

/* Wide Spacing Modifier for Focus Mode */
.user-content.wide-spacing p,
.user-content.wide-spacing>div {
    line-height: 2.2 !important;
    margin-bottom: 1.8em !important;
}


@media (prefers-color-scheme: light) {
    body.focus-mode:not([data-theme="dark"]) {
        background: #fdfbf7;
        color: #2d2d2d;
    }
}

body.focus-mode header,
body.focus-mode footer {
    display: none !important;
}


body.focus-mode .post-hero {
    padding: 80px 0 40px;
    background: transparent !important;
}


body.focus-mode .post-hero .category-badge,
body.focus-mode .post-hero .post-meta,
body.focus-mode .post-hero figcaption {
    display: none !important;
}

body.focus-mode .post-hero h1 {
    margin-bottom: 0;
}

body.focus-mode .content {
    max-width: 720px;
    margin: 80px auto;
    font-size: 1.4rem;
    line-height: 1.9;
}


.content>p:first-of-type {
    text-indent: 0;

}

.content>p:first-of-type::first-letter {
    float: left;
    font-family: var(--font-serif);
    font-size: 5.5rem;
    line-height: 0.8;
    margin-right: 12px;

    padding-top: 10px;
    font-weight: 700;
    color: var(--text);

}


/* Apply to container and direct children to ensure everything is justified */
.content,
.user-content {
    text-align: justify !important;
    text-justify: inter-word;
    /* Improves justification quality */
}

/* Target Quill specific class */
.ql-align-justify {
    text-align: justify !important;
}

/* Ensure paragraph justification */
.content p,
.user-content p,
.user-content>div {
    margin-bottom: 1em;
    text-indent: 0 !important;
    line-height: 1.8;
    text-align: justify !important;
    hyphens: auto;
    -webkit-hyphens: auto;
    width: 100%;
    display: block;
}


.mobile-menu-trigger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-trigger span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--text);
    transition: all 0.3s ease;
}

header.scrolled .mobile-menu-trigger span {
    background-color: var(--text);
}


header:not(.scrolled) .mobile-menu-trigger.on-dark span {
    background-color: white;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--background);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu ul {
    list-style: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 0;
}

.mobile-menu a {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--text) !important;
}


@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }

    .mobile-menu-trigger {
        display: flex;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .hero {
        min-height: 80vh;
        padding-bottom: 60px;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .grid {
        display: grid;
        grid-template-columns: 1fr 1fr;

        gap: 16px;

    }


    .grid>article:first-child {
        grid-column: 1 / -1;
        margin-bottom: 12px;
    }


    .grid>article:not(:first-child) .card-content p,
    .grid>article:not(:first-child) .card-content .card-category {
        display: none;

    }

    .grid>article:not(:first-child) .card-image {
        aspect-ratio: 1/1;

        margin-bottom: 8px;

    }

    .grid>article:not(:first-child) h3 {
        font-size: 1rem;

        line-height: 1.3;
        margin-bottom: 0;
    }

    .grid>article:not(:first-child) .card-content {
        padding-top: 0;

    }

    .card-image {
        aspect-ratio: 16/9;
    }

    .container {
        padding: 0 20px;
    }
}



.main-footer {
    background: var(--primary);
    padding: 80px 0;
    color: white;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 80px;
    align-items: start;
}

.footer-brand {
    max-width: 400px;
}

.footer-logo {
    height: 60px;
    margin-bottom: 24px;
    display: block;
}

.footer-description {
    color: #94A3B8;
    font-size: 1rem;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    gap: 80px;
}

.footer-section h4 {
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-family: var(--font-sans);
    font-weight: 600;
}

.footer-email {
    color: #CBD5E1;
    font-size: 1rem;
}

.social-icons {
    display: flex;
    gap: 20px;
}

.social-icons a {
    color: white;
    font-size: 24px;
    transition: color 0.3s, transform 0.2s;
    display: inline-flex;
}

.social-icons a:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

.footer-bottom {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #64748B;
    font-size: 0.9rem;
}


@media (max-width: 768px) {
    .main-footer {
        padding: 60px 0;
        text-align: left;
    }

    .footer-content {
        display: flex;
        flex-direction: column;
        gap: 40px;
    }

    .footer-brand {
        max-width: 100%;
        text-align: left;
    }

    .footer-logo {
        height: 50px;
        width: auto;

        margin-bottom: 20px;
        display: inline-block;

    }

    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 40px;
        text-align: left;
    }

    .footer-section {
        text-align: left;
    }

    .social-icons {
        justify-content: flex-start;
        gap: 24px;
    }


    .footer-bottom {
        margin-top: 40px;
        text-align: left;
        font-size: 0.8rem;
    }
}


.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.meta-divider {
    color: var(--border);
    font-size: 0.7rem;
}

.meta-views {
    display: flex;
    align-items: center;
    gap: 4px;
}


.horizontal-scroll-wrapper {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding-bottom: 20px;
    -webkit-overflow-scrolling: touch;

    scrollbar-width: none;

}

.horizontal-scroll-wrapper::-webkit-scrollbar {
    display: none;

}

.horizontal-scroll-wrapper .card {
    min-width: 300px;
    max-width: 300px;
    flex-shrink: 0;
}


.small-card .card-content h3 {
    font-size: 1.2rem;

}

.small-card .card-image {
    aspect-ratio: 3/2;
}

@media (max-width: 768px) {
    .horizontal-scroll-wrapper .card {
        min-width: 260px;
        max-width: 260px;
    }
}


.scroll-nav {
    display: flex;
    gap: 12px;
}

.nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--card-bg);

    background-color: var(--surface);

    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.nav-btn ion-icon {
    font-size: 1.2rem;
}


/* ROBUST TEXT JUSTIFICATION OVERRIDE */
.ql-align-justify {
    text-align: justify !important;
}

.content,
.user-content {
    text-align: justify !important;
}

.content p,
.user-content p,
.user-content>div {
    margin-bottom: 1em;
    text-indent: 0 !important;
    line-height: 1.8;
    text-align: justify !important;
    hyphens: auto;
    -webkit-hyphens: auto;
    width: 100%;
    display: block;
}