/*
Theme Name: NexiaMosaic
Theme URI: https://nexiamath.com/themes/nexia-mosaic
Author: Wonder World Host Limited
Author URI: https://nexiamath.com
Description: A bold arts and culture theme for independent magazines, exhibitions, criticism, and creative communities.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0.2
Requires PHP: 8.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nexia-mosaic
Domain Path: /languages
Tags: blog, news, portfolio, custom-logo, custom-menu, featured-images, footer-widgets, editor-style, wide-blocks, translation-ready
*/

:root {
    --shell: #fff4df;
    --ink: #182044;
    --muted: #626579;
    --primary: #e45534;
    --secondary: #2444d8;
    --accent: #f6c945;
    --card: #fffdf7;
    --line: #cfc5ad;
    --heading: Gill Sans Ultra Bold, Rockwell Extra Bold, Georgia, serif;
    --body: Avenir Next, Trebuchet MS, sans-serif;
    --shadow: 0 18px 55px color-mix(in srgb, var(--secondary) 13%, transparent);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body { margin: 0; color: var(--ink); background: var(--shell); font-family: var(--body); font-size: 17px; line-height: 1.65; }
body.admin-bar .site-header { top: 32px; }
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .2em; }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; vertical-align: middle; }
button, input, textarea, select, summary { font: inherit; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; z-index: 100000; top: 1rem; left: 1rem; width: auto; height: auto; clip: auto; padding: .75rem 1rem; background: #fff; color: #111; border: 3px solid var(--primary); }
:where(a, button, input, textarea, select, summary):focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.site-shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.site-header { position: sticky; z-index: 40; top: 0; background: color-mix(in srgb, var(--shell) 92%, white); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
.topbar { display: flex; justify-content: space-between; gap: 1rem; padding-top: .45rem; color: var(--muted); font-size: .76rem; }
.topbar strong, .topbar-symbol { font-weight: 950; letter-spacing: .12em; text-transform: uppercase; }
.topbar-symbol { margin-left: .55rem; padding: .18rem .48rem; border: 1px solid currentColor; border-radius: 999px; }
.header-main { min-height: 68px; display: flex; align-items: center; gap: 1rem; padding: .55rem 0; }
.site-branding { flex: 0 0 auto; min-width: 0; }
.brand-link { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 auto; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; font-weight: 950; }
.brand-copy { display: grid; gap: .02rem; }
.brand-name { font-family: var(--heading); font-size: clamp(1.35rem, 2.5vw, 2rem); line-height: 1; letter-spacing: -.035em; }
.brand-subtitle { color: var(--muted); font-size: .7rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.custom-logo-link { display: inline-flex; }
.custom-logo-link img { width: auto; max-width: 220px; max-height: 48px; }
.primary-nav { min-width: 0; flex: 1 1 auto; overflow: hidden; }
.primary-menu, .desktop-more-list, .mobile-menu-list, .footer-menu { margin: 0; padding: 0; list-style: none; }
.primary-menu { display: flex; justify-content: flex-end; align-items: center; gap: .2rem; white-space: nowrap; }
.primary-menu > li { flex: 0 0 auto; }
.primary-menu > li:nth-child(n+7) { display: none; }
.primary-nav a { display: inline-flex; min-height: 42px; align-items: center; padding: .55rem .72rem; border-radius: 999px; text-decoration: none; font-weight: 850; }
.primary-nav a:hover { background: color-mix(in srgb, var(--primary) 12%, transparent); }
.primary-nav .sub-menu { display: none; }
.header-tools { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.header-search, .desktop-more summary, .mobile-menu summary { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: .62rem .8rem; border: 1px solid var(--line); background: #fff; color: #17202a; text-decoration: none; cursor: pointer; font-weight: 900; }
.desktop-more, .mobile-menu { position: relative; }
.desktop-more summary, .mobile-menu summary { list-style: none; }
.desktop-more summary::-webkit-details-marker, .mobile-menu summary::-webkit-details-marker { display: none; }
.desktop-more summary::after { content: ' +'; }
.desktop-more[open] summary::after { content: ' -'; }
.desktop-more-panel { position: absolute; z-index: 80; top: calc(100% + .65rem); right: 0; width: min(520px, calc(100vw - 40px)); max-height: min(70vh, 620px); overflow: auto; padding: .8rem; border: 1px solid var(--line); background: #fff; color: #17202a; box-shadow: var(--shadow); }
.desktop-more-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
.desktop-more-list a, .mobile-menu-list a { display: flex; min-height: 46px; align-items: center; padding: .65rem .72rem; background: color-mix(in srgb, var(--shell) 78%, white); color: inherit; text-decoration: none; font-weight: 800; overflow-wrap: anywhere; }
.desktop-more-list .sub-menu, .mobile-menu-list .sub-menu { grid-column: 1 / -1; margin: .2rem 0 .4rem 1rem; padding: 0; list-style: none; }
.mobile-menu { display: none; }
.category-strip-wrap { overflow: hidden; }
.category-strip { display: flex; gap: .5rem; margin: 0; padding: .2rem 0 .7rem; overflow-x: auto; scrollbar-width: thin; }
.category-strip a { flex: 0 0 auto; padding: .38rem .65rem; border: 1px solid var(--line); background: color-mix(in srgb, var(--card) 90%, var(--shell)); text-decoration: none; font-size: .78rem; font-weight: 850; }
.home-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(290px, .9fr); gap: clamp(1rem, 3vw, 2.4rem); align-items: stretch; margin-block: clamp(1.2rem, 4vw, 3.2rem); padding: clamp(1.2rem, 4vw, 3rem); border: 1px solid var(--line); border-radius: 28px; background: var(--card); box-shadow: var(--shadow); }
.hero-intro, .hero-feature { min-width: 0; }
.hero-intro { display: flex; flex-direction: column; justify-content: center; }
.hero-kicker, .section-kicker, .entry-kicker { color: var(--primary); font-size: .72rem; font-weight: 950; letter-spacing: .14em; text-transform: uppercase; }
.hero-title, .entry-title, .archive-title { margin: .35rem 0 1rem; font-family: var(--heading); font-size: clamp(2.5rem, 6vw, 5.5rem); line-height: .94; letter-spacing: -.05em; text-wrap: balance; }
.hero-copy { max-width: 57ch; margin: 0; color: var(--muted); font-size: clamp(1rem, 1.8vw, 1.2rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.3rem; }
.button-link, .read-more, .search-submit, input[type='submit'] { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: .7rem 1rem; border: 0; border-radius: 999px; background: var(--secondary); color: #fff; cursor: pointer; text-decoration: none; font-weight: 900; }
.button-link.secondary { border: 1px solid var(--line); background: #fff; color: #17202a; }
.hero-metrics { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.hero-metrics span { padding: .4rem .65rem; border: 1px solid var(--line); border-radius: 999px; font-size: .75rem; font-weight: 850; }
.hero-feature { position: relative; overflow: hidden; padding: 1rem; border: 1px solid var(--line); border-radius: 22px; background: color-mix(in srgb, var(--shell) 55%, white); }
.hero-media { display: block; min-height: 260px; aspect-ratio: 4 / 3; overflow: hidden; background: linear-gradient(135deg, var(--primary), var(--secondary)); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-feature-title { margin: .8rem 0 .55rem; font-family: var(--heading); font-size: clamp(1.5rem, 3vw, 2.35rem); line-height: 1; letter-spacing: -.035em; }
.hero-feature-title a { text-decoration: none; }
.post-meta, .card-meta, .entry-meta { display: flex; flex-wrap: wrap; gap: .55rem; color: var(--muted); font-size: .82rem; font-weight: 750; }
.main-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: clamp(1.2rem, 3vw, 2.4rem); align-items: start; margin-block: 2rem 4rem; }
.content-stream, .sidebar { min-width: 0; }
.stream-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1rem; padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
.stream-heading h2 { margin: 0; font-family: var(--heading); font-size: clamp(1.65rem, 3vw, 2.7rem); line-height: 1; }
.stream-heading p { max-width: 30rem; margin: 0; color: var(--muted); font-size: .88rem; text-align: right; }
.stream-symbol, .footer-signature { color: var(--primary); font-size: .68rem; font-weight: 950; letter-spacing: .14em; text-transform: uppercase; }
.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.content-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: 0 12px 35px color-mix(in srgb, var(--secondary) 8%, transparent); }
.card-media { display: block; min-height: 220px; overflow: hidden; background: linear-gradient(135deg, var(--primary), var(--secondary)); }
.card-media img { width: 100%; height: 100%; min-height: 220px; object-fit: cover; transition: transform .3s ease; }
.content-card:hover .card-media img { transform: scale(1.025); }
.card-fallback { min-height: 220px; display: grid; place-items: center; color: #fff; font-family: var(--heading); font-size: 2rem; }
.card-body { padding: 1.1rem; }
.card-title { margin: .55rem 0; font-family: var(--heading); font-size: clamp(1.25rem, 2.2vw, 1.85rem); line-height: 1.04; letter-spacing: -.03em; }
.card-title a { text-decoration: none; }
.card-excerpt { color: var(--muted); }
.card-sequence { position: absolute; z-index: 4; top: .75rem; right: .75rem; display: grid; min-width: 2rem; min-height: 2rem; place-items: center; border-radius: 50%; background: var(--primary); color: #fff; font-size: .68rem; font-weight: 950; }
.pagination-wrap { grid-column: 1 / -1; }
.pagination, .nav-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.page-numbers, .post-page-numbers { padding: .48rem .7rem; border: 1px solid var(--line); background: #fff; color: #17202a; text-decoration: none; font-weight: 800; }
.sidebar { display: grid; gap: 1rem; align-content: start; position: sticky; top: 150px; }
.sidebar-panel, .widget { padding: 1rem; border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--card) 92%, var(--shell)); }
.sidebar-title, .widget-title { margin: 0 0 .75rem; font-family: var(--heading); font-size: 1.2rem; }
.sidebar-panel-intro p { color: var(--muted); }
.side-list { display: grid; gap: .7rem; margin: 0; padding: 0; list-style: none; }
.side-list a { display: grid; grid-template-columns: 2rem 1fr; gap: .6rem; align-items: start; text-decoration: none; font-weight: 800; }
.side-rank { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--primary); color: #fff; font-size: .7rem; }
.search-form { display: flex; gap: .45rem; }
.search-field { min-width: 0; width: 100%; padding: .72rem .85rem; border: 1px solid var(--line); background: #fff; color: #17202a; }
.entry-article, .page-content, .not-found { margin: 2rem auto 4rem; }
.entry-shell { width: min(840px, calc(100% - 40px)); margin: 0 auto; }
.entry-header { padding: 2rem 0 1.4rem; }
.entry-title, .archive-title { font-size: clamp(2.2rem, 5vw, 4.8rem); }
.featured-image { margin: 0 auto 2rem; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); }
.featured-image img { display: block; width: 100%; height: auto; margin-inline: auto; }
.entry-content { font-size: clamp(1.05rem, 1.6vw, 1.18rem); }
.entry-content > * { width: min(760px, calc(100% - 40px)); max-width: 760px; margin-left: auto; margin-right: auto; }
.entry-content > .alignwide { width: min(1040px, calc(100% - 40px)); max-width: 1040px; }
.entry-content > .alignfull { width: 100%; max-width: none; }
.entry-content img.alignnone, .entry-content .wp-block-image:not(.alignleft):not(.alignright) img, .entry-content p > img:only-child { display: block; margin-inline: auto; }
.entry-content h2, .entry-content h3 { font-family: var(--heading); line-height: 1.08; }
.entry-content p { margin-bottom: 1.15rem; text-wrap: pretty; }
.entry-footer { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.archive-hero { margin-block: 2rem; padding: 2rem; border: 1px solid var(--line); background: var(--card); }
.archive-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 2rem; margin-bottom: 4rem; }
.comments-area { margin-top: 2rem; }
.comment-list { padding-left: 1.2rem; }
.comment-list .bypostauthor > article { padding-left: 1rem; border-left: 4px solid var(--primary); }
.no-results, .not-found { padding: 2rem; border: 1px solid var(--line); background: var(--card); }
.site-footer { border-top: 1px solid var(--line); background: var(--secondary); color: #fff; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; padding-block: 2.2rem; }
.footer-brand { max-width: 46rem; }
.footer-brand strong { display: block; font-family: var(--heading); font-size: 1.65rem; }
.footer-brand p { color: color-mix(in srgb, white 72%, var(--accent)); }
.footer-menu { display: flex; flex-wrap: wrap; gap: .5rem; }
.footer-menu a { color: #fff; }
.footer-widgets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; padding-bottom: 1.5rem; }
.footer-widgets .widget { color: var(--ink); }

body.nexia-layout-mosaic-gallery { background: linear-gradient(135deg, rgb(36 68 216 / .08) 25%, transparent 25%) 0 0 / 80px 80px, #fff4df; }
.nexia-layout-mosaic-gallery .site-header { background: rgb(255 244 223 / .95); border-bottom: 4px solid var(--secondary); }
.nexia-layout-mosaic-gallery .brand-mark { border-radius: 6px 50% 50% 6px; transform: rotate(-5deg); }
.nexia-layout-mosaic-gallery .primary-nav a { border: 2px solid var(--ink); border-radius: 0; background: #fff; }
.nexia-layout-mosaic-gallery .category-strip a:nth-child(odd) { transform: rotate(-1deg); }
.nexia-layout-mosaic-gallery .home-hero { grid-template-columns: minmax(280px, .75fr) minmax(0, 1.25fr); border: 3px solid var(--ink); border-radius: 0; box-shadow: 14px 14px 0 var(--primary); }
.nexia-layout-mosaic-gallery .hero-intro { order: 2; background: var(--accent); }
.nexia-layout-mosaic-gallery .hero-feature { order: 1; border: 0; border-radius: 0; transform: rotate(-1deg); }
.nexia-layout-mosaic-gallery .main-layout { grid-template-columns: minmax(0, 1fr) 250px; }
.nexia-layout-mosaic-gallery .post-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: stretch; }
.nexia-layout-mosaic-gallery .content-card { grid-column: span 3; border: 2px solid var(--ink); border-radius: 0; box-shadow: 6px 6px 0 rgb(36 68 216 / .16); }
.nexia-layout-mosaic-gallery .content-card:nth-child(5n+1) { grid-column: span 4; }
.nexia-layout-mosaic-gallery .content-card:nth-child(5n+2) { grid-column: span 2; background: #fff0eb; }
.nexia-layout-mosaic-gallery .content-card:nth-child(5n+4) { transform: translateY(16px); }
.nexia-layout-mosaic-gallery .card-sequence { border-radius: 50%; background: var(--secondary); }
.nexia-layout-mosaic-gallery .sidebar-panel, .nexia-layout-mosaic-gallery .widget { border: 2px dashed var(--primary); border-radius: 0; background: #fffdf7; }

@media (max-width: 1260px) {
    .primary-menu > li:nth-child(n+5) { display: none; }
}
@media (max-width: 960px) {
    body.admin-bar .site-header { top: 46px; }
    .topbar { display: none; }
    .header-main { min-height: 66px; }
    .primary-nav, .desktop-more { display: none; }
    .mobile-menu { display: block; }
    .mobile-menu summary { gap: .5rem; }
    .mobile-menu-panel { position: fixed; z-index: 90; top: calc(env(safe-area-inset-top) + 74px); right: 14px; left: 14px; max-height: calc(100dvh - 90px); overflow: auto; padding: .8rem; border: 1px solid var(--line); background: #fff; color: #17202a; box-shadow: var(--shadow); }
    body.admin-bar .mobile-menu-panel { top: calc(env(safe-area-inset-top) + 120px); }
    .mobile-menu-list { display: grid; gap: .35rem; }
    .home-hero, .main-layout, .archive-grid { grid-template-columns: 1fr !important; }
    .hero-intro, .hero-feature { order: initial !important; }
    .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .content-card, .content-card:nth-child(n) { grid-column: auto !important; grid-template-columns: 1fr !important; transform: none !important; }
    .sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .site-shell, .entry-shell { width: min(100% - 28px, 1180px); }
    .brand-subtitle { display: none; }
    .brand-name { font-size: 1.2rem; }
    .brand-mark { width: 40px; height: 40px; }
    .header-search { display: none; }
    .home-hero { margin-top: 1rem; padding: 1rem; border-radius: 18px; }
    .hero-title { font-size: clamp(2.3rem, 14vw, 3.8rem); }
    .hero-actions { display: grid; }
    .hero-actions a { width: 100%; }
    .hero-media { min-height: 210px; }
    .stream-heading { align-items: flex-start; flex-direction: column; }
    .stream-heading p { text-align: left; }
    .post-grid { grid-template-columns: 1fr !important; }
    .sidebar { grid-template-columns: 1fr; }
    .entry-content > * { width: min(760px, calc(100% - 28px)); }
    .entry-content > .alignwide { width: min(1040px, calc(100% - 28px)); }
    .entry-content > .alignfull { width: 100%; }
    .footer-widgets { grid-template-columns: 1fr; }
    .search-form { flex-direction: column; }
}
@media (max-width: 390px) {
    .site-shell, .entry-shell { width: min(100% - 22px, 1180px); }
    .header-main { gap: .5rem; }
    .entry-content > * { width: min(760px, calc(100% - 22px)); }
    .entry-content > .alignwide { width: min(1040px, calc(100% - 22px)); }
    .entry-content > .alignfull { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
    .site-header, .site-footer, .sidebar, .hero-actions { display: none !important; }
    body { background: #fff !important; color: #000 !important; }
    .entry-shell, .entry-content > * { width: 100% !important; max-width: none !important; }
}
