:root{
    --paper:#fffaf8;
    --paper-strong:#ffffff;
    --ink:#241d24;
    --muted:#71656d;
    --purple:#4b1db7;
    --purple-2:#7654e8;
    --purple-soft:#eee8ff;
    --red:#e74747;
    --orange:#ff775f;
    --green:#3f7048;
    --blue:#234d6b;
    --pink:#ffdfe3;
    --cream:#fff2dc;
    --sky:#e7f4ff;
    --line:rgba(75,29,183,.16);
    --shadow:0 18px 55px rgba(69,40,70,.13);
    --shadow-hover:0 24px 65px rgba(69,40,70,.20);
    --radius:20px;
    --max:1080px;
}

*{box-sizing:border-box}

html{
    scroll-behavior:smooth;
    scroll-padding-top:95px;
}

body{
    margin:0;
    min-height:100vh;
    color:var(--ink);
    font-family:Georgia,"Times New Roman",serif;
    line-height:1.65;
    background:
        radial-gradient(circle at 8% 7%,rgba(255,255,255,.85),transparent 25rem),
        radial-gradient(circle at 92% 15%,rgba(255,235,244,.8),transparent 23rem),
        linear-gradient(135deg,#fcecf4 0%,#e9f5ff 52%,#f8f0ff 100%);
}

body.modal-open{overflow:hidden}

a,button,input,select{font:inherit}
button,a{ -webkit-tap-highlight-color:transparent }

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
.post-card:focus-visible{
    outline:3px solid rgba(118,84,232,.35);
    outline-offset:3px;
}

/* ---------- Site chrome ---------- */

.site-nav{
    width:min(calc(100% - 24px),var(--max));
    margin:12px auto 0;
    position:sticky;
    top:10px;
    z-index:1000;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    padding:11px 12px 11px 19px;
    background:rgba(255,255,255,.82);
    border:1px solid rgba(255,255,255,.95);
    border-radius:17px;
    box-shadow:0 12px 35px rgba(40,28,48,.13);
    backdrop-filter:blur(16px);
    -webkit-backdrop-filter:blur(16px);
}

.brand{
    display:flex;
    align-items:center;
    gap:10px;
    min-width:0;
    color:var(--ink);
    text-decoration:none;
}

.brand-name{
    color:#ed574b;
    font-weight:900;
    font-size:1.13rem;
    letter-spacing:.02em;
}

.brand-mark{
    width:46px;
    height:46px;
    flex:0 0 auto;
    display:grid;
    place-items:center;
    overflow:hidden;
    border-radius:16px;
    background:#fff;
    border:1.5px solid rgba(36,29,36,.15);
}

.brand-mark img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}


.menu-wrap{position:relative}

.menu-toggle{
    width:42px;
    height:42px;
    display:grid;
    place-items:center;
    color:#fff;
    background:var(--blue);
    border:0;
    border-radius:50%;
    cursor:pointer;
    transition:transform .18s ease,box-shadow .18s ease,background .18s ease;
}

.menu-toggle:hover{
    transform:translateY(-1px) rotate(2deg);
    background:#183b54;
    box-shadow:0 9px 23px rgba(35,77,107,.27);
}

.menu-toggle .close-icon{display:none}
.menu-toggle[aria-expanded="true"] .menu-icon{display:none}
.menu-toggle[aria-expanded="true"] .close-icon{display:block}

.menu-panel{
    position:absolute;
    top:calc(100% + 10px);
    right:0;
    width:min(320px,calc(100vw - 26px));
    max-height:70vh;
    overflow:auto;
    padding:10px;
    display:none;
    background:#fff;
    border:1px solid #ffae63;
    border-radius:15px;
    box-shadow:0 22px 55px rgba(45,28,50,.20);
}

.menu-panel.open{
    display:block;
    animation:menuIn .16s ease-out;
}

@keyframes menuIn{
    from{opacity:0;transform:translateY(-5px)}
    to{opacity:1;transform:translateY(0)}
}

.menu-link{
    display:block;
    padding:11px 12px;
    color:#566b30;
    font-weight:700;
    text-decoration:none;
    border-radius:10px;
    transition:background .16s ease,transform .16s ease;
}

.menu-link:hover{
    background:#ffefd9;
    transform:translateX(2px);
}

.menu-divider{
    height:1px;
    margin:2px 10px;
    background:rgba(255,174,99,.38);
}

/* ---------- Hero ---------- */

.shell{
    width:min(calc(100% - 24px),var(--max));
    margin:0 auto;
}

.hero{
    padding:72px 14px 34px;
    text-align:center;
}

.eyebrow{
    display:inline-flex;
    align-items:center;
    gap:8px;
    margin-bottom:15px;
    padding:7px 12px;
    color:var(--purple);
    background:rgba(255,255,255,.67);
    border:1px solid rgba(118,84,232,.18);
    border-radius:999px;
    font-size:.74rem;
    font-weight:900;
    letter-spacing:.13em;
    text-transform:uppercase;
}

.eyebrow-dot{
    width:7px;
    height:7px;
    background:var(--orange);
    border-radius:50%;
    box-shadow:0 0 0 4px rgba(255,119,95,.12);
}

.hero h1{
    margin:0;
    font-size:clamp(2.75rem,9vw,6.4rem);
    line-height:.88;
    letter-spacing:-.055em;
    font-weight:900;
    color:#211b21;
}

.hero-title-accent{
    display:block;
    color:var(--red);
}

.tagline{
    max-width:670px;
    margin:19px auto 0;
    color:#6d5662;
    font-family:"Brush Script MT","Segoe Script",cursive;
    font-size:clamp(1.12rem,3vw,1.42rem);
}

.hero-intro{
    max-width:720px;
    margin:18px auto 0;
    color:var(--muted);
    font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    font-size:.94rem;
}

/* ---------- Dashboard strip ---------- */

.info-strip{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:12px;
    margin:0 auto 34px;
}

.info-card{
    padding:16px 18px;
    background:rgba(255,255,255,.68);
    border:1px solid rgba(255,255,255,.9);
    border-radius:16px;
    box-shadow:0 9px 28px rgba(65,40,70,.08);
}

.info-value{
    color:var(--purple);
    font-size:1.5rem;
    font-weight:900;
    line-height:1;
}

.info-label{
    margin-top:5px;
    color:var(--muted);
    font-family:system-ui,-apple-system,"Segoe UI",sans-serif;
    font-size:.73rem;
    font-weight:800;
    letter-spacing:.06em;
    text-transform:uppercase;
}

/* ---------- Section ---------- */

.section-head{
    display:flex;
    align-items:end;
    justify-content:space-between;
    gap:20px;
    margin:0 0 19px;
    padding:19px 20px;
    background:rgba(255,220,220,.82);
    border-left:5px solid var(--red);
    border-right:5px solid var(--red);
    border-radius:14px;
    box-shadow:0 9px 26px rgba(110,40,70,.07);
}

.section-head h2{
    margin:0;
    font-size:clamp(1.25rem,4vw,1.7rem);
    line-height:1.15;
}

.section-head p{
    margin:4px 0 0;
    color:#7a5c65;
    font-family:system-ui,-apple-system,"Segoe UI",sans-serif;
    font-size:.82rem;
}

.section-kicker{
    color:var(--purple);
    font-size:.74rem;
    font-weight:900;
    letter-spacing:.09em;
    text-transform:uppercase;
}

/* ---------- Controls ---------- */

.controls{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:12px;
    margin-bottom:22px;
}

.search-box{
    position:relative;
}

.search-box svg{
    position:absolute;
    left:14px;
    top:50%;
    width:18px;
    height:18px;
    color:#817783;
    transform:translateY(-50%);
    pointer-events:none;
}

.search-input{
    width:100%;
    min-height:47px;
    padding:10px 15px 10px 42px;
    color:var(--ink);
    background:rgba(255,255,255,.84);
    border:1.5px solid rgba(75,29,183,.18);
    border-radius:13px;
    outline:none;
    font-family:system-ui,-apple-system,"Segoe UI",sans-serif;
    font-size:.92rem;
    transition:border-color .18s ease,box-shadow .18s ease;
}

.search-input:focus{
    border-color:var(--purple-2);
    box-shadow:0 0 0 4px rgba(118,84,232,.10);
}

.sort-select{
    min-height:47px;
    padding:8px 34px 8px 13px;
    color:var(--purple);
    background:rgba(255,255,255,.84);
    border:1.5px solid rgba(75,29,183,.18);
    border-radius:13px;
    font-weight:800;
    outline:none;
    cursor:pointer;
}

.filters{
    display:flex;
    gap:8px;
    overflow-x:auto;
    padding:2px 2px 9px;
    margin-bottom:22px;
    scrollbar-width:thin;
}

.filter{
    flex:0 0 auto;
    min-height:40px;
    padding:8px 15px;
    color:var(--purple);
    background:rgba(255,255,255,.78);
    border:1.5px solid var(--purple-2);
    border-radius:999px;
    font-size:.88rem;
    font-weight:800;
    cursor:pointer;
    transition:transform .16s ease,background .16s ease,color .16s ease,box-shadow .16s ease;
}

.filter:hover{
    transform:translateY(-1px);
    box-shadow:0 8px 18px rgba(118,84,232,.13);
}

.filter.active{
    color:#fff;
    background:var(--purple-2);
    box-shadow:0 8px 20px rgba(118,84,232,.20);
}

/* ---------- Feed ---------- */

.feed{
    display:grid;
    gap:20px;
}

.post-card{
    position:relative;
    padding:24px 25px 23px;
    background:rgba(255,250,248,.91);
    border:1.5px solid rgba(75,29,183,.48);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    cursor:pointer;
    transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease,background .22s ease;
}

.post-card:hover{
    transform:translateY(-5px);
    background:#fff8f5;
    border-color:rgba(75,29,183,.78);
    box-shadow:var(--shadow-hover);
}

.post-card:active{transform:translateY(-2px)}

.card-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:12px;
}

.category-badge{
    display:inline-flex;
    width:max-content;
    max-width:70%;
    padding:5px 10px;
    color:var(--purple);
    background:var(--purple-soft);
    border-radius:999px;
    font-size:.71rem;
    font-weight:900;
    letter-spacing:.06em;
    text-transform:uppercase;
}

.date{
    color:#c62e34;
    font-size:.76rem;
    font-weight:800;
    white-space:nowrap;
}

.post-card h3{
    margin:0 48px 10px 0;
    color:#211b21;
    font-size:clamp(1.35rem,4vw,1.78rem);
    line-height:1.15;
}

.excerpt{
    max-width:800px;
    margin:0 0 20px;
    color:var(--green);
    font-size:1rem;
}

.read-link{
    display:inline-flex;
    align-items:center;
    gap:7px;
    color:#073b68;
    font-weight:900;
    text-decoration:underline;
    text-underline-offset:4px;
}

.read-link span{
    display:inline-block;
    transition:transform .18s ease;
}

.post-card:hover .read-link span{transform:translateX(4px)}

.card-arrow{
    position:absolute;
    top:24px;
    right:25px;
    width:33px;
    height:33px;
    display:grid;
    place-items:center;
    color:var(--purple);
    background:#f3eeff;
    border-radius:50%;
    font-weight:900;
}

/* ---------- States ---------- */

.state{
    padding:38px 20px;
    text-align:center;
    background:rgba(255,250,248,.9);
    border:1.5px solid rgba(75,29,183,.45);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
}

.state h3{
    margin:0 0 6px;
    font-size:1.3rem;
}

.state p{
    margin:0 auto 17px;
    max-width:560px;
    color:var(--muted);
    font-family:system-ui,-apple-system,"Segoe UI",sans-serif;
    font-size:.9rem;
}

.loading-spinner{
    width:36px;
    height:36px;
    margin:0 auto 13px;
    border:3px solid #ddd5f4;
    border-top-color:var(--purple-2);
    border-radius:50%;
    animation:spin .8s linear infinite;
}

@keyframes spin{to{transform:rotate(360deg)}}

.retry{
    padding:9px 17px;
    color:#fff;
    background:var(--purple);
    border:0;
    border-radius:999px;
    font-weight:800;
    cursor:pointer;
}

/* ---------- Modal / reading experience ---------- */

.modal{
    position:fixed;
    inset:0;
    z-index:3000;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
    background:rgba(48,29,49,.42);
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
    opacity:0;
    pointer-events:none;
    transition:opacity .23s ease;
}

.modal.open{
    opacity:1;
    pointer-events:auto;
}

.modal-dialog{
    width:min(900px,100%);
    max-height:min(92vh,960px);
    overflow:auto;
    background:var(--paper);
    border:1.5px solid rgba(75,29,183,.55);
    border-radius:22px;
    box-shadow:0 30px 90px rgba(35,20,40,.30);
    transform:translateY(15px) scale(.985);
    transition:transform .23s ease;
}

.modal.open .modal-dialog{
    transform:translateY(0) scale(1);
}

.modal-header{
    position:sticky;
    top:0;
    z-index:2;
    display:flex;
    justify-content:flex-end;
    padding:15px 17px 0;
    pointer-events:none;
}

.close{
    width:40px;
    height:40px;
    display:grid;
    place-items:center;
    color:#fff;
    background:var(--purple-2);
    border:0;
    border-radius:50%;
    font-size:1.5rem;
    line-height:1;
    cursor:pointer;
    pointer-events:auto;
    box-shadow:0 8px 18px rgba(118,84,232,.25);
}

.article{
    padding:5px 48px 48px;
}

.article-meta{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:8px;
    margin:4px 0 12px;
    color:var(--purple);
    font-size:.73rem;
    font-weight:900;
    letter-spacing:.08em;
    text-transform:uppercase;
}

.article-title{
    margin:0 0 16px;
    font-size:clamp(2rem,6vw,3.4rem);
    line-height:1.03;
    letter-spacing:-.025em;
}

.article-caption{
    margin:0 0 28px;
    padding:15px 16px;
    color:var(--green);
    background:var(--pink);
    border-left:4px solid var(--red);
    border-radius:10px;
}

.article-image-wrap{
    width:100%;
    margin:0 0 30px;
    overflow:hidden;
    border-radius:18px;
    line-height:0;
}

.article-image{
    display:block;
    width:100%;
    height:auto;
    max-width:100%;
    max-height:70vh;
    margin:0 auto;
    border-radius:18px;
    object-fit:contain;
    object-position:center;
}

.article-image-wrap[hidden]{
    display:none;
}

.article-body{
    max-width:760px;
    color:#302a30;
    font-size:1.06rem;
    line-height:1.9;
    overflow-wrap:anywhere;
}

.article-body h3,
.article-body h4{
    color:var(--purple);
    line-height:1.25;
}

.article-body h3{font-size:1.45rem;margin:1.9em 0 .65em}
.article-body h4{font-size:1.18rem;margin:1.7em 0 .55em}

.article-body p{margin:0 0 1.1em}

.article-body pre{
    overflow:auto;
    padding:16px;
    color:#29222a;
    background:#fff;
    border:1px solid #d9d0ef;
    border-radius:12px;
    font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
    font-size:.88rem;
    line-height:1.55;
}

.article-body code{
    padding:2px 5px;
    background:#f0ebfa;
    border-radius:5px;
    font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
    font-size:.9em;
}

.article-body pre code{
    padding:0;
    background:none;
}

.article-body a{
    color:#073b68;
    text-underline-offset:3px;
}

/* ---------- Footer ---------- */

footer{
    width:min(calc(100% - 24px),var(--max));
    margin:72px auto 0;
    padding:0 10px 30px;
    text-align:center;
}

.footer-rule{
    border:0;
    border-top:1px solid rgba(0,0,0,.15);
    margin-bottom:21px;
}

.footer-links{
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:8px 20px;
    margin-bottom:12px;
}

.footer-links a{
    color:#073b68;
    font-size:.9rem;
    font-weight:800;
    text-decoration:underline;
    text-underline-offset:3px;
}

.footer-copy{
    margin:0;
    color:#746d73;
    font-family:system-ui,-apple-system,"Segoe UI",sans-serif;
    font-size:.78rem;
}

/* ---------- Responsive ---------- */

@media (max-width:760px){
    .hero{padding-top:55px}
    .info-strip{grid-template-columns:1fr 1fr}
    .info-card:last-child{grid-column:1/-1}
    .controls{grid-template-columns:1fr}
    .article{padding:4px 23px 34px}
}

@media (max-width:560px){
    .site-nav{
        width:calc(100% - 18px);
        margin-top:8px;
        top:6px;
    }

    .shell{width:calc(100% - 18px)}

    .hero{
        padding:47px 7px 27px;
    }

    .hero h1{font-size:clamp(2.55rem,16vw,4rem)}
    .hero-intro{font-size:.88rem}

    .info-strip{
        grid-template-columns:1fr 1fr;
        gap:8px;
    }

    .info-card{
        padding:14px;
    }

    .info-value{font-size:1.3rem}

    .section-head{
        display:block;
        padding:16px;
    }

    .section-kicker{
        display:block;
        margin-bottom:4px;
    }

    .post-card{
        padding:20px 18px;
    }

    .card-top{
        align-items:flex-start;
        flex-direction:column;
        gap:7px;
    }

    .category-badge{max-width:100%}
    .date{white-space:normal}
    .card-arrow{top:20px;right:18px}

    .post-card h3{
        margin-right:38px;
        font-size:1.35rem;
    }

    .excerpt{font-size:.95rem}

    .modal{
        padding:8px;
    }

    .modal-dialog{
        max-height:96vh;
        border-radius:16px;
    }

    .article{
        padding-left:18px;
        padding-right:18px;
    }

    .article-title{
        font-size:1.95rem;
    }

    .article-body{
        font-size:1rem;
        line-height:1.8;
    }
}

@media (prefers-reduced-motion:reduce){
    html{scroll-behavior:auto}
    *,*::before,*::after{
        animation-duration:.01ms!important;
        animation-iteration-count:1!important;
        transition-duration:.01ms!important;
    }
}
